FontUnitConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, 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
参数
- context
- ITypeDescriptorContext
一个实现了 ITypeDescriptorContext 的对象,它提供有关类型转换器上下文的信息。An ITypeDescriptorContext implemented object that provides information about the context of a type converter.
- culture
- CultureInfo
指定用于表示 CultureInfo(当它以磅表示时)的区域性的 FontUnit。A CultureInfo that specifies the culture to represent the FontUnit, when it is expressed in points.
返回
Object,表示已转换的值。A Object that represents the converted value.
注解
使用 ConvertTo 方法可将 FontUnit 参数指定的转换 value 为具有参数指定的数据类型的对象 destinationType 。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.
备注
String.Empty 如果参数包含,则从此方法返回 value null 。String.Empty is returned from this method if the value parameter contains null. String.Empty 如果 Type FontUnit 由参数指定的的属性 value 包含值,也将返回 FontSize.NotSet 。String.Empty is also returned if the Type property of the FontUnit specified by the value parameter contains the value FontSize.NotSet.