次の方法で共有


IXRRangeBase (Compact 2013)

3/28/2014

This class represents an element that has a value in a specific range, such as the IXRScrollBar and IXRSlider controls.

Syntax

class IXRRangeBase : public IXRControl

Inheritance Hierarchy

IXRDependencyObject

    IXRUIElement

        IXRFrameworkElement

            IXRControl

                IXRRangeBase

                    IXRScrollBar

                    IXRSlider

Methods

Method

Description

IXRRangeBase::AddMaximumChangedEventHandler

Attaches a delegate to the MaximumChanged event handler for this control. When the MaximumChanged event handler is raised by this control, this delegate will be invoked.

IXRRangeBase::AddMinimumChangedEventHandler

Attaches a delegate to the MinimumChanged event for this control. When the MinimumChanged event is raised by this control, this delegate will be invoked.

IXRRangeBase::AddValueChangedEventHandler

Attaches a delegate to the ValueChanged event for this control. When the ValueChanged event is raised by this control, this delegate will be invoked.

IXRRangeBase::GetLargeChange

Retrieves a value to be added to or subtracted from the Value of this IXRRangeBase control.

IXRRangeBase::GetMaximum

Retrieves the highest possible value of this IXRRangeBase control.

IXRRangeBase::GetMinimum

Retrieves the minimum possible value for this IXRRangeBase control.

IXRRangeBase::GetSmallChange

Retrieves a value to be added or subtracted from the Value of the IXRRangeBase control.

IXRRangeBase::GetValue

Retrieves the current setting of this IXRRangeBase control, which might be coerced.

IXRRangeBase::RemoveMaximumChangedEventHandler

Removes a delegate from the MaximumChanged event for this control.

IXRRangeBase::RemoveMinimumChangedEventHandler

Removes a delegate from the MinimumChanged event for this control.

IXRRangeBase::RemoveValueChangedEventHandler

Removes a delegate from the ValueChanged event for this control.

IXRRangeBase::SetLargeChange

Sets a value to be added to or subtracted from the Value of this IXRRangeBase control.

IXRRangeBase::SetMaximum

Sets the highest possible value of this IXRRangeBase control.

IXRRangeBase::SetMinimum

Sets the minimum possible value for this IXRRangeBase control.

IXRRangeBase::SetSmallChange

Sets a value to be added or subtracted from the Value of the IXRRangeBase control.

IXRRangeBase::SetValue

Sets the current setting of this IXRRangeBase control, which might be coerced.

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

An IXRRangeBase control has a Value that can be set by calling IXRRangeBase::SetValue. It must be between the Minimum and Maximum properties, which you can retrieve by calling IXRRangeBase::GetMinimum and IXRRangeBase::GetMaximum. The IXRRangeBase control visually indicates its Value when it is rendered on-screen.

An IXRRangeBase control has a limited default style. If you want to augment the appearance of the control, you can create a new IXRControlTemplate.

The IXRRangeBase control uses property coercion to make sure that the Minimum, Maximum, and Value properties maintain the relationship of MinimumValueMaximum. Coercion affects the return value of each Get* method, but not the value of the associated field in the IXRRangeBase class. If the conditions that cause coercion are removed, the return value of each Get* method again reflects the true value of its associated field.

The following table shows an example sequence of setting values for IXRRangeBase and the resulting values for Minimum, Maximum, and Value at each step of the sequence.

Action

Minimum

Maximum

Value

Example original settings

Field = 15

Property = 15

Field = 100

Property = 100

Field = 30

Property = 30

Call IXRRangeBase::SetMinimum and pass in 200

Field = 200

Property = 200

Field = 100

Property = 200

Field = 30

Property = 200

Call IXRRangeBase::SetValue and pass in 45

Field = 200

Property = 200

Field = 100

Property = 200

Field = 45

Property = 200

Call IXRRangeBase::SetMinimum and pass in 0

Field = 0

Property = 0

Field = 100

Property = 100

Field = 45

Property = 45

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

.NET Framework Equivalent

System.Windows.Controls.Primitives.RangeBase

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for UI Element Management