IDynamicValues インターフェイス

定義

IDynamicValues インターフェイスは、文字列プロパティの動的リストを作成するために使用されます。 クラスは、このインターフェイスを実装し、DynamicValuesAttribute (以下) を使用して動的値の生成を有効にする必要があります。

この相互運用と属性は、実行時まで認識されない文字列の一覧をドロップダウン リストに表示する必要がある場合に使用できます。 この例としては、データベース名、ユーザー、照合順序などがあります。

public interface IDynamicValues
type IDynamicValues = interface
Public Interface IDynamicValues

public TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { string[] collationName = new string[] { "first item", "second itme" }; return new TypeConverter.StandardValuesCollection(collationName); }

メソッド

名前 説明
GetStandardValues(ITypeDescriptorContext)

GetStandardValues は、コンテキスト内のプロパティ指定子の一覧に表示されるすべての項目を含む StandardValuesCollection を返す必要があります。

適用対象