How put Dependency Property in not Miscellaneous panel?
When I add Dependency Property to my user control, I always finded it in Miscellaneous panel on a properties window (in Expression Blend). But, some times i've too many custom properties and all they are in Miscellaneous panel. How I开发者_如何学编程 can put properties to othe panel? May be I can make my own panel? But I do not know - how.
The attributes in System.ComponentModel determine this.
In your case, you need to specify the [Category] to use for your property.
I like to additionally decorate the method with a description as such:
[Category("Modal Options")]
[Description("Set the modal background on or off")]
public bool Modal
{
get { return (bool)GetValue(ModalProperty); }
set { SetValue(ModalProperty, value); toggleModal(); }
}
This shows in the tool tip which is useful.
精彩评论