Enables custom item style selection logic as a function of the content data and its specific item container.
The StyleSelector class has these types of members:
The StyleSelector class has these constructors.
|StyleSelector||Initializes a new instance of the StyleSelector class.|
The StyleSelector class has these methods. It also inherits methods from the Object class.
|SelectStyle||Returns a specific Style based on custom logic.|
|SelectStyleCore||When implemented by a derived class, returns a specific Style based on custom logic.|
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.
Minimum supported client
|Windows 8 [Windows Store apps only]|
Minimum supported server
|Windows Server 2012 [Windows Store apps only]|
Minimum supported phone
|Windows Phone 8.1 [Windows Runtime apps only]|