DataTemplateSelector class
Enables custom template selection logic at the application level.
Inheritance
- Object
- DataTemplateSelector
Syntax
See Remarks
Attributes
- MarshalingBehaviorAttribute(Agile)
- ThreadingAttribute(Both)
- VersionAttribute(NTDDI_WIN8)
- WebHostHiddenAttribute()
Members
The DataTemplateSelector class has these types of members:
Constructors
The DataTemplateSelector class has these constructors.
| Constructor | Description |
|---|---|
| DataTemplateSelector | Initializes a new instance of the DataTemplateSelector class. |
Methods
The DataTemplateSelector class has these methods. It also inherits methods from the Object class.
| Method | Description |
|---|---|
| SelectTemplate | Returns a specific DataTemplate for a given item or container. |
| SelectTemplateCore | When implemented by a derived class, returns a specific DataTemplate for a given item or container. |
Remarks
The base DataTemplateSelector class is not used as an object element in XAML. However, it is a common scenario to derive a custom DataTemplateSelector, 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 ItemTemplateSelector in XAML templates and visual states.
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 3/12/2013
