radDock DocumentWindow Floating Docked

1 Answer 107 Views
Dock
Curtis
Top achievements
Rank 1
Iron
Iron
Veteran
Curtis asked on 31 May 2022, 09:17 PM

Hello!

Is it possible to have a radDock with several tabbed DocumentWindows where the user is only allowed to "Float" these Documents and can ONLY dock them back on the original DocumentContainer?  Meaning the User is not allowed to Dock a floating window inside another one of these DocumentWindows?

All but one DocumentWindow is created dynamically - so I should be able to set each window as needed i'm just stuck on what those settings are!

Any help you can provide would be great!

Kindest regards,

Curtis.

 

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 01 Jun 2022, 01:31 PM

Hello, Curtis,   

Note that each DocumentWindow offers the AllowedDockState property which gives you the possibility to specify which states are allowed for the window: https://docs.telerik.com/devtools/winforms/controls/dock/object-model/alloweddockstates 
Thus, you can restrict the Floating state.

In addition to this, RadDock offers the DockStateChanging event. The DockStateChangingEventArgs gives you access to the NewDockState and if it is a TabbedDocument, you can check in which tab strip it will be docked via the NewWindow.TabStrip.Name property. If the operation is not allowed according to your needs, feel free to cancel the event:
        private void radDock1_DockStateChanging(object sender, Telerik.WinControls.UI.Docking.DockStateChangingEventArgs e)
        {
            if (e.NewDockState== Telerik.WinControls.UI.Docking.DockState.TabbedDocument & e.NewWindow.TabStrip.Name!="DockTabStrip1")
            {
                e.Cancel=true;
            }
        }
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

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
Dock
Asked by
Curtis
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or