Show / Hide Table of Contents

Class DataGridLengthConverter

DataGridLengthConverter - Converter class for converting instances of other types to and from DataGridLength instances.

Inheritance
System.Object
System.ComponentModel.TypeConverter
DataGridLengthConverter
Inherited Members
System.ComponentModel.TypeConverter.CanConvertFrom(System.Type)
System.ComponentModel.TypeConverter.CanConvertTo(System.Type)
System.ComponentModel.TypeConverter.ConvertFrom(System.Object)
System.ComponentModel.TypeConverter.ConvertFromInvariantString(System.ComponentModel.ITypeDescriptorContext, System.String)
System.ComponentModel.TypeConverter.ConvertFromInvariantString(System.String)
System.ComponentModel.TypeConverter.ConvertFromString(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.String)
System.ComponentModel.TypeConverter.ConvertFromString(System.ComponentModel.ITypeDescriptorContext, System.String)
System.ComponentModel.TypeConverter.ConvertFromString(System.String)
System.ComponentModel.TypeConverter.ConvertTo(System.Object, System.Type)
System.ComponentModel.TypeConverter.ConvertToInvariantString(System.ComponentModel.ITypeDescriptorContext, System.Object)
System.ComponentModel.TypeConverter.ConvertToInvariantString(System.Object)
System.ComponentModel.TypeConverter.ConvertToString(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)
System.ComponentModel.TypeConverter.ConvertToString(System.ComponentModel.ITypeDescriptorContext, System.Object)
System.ComponentModel.TypeConverter.ConvertToString(System.Object)
System.ComponentModel.TypeConverter.CreateInstance(System.Collections.IDictionary)
System.ComponentModel.TypeConverter.CreateInstance(System.ComponentModel.ITypeDescriptorContext, System.Collections.IDictionary)
System.ComponentModel.TypeConverter.GetConvertFromException(System.Object)
System.ComponentModel.TypeConverter.GetConvertToException(System.Object, System.Type)
System.ComponentModel.TypeConverter.GetCreateInstanceSupported()
System.ComponentModel.TypeConverter.GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext)
System.ComponentModel.TypeConverter.GetProperties(System.ComponentModel.ITypeDescriptorContext, System.Object)
System.ComponentModel.TypeConverter.GetProperties(System.ComponentModel.ITypeDescriptorContext, System.Object, System.Attribute[])
System.ComponentModel.TypeConverter.GetProperties(System.Object)
System.ComponentModel.TypeConverter.GetPropertiesSupported()
System.ComponentModel.TypeConverter.GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext)
System.ComponentModel.TypeConverter.GetStandardValues()
System.ComponentModel.TypeConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)
System.ComponentModel.TypeConverter.GetStandardValuesExclusive()
System.ComponentModel.TypeConverter.GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext)
System.ComponentModel.TypeConverter.GetStandardValuesSupported()
System.ComponentModel.TypeConverter.GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext)
System.ComponentModel.TypeConverter.IsValid(System.ComponentModel.ITypeDescriptorContext, System.Object)
System.ComponentModel.TypeConverter.IsValid(System.Object)
System.ComponentModel.TypeConverter.SortProperties(System.ComponentModel.PropertyDescriptorCollection, System.String[])
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Controls
Assembly: OpenSilver.Controls.Data.dll
Syntax
public class DataGridLengthConverter : TypeConverter

Methods

| Improve this Doc View Source

CanConvertFrom(ITypeDescriptorContext, Type)

Checks whether or not this class can convert from a given type.

Declaration
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
Parameters
Type Name Description
System.ComponentModel.ITypeDescriptorContext context

An ITypeDescriptorContext that provides a format context.

System.Type sourceType

The Type being queried for support.

Returns
Type Description
System.Boolean

true if this converter can convert from the provided type, false otherwise.

Overrides
System.ComponentModel.TypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Type)
| Improve this Doc View Source

CanConvertTo(ITypeDescriptorContext, Type)

Checks whether or not this class can convert to a given type.

Declaration
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
Parameters
Type Name Description
System.ComponentModel.ITypeDescriptorContext context

An ITypeDescriptorContext that provides a format context.

System.Type destinationType

The Type being queried for support.

Returns
Type Description
System.Boolean

true if this converter can convert to the provided type, false otherwise.

Overrides
System.ComponentModel.TypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)
| Improve this Doc View Source

ConvertFrom(ITypeDescriptorContext, CultureInfo, Object)

Attempts to convert to a DataGridLength from the given object.

Declaration
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
Parameters
Type Name Description
System.ComponentModel.ITypeDescriptorContext context

An ITypeDescriptorContext that provides a format context.

System.Globalization.CultureInfo culture

The CultureInfo to use for the conversion.

System.Object value

The object to convert to a GridLength.

Returns
Type Description
System.Object

The GridLength instance which was constructed.

Overrides
System.ComponentModel.TypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)
Exceptions
Type Condition
System.NotSupportedException

A NotSupportedException is thrown if the example object is null.

| Improve this Doc View Source

ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type)

Attempts to convert a DataGridLength instance to the given type.

Declaration
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Parameters
Type Name Description
System.ComponentModel.ITypeDescriptorContext context

An ITypeDescriptorContext that provides a format context.

System.Globalization.CultureInfo culture

The CultureInfo to use for the conversion.

System.Object value

The DataGridLength to convert.

System.Type destinationType

The type to which to convert the DataGridLength instance.

Returns
Type Description
System.Object

The object which was constructed.

Overrides
System.ComponentModel.TypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)
Exceptions
Type Condition
System.ArgumentNullException

An ArgumentNullException is thrown if the example object is null.

System.NotSupportedException

A NotSupportedException is thrown if the object is not null and is not a DataGridLength, or if the destinationType isn't one of the valid destination types.

  • Improve this Doc
  • View Source