How to disable docking but use pin/unpin feature?

1 Answer 16 Views
General Discussions
kiba
Top achievements
Rank 1
kiba asked on 24 Feb 2022, 01:20 PM
I have a Telerik.WinControls.UI.Docking.ToolWindow added to RadDock. I want to use the pin/unpin feature and not the docking feature. I want to disable the contextmenu and not allow user to move around the ToolWindow as well. How do I acheive it?

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 28 Feb 2022, 01:45 PM
Hello, Kiba,

RadDock offers the DockStateChanging event which allows you to cancel the new state if it is not allowed according to your requirements. 
        private void radDock1_DockStateChanging(object sender, Telerik.WinControls.UI.Docking.DockStateChangingEventArgs e)
        {
            if (e.NewDockState!= Telerik.WinControls.UI.Docking.DockState.AutoHide && e.NewDockState!= Telerik.WinControls.UI.Docking.DockState.Docked)
            {
                e.Cancel = true;
            }
        }

Thus, the end users will be allowed to pin/unpin the ToolWindows, but they wouldn't be allowed to float the document. 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
kiba
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or