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); } }
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); } }
internal static void AddQueryContinueDragHandler(DependencyObject element, CustomQueryContinueDragEventHandler handler) { AddQueryContinueDragHandler(element, handler, false); }