Поделиться через


XRValueChangedEventArgs<_ValueType> (Compact 2013)

3/28/2014

This structure contains event data for the ValueChanged event, which occurs when a value changes.

Syntax

template <typename _ValueType>
struct XRValueChangedEventArgs : XRRoutedEventArgs{
  _ValueType OldValue;
  _ValueType NewValue;
};

Inheritance Hierarchy

XREventArgs

    XRRoutedEventArgs

        XRValueChangedEventArgs

Members

  • OldValue
    Indicates the previous value.
  • NewValue
    Indicates the new value.
  • pSource
    Points to an IXRDependencyObject object that represents the source. This is the first object that raised the routed event. Inherited from XRRoutedEventArgs.
  • Size
    Indicates the size, in bytes, of this structure. Inherited from XREventArgs.

Remarks

This template provides a generic event-data structure. You can customize this structure for a certain value type by specifying a type for the generic _ValueType parameter.

The following code shows the syntax for using this structure:

XRValueChangedEventArgs<_ValueType>

The following example shows how this template is used by the AddValueChangedEventHandler method, which attaches a delegate that handles a float value:

virtual HRESULT STDMETHODCALLTYPE AddValueChangedEventHandler(
         __in IXRDelegate<XRValueChangedEventArgs<float> >* pDelegate
        ) = 0;

.NET Framework Equivalent

None.

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

XAML for Windows Embedded Structures
IXRVisualStateGroup::AddVisualStateChangedEventHandler
IXRVisualStateGroup::AddVisualStateChangingEventHandler
IXRControl::AddIsEnabledChangedEventHandler
IXRRangeBase::AddMaximumChangedEventHandler
IXRRangeBase::AddMinimumChangedEventHandler
IXRRangeBase::AddValueChangedEventHandler