Partager via


IXRStyle (Compact 2013)

3/28/2014

This class contains a collection of objects used to set properties that can be shared between instances of a specific type.

Syntax

class IXRStyle : public IXRDependencyObject

Inheritance Hierarchy

IXRDependencyObject

    IXRStyle

Methods

Method

Description

IXRStyle::GetBasedOn

Retrieves a defined style that is the basis of the current style.

IXRStyle::GetIsSealed

Retrieves a value that indicates whether this style is read only.

IXRStyle::GetSetters

Retrieves a collection of objects used to set properties.

IXRStyle::GetTargetType

Retrieves the type of object for which this style is intended.

IXRStyle::Seal

Locks this style so that you cannot change either its destination type or its value-setting objects in its IXRSetterBaseCollection object.

IXRStyle::SetBasedOn

Sets a defined style that is the basis of the current style.

IXRStyle::SetTargetType

Sets the type of object for which this style is intended.

Thread Safety

Members of this class are thread-safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.

Remarks

You can set a style on any object that derives from IXRFrameworkElement. To do this, supply an IXRStyle object to its inherited method IXRFrameworkElement::SetStyle.

You can also set a style for all objects in an item collection that belong to an IXRSelector-derived object. To do this, call IXRComboBox::SetItemContainerStyle or IXRListBox::SetItemContainerStyle.

For more information about the objects used to set values in the collection in an IXRStyle object, see IXRSetter.

When you create a class instance, use an IXRStylePtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

You can also define a style in Silverlight 3 XAML. 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 the Style Class on MSDN.

.NET Framework Equivalent

System.Windows.Style

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Visual Appearance