Unplanned
Last Updated: 20 May 2025 07:17 by Martin Ivanov
Martin Ivanov
Created on: 20 May 2025 07:17
Category: Diagram
Type: Feature Request
1
Diagrams: Expose protected methods that raise the drag events of the DraggingService

Currently, if you create a custom DraggingService of RadDiagram and override the drag methods (StartDrag, Dragging, etc.), the corresponding drag events stop reporting if you don't call the base method implementation. Add protected methods like OnDragging and OnStartDrag that raise the corresponding events. This will allow the developer to manually raise the events if the drag method overrides are implemented from scratch, without calling the base implementation.

In the meantime, you can use custom events like so:

public class CustomDraggingService : DraggingService
{
    public event EventHandler<PositionChangedEventArgs> CustomDraggingEvent;


    public CustomDraggingService(IGraphInternal graph) : base(graph)
    {
    }

    public override void Drag(Point newPoint)
    {
        CustomDraggingEvent?.Invoke(this, new PositionChangedEventArgs(new Point(), newPoint, null));
// custom implementation here
    }
}

0 comments