Reputation: 2490
I have the following markup declared in my control's resources:
<conv:ActionItemToBooleanConverter x:Key="ActionItemToBooleanConverter" />
<Style TargetType="{x:Type ListBox}">
<Setter Property="ListBox.ItemTemplate">
<Setter.Value>
<DataTemplate>
<RadioButton Content="Foo2"
GroupName="FOo"
IsChecked="{Binding CurrentProcessPoint, Converter={StaticResource ActionItemToBooleanConverter}, Mode=TwoWay}"
Style="{StaticResource {x:Type ToggleButton}}" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
For the RadioButton, when I introduced the Converter={StaticResource ActionItemToBooleanConverter}
on my IsChecked
Property it suddenly caused a problem for my Style="{StaticResource {x:Type ToggleButton}}"
. A blue squiggly appears under the style and says 'The resource {x:Type ToggleButton} could not be resolved'.
Why is this happening? What is it about the introduction of a StaticResource for my Converter that prevents me from Styling my RadioButton as a ToggleButton?
What can I add/fix to resolve the conflict?
Thanks
Upvotes: 2
Views: 204