Advertisement
Tosker

WPFDialog Part 2 - AlertDialogVM

Jul 26th, 2018
950
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  1.     public class AlertDialogViewModel : DialogViewModelBase<DialogResults>
  2.     {
  3.         public ICommand OKCommand { get; private set; }
  4.  
  5.         public AlertDialogViewModel(string title, string message) : base(title, message)
  6.         {
  7.             OKCommand = new RelayCommand<IDialogWindow>(OK);
  8.         }
  9.  
  10.         private void OK(IDialogWindow window)
  11.         {
  12.             CloseDialogWithResult(window, DialogResults.Undefined);
  13.         }
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement