Dela via


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

Converts an instance of the RibbonControlLength structure to an instance of the specified type.

Namespace:  Microsoft.Windows.Controls.Ribbon
Assembly:  RibbonControlsLibrary (in RibbonControlsLibrary.dll)

Syntax

'Declaration
Public Overrides Function ConvertTo ( _
    context As ITypeDescriptorContext, _
    culture As CultureInfo, _
    value As Object, _
    destinationType As Type _
) As Object
public override Object ConvertTo(
    ITypeDescriptorContext context,
    CultureInfo culture,
    Object value,
    Type destinationType
)
public:
virtual Object^ ConvertTo(
    ITypeDescriptorContext^ context, 
    CultureInfo^ culture, 
    Object^ value, 
    Type^ destinationType
) override
abstract ConvertTo : 
        context:ITypeDescriptorContext * 
        culture:CultureInfo * 
        value:Object * 
        destinationType:Type -> Object 
override ConvertTo : 
        context:ITypeDescriptorContext * 
        culture:CultureInfo * 
        value:Object * 
        destinationType:Type -> Object 
public override function ConvertTo(
    context : ITypeDescriptorContext, 
    culture : CultureInfo, 
    value : Object, 
    destinationType : Type
) : Object

Parameters

  • destinationType
    Type: System.Type
    The type to convert the value to.

Return Value

Type: System.Object
The converted value.

Exceptions

Exception Condition
ArgumentNullException

destinationType is null.

ArgumentException

value is not a RibbonControlLength.

-or-

destinationType is not a valid conversion type.

.NET Framework Security

See Also

Reference

RibbonControlLengthConverter Class

ConvertTo Overload

Microsoft.Windows.Controls.Ribbon Namespace