AccessDataSourceDesigner.PreFilterProperties(IDictionary) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
[プロパティ] グリッドのプロパティの追加や削除、または、関連付けられたコントロールのプロパティをシャドウするために、デザイナーによって使用されます。
protected:
override void PreFilterProperties(System::Collections::IDictionary ^ properties);
protected override void PreFilterProperties (System.Collections.IDictionary properties);
override this.PreFilterProperties : System.Collections.IDictionary -> unit
Protected Overrides Sub PreFilterProperties (properties As IDictionary)
パラメーター
- properties
- IDictionary
追加されたプロパティおよびシャドウ プロパティの IDictionary を実装するコレクション。
例
次のコード例は、 メソッドを PreFilterProperties オーバーライドしてプロパティを ConnectionString 読み取り専用にし、 プロパティ グリッドに表示する方法を示しています。
このコード例は、AccessDataSourceDesigner クラスのために提供されている大規模な例の一部です。
// Shadow control properties with design time properties.
protected override void PreFilterProperties(IDictionary properties)
{
// Call the base class method first.
base.PreFilterProperties(properties);
// Add the ConnectionString property to the property grid.
PropertyDescriptor property =
(PropertyDescriptor)properties["ConnectionString"];
Attribute[] attributes = new Attribute[]
{
new BrowsableAttribute(true),
new ReadOnlyAttribute(true)
};
properties["ConnectionString"] = TypeDescriptor.CreateProperty(
GetType(), property, attributes);
}
' Shadow control properties with design time properties.
Protected Overrides Sub PreFilterProperties(ByVal properties As IDictionary)
' Call the base class method first.
MyBase.PreFilterProperties(properties)
' Add the ConnectionString property to the property grid.
Dim prop As PropertyDescriptor
prop = CType(properties("ConnectionString"), PropertyDescriptor)
Dim atts(1) As Attribute
atts(0) = New BrowsableAttribute(True)
atts(1) = New ReadOnlyAttribute(True)
properties("ConnectionString") = TypeDescriptor.CreateProperty( _
prop.GetType(), prop, atts)
End Sub
注釈
コントロール デザイナーは、 メソッドから派生したメソッドをComponentDesigner.PreFilterProperties使用して、デザイナーが実装する対応するデザイン時プロパティを使用してさまざまなコントロール プロパティをシャドウし、プロパティグリッドにプロパティを追加または削除します。
コントロールの AccessDataSource 場合、 メソッドは PreFilterProperties デザイン時 DataFile プロパティを作成して、コントロールの プロパティを DataFile シャドウします。
注意 (継承者)
デザイン時の PreFilterProperties(IDictionary) プロパティ コレクションにプロパティを追加したり、その属性を変更したりするには、 メソッドをオーバーライドします。 他の処理を実行する前に、必ず基本メソッドを呼び出してください。
適用対象
こちらもご覧ください
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示