IXRScrollBar (Compact 2013)

3/28/2014

This class represents a control that provides a scroll bar that has a sliding Thumb control whose position corresponds to a value.

Syntax

class IXRScrollBar : public IXRRangeBase

Inheritance Hierarchy

IXRDependencyObject

    IXRUIElement

        IXRFrameworkElement

            IXRControl

                IXRRangeBase

                    IXRScrollBar

Methods

Method

Description

IXRScrollBar::AddScrollEventHandler

Attaches a delegate to the Scroll event for this scroll bar. When this scroll bar raises the Scroll event, the delegate is invoked.

IXRScrollBar::GetOrientation

Retrieves a value that defines whether this scroll bar is displayed horizontally or vertically.

IXRScrollbar::GetViewportSize

Retrieves a value that indicates how much of the scrollable content is currently visible.

IXRScrollBar::RemoveScrollEventHandler

Removes a delegate from the Scroll event for this scroll bar.

IXRScrollBar::SetOrientation

Sets a value that defines whether this scroll bar is displayed horizontally or vertically.

IXRScrollBar::SetViewportSize

Defines how much of the scrollable content is currently visible.

Thread Safety

Members of this class are thread-safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.

Remarks

The IXRScrollBar class implements a ScrollBar control, which consists of a Thumb control (implemented by the IXRThumb class) and two RepeatButton controls (implemented by the IXRRepeatButton class).

The IXRScrollbar class inherits a default range of values for the ScrollBar control (0 to 10)l from the IXRRangeBase class. The Value property that IXRScrollbar inherits from IXRRangeBase represents the linear distance of the Thumb control between the endpoints of the scroll bar, and users can press the repeat buttons or drag the Thumb control to increase or decrease the number assigned to the Value property. To change the default range of values call IXRRangeBase::SetMinimum and IXRRangeBase::SetMaximum. To determine whether this scroll bar is displayed horizontally or vertically, use the IXRScrollBar::GetOrientation and IXRScrollBar::SetOrientation.

The scroll track in an IXRScrollBar is oriented so that values increase from top to bottom for a vertical scroll bar and from left to right for a horizontal scroll bar.

When you create a class instance, use an IXRScrollBarPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

You can also define a scroll bar control in Microsoft Silverlight 3 XAML. For information about the differences between XAML in XAML for Windows Embedded and Silverlight 3, see Differences Between Microsoft Silverlight 3 and XAML for Windows Embedded. For more information about how to define this element in the source XAML for your application, see the ScrollBar Class on MSDN.

.NET Framework Equivalent

System.Windows.Controls.Primitives.ScrollBar

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for UI Element Management