Skip to main content

View

  • 2 minutes to read

A NavBar control provides various types of control representations, which are called Views. There are various built-in Views, which allow you to display the control in a desired manner. You can implement a custom View as well. Refer to the Registering Custom Views topic for details.

A View designates the arrangement and appearance of NavBar elements (groups, links, and scroll buttons). It also determines the reaction of elements to user actions such as pressing, selecting and hovering over items. To assign a View to a NavBar control, use the control’s View property.

All Views can be divided into two general categories:

  • Side Bar Views, which can display only the contents of a single group at a time.

  • Explorer Bar Views, which allow several groups to be simultaneously displayed within the control.

Each View provides its own default style settings, which determine the default appearance of the View. After a specific View is assigned to a NavBar control, you can access its default style settings via the OptionsStyle.DefaultStyles property. You can change any of the style attributes, but these changes do not persist after another View is assigned to the NavBar control. You can customize the appearance of NavBar elements by creating and applying custom styles via the OptionsStyle.CustomStyleRepository and OptionsStyle.CustomStyles properties. In addition to these style settings, you can completely custom paint NavBar elements by handling OnCustomDraw events.

See Also