Nel file Application.xaml ho dichiarato il seguente style
codice:
<Style x:Key="stile_ListBoxItem" TargetType="{x:Type ListBoxItem}">
<Setter Property="FocusVisualStyle"
Value="{x:Null}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<ControlTemplate.Triggers>
<Trigger Property="IsSelected"
Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation To="2"
Storyboard.TargetName="scale"
Storyboard.TargetProperty="ScaleY" />
<DoubleAnimation To="2"
Storyboard.TargetName="scale"
Storyboard.TargetProperty="ScaleX" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation To="1"
Storyboard.TargetName="scale"
Storyboard.TargetProperty="ScaleY" />
<DoubleAnimation To="1"
Storyboard.TargetName="scale"
Storyboard.TargetProperty="ScaleX" />
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
<ContentPresenter>
<ContentPresenter.LayoutTransform>
<ScaleTransform ScaleY="1"
x:Name="scale" />
</ContentPresenter.LayoutTransform>
</ContentPresenter>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
nella window ho la seguente list box
codice:
<ListBox Margin="12,78,273,12" Name="ListBoxRisultati" />
tento di impostare attraverso le proprietà lo style di ItemContainerStyle ma non riesco a vedere lo style dichiarato al livello applicazione.
Dove sbaglio?