コード例 #1
0
        private static void OnTextToolTipManagerChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            TextToolTipManager oldValue = (TextToolTipManager)e.OldValue;
            TextToolTipManager newValue = (TextToolTipManager)e.NewValue;

            oldValue?.Detach();
            newValue?.Attach();
        }
コード例 #2
0
 private static void SetTextToolTipManager(DependencyObject element, TextToolTipManager value)
 {
     if (element == null)
     {
         throw new ArgumentNullException(nameof(element));
     }
     element.SetValue(TextToolTipManagerProperty, value);
 }