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; } }
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"); } }
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(); }