How to avoid that MID children can be place outside racDock parent window?

2 posts, 0 answers
  1. FMorales
    FMorales avatar
    26 posts
    Member since:
    Aug 2014

    Posted 19 Jun 2015 Link to this post


    I have a main windows form that includes a racDock with the "AutoDetectMdiChildren" to true.

    I need that children MDI winform can be only docked inside the racDock area, so, I would like that the user can dock the MID child form to the top/botton/left/right but not be able to extract the windows to another independent windows outside the parent form where is the racDock control.

    How can I disable that the MDI child form could be outside of the parent form?.

    Thanks a lot.


  2. Dess
    Dess avatar
    1561 posts

    Posted 22 Jun 2015 Link to this post

    Hello Francisco,

    Thank you for writing.

    In order to achieve your goal, you can use set the RadDock.DragDropMode property to Preview and cancel the DockStateChanging event if the DockStateChangingEventArgs.NewDockState is DockState.Floating:
    public Form1()
        this.IsMdiContainer = true;
        this.radDock1.AutoDetectMdiChildren = true;
        this.radDock1.DragDropMode = Telerik.WinControls.UI.Docking.DragDropMode.Preview;
    private void radDock1_DockStateChanging(object sender, Telerik.WinControls.UI.Docking.DockStateChangingEventArgs e)
        e.Cancel = e.NewDockState == Telerik.WinControls.UI.Docking.DockState.Floating;

    I hope this information helps. Should you have further questions, I would be glad to help.
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top