Reputation: 10927
I created my own ContentCOntrol in XAML, e.x.:
<ContentControl x:Class="server.ui.DiamondButton">
<ContentControl.Template>
<ControlTemplate TargetType="src:DiamondButton">
<...>
</ControlTemplate>
</ContentControl.Template>
</ContentControl>
This sets the default template and generally works great. However, the template is not editable in Expression. I get the message 'DiamondButton' ControlTemplate TargetType does not match templated type 'ContentControl'. Is there another way I should be doing this which allows it to be editable in Blend?
Upvotes: 1
Views: 1235
Reputation: 27055
Unless you use specific properties from your DiamondButton in TemplateBindings in your ControlTemplate, changing the TargetType src:DiamondButton to ContentControl should do the trick ;)..
<ContentControl x:Class="server.ui.DiamondButton">
<ContentControl.Template>
<ControlTemplate TargetType="ContentControl">
<...>
</ControlTemplate>
</ContentControl.Template>
</ContentControl>
Upvotes: 2