private void Editor_TextChanged(object sender, RoutedEventArgs e) { editor.Document.GetText(Windows.UI.Text.TextGetOptions.FormatRtf, out string rtf); editor.Document.GetText(Windows.UI.Text.TextGetOptions.None, out string text); NoteViewModel.NoteContent = new Models.ContentModel(rtf, text); NoteViewModel.FirePropertyChanged(nameof(NoteViewModel.NoteContent)); }
/// <summary> /// Executes the command. /// </summary> /// <param name="parameter"></param> public void Execute(object parameter) { // Notify that the edit mode value has changed vm.EditMode = false; vm.FirePropertyChanged(nameof(vm.EditMode)); // Notify the command bar to hide vm.FirePropertyChanged(nameof(vm.EditorCommandsVisibility)); // Notify that the read only value has changed vm.ReadOnly = true; vm.FirePropertyChanged(nameof(vm.ReadOnly)); FireCanExecuteChanged(); vm.EditCommand.FireCanExecuteChanged(); }