1

What is the best practice for creating re-usable control templates.

For example. I want to start with the standard checkbox and modify its template for re-use accross multiple future projects.

I understand how to modify the template in Blend, but it always wants to save the template to App.xaml of the current project or to the parent control where I first placed the checkbox.

Ideally I would like some soft of ControlLibrary that contains all my custom controls AND custom templates (modified templates of existing controls)

-Jeff

GameFreak
  • 2,881
  • 7
  • 34
  • 38
Jeff Weber
  • 949
  • 1
  • 8
  • 18

2 Answers2

1

Implicit Style Manager might be helpful.

The Silverlight controls team and others have been blogging a bit recently about ISM which allows alternative style sets to be applied across the board to standard controls. Try Jesse Liberty's blog or Mehdi Slaoui Andaloussi's blog

HTH

Luke Woodward
  • 63,336
  • 16
  • 89
  • 104
Gordon Mackie JoanMiro
  • 3,499
  • 3
  • 34
  • 42
  • Yeah, the Silverlight Toolkit's ISM is the closest thing you will get. Give it a try, feel free to comment back here if you have any trouble! – Jeff Wilcox Aug 30 '09 at 18:38
0

I don't think you can have a ControlTemplate as a separate entity, without it being attached to a Control. For your control library you can create custom controls that have the appropriate custom templates and reuse the controls.

Boyan
  • 3,645
  • 3
  • 22
  • 14