Monday, December 3, 2012

How can I reuse a set of properties/values to initialize an object of a class derived from DependencyObject?

How can I reuse a set of properties/values to initialize an object of a class derived from DependencyObject?

I have a number of DataGridTemplateColumns in my DataGrid (Silverligh 4 SDK). All of them share the same set of settings. So how can I define a set of values for the same properties once and then reuse it to initialize all the columns (without having to specify them over and over for each column explicitly)? I cannot use Style because there is no such thing as Style for DataGridTemplateColumn because

You can set a Style on any element that derives from FrameworkElement.

which is not the case for DataGridTemplateColumn

Answers & Comments...




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog