I have named Styles and Templates in my App.xaml file. I can apply these to each control throughout my project. I have a UserControl with X number of Buttons. Instead of specifying each Button's style, I was able to use BasedOn:
This has saved a lot of typing to specify which style to use on this page. Is there a way to set all Buttons' Templates on this page using a named Template I already have? It would make sense for this to be possible.
<UserControl ...>
<UserControl.Resources>
<Style TargetType={x:Type Button}" BasedOn="{StaticResource styBigButtons}">
<Setter Property="Margin" Value="10" />
</Style>
</UserControl.Resources>
<Grid>
///This is a very condensed example so we can get to the point
<Button Name="btn1" Content="1" Template="{StaticResource ctRedButton}" />
...
<Button Name="btn9" Content="9" Template="{StaticResource ctRedButton}" />
</Grid>
</UserControl>
This has saved a lot of typing to specify which style to use on this page. Is there a way to set all Buttons' Templates on this page using a named Template I already have? It would make sense for this to be possible.