Example #1
0
 /// <inheritdoc />
 protected override void InitCommands()
 {
     base.InitCommands();
     ShowMessageCommand = new RelayCommand(
         () =>
     {
         MessageBox.Show($"I'm a message box with owner {AssociatedView.GetHashCode()}.");
     });
 }
Example #2
0
 /// <summary>
 /// Can be used to close the window which holds the data context to this type.
 /// </summary>
 protected void CloseWindow()
 {
     AssociatedView?.Close();
 }
Example #3
0
 /// <summary>
 /// Can be used to close the window which holds the data context to this type.
 /// </summary>
 /// <param name="dialogResult">
 /// The dialog result which should be passed to the <see cref="AssociatedView" /> before it's
 /// closed.
 /// </param>
 protected void CloseWindow(bool?dialogResult)
 {
     AssociatedView.DialogResult = dialogResult;
     AssociatedView?.Close();
 }