Class DataTemplateKey
Represents the resource key for the DataTemplate class.
Inheritance
Inherited Members
Namespace: System.Windows
Assembly: OpenSilver.dll
Syntax
public class DataTemplateKey
Constructors
| Improve this Doc View SourceDataTemplateKey()
Initializes a new instance of the DataTemplateKey class without initializing the DataType property.
Declaration
public DataTemplateKey()
DataTemplateKey(Object)
Initializes a new instance of the DataTemplateKey class, setting the DataType property to the specified value.
Declaration
public DataTemplateKey(object dataType)
Parameters
Type | Name | Description |
---|---|---|
System.Object | dataType | The initial value of the DataType property. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | dataType is not of type System.Type. |
Properties
| Improve this Doc View SourceDataType
Gets or sets the type for which the template is intended.
Declaration
public object DataType { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The type of object to which the template is applied. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The value is null. |
System.ArgumentException | When setting this property, the specified value is not of type System.Type. |
Methods
| Improve this Doc View SourceEquals(Object)
Returns a value that indicates whether the specified object is a DataTemplateKey that has the same DataType property value as the current DataTemplateKey.
Declaration
public override bool Equals(object o)
Parameters
Type | Name | Description |
---|---|---|
System.Object | o | The object to compare to the current object. |
Returns
Type | Description |
---|---|
System.Boolean | true if o is equivalent to the current object; otherwise, false. |
Overrides
GetHashCode()
Returns the hash code of the DataType property value.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | The hash code of the DataType property value, or 0 if DataType is null. |