❔ In a derived WPF control, how do you hide properties from the base class?
I have a UserControl. UserControl, of course, exposes a property called Content. But if the parent of my control tries to set Content, you get mysterious error messages that are tough to understand. So I want to hide those properties. But how?
[EditorBrowsable]
doesn't work on properties. [Browsable]
does, but has no effect on the properties window in the designer. I tried putting warnings in my own [Description]
, but it seems the WPF designer is ignoring my property. So private
on the property has no effect either.3 Replies
I know this isn't the answer you want, but don't use the designer.
Doesn't matter as other developers might. Besides, I want the XAML compiler to disallow that property.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.