protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) { string text = ((System.Windows.FrameworkElement)e.OriginalSource).DataContext.ToString(); this.OnClickHandler(this, SetFontFormatEventArgs <object> .SetFontFormat(text)); base.OnMouseLeftButtonDown(e); }
private void Item_OnClickHandler(object sender, SetFontFormatEventArgs <object> e) { MyComboBoxItem item = sender as MyComboBoxItem; this.SetFontFormatHandler(this, SetFontFormatEventArgs <object> .SetFontFormat(item.Content)); }
private void SetDefaultButton_Click(object sender, RoutedEventArgs e) { this.SetDefaultHandler(this, SetFontFormatEventArgs <object> .SetFontFormat(this.SelectedItem)); this.IsDropDownOpen = false; }