PreFilterProperties
C#
1
Posts
1
Posters
0
Views
1
Watching
-
I have built a custom gradient form as part of a windows control library. What I would like to do is to hide the BackColor property from the forms designer (since it has now been replaced by BackColor1 and BackColor2). Currently when I create a new inherited form which inherits from my GradientForm in the designer pane I can see BackColor, BackColor1, and BackColor2. With a windows control I would use something like the following to remove BackColor:
internal class GradientPanelDesigner : ScrollableControlDesigner { public GradientPanelDesigner() { } protected override void PreFilterProperties(System.Collections.IDictionary properties) { properties.Remove("BackColor"); properties.Remove("BackgroundImage"); } }
Is there an equivalent for a Windows Form? thanks for help