I'm using Visual Studio 2010 and WPF.
I'm creating a new Control that inherits from ContentControl and I wanna hide the Content property so it will be invisible in the Properties window at design time.
I tried with
[Browsable(false)]
like we do in WinForms but it doesn't work.
Any idea about how to solve this?
Thank you.
Michelle,
Your property needs to be set to public:
[Browsable(false)]
public new object Content
{
get { return base.Content; }
set { base.Content = value; }
}
Once you set it to public, it will hide from the properties window.
With Private:
With Public:
Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With