void IUserInterfaceContext.GetNoteText(Action<string> onAcceptAction) { var noteTextVM = new NoteTextViewModel(); var noteTextView = new NoteTextView(noteTextVM); noteTextVM.RequestClose += (sender, args) => { if (args.Success && onAcceptAction != null) { onAcceptAction(noteTextVM.NoteText); } noteTextView.Close(); }; ShowDialog(noteTextView, true); }
public NoteTextView(NoteTextViewModel viewModel) { InitializeComponent(); DataContext = viewModel; }