Greetings
.
I'm working on a custom WPF user control which acts like a button (and surprisingly inherits Button).
However, my button has some limitations for designtime (The size is constant, the color scheme is
pre-defined in an enumeration etc..).
Therefore, I want people who use my control in design time, to be able to do only things I allow.
In WinForms, I could create myself a MyButtonDesigner : ControlDesigner, and override the
PostFilterProperties method and there remove unwanted properties (or add/change etc..).
Unfortrantly, I could not find a replacement to the System.Windows.Forms.Design.ControlDesigner
class for WPF...
Is there any solution out there?
Code Snippet displaying what I am looking for, written for WinForm
..
public class MyButtonDesigner : System.Windows.Forms.Design.ControlDesigner
{
public MyButtonDesigner()
{
}
protected override void PostFilterProperties( IDictionary properties )
{
properties.Remove( "ForeColor" );
properties.Remove( "Size" );
}
}
Best Regards,
Doron.