private void AssociatedObject_RowLoaded(object sender, RowLoadedEventArgs e) { if (AllowDrag) { RadDragAndDropManager.SetAllowDrag(e.Row, true); } }
/// <summary> /// Called after the behavior is attached to an AssociatedObject. /// </summary> protected override void OnAttached() { base.OnAttached(); RadDragAndDropManager.SetAllowDrag(AssociatedObject, false); AssociatedObject.RowLoaded += AssociatedObject_RowLoaded; }
public DragAndDropExpander() { this.AddHandler(RadDragAndDropManager.DragQueryEvent, new EventHandler <DragDropQueryEventArgs>(OnDragQuery)); this.AddHandler(RadDragAndDropManager.DropQueryEvent, new EventHandler <DragDropQueryEventArgs>(OnDropQuery)); this.AddHandler(RadDragAndDropManager.DropInfoEvent, new EventHandler <DragDropEventArgs>(OnDropInfo)); this.AddHandler(RadDragAndDropManager.DragInfoEvent, new EventHandler <DragDropEventArgs>(OnDragInfo)); RadDragAndDropManager.SetAllowDrop(this, true); RadDragAndDropManager.SetAllowDrag(this, true); }
/// <summary> /// Called after the behavior is attached to an AssociatedObject. /// </summary> protected override void OnAttached() { if (AllowDrag) { RadDragAndDropManager.SetAllowDrag(AssociatedObject, true); RadDragAndDropManager.AddDragQueryHandler(AssociatedObject, OnDragQuery); RadDragAndDropManager.AddDragInfoHandler(AssociatedObject, OnDragInfo); } }
protected override void PrepareContainerForItemOverride(DependencyObject element, object item) { base.PrepareContainerForItemOverride(element, item); RadDragAndDropManager.SetAllowDrag(element, true); }