LookupBindingPropertiesAttribute Class
Assembly: System (in system.dll)
'Declaration <AttributeUsageAttribute(AttributeTargets.Class)> _ Public NotInheritable Class LookupBindingPropertiesAttribute Inherits Attribute 'Usage Dim instance As LookupBindingPropertiesAttribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Class) */ public final class LookupBindingPropertiesAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.Class) public final class LookupBindingPropertiesAttribute extends Attribute
Not applicable.
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 following code example shows properties used with lookup-based binding.
' The DemoControl class shows properties ' used with lookup-based binding. <LookupBindingProperties( _ "DataSource", _ "DisplayMember", _ "ValueMember", _ "LookupMember")> _ Public Class DemoControl Inherits Control End Class
The LookupBindingPropertiesAttribute attribute must include all four members, except when unsetting values. The following code example shows the ComboBox control.
' The DemoComboBox control shows a standard ' combo box binding definition. <LookupBindingProperties( _ "DataSource", _ "DisplayMember", _ "ValueMember", _ "SelectedValue")> _ Public Class DemoComboBox Inherits Control End Class
The following code example shows that a control can support both simple binding as well as list binding.
' The DemoComboBox2 class shows that a control can ' support both simple binding as well as list binding. <LookupBindingProperties( _ "DataSource", _ "DisplayMember", _ "ValueMember", _ "SelectedValue"), _ DefaultBindingProperty("Text")> _ Public Class DemoComboBox2 Inherits Control End Class
The following code example shows that the LookupBindingPropertiesAttribute attribute can be unset by specifying no arguments.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.