HierarchicalDataBoundControlDesigner.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 メソッドから派生したメソッドを使用して、各種のコントロール プロパティを対応するデザイン時プロパティを実装してシャドウしたり、[プロパティ] グリッドのプロパティを追加または削除したりできます。
HierarchicalDataBoundControl クラスから派生したコントロールの場合、PreFilterProperties メソッドは、デザイン時のプロパティを作成し、DataSource プロパティと DataSourceID プロパティをシャドウします。
継承時の注意 デザイン時のプロパティ コレクションに対し、プロパティを追加したり、プロパティの属性を変更したりするには、PreFilterProperties メソッドをオーバーライドします。他の処理を実行する前に、必ず基本メソッドを呼び出してください。
HierarchicalDataBoundControlDesigner クラスから継承したクラスで PreFilterProperties メソッドをオーバーライドし、デザイン時に、HierarchicalDataBoundControl コントロールの [プロパティ] グリッドを変更する方法を次のコード例に示します。この例では、[プロパティ] グリッドから NamingContainer プロパティを参照できるようにしています。
' Shadow the control properties with design-time properties. Protected Overrides Sub PreFilterProperties( _ ByVal properties As IDictionary) Dim namingContainer As String = "NamingContainer" ' Call the base method first. MyBase.PreFilterProperties(properties) ' Make the NamingContainery visible in the Properties grid. Dim selectProp As PropertyDescriptor = _ CType(properties(namingContainer), PropertyDescriptor) properties(namingContainer) = _ TypeDescriptor.CreateProperty(selectProp.ComponentType, _ selectProp, BrowsableAttribute.Yes) End Sub ' PreFilterProperties
// Shadow the control properties with design-time properties. protected override void PreFilterProperties(IDictionary properties) { string namingContainer = "NamingContainer"; // Call the base method first. base.PreFilterProperties(properties); // Make the NamingContainery visible in the Properties grid. PropertyDescriptor selectProp = (PropertyDescriptor)properties[namingContainer]; properties[namingContainer] = TypeDescriptor.CreateProperty(selectProp.ComponentType, selectProp, BrowsableAttribute.Yes); } // PreFilterProperties


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- HierarchicalDataBoundControlDesigner.PreFilterProperties メソッドのページへのリンク