'Declaration Public Event NavigationPaneFlyoutClosed As NavigationPaneFlyoutClosedEventHandler
public event NavigationPaneFlyoutClosedEventHandler NavigationPaneFlyoutClosed
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.
Property | Description |
---|---|
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. |
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.
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 ) ); } }
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