Provides a way to apply styles based on custom logic.
Assembly: PresentationFramework (in PresentationFramework.dll)
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
When overridden in a derived class, returns a Style based on custom logic.
Returns a string that represents the current object.(Inherited from Object.)
To create a SelectStyle method.that applies a style based on custom logic, create a subclass of the class and implement the
The following example shows how to define a ResourceKey for the . The namespc prefix maps to a CLR namespace and the corresponding assembly where the is defined. For more information, see XAML Namespaces and Namespace Mapping for WPF XAML.
For an example of how to create a selector to choose a defined style resource, see the implementation of DataTemplateSelector.SelectTemplate, which allows you to use custom logic to select a DataTemplate, based on a similar concept.
Available since 3.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.