Exemplo n.º 1
0
 private void MyListButton_IsCheckedChanged(Microsoft.UI.Xaml.Controls.ToggleSplitButton sender, Microsoft.UI.Xaml.Controls.ToggleSplitButtonIsCheckedChangedEventArgs args)
 {
     if (sender.IsChecked)
     {
         //add bulleted list
         myRichEditBox.Document.Selection.ParagraphFormat.ListType = _type;
     }
     else
     {
         //remove bulleted list
         myRichEditBox.Document.Selection.ParagraphFormat.ListType = MarkerType.None;
     }
 }
Exemplo n.º 2
0
 private void ToggleSplitButton_IsCheckedChanged(MUXC.ToggleSplitButton sender, MUXC.ToggleSplitButtonIsCheckedChangedEventArgs args)
 {
     // Use the toggle button to turn the selected list style on or off.
     if (((MUXC.ToggleSplitButton)sender).IsChecked)
     {
         // On. Apply the list style selected in the drop down to the selected text.
         var listStyle = ((FrameworkElement)(ListStylesListView.SelectedItem))?.Tag.ToString();
         ApplyListStyle(listStyle);
     }
     else
     {
         // Off. Make the selected text not a list,
         // but don't change the list style selected in the drop down.
         ApplyListStyle("none");
     }
 }
Exemplo n.º 3
0
 private void CategoryButton_IsCheckedChanged(Microsoft.UI.Xaml.Controls.ToggleSplitButton sender, Microsoft.UI.Xaml.Controls.ToggleSplitButtonIsCheckedChangedEventArgs args)
 {
     SearchBox.Text = "";
     if (sender.IsChecked)
     {
         // Filter is enabled
         FilterByCategory();
     }
     else
     {
         // Filter is disabled
         Projects = new ObservableCollection <Project>(AllProjects);
         // Must call Sort() here because FilterByCategory() won't
         // do it for us in this branch
         Sort();
     }
     Bindings.Update();
 }