Редагувати

Поділитися через


FontUnitConverter.ConvertTo Method

Definition

Converts a FontUnit to an object with a different data type.

public:
 override System::Object ^ ConvertTo(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value, Type ^ destinationType);
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType);
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
Public Overrides Function ConvertTo (context As ITypeDescriptorContext, culture As CultureInfo, value As Object, destinationType As Type) As Object

Parameters

context
ITypeDescriptorContext

An ITypeDescriptorContext implemented object that provides information about the context of a type converter.

culture
CultureInfo

A CultureInfo that specifies the culture to represent the FontUnit, when it is expressed in points.

value
Object

A Object that represents the FontUnit to convert.

destinationType
Type

A Type that represents the data type to convert to.

Returns

A Object that represents the converted value.

Remarks

Use the ConvertTo method to convert the FontUnit specified by the value parameter to an object with the data type specified by the destinationType parameter.

Note

String.Empty is returned from this method if the value parameter contains null. String.Empty is also returned if the Type property of the FontUnit specified by the value parameter contains the value FontSize.NotSet.

Note

This method can only convert a FontUnit to a string.

Applies to

See also