View Issue Details

IDProjectCategoryView StatusLast Update
0000789NoesisGUIUnitypublic2018-11-23 11:39
Reportereasylaser Assigned Tosfernandez  
PrioritynormalSeveritymajor 
Status resolvedResolutionfixed 
Target Version2.2.0Fixed in Version2.2.0b3 
Summary0000789: Brush animations won't stop playing when leaving DataTrigger.
Description

If a trigger sets a new Brush and animates it (on the Trigger.EnterActions), when the trigger stops being active, original Brush value is not restored, the animation stays playing.

PlatformAny

Relationships

related to 0000792 resolvedsfernandez Setter value not restored in a Trigger if animated 

Activities

sfernandez

sfernandez

2015-12-29 12:24

manager   ~0003425

Last edited: 2015-12-29 12:27

Hi,

While we solve this bug, you can use another Storyboard in the Trigger.ExitActions to transition to normal state brush:


<Style x:Key="MyStyle" TargetType="{x:Type common:MyComponent}">
  <Setter Property="Background">
    <Setter.Value>
          <RadialGradientBrush>
            <GradientStop Color="Green" Offset="0.0"/>
            <GradientStop Color="Green" Offset="1.5"/>
          </RadialGradientBrush>
    </Setter.Value>
  </Setter>
  <Style.Triggers>
    <DataTrigger Binding="{Binding State}" Value="Doing">
      <DataTrigger.EnterActions>
        <BeginStoryboard>
          <Storyboard>
          <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[0].Color"
     To="White" Duration="0:0:0.2"/>
           <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color"
             To="{StaticResource Color.Active.Bright.Normal}" Duration="0:0:0.2"/>
            <DoubleAnimation Storyboard.TargetProperty="Background.RadiusX" 
              From="5" To="1" Duration="0:0:1" AutoReverse="True" 
              RepeatBehavior="Forever" />
            <DoubleAnimation Storyboard.TargetProperty="Background.RadiusY" 
              From="5" To="1" Duration="0:0:1" AutoReverse="True" 
              RepeatBehavior="Forever" />
          </Storyboard>
        </BeginStoryboard>
      </DataTrigger.EnterActions>
      <DataTrigger.ExitActions>
        <BeginStoryboard>
          <Storyboard>
            <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[0].Color"
              To="Green" Duration="0:0:0.5"/>
            <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color"
              To="Green" Duration="0:0:0.2"/>
          </Storyboard>
        </BeginStoryboard>
      </DataTrigger.ExitActions>
    </DataTrigger>
  </Style.Triggers>
</Style>

peterh

peterh

2016-03-23 13:46

reporter   ~0003649

Thank you. Sadly, this workaround won't cut it for me, as the actual state (as opposed to the minimal example I gave you) is much more complex than the workaround allows.
I'll just have to wait until this is fixed instead.

Issue History

Date Modified Username Field Change
2015-12-29 09:31 peterh New Issue
2015-12-29 12:24 sfernandez Note Added: 0003425
2015-12-29 12:24 sfernandez Assigned To => sfernandez
2015-12-29 12:24 sfernandez Status new => feedback
2015-12-29 12:27 sfernandez Note Edited: 0003425
2016-03-23 13:46 peterh Note Added: 0003649
2016-03-23 13:46 peterh Status feedback => assigned
2016-03-23 19:54 sfernandez Relationship added related to 0000792
2017-12-14 10:46 sfernandez Reporter peterh => easylaser
2018-11-01 02:14 jsantos View Status public => private
2018-11-21 12:59 jsantos Product Version 1.2.5f8 => 2.2.0
2018-11-21 12:59 jsantos View Status private => public
2018-11-21 12:59 jsantos Platform => Any
2018-11-23 11:23 sfernandez Product Version 2.2.0 =>
2018-11-23 11:23 sfernandez Target Version => 2.2.0
2018-11-23 11:39 sfernandez Status assigned => resolved
2018-11-23 11:39 sfernandez Resolution open => fixed
2018-11-23 11:39 sfernandez Fixed in Version => 2.2.0b3
2025-10-10 13:29 jsantos Category Unity3D => Unity