Hi,
I'm trying to figure out a good way to dock a form onto an MDI Parent RadDock from a child form. The method I have been using is as follows:
Dim dockOpen As Integer = 0
For Each checkdoc As DockWindow In RadDock1.DockWindows.DocumentWindows
If checkdoc.Name = "NameofForm1" Then
dockOpen = 1
End If
Next
If dockOpen = 0 Then
'Open Form
Dim OpenForm As new NameofForm()
OpenForm.Text = "Form Title"
RadDock1.DockControl(OpenForm, UI.Docking.DockPosition.Fill, UI.Docking.DockType.Document)
Dim dockable As DockWindow = GetDockableByName("NameofForm1")
If Not dockable Is Nothing Then
Me.RadDock1.ActiveWindow = dockable
End If
Else
Dim dockable As DockWindow = GetDockableByName("NameofForm1")
If Not dockable Is Nothing Then
Me.RadDock1.ActiveWindow = dockable
End If
End If
This works fine when I call it from within my MDI Parent form. The problem is from my Child Form I can't see 'RadDock1' or 'GetDockableByName'. Can anyone help me out?
Thanks,
Will
I'm trying to figure out a good way to dock a form onto an MDI Parent RadDock from a child form. The method I have been using is as follows:
Dim dockOpen As Integer = 0
For Each checkdoc As DockWindow In RadDock1.DockWindows.DocumentWindows
If checkdoc.Name = "NameofForm1" Then
dockOpen = 1
End If
Next
If dockOpen = 0 Then
'Open Form
Dim OpenForm As new NameofForm()
OpenForm.Text = "Form Title"
RadDock1.DockControl(OpenForm, UI.Docking.DockPosition.Fill, UI.Docking.DockType.Document)
Dim dockable As DockWindow = GetDockableByName("NameofForm1")
If Not dockable Is Nothing Then
Me.RadDock1.ActiveWindow = dockable
End If
Else
Dim dockable As DockWindow = GetDockableByName("NameofForm1")
If Not dockable Is Nothing Then
Me.RadDock1.ActiveWindow = dockable
End If
End If
This works fine when I call it from within my MDI Parent form. The problem is from my Child Form I can't see 'RadDock1' or 'GetDockableByName'. Can anyone help me out?
Thanks,
Will