Hi
I'm working on a C++ Metro style app. I use a resource dictionary from which I define styles for several controls, for example a group of radio buttons. The designer shows an error ("Template's TargetType property does not match its control type")
but only for the first of these buttons. I can't figure out any mistake, maybe there is one, but since I am able to compile I may assume that this is a bug.
Simplified code for the controls inside my page:
<RadioButton x:Name="m_btnTone0" Content="1" Style="{StaticResource ToneButton}"/>
<RadioButton x:Name="m_btnTone1" Content="2" Style="{StaticResource ToneButton}"/>
Simplified code for the style inside the dictionary:
<Style x:Key="ToneButton" TargetType="RadioButton">
<Setter Property="FontSize" Value="21.333"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="VerticalContentAlignment" Value="Bottom"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="ClickMode" Value="Press"/>
<Setter Property="GroupName" Value="ToneButtonsGroup"/>
</Style>