Version

Determine Whether a Pane is Docked

To determine whether a Pane is docked, you must first locate a particular pane. The code snippet below makes use of the PaneFromControl method, but you can use any of the other similar methods for getting a pane. For more information, see Locate a Specific Pane.

The following code snippet finds a pane, then checks to see if that pane is docked, if it is docked it makes it a floating pane.

In Visual Basic:

Imports Infragistics.Win.UltraWinDock
...
Private Sub btnCheck_Click(ByVal sender As Object, _
  ByVal e As System.EventArgs) Handles btnCheck.Click
	'Checked to see if the pane holding the control is docked
	If Me.UltraDockManager1.PaneFromControl(Me.UltraDayView1).DockedState = _
	  DockedState.Docked Then
		' If it is docked make it a floating pane
		Me.UltraDockManager1.PaneFromControl(Me.UltraDayView1).Float(True)
	End If
End Sub

In C#:

using Infragistics.Win.UltraWinDock;
...
private void btnCheck_Click(object sender, EventArgs e)
{
	// Checked to see if the pane holding the control is docked
	if(this.ultraDockManager1.PaneFromControl(this.ultraDayView1).DockedState ==
	  DockedState.Docked)
		// If it is docked make it a floating pane
		this.ultraDockManager1.PaneFromControl(this.ultraDayView1).Float(true);
}