Cocktail Help Reference
RegisterConvention(IValueConverter,DependencyProperty,Type) Method
See Also  Send Feedback
Cocktail Assembly > Cocktail Namespace > ValueConverterConventionRegistry Class > RegisterConvention Method : RegisterConvention(IValueConverter,DependencyProperty,Type) Method



converter
The converter instance returned by the ValueConverterConvention.
bindableProperty
The binding property to which this converter applies.
dataPropertyType
The type of the data property that this converter can convert.

Glossary Item Box

Creates a ValueConverterConvention and adds it to the registry. Creates a convention for a System.Windows.Data.IValueConverter with a Filter that matches the binding's and exactly.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Sub RegisterConvention( _
   ByVal converter As IValueConverter, _
   ByVal bindableProperty As DependencyProperty, _
   ByVal dataPropertyType As Type _
) 
Visual Basic (Usage)Copy Code
Dim converter As IValueConverter
Dim bindableProperty As DependencyProperty
Dim dataPropertyType As Type
 
ValueConverterConventionRegistry.RegisterConvention(converter, bindableProperty, dataPropertyType)
C# 
public static void RegisterConvention( 
   IValueConverter converter,
   DependencyProperty bindableProperty,
   Type dataPropertyType
)
C++/CLI 
public:
static void RegisterConvention( 
   IValueConverter^ converter,
   DependencyProperty^ bindableProperty,
   Type^ dataPropertyType
) 

Parameters

converter
The converter instance returned by the ValueConverterConvention.
bindableProperty
The binding property to which this converter applies.
dataPropertyType
The type of the data property that this converter can convert.

Remarks

See PathToImageSourceConverter for an example.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.