AccessDataSourceDesigner.PreFilterProperties メソッド
アセンブリ: System.Design (system.design.dll 内)
構文Protected Overrides Sub PreFilterProperties ( _ properties As IDictionary _ )
Dim properties As IDictionary Me.PreFilterProperties(properties)
protected override void PreFilterProperties ( IDictionary properties )
protected void PreFilterProperties ( IDictionary properties )
protected override function PreFilterProperties ( properties : IDictionary )
解説コントロール デザイナは、ComponentDesigner.PreFilterProperties メソッドから派生したメソッドを使用して、各種のコントロール プロパティを対応するデザイン時プロパティを実装して Shadows' を実行したり、[プロパティ] グリッドのプロパティを追加または削除したりできます。
AccessDataSource コントロールに対しては、PreFilterProperties メソッドがデザイン時の DataFile プロパティを作成して、そのコントロールの DataFile プロパティの Shadows' を実行します。
継承時の注意 プロパティをデザイン時のプロパティ コレクションに追加したり、プロパティの属性を変更したりするには、PreFilterProperties メソッドをオーバーライドします。他の処理を実行する前に、必ず基本メソッドを呼び出してください。
使用例PreFilterProperties メソッドをオーバーライドして ConnectionString プロパティを読み取り専用にし、[プロパティ] グリッドに表示されるようにする方法を次のコード例に示します。
このコード例は、AccessDataSourceDesigner クラスのトピックで取り上げているコード例の一部分です。
' 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
// 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); }
.NET Framework のセキュリティ
プラットフォームWindows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照Weblioに収録されているすべての辞書からAccessDataSourceDesigner.PreFilterProperties メソッドを検索する場合は、下記のリンクをクリックしてください。
                     全ての辞書からAccessDataSourceDesigner.PreFilterProperties メソッド
                    を検索
                - AccessDataSourceDesigner.PreFilterProperties メソッドのページへのリンク