Exemple #1
0
        private static void OnFocusableChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ContentElement ce = (ContentElement)d;

            // Raise the public changed event.
            ce.RaiseDependencyPropertyChanged(UIElement.FocusableChangedKey, e);
        }
Exemple #2
0
        private static void OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ContentElement ce = (ContentElement)d;

            // Raise the public changed event.
            ce.RaiseDependencyPropertyChanged(UIElement.IsEnabledChangedKey, e);

            // Invalidate the children so that they will inherit the new value.
            ce.InvalidateForceInheritPropertyOnChildren(e.Property);

            // The input manager needs to re-hittest because something changed
            // that is involved in the hit-testing we do, so a different result
            // could be returned.
            InputManager.SafeCurrentNotifyHitTestInvalidated();
        }