static DragDropAction GetOrCreateAction(DependencyObject depObj) { DragDropAction action = depObj.GetValue(DragDropActionProperty) as DragDropAction; if (action == null) { action = new DragDropAction(); depObj.SetValue(DragDropActionProperty, action); } return(action); }
static DragDropAction GetOrCreateAction(DependencyObject depObj) { DragDropAction action = depObj.GetValue(DragDropActionProperty) as DragDropAction; if (action == null) { action = new DragDropAction(); depObj.SetValue(DragDropActionProperty, action); } return action; }
/// <summary> /// Sets the value of the DragDropAction attached property /// for a given dependency object. /// </summary> /// <param name="obj">The object to which the property value /// is written.</param> /// <param name="value">Sets the DragDropAction value of the specified object.</param> public static void SetDragDropAction(DependencyObject obj, DragDropAction value) { obj.SetValue(DragDropActionProperty, value); }