Note that there are some explanatory texts on larger screens.

plurals
  1. POMultiple storyboards on one property
    text
    copied!<p>I have multiple storyboards that access the same property (not at the same time). After one storyboard changed the property, the other one seems to have no access to it and does not change anything.. What can I do against this?</p> <p>Sample:</p> <pre><code>&lt;ListBox&gt; &lt;ListBox.ItemContainerStyle&gt; &lt;Style TargetType="ListBoxItem"&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="{x:Type ListBoxItem}"&gt; &lt;Border Name="Border" BorderBrush="DarkGray" BorderThickness="1" Margin="3"&gt; &lt;ContentPresenter /&gt; &lt;Border.Background&gt; &lt;SolidColorBrush /&gt; &lt;/Border.Background&gt; &lt;/Border&gt; &lt;ControlTemplate.Triggers&gt; &lt;Trigger Property="IsSelected" Value="True"&gt; &lt;Trigger.EnterActions&gt; &lt;BeginStoryboard&gt; &lt;Storyboard&gt; &lt;ColorAnimation Storyboard.TargetName="Border" Storyboard.TargetProperty="Background.Color" To="#3e8bff" Duration="0:0:0.1" /&gt; &lt;/Storyboard&gt; &lt;/BeginStoryboard&gt; &lt;/Trigger.EnterActions&gt; &lt;Trigger.ExitActions&gt; &lt;BeginStoryboard&gt; &lt;Storyboard&gt; &lt;ColorAnimation Storyboard.TargetName="Border" Storyboard.TargetProperty="Background.Color" To="White" Duration="0:0:0.1" /&gt; &lt;/Storyboard&gt; &lt;/BeginStoryboard&gt; &lt;/Trigger.ExitActions&gt; &lt;/Trigger&gt; &lt;MultiTrigger&gt; &lt;MultiTrigger.Conditions&gt; &lt;Condition Property="IsMouseOver" Value="True" /&gt; &lt;Condition Property="IsSelected" Value="False" /&gt; &lt;/MultiTrigger.Conditions&gt; &lt;MultiTrigger.EnterActions&gt; &lt;BeginStoryboard&gt; &lt;Storyboard&gt; &lt;ColorAnimation Storyboard.TargetName="Border" Storyboard.TargetProperty="Background.Color" To="Orange" Duration="0:0:0.1" /&gt; &lt;/Storyboard&gt; &lt;/BeginStoryboard&gt; &lt;/MultiTrigger.EnterActions&gt; &lt;MultiTrigger.ExitActions&gt; &lt;BeginStoryboard&gt; &lt;Storyboard&gt; &lt;ColorAnimation Storyboard.TargetName="Border" Storyboard.TargetProperty="Background.Color" To="White" Duration="0:0:0.1" /&gt; &lt;/Storyboard&gt; &lt;/BeginStoryboard&gt; &lt;/MultiTrigger.ExitActions&gt; &lt;/MultiTrigger&gt; &lt;/ControlTemplate.Triggers&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; &lt;/ListBox.ItemContainerStyle&gt; &lt;ListBox.Items&gt; &lt;sys:String&gt;hey&lt;/sys:String&gt; &lt;sys:String&gt;du&lt;/sys:String&gt; &lt;sys:String&gt;dux&lt;/sys:String&gt; &lt;sys:String&gt;duy&lt;/sys:String&gt; &lt;sys:String&gt;dua&lt;/sys:String&gt; &lt;/ListBox.Items&gt; &lt;/ListBox&gt; </code></pre> <p>This is the smallest sample code I could make. After you've hovered an item, it won't turn blue when it's selected (try to click on one item and then use the arrow keys to select items without hovering them).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload