Pane Selection
All panes in a NavigationBar are listed in its Panes collection. The selected pane can be set programmatically by using the SelectedPane property. The SelectedIndex property also can change the selected pane.
Selection Events
There are two events which are raised when selection changes occur.
The SelectionChanging event is raised immediately before a selection change occurs. Its event arguments specify the NavigationPane that is about to be selected.
The SelectionChanged event is raised immediately after a selection change occurs.
Cancelling Selection Changes
Most selection changes can be cancelled by handling the SelectionChanging event and setting its Cancel
property to true
.