IXRFrameworkElement::GetDataContext (Compact 2013)
3/28/2014
This method retrieves the data-source object that provides the data context for an element that participates in data binding.
Syntax
virtual HRESULT STDMETHODCALLTYPE GetDataContext(
__out XRValue* pValue
) = 0;
Parameters
- pValue
[out] Pointer to an XRValue object that represents the data-source object. The vType member of the data-source object must be VTYPE_PROPERTYBAG.
Return Value
Returns an HRESULT that indicates success or failure.
Remarks
For more information about the data-source object, see Remarks in IXRPropertyBag.
To use a specific interface pointer type, you can use the helper template version of this method that XAML for Windows Embedded provides. When you supply a derived type, this version automatically supplies a type-safe method that implicitly converts the returned type from a generic interface, so you do not have to explicitly call QueryInterface to convert the generic interface into the required object type. The exceptions are for types derived from IXRPropertyBag or IXRDependencyObject, which require an explicit call to QueryInterface to convert the generic interface to the required object type.
.NET Framework Equivalent
System.Windows.FrameworkElement.DataContext
Requirements
Header |
XamlRuntime.h |
sysgen |
SYSGEN_XAML_RUNTIME |