using Stylet; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace StyletIntegrationTests.ShowDialogAndDialogResult { public class DialogViewModel : Screen { public BindableCollection> DesiredResult { get; private set; } public LabelledValue SelectedDesiredResult { get; set; } public DialogViewModel() { this.DisplayName = "ShowDialog and DialogResult"; this.DesiredResult = new BindableCollection>() { new LabelledValue("True", true), new LabelledValue("False", false), }; this.SelectedDesiredResult = this.DesiredResult[0]; } public void Close() { this.TryClose(this.SelectedDesiredResult.Value); } } }