Prevent Floating and Prevent Closing

2 posts, 0 answers
  1. Ching-Yen
    Ching-Yen avatar
    65 posts
    Member since:
    Nov 2007

    Posted 17 Jun 2008 Link to this post


    1. I have 3 pane in my project, and I would like to prevent them from Floating
    2. For the other project, I would like to give the user the flexibility of making the pane floating, but, I do not want them have the option to close the pane.

    Please advice.
  2. Nikolay
    Nikolay avatar
    1805 posts

    Posted 19 Jun 2008 Link to this post

    Hello Ching-Yen,

    Please find the answers to your questions below:

    1. In order to prevent your dock panels from floating, set dockingManager.AllowFloating to false.
    2. You can hide the close button of the floating window. To do that, you should first subscribe to the SizeChanged event of the corresponding DockPanel. Then, in the SizeChanged event handler, hide the close button:
      public Form1()  
          dockPanel1.SizeChanged += new EventHandler(dockPanel1_SizeChanged);  
      void dockPanel1_SizeChanged(object sender, EventArgs e)  
          if (this.dockPanel1.DockState == DockState.Floating)  
              this.dockPanel1.FindForm().ControlBox = false;  
    If you have additional questions, feel free to contact me.

    All the best,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top