Click or drag to resize

RoleBasedDataTemplateSelector Class

A template selector that finds the DataTemplate by the RoleBasedDataTemplateKey.
Inheritance Hierarchy
SystemObject
  System.Windows.ControlsDataTemplateSelector
    TomsToolbox.Wpf.CompositionRoleBasedDataTemplateSelector

Namespace:  TomsToolbox.Wpf.Composition
Assembly:  TomsToolbox.Wpf (in TomsToolbox.Wpf.dll) Version: 1.0.70.0
Syntax
public class RoleBasedDataTemplateSelector : DataTemplateSelector

The RoleBasedDataTemplateSelector type exposes the following members.

Constructors
  NameDescription
Public methodRoleBasedDataTemplateSelector
Initializes a new instance of the RoleBasedDataTemplateSelector class
Top
Properties
  NameDescription
Public propertyFallbackValue
Gets or sets the template used as fallback if no template for the specified role is found.

[CanBeNull]

Public propertyRole
Gets or sets the role to use in the lookup.

[CanBeNull]

Top
Methods
Extension Methods
  NameDescription
Public Extension MethodSafeCastT
Performs a cast from object to T, avoiding possible null violations if T is a value type.

[CanBeNull]

(Defined by ObjectExtensions.)
Top
See Also