FontFamilyConverter.ConvertTo Method (ITypeDescriptorContext, CultureInfo, Object, Type)

 

Attempts to convert a specified object to an instance of FontFamily.

Namespace:   System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

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

Parameters

context
Type: System.ComponentModel.ITypeDescriptorContext

Describes the context information of a type.

culture
Type: System.Globalization.CultureInfo

Cultural-specific information that should be respected during conversion.

value
Type: System.Object

The object being converted.

destinationType
Type: System.Type

The type that this instance of FontFamily is converted to.

Return Value

Type: System.Object

The object that is created from the converted instance of FontFamily.

Exception Condition
ArgumentException

Occurs if value or destinationType is not a valid type for conversion.

ArgumentNullException

Occurs if value or destinationType is null.

FontFamilyConverter supports conversion to and from the String type.

.NET Framework
Available since 3.0
Return to top
Show: