Compartir a través de


IXRStyle::SetTargetType (Compact 2013)

3/28/2014

This method sets the type of object for which this style is intended.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetTargetType(
    __in const IID iid
) = 0;

Parameters

  • iid
    [in] Interface identifier (IID) of the object type for which this style is intended.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

When you create an IXRStyle object, you must set the type by calling this method. If you do not, an exception is thrown.

You can set a style on any object that derives from IXRFrameworkElement. Therefore, the target type can be an IID for any of those derived objects.

To provide an IID, you prefix the name of an object that inherits from IXRFrameworkElement with the substring "IID_". For example, IID_IXRListBoxItem.

.NET Framework Equivalent

System.Windows.Style.TargetType

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRStyle
IXRStyle::GetTargetType