public DialogYesNo(string msg, Action yes) { InitializeComponent(); DataContext = new YesNoViewModel(msg, yes) { Close = () => this.Close() }; }
public void ConstructorsAndPropertiesTest() { var yes = new YesNoViewModel("message", "heading"); Assert.AreEqual("message", yes.Message); Assert.AreEqual("heading", yes.Heading); Assert.IsNotNull(yes.NoCommand); Assert.IsNotNull(yes.YesCommand); }
public YesNoWindow(string msg, string sub, string question) { InitializeComponent(); ViewModel = new YesNoViewModel(); ViewModel.MainMessage = msg; ViewModel.SubMessage = sub; ViewModel.Question = question; DataContext = ViewModel; }
/// <summary> /// Create a new instance of this class /// </summary> public YesNoDialog() { InitializeComponent(); DataContext = new YesNoViewModel(); }