Home Forums WinForms controls Other WinForms controls DockManager Basic Question

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18593 |

    I have just downloaded latest suite.  In trying the DockManager and reading documentation, it seems there is no way to visually design a form’s or client controls docked controls, all has to be done in code.  Is this correct?  For instance, I just have a new form, dropped a Dock Manager on it and set Doc host to the form.  I dropped a panel on the form and want to dock it on the left of the form.  I see no property in desiner for toolwindows collection (or groups, etc) and am not able to manually dock the panel.

    So this all has to be done in code?  And just as a help, if form is form1 and panel is panel1, and Dock manager dropped on form is DocMgr with  DocHost set to form1, what would be the code on form load or initialization to doc the panel on the left of the form?

    Thanks.

    Imported from legacy forums. Posted by Glenn (had 1134 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Glenn, 

    You are correct, this needs to be done from code, here’s a sample snippet for docking the panel to the left:

     

    Public Class Form1

        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

            Me.DocMgr.SuspendLayout()

            Dim window As ToolWindow = New ToolWindow(Panel1, “panel”)

            DocMgr.ToolWindows.Add(window)

            window.DockTo(DockTargetHost.ClientHost, DockPosition.Left)

            DocMgr.ResumeLayout()

        End Sub

    End Class 

    Imported from legacy forums. Posted by Michel [Xceed] (had 2048 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.