/// <summary> /// This static initializer is used to override PropertyMetadata of the Visibility property so that it /// can be coerced according to the IsSuppressed property value. Suppressing an edge pointer will make /// it invisible to the user without altering the underlying value of the Visibility property. Thus, /// visibility can be controlled independently of other factors that may require making the pointer /// invisible to the user. For example, the HideEdgePointerByEdgeLength feature of EdgeControlBase may /// need to ensure the pointer is removed from view, but when the constraint is removed, it shouldn't /// cause pointers to be shown that weren't shown before. /// </summary> static DefaultEdgePointer() { var oldPmd = VisibilityProperty.GetMetadata(typeof(DefaultEdgePointer).BaseType); var newPmd = new PropertyMetadata(oldPmd.DefaultValue, oldPmd.PropertyChangedCallback, CoerceVisibility); VisibilityProperty.OverrideMetadata(typeof(DefaultEdgePointer), newPmd); }
static ProgressRing() { DefaultStyleKeyProperty.OverrideMetadata(typeof(ProgressRing), new FrameworkPropertyMetadata(typeof(ProgressRing))); VisibilityProperty.OverrideMetadata(typeof(ProgressRing), new FrameworkPropertyMetadata( new PropertyChangedCallback( (ringObject, e) => { if (e.NewValue != e.OldValue) { var ring = (ProgressRing)ringObject; //auto set IsActive to false if we're hiding it. if ((Visibility)e.NewValue != Visibility.Visible) { //sets the value without overriding it's binding (if any). ring.SetCurrentValue(ProgressRing.IsActiveProperty, false); } else { // #1105 don't forget to re-activate ring.IsActive = true; } } }))); }
static ProgressRing() { DefaultStyleKeyProperty.OverrideMetadata( typeof(ProgressRing), new FrameworkPropertyMetadata(typeof(ProgressRing))); VisibilityProperty.OverrideMetadata( typeof(ProgressRing), new FrameworkPropertyMetadata( new PropertyChangedCallback( (ringObject, e) => { if (e.NewValue != e.OldValue) { var ring = (ProgressRing)ringObject; if ((Visibility)e.NewValue != Visibility.Visible) { ring.SetCurrentValue(ProgressRing.IsActiveProperty, false); } else { ring.IsActive = true; } } }))); }
static RibbonTabItem() { DefaultStyleKeyProperty.OverrideMetadata(typeof(RibbonTabItem), new FrameworkPropertyMetadata(typeof(RibbonTabItem))); FocusableProperty.AddOwner(typeof(RibbonTabItem), new FrameworkPropertyMetadata(OnFocusableChanged, CoerceFocusable)); ToolTipProperty.OverrideMetadata(typeof(RibbonTabItem), new FrameworkPropertyMetadata(null, CoerceToolTip)); VisibilityProperty.AddOwner(typeof(RibbonTabItem), new FrameworkPropertyMetadata(OnVisibilityChanged)); }
static GameControlBase() { ClickEvent = GameControlService.ClickEvent.AddOwner(typeof(GameControlBase)); PreviewClickEvent = GameControlService.PreviewClickEvent.AddOwner(typeof(GameControlBase)); CommandProperty = GameControlService.CommandProperty.AddOwner(typeof(GameControlBase)); CommandParameterProperty = GameControlService.CommandParameterProperty.AddOwner(typeof(GameControlBase)); CommandTargetProperty = GameControlService.CommandTargetProperty.AddOwner(typeof(GameControlBase)); HasImageProperty = GameControlService.HasImageProperty.AddOwner(typeof(GameControlBase)); HasLabelProperty = GameControlService.HasLabelProperty.AddOwner(typeof(GameControlBase)); IdProperty = GameControlService.IdProperty.AddOwner(typeof(GameControlBase)); ImageSourceLargeProperty = GameControlService.ImageSourceLargeProperty.AddOwner(typeof(GameControlBase)); ImageSourceSmallProperty = GameControlService.ImageSourceSmallProperty.AddOwner(typeof(GameControlBase)); IsHighlightedProperty = GameControlService.IsHighlightedProperty.AddOwner(typeof(GameControlBase)); LabelProperty = GameControlService.LabelProperty.AddOwner(typeof(GameControlBase)); LabelTextTrimmingProperty = ThemeProperties.TextTrimmingProperty.AddOwner(typeof(GameControlBase)); LabelTextWrappingProperty = ThemeProperties.TextWrappingProperty.AddOwner(typeof(GameControlBase)); VariantSizeProperty = GameControlService.VariantSizeProperty.AddOwner( typeof(GameControlBase), new FrameworkPropertyMetadata( VariantSize.Medium, OnVariantSizePropertyValueChanged)); ContextProperty = GameControlService.ContextProperty.AddOwner( typeof(GameControlBase), new FrameworkPropertyMetadata(OnContextPropertyValueChanged)); VisibilityProperty.OverrideMetadata( typeof(GameControlBase), new FrameworkPropertyMetadata(VisibilityProperty.DefaultMetadata.DefaultValue, null, CoerceVisibility)); }
static InfoCardWindowControl() { DefaultStyleKeyProperty.OverrideMetadata( typeof(InfoCardWindowControl), new FrameworkPropertyMetadata(typeof(InfoCardWindowControl))); VisibilityProperty.OverrideMetadata( typeof(InfoCardWindowControl), new FrameworkPropertyMetadata(Visibility.Collapsed)); DropShadowColorProperty.OverrideMetadata( typeof(InfoCardWindowControl), new FrameworkPropertyMetadata(Color.FromArgb(0x38, 0, 0, 0))); HasDropShadowProperty.OverrideMetadata( typeof(InfoCardWindowControl), new FrameworkPropertyMetadata(true)); WindowStyleProperty.OverrideMetadata( typeof(InfoCardWindowControl), new FrameworkPropertyMetadata(WindowStyle.None)); ResizeModeProperty.OverrideMetadata( typeof(InfoCardWindowControl), new FrameworkPropertyMetadata(ResizeMode.NoResize)); }
/// <summary> /// Initialises static members of the <see cref="WizardItem"/> class. /// </summary> static WizardItem() { DefaultStyleKeyProperty.OverrideMetadata(typeof(WizardItem), new FrameworkPropertyMetadata(typeof(WizardItem))); VisibilityProperty.OverrideMetadata( typeof(WizardItem), new FrameworkPropertyMetadata(new PropertyChangedCallback(OnVisibilityChanged))); }
static LayoutAutoHideWindowControl() { DefaultStyleKeyProperty.OverrideMetadata(typeof(LayoutAutoHideWindowControl), new FrameworkPropertyMetadata(typeof(LayoutAutoHideWindowControl))); UIElement.FocusableProperty.OverrideMetadata(typeof(LayoutAutoHideWindowControl), new FrameworkPropertyMetadata(true)); Control.IsTabStopProperty.OverrideMetadata(typeof(LayoutAutoHideWindowControl), new FrameworkPropertyMetadata(true)); VisibilityProperty.OverrideMetadata(typeof(LayoutAutoHideWindowControl), new FrameworkPropertyMetadata(Visibility.Hidden)); }
public TextBox() { TextProperty = new BindableProperty <TextBox, string>(this, string.Empty); KeyboardControlProperty = new BindableProperty <TextBox, bool>(this); KeyboardControlProperty.OnPropertyChanged((t, orig, cur) => _needsKeyboardFocus = cur); MaxLength = int.MaxValue; VisibilityProperty.OnPropertyChanged((t, o, n) => { KeyboardControlProperty.Value = false; _hotControl = -1; }); //reset hot control when it goes invisible }
static ExtensionWindow() { VisibilityProperty.AddOwner(typeof(ExtensionWindow), new PropertyMetadata(OnVisibilityChanged)); DefaultStyleKeyProperty.OverrideMetadata( typeof(ExtensionWindow), new FrameworkPropertyMetadata(typeof(ExtensionWindow))); }
static Flyout() { DefaultStyleKeyProperty.OverrideMetadata(typeof(Flyout), new FrameworkPropertyMetadata(typeof(Flyout))); KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(Flyout), new FrameworkPropertyMetadata(KeyboardNavigationMode.Cycle)); ClipToBoundsProperty.OverrideMetadata(typeof(Flyout), new FrameworkPropertyMetadata(true)); VisibilityProperty.AddOwner(typeof(Flyout), new PropertyMetadata(Visibility.Collapsed, OnVisibilityPropertyChanged)); initializeCommand(); }
static UnreadTip() { DefaultStyleKeyProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(typeof(UnreadTip))); ClipToBoundsProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(true)); VisibilityProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(Visibility.Collapsed)); HeightProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(10.00)); WidthProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(15.00)); }
static Toast() { DefaultStyleKeyProperty.OverrideMetadata(typeof(Toast), new FrameworkPropertyMetadata(typeof(Toast))); VisibilityProperty.OverrideMetadata( typeof(Toast), new FrameworkPropertyMetadata(OnVisibilityPropertyChanged) ); }
/// <summary> /// Initializes static members of the RibbonContextualTabGroup class. Also /// overrides the default style. /// </summary> static RibbonContextualTabGroup() { DefaultStyleKeyProperty.OverrideMetadata(typeof(RibbonContextualTabGroup), new FrameworkPropertyMetadata(typeof(RibbonContextualTabGroup))); VisibilityProperty.OverrideMetadata(typeof(RibbonContextualTabGroup), new FrameworkPropertyMetadata(Visibility.Collapsed, new PropertyChangedCallback(OnVisibilityChanged), new CoerceValueCallback(CoerceVisibility))); FocusableProperty.OverrideMetadata(typeof(RibbonContextualTabGroup), new FrameworkPropertyMetadata(false)); #if RIBBON_IN_FRAMEWORK AutomationProperties.IsOffscreenBehaviorProperty.OverrideMetadata(typeof(RibbonContextualTabGroup), new FrameworkPropertyMetadata(IsOffscreenBehavior.FromClip)); #endif }
static IconFontControl() { OpacityProperty.OverrideMetadata(typeof(IconFontControl <TKind>), new UIPropertyMetadata(1.0, (d, e) => d.CoerceValue(SpinProperty))); VisibilityProperty.OverrideMetadata(typeof(IconFontControl <TKind>), new UIPropertyMetadata(Visibility.Visible, (d, e) => d.CoerceValue(SpinProperty))); }
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))); }
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 EditControlLayer() { DefaultStyleKeyProperty.OverrideMetadata(typeof(EditControlLayer), new FrameworkPropertyMetadata(typeof(EditControlLayer))); VisibilityProperty.OverrideMetadata(typeof(EditControlLayer), new FrameworkPropertyMetadata(VisibilityProperty.DefaultMetadata.DefaultValue, (d, e) => { d.SaftyInvoke <EditControlLayer>(o => o.TryEndEdit(Key.Escape)); })); }
static UIElement() { var uiElement = typeof(UIElement); VisibilityProperty.GetMetadata(uiElement).MergePropertyChangedCallback(ClearPointersStateIfNeeded); Windows.UI.Xaml.Controls.Control.IsEnabledProperty.GetMetadata(typeof(Windows.UI.Xaml.Controls.Control)).MergePropertyChangedCallback(ClearPointersStateIfNeeded); #if __WASM__ HitTestVisibilityProperty.GetMetadata(uiElement).MergePropertyChangedCallback(ClearPointersStateIfNeeded); #endif }
static UnreadTip() { DefaultStyleKeyProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(typeof(UnreadTip))); ClipToBoundsProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(true)); VisibilityProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(Visibility.Collapsed)); HeightProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(10.00)); WidthProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(15.00)); FontSizeProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(8.00)); BackgroundProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(new SolidColorBrush(Colors.Red))); }
/// <summary> /// Static constructor /// </summary> static RibbonTabItem() { DefaultStyleKeyProperty.OverrideMetadata(typeof(RibbonTabItem), new FrameworkPropertyMetadata(typeof(RibbonTabItem))); FocusableProperty.AddOwner(typeof(RibbonTabItem), new FrameworkPropertyMetadata(OnFocusableChanged, CoerceFocusable)); VisibilityProperty.AddOwner(typeof(RibbonTabItem), new FrameworkPropertyMetadata(OnVisibilityChanged)); KeyboardNavigation.DirectionalNavigationProperty.OverrideMetadata(typeof(RibbonTabItem), new FrameworkPropertyMetadata(KeyboardNavigationMode.Contained)); KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(RibbonTabItem), new FrameworkPropertyMetadata(KeyboardNavigationMode.Local)); AutomationProperties.IsOffscreenBehaviorProperty.OverrideMetadata(typeof(RibbonTabItem), new FrameworkPropertyMetadata(IsOffscreenBehavior.FromClip)); }
static OverlayWindow() { DefaultStyleKeyProperty.OverrideMetadata(typeof(OverlayWindow), new FrameworkPropertyMetadata(typeof(OverlayWindow))); AllowsTransparencyProperty.OverrideMetadata(typeof(OverlayWindow), new FrameworkPropertyMetadata(true)); WindowStyleProperty.OverrideMetadata(typeof(OverlayWindow), new FrameworkPropertyMetadata(WindowStyle.None)); ShowInTaskbarProperty.OverrideMetadata(typeof(OverlayWindow), new FrameworkPropertyMetadata(false)); ShowActivatedProperty.OverrideMetadata(typeof(OverlayWindow), new FrameworkPropertyMetadata(false)); VisibilityProperty.OverrideMetadata(typeof(OverlayWindow), new FrameworkPropertyMetadata(Visibility.Hidden)); }
/// <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); }
/// <summary> /// Instantiates global information. /// </summary> static DataGridRow() { VisibilityProperty.OverrideMetadata(typeof(DataGridRow), new FrameworkPropertyMetadata(null, OnCoerceVisibility)); DefaultStyleKeyProperty.OverrideMetadata(typeof(DataGridRow), new FrameworkPropertyMetadata(typeof(DataGridRow))); ItemsPanelProperty.OverrideMetadata(typeof(DataGridRow), new FrameworkPropertyMetadata(new ItemsPanelTemplate(new FrameworkElementFactory(typeof(DataGridCellsPanel))))); FocusableProperty.OverrideMetadata(typeof(DataGridRow), new FrameworkPropertyMetadata(false)); BackgroundProperty.OverrideMetadata(typeof(DataGridRow), new FrameworkPropertyMetadata(null, OnNotifyRowPropertyChanged, OnCoerceBackground)); BindingGroupProperty.OverrideMetadata(typeof(DataGridRow), new FrameworkPropertyMetadata(OnNotifyRowPropertyChanged)); // Set SnapsToDevicePixels to true so that this element can draw grid lines. The metadata options are so that the property value doesn't inherit down the tree from here. SnapsToDevicePixelsProperty.OverrideMetadata(typeof(DataGridRow), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsArrange)); }
/// <summary> /// Static constructor /// </summary> static RibbonTabItem() { DefaultStyleKeyProperty.OverrideMetadata(typeof(RibbonTabItem), new FrameworkPropertyMetadata(typeof(RibbonTabItem))); FocusableProperty.AddOwner(typeof(RibbonTabItem), new FrameworkPropertyMetadata(OnFocusableChanged, CoerceFocusable)); VisibilityProperty.AddOwner(typeof(RibbonTabItem), new FrameworkPropertyMetadata(OnVisibilityChanged)); ToolTipProperty.OverrideMetadata(typeof(RibbonTabItem), new FrameworkPropertyMetadata(null, CoerceToolTip)); System.Windows.Controls.ToolTipService.InitialShowDelayProperty.OverrideMetadata(typeof(RibbonTabItem), new FrameworkPropertyMetadata(2000)); KeyboardNavigation.DirectionalNavigationProperty.OverrideMetadata(typeof(RibbonTabItem), new FrameworkPropertyMetadata(KeyboardNavigationMode.Contained)); KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(RibbonTabItem), new FrameworkPropertyMetadata(KeyboardNavigationMode.Local)); }
static RibbonTabItem() { DefaultStyleKeyProperty.OverrideMetadata(typeof(RibbonTabItem), new FrameworkPropertyMetadata(typeof(RibbonTabItem))); // changing the visibility requires the RibbonBar to be rendered again, so ensure the correct metadata options to be set: VisibilityProperty.OverrideMetadata( typeof(RibbonTabItem), new FrameworkPropertyMetadata(Visibility.Visible, FrameworkPropertyMetadataOptions.AffectsParentArrange | FrameworkPropertyMetadataOptions.AffectsParentArrange | FrameworkPropertyMetadataOptions.AffectsParentMeasure | FrameworkPropertyMetadataOptions.AffectsRender)); }
public NotifyIcon() { VisibilityProperty.OverrideMetadata(typeof(NotifyIcon), new PropertyMetadata(OnVisibilityChanged)); Notification = new Forms.NotifyIcon { Text = Text, Visible = true, ContextMenu = new Forms.ContextMenu() }; Notification.MouseDown += OnMouseDown; Notification.MouseUp += OnMouseUp; Notification.MouseClick += OnMouseClick; Notification.MouseDoubleClick += OnMouseDoubleClick; }
static RibbonContextualTabGroupItemsControl() { Type ownerType = typeof(RibbonContextualTabGroupItemsControl); DefaultStyleKeyProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(ownerType)); ItemTemplateProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(null, OnNotifyPropertyChanged, CoerceItemTemplate)); ItemContainerStyleProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(null, OnNotifyPropertyChanged, CoerceItemContainerStyle)); VisibilityProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(null, new CoerceValueCallback(CoerceVisibility))); FocusableProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(false)); FrameworkElementFactory factory = new FrameworkElementFactory(typeof(RibbonContextualTabGroupsPanel)); ItemsPanelTemplate itemsPanel = new ItemsPanelTemplate(factory); itemsPanel.Seal(); ItemsPanelProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(itemsPanel)); }
static RibbonTab() { Type ownerType = typeof(RibbonTab); IsEnabledProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(new PropertyChangedCallback(OnIsEnabledChanged))); DefaultStyleKeyProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(ownerType)); ItemsPanelProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(new ItemsPanelTemplate(new FrameworkElementFactory(typeof(RibbonGroupsPanel))))); HeaderProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(new PropertyChangedCallback(OnHeaderChanged))); VisibilityProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(Visibility.Visible, new PropertyChangedCallback(OnVisibilityChanged), new CoerceValueCallback(CoerceVisibility))); HeaderTemplateProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(new PropertyChangedCallback(OnNotifyHeaderPropertyChanged), new CoerceValueCallback(CoerceHeaderTemplate))); HeaderTemplateSelectorProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(new PropertyChangedCallback(OnNotifyHeaderPropertyChanged))); HeaderStringFormatProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(new PropertyChangedCallback(OnNotifyHeaderPropertyChanged))); FocusableProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(false)); EventManager.RegisterClassHandler(ownerType, KeyTipService.ActivatingKeyTipEvent, new ActivatingKeyTipEventHandler(OnActivatingKeyTipThunk)); EventManager.RegisterClassHandler(ownerType, KeyTipService.KeyTipAccessedEvent, new KeyTipAccessedEventHandler(OnKeyTipAccessedThunk)); KeyTipService.KeyTipProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(new PropertyChangedCallback(OnKeyTipChanged))); }
static RibbonTabHeader() { Type ownerType = typeof(RibbonTabHeader); IsEnabledProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(null, new CoerceValueCallback(OnCoerceIsEnabled))); DefaultStyleKeyProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(ownerType)); VisibilityProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(null, new CoerceValueCallback(CoerceVisibility))); ToolTipService.ShowOnDisabledProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(true)); StyleProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(OnNotifyPropertyChanged, CoerceStyle)); ContentProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(OnNotifyPropertyChanged, CoerceContent)); ContentTemplateProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(OnNotifyPropertyChanged, CoerceContentTemplate)); ContentTemplateSelectorProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(OnNotifyPropertyChanged, CoerceContentTemplateSelector)); ContentStringFormatProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(OnNotifyPropertyChanged, CoerceStringFormat)); KeyTipService.KeyTipProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(null, new CoerceValueCallback(CoerceKeyTip))); EventManager.RegisterClassHandler(ownerType, KeyTipService.ActivatingKeyTipEvent, new ActivatingKeyTipEventHandler(OnActivatingKeyTipThunk)); EventManager.RegisterClassHandler(ownerType, KeyTipService.KeyTipAccessedEvent, new KeyTipAccessedEventHandler(OnKeyTipAccessedThunk)); }