[This documentation is preliminary and is subject to change.]
Applies to: Metro style apps only
A class that you derive from to select the item style as a function of the content data and its specific item container.
Inheritance
- Object
- StyleSelector
Syntax
See Remarks
Attributes
- MarshalingBehaviorAttribute(Agile)
- ThreadingAttribute(Both)
- VersionAttribute(NTDDI_WIN8)
- WebHostHiddenAttribute()
Members
The StyleSelector class has these types of members:
Constructors
The StyleSelector class has these constructors.
| Constructor | Description |
|---|---|
| StyleSelector | Initializes a new instance of the StyleSelector class. |
Methods
The StyleSelector class has these methods. It also inherits methods from the Object class.
| Method | Description |
|---|---|
| SelectStyle | When overridden in a derived class, returns a Style based on custom logic. |
| SelectStyleCore | Invokes SelectStyle on a StyleSelector implementation. |
Remarks
The base StyleSelector class is not used as an object element in XAML. However, it is a common scenario to derive a custom StyleSelector, map a xmlns prefix for the custom class and its namespace/assembly, and then refer to an instance of the custom class as defined in a Resources block in XAML. This makes it possible to refer to the custom template selector class by x:Key, and use that reference to set the value of properties such as ItemContainerStyleSelector in XAML templates and particular visual states.
Requirements
|
Minimum supported client | Windows 8 Release Preview |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 5/22/2012
