New Templates for own custom control RRS feed

  • Question

  • Hi,

    i implement my own custom control and now i would like to define some new templates... it should be possible to add new templates. i dont mean the default style!!

    i need four templates that can be defined for exmaple with blend...

    therefore i add four DependencyProperty of type Style to my control... and in my default style i wrote something like this:


     <Style TargetType="{x:Type local:MyControl}">
        <Setter Property="Template">
    <Setter Property="NEwTemplateA">

    The Templates should appear in Blend:




    My Problem:

    1. I'm not sure if this is the right way.

    2. Blend integration


    Thank you

    • Moved by Min Zhu Monday, November 29, 2010 4:31 AM (From:Windows Presentation Foundation (WPF))
    Friday, November 26, 2010 10:40 AM

All replies

  • Can someone help me?
    Monday, November 29, 2010 1:43 PM
  • It might work if you change your dependencyproperties to type ControlTemplate.   This should make them appear in the "Edit Additional Templates..." menu.  What are you trying to do with the templates?
    Tuesday, November 30, 2010 11:03 PM