LookupBindingPropertiesAttribute クラス
アセンブリ: System (system.dll 内)

<AttributeUsageAttribute(AttributeTargets.Class)> _ Public NotInheritable Class LookupBindingPropertiesAttribute Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Class)] public sealed class LookupBindingPropertiesAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class)] public ref class LookupBindingPropertiesAttribute sealed : public Attribute

LookupBindingPropertiesAttribute は、検索ベースのバインディング (特に ListBox コントロールと ComboBox コントロール) で使用するプロパティを指定するために使用します。
LookupBindingPropertiesAttribute はクラス レベルで指定されます。このクラスは継承でき、同じクラスで複数の属性を使用することはできません。

検索ベースのバインディングで使用するプロパティを次のコード例に示します。
[LookupBindingProperties("DataSource", "DisplayMember", "ValueMember", "LookupMember")] public class DemoControl : Control { … }
LookupBindingPropertiesAttribute 属性には、値の設定解除時を除き、4 つのメンバすべてを含める必要があります。ComboBox コントロールを次のコード例に示します。
[LookupBindingProperties("DataSource", "DisplayMember", "ValueMember", "SelectedValue")] public class ComboBox : Control{ … }
コントロールで単純バインディングとリスト バインディングの両方をサポートできることを次のコード例に示します。
[LookupBindingProperties("DataSource", "DisplayMember", "ValueMember", "SelectedValue")] [DefaultBindingProperty("Text")] public class ComboBox : Control{ … }
引数を指定しないことによって LookupBindingPropertiesAttribute 属性を設定解除できることを次のコード例に示します。

System.Attribute
System.ComponentModel.LookupBindingPropertiesAttribute


Windows 98, Windows 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
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- LookupBindingPropertiesAttribute クラスのページへのリンク