The LookupBindingPropertiesAttribute is used to specify the properties used with lookup-based binding, particularly ListBox and ComboBox controls.
The LookupBindingPropertiesAttribute is specified at the class level. The class can be inherited and does not allow multiple attributes on the same class.
' The DemoControl class shows properties ' used with lookup-based binding.
<LookupBindingProperties( _
"DataSource", _
"DisplayMember", _
"ValueMember", _
"LookupMember")> _
PublicClass DemoControl
Inherits Control
EndClass
The LookupBindingPropertiesAttribute attribute must include all four members, except when unsetting values. The following code example shows the ComboBox control.
' The DemoComboBox2 class shows that a control can ' support both simple binding as well as list binding.
<LookupBindingProperties( _
"DataSource", _
"DisplayMember", _
"ValueMember", _
"SelectedValue"), _
DefaultBindingProperty("Text")> _
PublicClass DemoComboBox2
Inherits Control
EndClass
The following code example shows that the LookupBindingPropertiesAttribute attribute can be unset by specifying no arguments.
' NonBindableCombo control shows how to unset the ' LookupBindingProperties by specifying no arguments.
<LookupBindingProperties()> _
PublicClass NonBindableCombo
Inherits Control
EndClass
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.