예제 #1
0
        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;
 }
예제 #3
0
 /// <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);
 }
 /// <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);
 }