Many a times when you write your own control in Silverlight, its properties are displayed under “Other” in Visual Studio and “Miscellaneous”  in Expression Blend.

For one or two properties this behaviour is acceptable, but when you are creating custom template controls, usually you have many custom properties. Having these organized in groups makes the life of a XAML designer a bit simple.

So how do you set categories to your properties?

The answer is simple, just place a Category Attribute to your property like this:

[Category(“My Properties”)]

public string MyCustomProperty{ get; set; }

You can have multiple properties in one group by setting two properties within the same group name.

Related Links


Share your thoughts

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s