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)

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.

ExceptionCondition
NotSupportedException

value is null

-or-

value i is not an instance of FontWeight

-or-

destinationType is not a valid destination type.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft