Scrolling
- 2 minutes to read
If a DXNavBar control groups and items don’t fit into the view region, a scrolling feature is enabled. End-users can scroll up and down using dedicated scroll buttons, scroll bar or mouse wheel.
Scroll Modes
Use the ScrollingSettings.ScrollMode attached property and NavBarGroup.GroupScrollMode regular property to specify whether to use a scroll bar or scroll buttons to scroll through the NavBar control’s contents.
ScrollMode = Buttons | ScrollMode = ScrollBar |
---|---|
The ScrollingSettings.ScrollMode attached property should be applied to the NavBar control’s View, referenced by the NavBarControl.View property.
Scroll Settings
You can use the following properties to control the scrolling functionality. Properties provided by the ScrollingSettings class are all attached properties.
Property | Description |
---|---|
ScrollingSettings.ClickMode | Gets or sets a value that specifies how scroll buttons should be manipulated by an end-user to initiate scrolling. This is an attached property. |
ScrollingSettings.AccelerationRatio | Gets or sets the acceleration ratio of the scrolling speed (in pixels per second squared), when scrolling using scroll buttons. This is an attached property. |
ScrollingSettings.DecelerationRatio | Gets or sets the deceleration ratio of the scrolling speed (in pixels per second squared), when scrolling using scroll buttons. This is an attached property. |
ScrollingSettings.ScrollMode | Gets or sets how a specific NavBar object is scrolled, using a scroll bar or scroll buttons. This is an attached property. |
NavBarGroup.GroupScrollMode | Gets or sets how a specific NavBar group is scrolled, using a scroll bar or scroll buttons. |
ScrollingSettings.ScrollSpeed | Gets or sets the speed of scrolling (in pixels per second). This property is in effect when scrolling using scroll buttons. This is an attached property. |
ScrollingSettings.TopBottomIndent | Gets or sets the top and bottom indents of the scrollable region. This is an attached property. |
In XAML, you can use attached properties in the following manner.
<dxn:NavBarControl>
<dxn:NavBarControl.View>
<dxn:NavigationPaneView dxn:ScrollingSettings.ClickMode="Press"/>
</dxn:NavBarControl.View>
...
</dxn:NavBarControl>