private void ChangeText(object sender, RoutedEventArgs e) { var button = sender as ToggleButton; if (button?.IsChecked == null) { return; } var check = button.IsChecked.Value; _note.ChangeTextSettings(button.Name, StrikeToggle, UnderlineToggle, check); MultiText.Focus(); }