Show / Hide Table of Contents

Class DataTemplateKey

Represents the resource key for the DataTemplate class.

Inheritance
System.Object
DataTemplateKey
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows
Assembly: OpenSilver.dll
Syntax
public class DataTemplateKey

Constructors

| Improve this Doc View Source

DataTemplateKey()

Initializes a new instance of the DataTemplateKey class without initializing the DataType property.

Declaration
public DataTemplateKey()
| Improve this Doc View Source

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 Source

DataType

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 Source

Equals(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
System.Object.Equals(System.Object)
| Improve this Doc View Source

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.

Overrides
System.Object.GetHashCode()
  • Improve this Doc
  • View Source