Version

NavigationPaneFlyoutClosed Event

Occurs after the navigation pane flyout has been closed.
Syntax
'Declaration
 
Public Event NavigationPaneFlyoutClosed As NavigationPaneFlyoutClosedEventHandler
public event NavigationPaneFlyoutClosedEventHandler NavigationPaneFlyoutClosed
Event Data

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

PropertyDescription
Canceled Returns whether the flyout session was canceled, for example, whether the end user pressed the Escape key to close the flyout.
SelectedItem Returns the UltraExplorerBarItem that was selected by the end user during the flyout session, or null if the flyout session was canceled.
Remarks

The end developer can programmatically close the navigation pane flyout by calling the CloseNavigationPaneFlyout method; whether the flyout is closed in this manner or via user interaction, the NavigationPaneFlyoutClosed event is fired. Note that because it is not possible to prevent the navigation pane flyout from being closed, no cancelable event fires prior to its closing.

Example
The following code sample demonstrates how to use the NavigationPaneFlyoutClosed event to receive a notification when the navigation pane flyout is closed:

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.Win
Imports Infragistics.Win.UltraWinExplorerBar


    '   Handles the Form's 'Load' event
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        '	Hook the NavigationPaneCollapsed event
        AddHandler Me.ultraExplorerBar1.NavigationPaneFlyoutDisplayed, AddressOf Me.ultraExplorerBar1_NavigationPaneFlyoutDisplayed

    End Sub

    '	Handles the ExplorerBar's 'NavigationPaneFlyoutDisplayed' event
    Private Sub ultraExplorerBar1_NavigationPaneFlyoutDisplayed(ByVal sender As Object, ByVal e As EventArgs)

        Dim explorerBar As UltraExplorerBar = sender

        '	Deregister from the notification list since we won't need this
        '	until after the NavigationPaneFlyoutClosed event is fired
        RemoveHandler explorerBar.NavigationPaneFlyoutDisplayed, AddressOf Me.ultraExplorerBar1_NavigationPaneFlyoutDisplayed

        '	Register as a listener for the NavigationPaneFlyoutClosed event
        AddHandler explorerBar.NavigationPaneFlyoutClosed, AddressOf Me.ultraExplorerBar1_NavigationPaneFlyoutClosed
    End Sub

    '	Handles the ExplorerBar's 'NavigationPaneFlyoutDisplayed' event
    Private Sub ultraExplorerBar1_NavigationPaneFlyoutClosed(ByVal sender As Object, ByVal e As NavigationPaneFlyoutClosedEventArgs)

        Dim explorerBar As UltraExplorerBar = sender

        '	Deregister from the notification list since we won't need this
        '	until after the NavigationPaneFlyoutDisplayed event is fired
        RemoveHandler explorerBar.NavigationPaneFlyoutClosed, AddressOf Me.ultraExplorerBar1_NavigationPaneFlyoutClosed

        '	Register as a listener for the NavigationPaneFlyoutDisplayed event
        AddHandler explorerBar.NavigationPaneFlyoutDisplayed, AddressOf Me.ultraExplorerBar1_NavigationPaneFlyoutDisplayed

        If (e.Canceled = False AndAlso Not e.SelectedItem Is Nothing) Then
            Debug.WriteLine(String.Format("Item '{0}' selected.", e.SelectedItem.Text))
        End If

    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinExplorerBar;
using System.Diagnostics;


		//	Handles the Form's 'Load' event.
		private void Form1_Load(object sender, System.EventArgs e)
		{
			//	Hook the NavigationPaneFlyoutDisplayed event
			this.ultraExplorerBar1.NavigationPaneFlyoutDisplayed += new EventHandler( this.ultraExplorerBar1_NavigationPaneFlyoutDisplayed );
		}

		//	Handles the ExplorerBar's 'NavigationPaneExpanded' event.
		private void ultraExplorerBar1_NavigationPaneFlyoutDisplayed( object sender, EventArgs e )
		{
			UltraExplorerBar explorerBar = sender as UltraExplorerBar;

			//	Deregister from the notification list since we won't need this
			//	until after the NavigationPaneFlyoutClosed event is fired
			explorerBar.NavigationPaneFlyoutDisplayed -= new EventHandler( this.ultraExplorerBar1_NavigationPaneFlyoutDisplayed );

			//	Register as a listener for the NavigationPaneFlyoutClosed event
			explorerBar.NavigationPaneFlyoutClosed += new NavigationPaneFlyoutClosedEventHandler( this.ultraExplorerBar1_NavigationPaneFlyoutClosed );
		}

		//	Handles the ExplorerBar's 'NavigationPaneFlyoutClosed' event.
		private void ultraExplorerBar1_NavigationPaneFlyoutClosed( object sender, NavigationPaneFlyoutClosedEventArgs e )
		{
			UltraExplorerBar explorerBar = sender as UltraExplorerBar;

			//	Deregister from the notification list since we won't need this
			//	until after the NavigationPaneFlyoutDisplayed event is fired
			explorerBar.NavigationPaneFlyoutClosed -= new NavigationPaneFlyoutClosedEventHandler( this.ultraExplorerBar1_NavigationPaneFlyoutClosed );

			//	Register as a listener for the NavigationPaneFlyoutDisplayed event
			explorerBar.NavigationPaneFlyoutDisplayed += new EventHandler( this.ultraExplorerBar1_NavigationPaneFlyoutDisplayed );

			if ( e.Canceled == false && e.SelectedItem != null )
			{
				Debug.WriteLine( string.Format( "Item '{0}' selected.", e.SelectedItem.Text ) );
			}
		}
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