views:

82

answers:

1

How can I separate Visual State Management from a Custom Control template?

I have one Custom Control, but with several different faces placed in templates. All templates must have same state-based visualisation. Is there any way to set my VSM once only? Otherwise I need to copy the VSM code in each template.

A: 

Re-templating often leads to duplicate code, especially for VSM code. There isn't an easy way to abstract out that code today, unfortunately.

Jeff Wilcox