/// <inheritdoc /> protected override void InitCommands() { base.InitCommands(); ShowMessageCommand = new RelayCommand( () => { MessageBox.Show($"I'm a message box with owner {AssociatedView.GetHashCode()}."); }); }
/// <summary> /// Can be used to close the window which holds the data context to this type. /// </summary> protected void CloseWindow() { AssociatedView?.Close(); }
/// <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(); }