Пример #1
0
 private static void UpdateHandlers(DependencyObject d)
 {
     IsVisibleChangedEventManager.UpdateHandler((UIElement)d, OnAdornedElementChanged);
     LoadedEventManager.UpdateHandler((UIElement)d, OnAdornedElementChanged);
     UnloadedEventManager.UpdateHandler((UIElement)d, OnAdornedElementChanged);
     SizeChangedEventManager.UpdateHandler((FrameworkElement)d, OnSizeChanged);
 }
Пример #2
0
 private static void OnTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
 {
     IsVisibleChangedEventManager.UpdateHandler((UIElement)d, OnAdornedElementChanged);
     LoadedEventManager.UpdateHandler((UIElement)d, OnAdornedElementChanged);
     UnloadedEventManager.UpdateHandler((UIElement)d, OnAdornedElementChanged);
     SizeChangedEventManager.UpdateHandler((FrameworkElement)d, OnSizeChanged);
     UpdateIsShowing(d);
 }
Пример #3
0
 private static void UpdateHandlers(TextBoxBase textBox)
 {
     IsVisibleChangedEventManager.UpdateHandler(textBox, OnAdornedElementChanged);
     LoadedEventManager.UpdateHandler(textBox, OnAdornedElementChanged);
     UnloadedEventManager.UpdateHandler(textBox, OnAdornedElementChanged);
     GotKeyboardFocusEventManager.UpdateHandler(textBox, OnAdornedElementChanged);
     LostKeyboardFocusEventManager.UpdateHandler(textBox, OnAdornedElementChanged);
     TextChangedEventManager.UpdateHandler(textBox, OnAdornedElementChanged);
     SizeChangedEventManager.UpdateHandler(textBox, OnSizeChanged);
 }
Пример #4
0
 private static void OnTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
 {
     if (d is FrameworkElement adornedElement)
     {
         IsVisibleChangedEventManager.UpdateHandler(adornedElement, OnAdornedElementChanged);
         LoadedEventManager.UpdateHandler(adornedElement, OnAdornedElementChanged);
         UnloadedEventManager.UpdateHandler(adornedElement, OnAdornedElementChanged);
         SizeChangedEventManager.UpdateHandler(adornedElement, OnSizeChanged);
         UpdateIsVisible(adornedElement);
     }
 }
Пример #5
0
 public ComboBoxListener(ComboBox comboBox)
 {
     this.comboBox = comboBox;
     IsVisibleChangedEventManager.UpdateHandler(comboBox, OnAdornedElementChanged);
     LoadedEventManager.UpdateHandler(comboBox, OnAdornedElementChanged);
     UnloadedEventManager.UpdateHandler(comboBox, OnAdornedElementChanged);
     GotKeyboardFocusEventManager.UpdateHandler(comboBox, OnAdornedElementChanged);
     LostKeyboardFocusEventManager.UpdateHandler(comboBox, OnAdornedElementChanged);
     SelectionChangedEventManager.UpdateHandler(comboBox, OnAdornedElementChanged);
     SizeChangedEventManager.UpdateHandler(comboBox, OnSizeChanged);
 }
Пример #6
0
 public PasswordBoxListener(PasswordBox passwordBox)
 {
     this.passwordBox = passwordBox;
     IsVisibleChangedEventManager.UpdateHandler(passwordBox, OnAdornedElementChanged);
     LoadedEventManager.UpdateHandler(passwordBox, OnAdornedElementChanged);
     UnloadedEventManager.UpdateHandler(passwordBox, OnAdornedElementChanged);
     GotKeyboardFocusEventManager.UpdateHandler(passwordBox, OnAdornedElementChanged);
     LostKeyboardFocusEventManager.UpdateHandler(passwordBox, OnAdornedElementChanged);
     PasswordChangedEventManager.UpdateHandler(passwordBox, OnAdornedElementChanged);
     SizeChangedEventManager.UpdateHandler(passwordBox, OnSizeChanged);
 }
Пример #7
0
 public TextBoxListener(TextBox textBox)
 {
     this.textBox = textBox;
     IsVisibleChangedEventManager.UpdateHandler(textBox, OnAdornedElementChanged);
     LoadedEventManager.UpdateHandler(textBox, OnAdornedElementChanged);
     UnloadedEventManager.UpdateHandler(textBox, OnAdornedElementChanged);
     GotKeyboardFocusEventManager.UpdateHandler(textBox, OnAdornedElementChanged);
     LostKeyboardFocusEventManager.UpdateHandler(textBox, OnAdornedElementChanged);
     TextChangedEventManager.UpdateHandler(textBox, OnAdornedElementChanged);
     SizeChangedEventManager.UpdateHandler(textBox, OnSizeChanged);
 }