次の方法で共有


IXRFrameworkElement::GetStyle (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

virtual HRESULT STDMETHODCALLTYPE GetStyle(
    IXRStyle **ppStyle
) = 0;

Parameters

  • ppStyle
    [out] Pointer to an IXRStyle pointer that references the applied style for this element, if it is present. Otherwise, a null reference.

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 Silverlight. 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 to set the appearance of an element through one of the following cases:

  • Control developers write a control that is based on IXRControl that is templatable. Then, applications that use the control can change its appearance by setting a new IXRControlTemplate object for it.
  • UI designers define a default style in XAML that Silverlight applies to all instances of the control.

.NET Framework Equivalent

System.Windows.FrameworkElement.Style

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

IXRFrameworkElement
IXRFrameworkElement::SetStyle