Dela via


RibbonControlLengthConverter.CanConvertFrom Method (ITypeDescriptorContext, Type)

Determines whether an instance of the specified type can be converted to an instance of the RibbonControlLength structure.

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

Syntax

'Declaration
Public Overrides Function CanConvertFrom ( _
    context As ITypeDescriptorContext, _
    sourceType As Type _
) As Boolean
public override bool CanConvertFrom(
    ITypeDescriptorContext context,
    Type sourceType
)
public:
virtual bool CanConvertFrom(
    ITypeDescriptorContext^ context, 
    Type^ sourceType
) override
abstract CanConvertFrom : 
        context:ITypeDescriptorContext * 
        sourceType:Type -> bool 
override CanConvertFrom : 
        context:ITypeDescriptorContext * 
        sourceType:Type -> bool 
public override function CanConvertFrom(
    context : ITypeDescriptorContext, 
    sourceType : Type
) : boolean

Parameters

  • sourceType
    Type: System.Type
    The type to convert from.

Return Value

Type: System.Boolean
true if this converter can perform the conversion; otherwise, false.

Remarks

This converter can convert from string, integer, and floating point types.

.NET Framework Security

See Also

Reference

RibbonControlLengthConverter Class

CanConvertFrom Overload

Microsoft.Windows.Controls.Ribbon Namespace