Partager via


IXRFrameworkElement::SetStyle (Compact 2013)

3/28/2014

This method sets an IXRStyle instance that is applied to this framework element when it is displayed.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetStyle(
    __in IXRStyle *pStyle
) = 0; 

Parameters

  • pStyle
    [in] Pointer to an IXRStyle object that references the new applied style for this element.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

Setting the applied style directly by using an IXRStyle object is not the most common way to apply a style to an element in XAML for Windows Embedded. You can apply a style to any element that inherits from IXRFrameworkElement. However, you can also apply a control template to elements that inherit from the derived class IXRControl by setting an IXRControlTemplate object for the element. It is more common for a UI designer to set the appearance of an element by defining a default style in XAML that XAML for Windows Embedded applies to all instances of the element.

.NET Framework Equivalent

System.Windows.FrameworkElement.Style

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRFrameworkElement
IXRFrameworkElement::GetStyle