protected virtual void OnPreviewDragDrop(RadDropEventArgs e) { EventHandler <RadDropEventArgs> eh = this.Events[PreviewDragDropEventKey] as EventHandler <RadDropEventArgs>; if (eh != null) { eh(this, e); } }
protected virtual void OnPreviewDragDrop(RadDropEventArgs e) { EventHandler <RadDropEventArgs> eventHandler = this.Events[RadDragDropService.PreviewDragDropEventKey] as EventHandler <RadDropEventArgs>; if (eventHandler == null) { return; } eventHandler((object)this, e); }
protected override void Commit() { RadItem context = this.Context as RadItem; context.Capture = false; RadDropEventArgs e = new RadDropEventArgs((ISupportDrag)context, this.target, this.dropLocation); this.OnPreviewDragDrop(e); if (e.Handled) { return; } this.target.DragDrop(this.dropLocation, (ISupportDrag)context); }
protected override void Commit() { RadItem draggedItem = this.Context as RadItem; Debug.Assert(draggedItem != null, "Invalid drag instance"); draggedItem.Capture = false; RadDropEventArgs args = new RadDropEventArgs(draggedItem, this.target, this.dropLocation); this.OnPreviewDragDrop(args); if (args.Handled) { return; } this.target.DragDrop(this.dropLocation, draggedItem); }