IXRControl::SetTemplate (Compact 2013)
3/28/2014
This method sets the control template that is used to define the appearance of this control.
Syntax
virtual HRESULT STDMETHODCALLTYPE SetTemplate(
IXRControlTemplate *pTemplate
) = 0;
Parameters
- pTemplate
[in] Pointer to an IXRControlTemplate object that defines the new appearance of this control.
Return Value
Returns an HRESULT that indicates success or failure.
Returns XR_E_INVALID_OBJECT if pTemplate is not a XAML for Windows Embedded object.
Remarks
A control template can be defined in Microsoft Silverlight 3 XAML markup by using the <ControlTemplate> markup element. 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 ControlTemplate Class on MSDN.
If an IXRControl has an IXRControlTemplate associated with it, the control can appear in your application UI.
The TargetType attribute for the control template must be set correctly in XAML for the custom control for this method to work correctly.
.NET Framework Equivalent
System.Windows.Controls.Control.Template
Requirements
Header |
XamlRuntime.h |
sysgen |
SYSGEN_XAML_RUNTIME |