Esempio n. 1
0
 internal static void AddQueryContinueDragHandler(DependencyObject element, CustomQueryContinueDragEventHandler handler, bool handledEventsToo)
 {
     if (element == null)
     {
         throw new ArgumentNullException("element");
     }
     if (handler == null)
     {
         throw new ArgumentNullException("handler");
     }
     CustomExtendedRoutedEventHandlerCollection<CustomQueryContinueDragEventHandler, CustomQueryContinueDragEventArgs> queryContinueDragHandlers = element.GetQueryContinueDragHandlers();
     CustomExtendedRoutedEventHandlerCollection<CustomQueryContinueDragEventHandler, CustomQueryContinueDragEventArgs> handlers2 = queryContinueDragHandlers ?? new CustomExtendedRoutedEventHandlerCollection<CustomQueryContinueDragEventHandler, CustomQueryContinueDragEventArgs>((h, a) => h(element, a));
     handlers2.Add(handler, handledEventsToo);
     if (handlers2 != queryContinueDragHandlers)
     {
         element.SetValue(QueryContinueDragHandlerProperty, handlers2);
     }
 }
Esempio n. 2
0
 internal static void RemoveQueryContinueDragHandler(DependencyObject element, CustomQueryContinueDragEventHandler handler)
 {
     if (element == null)
     {
         throw new ArgumentNullException("element");
     }
     if (handler == null)
     {
         throw new ArgumentNullException("handler");
     }
     CustomExtendedRoutedEventHandlerCollection<CustomQueryContinueDragEventHandler, CustomQueryContinueDragEventArgs> queryContinueDragHandlers = element.GetQueryContinueDragHandlers();
     if (queryContinueDragHandlers != null)
     {
         queryContinueDragHandlers.Remove(handler);
     }
 }
Esempio n. 3
0
 internal static void AddQueryContinueDragHandler(DependencyObject element, CustomQueryContinueDragEventHandler handler)
 {
     AddQueryContinueDragHandler(element, handler, false);
 }