Event when floating RadPane is stopped dragging

1 Answer 17 Views
Docking DragAndDrop
Alex
Top achievements
Rank 1
Alex asked on 05 Apr 2024, 04:31 PM

Hello,

I have a floating RadPane, I need to identify when the user stops dragging it. It can be still floating and and not docked.

1 Answer, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 08 Apr 2024, 12:39 PM

Hello Alex,

To achieve this requirement, the ToolWindow class can be extended and its OnDragEnd method can be overridden. Then, a custom DefaultGeneratedItemsFactory can be created and the CreateToolWindow method can be overridden to return a new instance of the custom ToolWindow element. Finally, set the custom factory to the GeneratedItemsFactory property of RadDocking.

The following code snippets show this suggestion's implementation:

public class CustomToolWindow : ToolWindow
{
    protected override void OnDragEnd(Point globalMousePosition, bool isCancel, bool isResize)
    {
        base.OnDragEnd(globalMousePosition, isCancel, isResize);
    }
}
public class CustomGeneratedItemsFactory : DefaultGeneratedItemsFactory
{
    public override ToolWindow CreateToolWindow()
    {
        return new CustomToolWindow();
    }
}
 <telerik:RadDocking.GeneratedItemsFactory>
     <local:CustomGeneratedItemsFactory/>
 </telerik:RadDocking.GeneratedItemsFactory>

With this being said, I hope the provided information will be of help to you.

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Docking DragAndDrop
Asked by
Alex
Top achievements
Rank 1
Answers by
Stenly
Telerik team
Share this question
or