Skip to main content

ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) Method

Attempts to convert a DataGridLength instance to the given type.

Definition

Namespace: Avalonia.Controls
Assembly: Avalonia.Controls.DataGrid (in Avalonia.Controls.DataGrid.dll)

public override Object ConvertTo(
ITypeDescriptorContext context,
CultureInfo culture,
Object value,
Type destinationType
)

Parameters

  ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
  CultureInfo
The CultureInfo to use for the conversion.
  Object
The DataGridLength to convert.
  Type
The type to which to convert the DataGridLength instance.

Return Value

Object
The object which was constructed.

Exceptions

ArgumentNullExceptionAn ArgumentNullException is thrown if the example object is null.
NotSupportedExceptionA 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.

See Also

Reference

DataGridLengthConverter Class
ConvertTo Overload
Avalonia.Controls Namespace