static RibbonTabControl() { var type = typeof(RibbonTabControl); DefaultStyleKeyProperty.OverrideMetadata(type, new FrameworkPropertyMetadata(typeof(RibbonTabControl))); ContextMenuService.Attach(type); PopupService.Attach(type); }
static RibbonGroupBox() { DefaultStyleKeyProperty.OverrideMetadata(typeof(RibbonGroupBox), new FrameworkPropertyMetadata(typeof(RibbonGroupBox))); VisibilityProperty.AddOwner(typeof(RibbonGroupBox), new PropertyMetadata(OnVisibilityChanged)); PopupService.Attach(typeof(RibbonGroupBox)); ContextMenuService.Attach(typeof(RibbonGroupBox)); }
static RibbonGroupBox() { DefaultStyleKeyProperty.OverrideMetadata(typeof(RibbonGroupBox), new FrameworkPropertyMetadata(typeof(RibbonGroupBox))); VisibilityProperty.AddOwner(typeof(RibbonGroupBox), new FrameworkPropertyMetadata(OnVisibilityChanged)); ContextMenuProperty.AddOwner(typeof(RibbonGroupBox), new FrameworkPropertyMetadata(null, OnContextMenuChanged, CoerceContextMenu)); PopupService.Attach(typeof(RibbonGroupBox)); StyleProperty.OverrideMetadata(typeof(RibbonGroupBox), new FrameworkPropertyMetadata(null, new CoerceValueCallback(OnCoerceStyle))); }
/// <summary> /// Initializes static members of the <see cref="RibbonTabControl"/> class. /// </summary> static RibbonTabControl() { var type = typeof(RibbonTabControl); DefaultStyleKeyProperty.OverrideMetadata(type, new FrameworkPropertyMetadata(typeof(RibbonTabControl))); IsTabStopProperty.OverrideMetadata(type, new FrameworkPropertyMetadata(BooleanBoxes.FalseBox)); KeyboardNavigation.DirectionalNavigationProperty.OverrideMetadata(type, new FrameworkPropertyMetadata(KeyboardNavigationMode.Contained)); ContextMenuService.Attach(type); PopupService.Attach(type); }
static ComboBox() { var type = typeof(ComboBox); ToolTipService.Attach(type); PopupService.Attach(type); ContextMenuService.Attach(type); DefaultStyleKeyProperty.OverrideMetadata(type, new FrameworkPropertyMetadata(type)); SelectedItemProperty.OverrideMetadata(type, new FrameworkPropertyMetadata(OnSelectionItemChanged, CoerceSelectedItem)); }
/// <summary> /// Initializes static members of the <see cref="RibbonGroupBox"/> class. /// </summary> static RibbonGroupBox() { var type = typeof(RibbonGroupBox); DefaultStyleKeyProperty.OverrideMetadata(type, new FrameworkPropertyMetadata(type)); VisibilityProperty.AddOwner(type, new PropertyMetadata(OnVisibilityChanged)); FontSizeProperty.AddOwner(type, new FrameworkPropertyMetadata(OnFontSizeChanged)); FontFamilyProperty.AddOwner(type, new FrameworkPropertyMetadata(OnFontFamilyChanged)); PopupService.Attach(type); ContextMenuService.Attach(type); }
static DropDownButton() { var type = typeof(DropDownButton); DefaultStyleKeyProperty.OverrideMetadata(type, new FrameworkPropertyMetadata(type)); System.Windows.Controls.ToolTipService.IsEnabledProperty.OverrideMetadata(typeof(DropDownButton), new FrameworkPropertyMetadata(null, CoerceToolTipIsEnabled)); KeyboardNavigation.ControlTabNavigationProperty.OverrideMetadata(type, new FrameworkPropertyMetadata(KeyboardNavigationMode.Once)); KeyboardNavigation.DirectionalNavigationProperty.OverrideMetadata(type, new FrameworkPropertyMetadata(KeyboardNavigationMode.Cycle)); ToolTipService.Attach(type); PopupService.Attach(type); ContextMenuService.Attach(type); }