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

 

Attempts to convert an instance of FontWeight to a specified type.

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

[SecurityCriticalAttribute]
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

Describes the CultureInfo of the type being converted.

value
Type: System.Object

The instance of FontWeight to convert.

destinationType
Type: System.Type

The type this instance of FontWeight is converted to.

Return Value

Type: System.Object

The object created from the converted instance of FontWeight.

Exception Condition
NotSupportedException

value is null

-or-

value i is not an instance of FontWeight

-or-

destinationType is not a valid destination type.

.NET Framework
Available since 3.0
Return to top
Show: