|Visual Basic (Declaration)|
Public Class UltraNavigationBar Inherits Infragistics.Win.UltraControlBase Implements Infragistics.Shared.IUltraLicensedComponent, Infragistics.Win.AppStyling.ISupportAppStyling, Infragistics.Win.IUltraControl, Infragistics.Win.IUltraControlElement
public class UltraNavigationBar : Infragistics.Win.UltraControlBase, Infragistics.Shared.IUltraLicensedComponent, Infragistics.Win.AppStyling.ISupportAppStyling, Infragistics.Win.IUltraControl, Infragistics.Win.IUltraControlElement
The UltraNavigationBar Windows Forms Control builds on the metaphor introduced with the Windows Vista Address Bar. It provides the ability to navigate a hierarchical structure such as a file system or relational data. Each node in the structure is referred to as a location, and is encapsulated by the UltraNavigationBarLocation object. The root node in the structure is represented by the RootLocation; all locations associated with the control are descendants of the root location. Each location, including the root, exposes a UltraNavigationBarLocation.Locations collection, to which its immediate children belong. The Locations collection is similar to a collection for a tree node; each member of the collection in turn exposes a collection of its own, providing a recursive relationship between ancestor and descendant nodes. A navigation path is constructed by selecting a member of a Locations collection; this member is then referenced by its parent location's UltraNavigationBarLocation.SelectedLocation property. As the process continues recursively, with progressively "deeper" levels of descendants being selected, the navigation path grows, with each newly selected location appearing to the right of its parent on the navigation path. The rightmost, or terminal location of the navigation path is referenced by the control's SelectedLocation property. With each change to the navigation path, the end developer is notified via the SelectedLocationChanging and SelectedLocationChanged events.
Since many nodes of larger hierarchical structures may never be accessed by the end user during the lifetime of an application, the UltraNavigationBar control supports "on-demand" population of the Locations collections via the InitializeLocations event. This event fires the first time a Locations collection is accessed, so that population of the collection can be deferred until the data is actually needed. This approach can boost response times and performance significantly in the case where a structure contains a relatively large number of nodes.
The UltraNavigationBar control provides extensive support for customizing the appearance of locations via the following properties:
- UltraNavigationBarButtonAppearances.Appearance - Used when the location is not in any particular user interface state.
- UltraNavigationBarButtonAppearances.HotTrackAppearance - Used when the cursor is positioned within the bounds of the location.
- UltraNavigationBarButtonAppearances.PressedAppearance - Used when the buttons which appear on the navigation path for the location are in the pressed state.
- UltraNavigationBarLocationSettings.SelectedAppearance - Used by the list items which appear on the parent location's dropdown list when the associated location also appears on the navigation path, i.e., is the UltraNavigationBarLocation.SelectedLocation for its parent.
- UltraNavigationBarLocationSettings.ActiveAppearance - Used by the location that has the keyboard focus.
The UltraNavigationBar control provides the ability to display buttons which appear in a separate area than the locations, which can execute some application-specific action when clicked by the end user, via the following members:
The UltraNavigationBar control provides "previous history" support via the following members:
- The PreviousLocations collection
- The PreviousLocationsSettings settings property
- The Infragistics.Win.Misc.UltraWinNavigationBar.ExitingEditModeEventArgs.AddToPreviousLocations property
- The NavigationBarPreviousLocationsCollection.SaveAsXml, NavigationBarPreviousLocationsCollection.SaveAsBinary, NavigationBarPreviousLocationsCollection.LoadFromXml, and NavigationBarPreviousLocationsCollection.LoadFromBinary methods.
The UltraNavigationBar control provides user interface customization support via the following properties: