Version

Locate a Specific Pane

Before you can effect changes on a pane, such as pinning, unpinning, maximizing, minimizing, you must first locate the pane to change. The WinDockManager™ has several methods available for obtaining the location, by key, x and y coordinates, and control.

The most common way of locating a pane is by specifying a control. The following code snippet uses the PaneFromControl method to find a control’s DockLocation.

In Visual Basic:

Private Sub btnFindPane_Click(ByVal sender As Object, _
  ByVal e As System.EventArgs) Handles btnFindPane.Click
	MessageBox.Show(Me.UltraDockManager1.PaneFromControl( _
	  Me.UltraWeekView1).DockAreaPane. _
	  DockedLocation.ToString())
End Sub

In C#:

private void btnFindPane_Click(object sender, System.EventArgs e)
{
	MessageBox.Show(this.ultraDockManager1.PaneFromControl(
	  this.ultraWeekView1).DockAreaPane.DockedLocation.ToString());
}

You could also use PaneFromKey or PaneFromPosition methods as well to locate a specific pane.