Click or drag to resize

RoleBasedDataTemplateKey Class

A resource key for data templates, like the DataTemplateKey, but adding a Role property to distinguish several data templates for different roles.
Inheritance Hierarchy

Namespace:  TomsToolbox.Wpf.Composition
Assembly:  TomsToolbox.Wpf.Composition (in TomsToolbox.Wpf.Composition.dll)
Syntax
public class RoleBasedDataTemplateKey : TemplateKey, 
	IEquatable<RoleBasedDataTemplateKey>

The RoleBasedDataTemplateKey type exposes the following members.

Constructors
  NameDescription
Public methodRoleBasedDataTemplateKey
Initializes a new instance of the RoleBasedDataTemplateKey class.
Public methodRoleBasedDataTemplateKey(Object, Object)
Initializes a new instance of the RoleBasedDataTemplateKey class.
Top
Properties
  NameDescription
Public propertyRole
Gets or sets the role. The role is immutable and can be set only once.
Top
Methods
  NameDescription
Public methodEquals(Object)
Determines whether the specified Object, is equal to this instance.
(Overrides TemplateKeyEquals(Object).)
Public methodEquals(RoleBasedDataTemplateKey)
Indicates whether the current object is equal to another object of the same type.
Public methodGetHashCode
Returns a hash code for this instance.
(Overrides TemplateKeyGetHashCode.)
Top
Extension Methods
Remarks
Mainly used in conjunction with the RoleBasedDataTemplateSelector.
See Also