Version

PaneActivate Event

Occurs when the control contained within a DockableControlPane is activated.
Syntax
'Declaration
 
Public Event PaneActivate As ControlPaneEventHandler
public event ControlPaneEventHandler PaneActivate
Event Data

The event handler receives an argument of type ControlPaneEventArgs containing data related to this event. The following ControlPaneEventArgs properties provide information specific to this event.

PropertyDescription
Pane DockableControlPane instance associated with the event. This property is read-only.
Example
The following code demonstrates how to use the information provided in the PaneActivate and PaneDeactivate events to provide feedback to the user.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinDock

Private Sub ultraDockManager1_PaneActivate(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinDock.ControlPaneEventArgs) Handles ultraDockManager1.PaneActivate

    ' This event provides a notification when the active pane
    ' (see the ActivePane property of the UltraDockManager)
    ' has been changed. a pane may be activated programatically
    ' by calling the pane's activate method or by giving focus
    ' to a control contained within the dockable control pane. 

    Dim statusText As String = Nothing

    ' Change the text on a status bar to provide information about the 
    ' about the active pane
    Select Case e.Pane.Key
        Case "tree"
            statusText = "Displays the network connections"
        Case "list"
            statusText = "List of currently running processes"
        Case "text"
            statusText = "Provides output information from the active process"
    End Select

    Me.statusBar1.Text = statusText

End Sub

Private Sub ultraDockManager1_PaneDeactivate(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinDock.ControlPaneEventArgs) Handles ultraDockManager1.PaneDeactivate

    ' The pane activate provides notification about when the
    ' previous active pane has changed (see the ActivePane property of the 
    ' UltraDockManager)
    '
    Debug.WriteLine(String.Format("The pane with the key '{0}' is being deactivated", e.Pane.Key))

    ' Clear the status when the pane is deactivated
    Me.statusBar1.Text = String.Empty

End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinDock;
using System.Diagnostics;

private void ultraDockManager1_PaneActivate(object sender, Infragistics.Win.UltraWinDock.ControlPaneEventArgs e)
{

	// This event provides a notification when the active pane
	// (see the ActivePane property of the UltraDockManager)
	// has been changed. a pane may be activated programatically
	// by calling the pane's activate method or by giving focus
	// to a control contained within the dockable control pane. 

	string statusText = null;

	// Change the text on a status bar to provide information about the 
	// about the active pane
	switch (e.Pane.Key)
	{
		case "tree":
			statusText = "Displays the network connections";
			break;
		case "list":
			statusText = "List of currently running processes";
			break;
		case "text":
			statusText = "Provides output information from the active process";
			break;
	}

	this.statusBar1.Text = statusText;

}

private void ultraDockManager1_PaneDeactivate(object sender, Infragistics.Win.UltraWinDock.ControlPaneEventArgs e)
{

	// The pane activate provides notification about when the
	// previous active pane has changed (see the ActivePane property of the 
	// UltraDockManager)
	//
	Debug.WriteLine( string.Format("The pane with the key '{0}' is being deactivated", e.Pane.Key) );

	// Clear the status when the pane is deactivated
	this.statusBar1.Text = string.Empty;

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also