public void DoDragDrop(DataObject data, DragEffects allowedAction) { WpfFrameworkElementHelper.ShouldCaptureMouse = false; var dataObject = data.ToWpf(); dataObject.SetData("source", Widget); sw.DragDrop.DoDragDrop(Control, dataObject, allowedAction.ToWpf()); }
/// <summary> /// Initializes a new instance of the <see cref="Eto.Forms.DragEventArgs"/> class. /// </summary> /// <param name="source">Drag operation source control.</param> /// <param name="data">Drag data.</param> /// <param name="allowedEffects">Allowed operation.</param> /// <param name="location">Location of the mouse cursor for this event</param> /// <param name="modifiers">Modifier buttons pressed for this event</param> /// <param name="buttons">Mouse buttons pressed for this event</param> /// <param name="controlObject">Platform-specific object to store additional arguments/info</param> public DragEventArgs(Control source, DataObject data, DragEffects allowedEffects, PointF location, Keys modifiers, MouseButtons buttons, object controlObject = null) { Data = data; Source = source; AllowedEffects = allowedEffects; Location = location; Modifiers = modifiers; Buttons = buttons; ControlObject = controlObject; }
public override void DoDragDrop(DataObject data, DragEffects allowedAction) { if (DragPasteboard != null) { var handler = data.Handler as IDataObjectHandler; handler?.Apply(DragPasteboard); Control.AllowedOperation = allowedAction.ToNS(); } else { base.DoDragDrop(data, allowedAction); } }
public static NSDragOperation ToNS(this DragEffects effects) { var op = NSDragOperation.None; if (effects.HasFlag(DragEffects.Copy)) { op |= NSDragOperation.Copy; } if (effects.HasFlag(DragEffects.Link)) { op |= NSDragOperation.Link; } if (effects.HasFlag(DragEffects.Move)) { op |= NSDragOperation.Move; } return(op); }
public static Gdk.DragAction ToGdk(this DragEffects dragAction) { var action = (Gdk.DragAction) 0; if (dragAction.HasFlag(DragEffects.Copy)) { action |= Gdk.DragAction.Copy; } if (dragAction.HasFlag(DragEffects.Move)) { action |= Gdk.DragAction.Move; } if (dragAction.HasFlag(DragEffects.Link)) { action |= Gdk.DragAction.Link; } return(action); }
public static swf.DragDropEffects ToSwf(this DragEffects action) { var resultAction = swf.DragDropEffects.None; if (action.HasFlag(DragEffects.Copy)) { resultAction |= swf.DragDropEffects.Copy; } if (action.HasFlag(DragEffects.Move)) { resultAction |= swf.DragDropEffects.Move; } if (action.HasFlag(DragEffects.Link)) { resultAction |= swf.DragDropEffects.Link; } return(resultAction); }
public void DoDragDrop(DataObject data, DragEffects allowedAction) { throw new NotImplementedException(); }
/// <summary> /// Starts drag operation using this control as drag source. /// </summary> /// <param name="data">Drag data.</param> /// <param name="allowedAction">Allowed action.</param> public void DoDragDrop(DataObject data, DragEffects allowedAction) { Control.DoDragDrop(data, allowedAction); }
public WpfDragEventArgs(Control source, DataObject data, DragEffects allowedEffects, PointF location, Keys modifiers, MouseButtons buttons, object controlObject = null) : base(source, data, allowedEffects, location, modifiers, buttons, controlObject) { }