sgray128 5/28/2015 11:45:41 AM

Winforms - RadDock

This page holds common techniques for coding the Winform RadDock control

 In order to open the form as a floating document, you can use the DockWindowAdded event and set the HostWindow.DockState property to Floating:

Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
    AddHandler Me.RadDock1.DockWindowAdded, AddressOf DockWindowAdded
    Dim frm As New RadForm1()
    Me.RadDock1.DockControl(frm, DockPosition.Left, DockType.Document)
    RemoveHandler Me.RadDock1.DockWindowAdded, AddressOf DockWindowAdded
End Sub
Private Sub DockWindowAdded(sender As Object, e As DockWindowEventArgs)
    Dim hw As HostWindow = TryCast(e.DockWindow, HostWindow)
    If hw IsNot Nothing Then
        hw.DockState = DockState.Floating
    End If
End Sub

To hide all the buttons on the window

oDocumentWindow.DocumentButtons = 0