コード例 #1
0
        public static FocusManagerBase GetFocusManager(DependencyObject obj)
        {
            if (obj == null)
            {
                return(null);
            }

            FocusManagerBase focusManager = (FocusManagerBase)obj.GetValue(FocusManagerProperty);

            if (focusManager == null)
            {
                return(GetFocusManager(VisualTreeHelper.GetParent(obj)));
            }

            return(focusManager);
        }
コード例 #2
0
 public static void SetFocusManager(DependencyObject obj, FocusManagerBase value)
 {
     obj.SetValue(FocusManagerProperty, value);
 }
コード例 #3
0
 public FocusUpdatesSuppressor(FocusManagerBase suppressedFocusManager)
 {
     this.suppressedFocusManager           = suppressedFocusManager;
     suppressedFocusManager.CanUpdateFocus = false;
 }