Share via


IXRControlTemplate::GetTargetType (Compact 2013)

3/28/2014

This method retrieves the object type to which this control template is applied.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetTargetType(
    IID *pIID
) = 0;

Parameters

  • pIID
    [out] Pointer to the interface identifier (IID) of the object type to which this control template is applied.

Return Value

Returns an HRESULT that indicates success or failure.

Returns S_FALSE when the target object type is not set for this control template.

Remarks

The IID returned in pIID is the name of an object that inherits from IXRControl, prefixed with the substring "IID_". For example, IID_IXRButton.

To set a new target object for an IXRControlTemplate object, call IXRControlTemplate::SetTargetType.

The controls available in XAML for Windows Embedded each have default control templates set in the generic.xaml source file. You can retrieve the control template set for a control by calling IXRControl::GetTemplate. Then, you can call this method on the retrieved IXRControlTemplate object to determine what object type the control template will be applied to.

.NET Framework Equivalent

System.Windows.Controls.ControlTemplate.TargetType

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRControlTemplate