Silverlight style trigger throwing error in blend
I am styling a listbox in silverlight and the trigger I am making will not work in Blend. Here is the code.
<Style TargetType="ListBoxItem" x:Key="ContainerStyle">
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="ContentTemplate" Value="{StaticResource SelectedTemplate}" />
</Trigger>
</Style.Triggers>
&l开发者_开发知识库t;Setter Property="ContentTemplate" Value="{StaticResource ItemTemplate}" />
</Style>
Blend just says "The member Triggers is not recognized or is not accessible.
That would be because the Style
class does not have a Triggers
collection. Only derivatives of FrameworkElement
have a Triggers
collection and in Silverlight only Loaded
trigger is recognized.
精彩评论