private static void OnDropSupportChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DropSupportData oldDropSupport = (DropSupportData)e.OldValue; DropSupportData newDropSupport = (DropSupportData)d.GetValue(DropSupportProperty); if (d is FrameworkElement == false) { return; } var ff = (FrameworkElement)d; if (newDropSupport != null && newDropSupport.BindingPath != null) { ff.AllowDrop = true; ff.Drop += ff_Drop; ff.PreviewDragOver += ff_PreviewDragOver; } else { ff.AllowDrop = false; ff.Drop -= ff_Drop; ff.PreviewDragOver -= ff_PreviewDragOver; } }
public static void SetDropSupport(DependencyObject d, DropSupportData value) { d.SetValue(DropSupportProperty, value); }
public static void SetDropSupport(DependencyObject d, DropSupportData value) { d.SetValue(DropSupportProperty, value); }