View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000508 | NoesisGUI | Unity | public | 2014-12-03 00:01 | 2018-11-23 16:52 |
| Reporter | MrHayato | Assigned To | sfernandez | ||
| Priority | high | Severity | major | ||
| Status | resolved | Resolution | fixed | ||
| Fixed in Version | 2.1.0f1 | ||||
| Summary | 0000508: ColorAnimationUsingKeyframes does not animate the dependency property | ||||
| Description | When using a ColorAnimationUsingKeyframes, and you use Dynamic Resources as the value for the keyframes, the actual resource itself gets modified. For example: <Color x:Key="Theme1Color">#FFFFFFFF</Color> <Storyboard x:Key="ChangeSelectedTextColorTransition"> When running this storyboard via C# and passing in a TextBlock as the FrameworkElement to animate, it looks like the textblock is animating from white to black as it should. However, everything else that uses the Theme1Color resource is now black. It seems like the animation isn't animating the TextBlock's color, but it's actually modifying the Color resource itself. | ||||
| Platform | Any | ||||
|
Actually, turns out the problem is because the TextBlock has a binding to Foreground like so: <TextBlock Foreground="{Binding TextColorBrush}" /> And TextColor is a reference to the original Color brush (which I get from the ResourceDictionary programmatically), and is getting modified because of the binding. Setting Mode=OneWay does not solve the problem unfortunately. |
|
|
Hi, I tried the following sample in WPF: <Grid
|
|
|
I'm not sure that's a viable solution. To me, the Color itself should not change. It should be making a copy of the color and animating that rather than modifying the original resource. We use the same color key throughout the application so it's not possible for us to Freeze the value every time we need to animate it. Right now, we have to animate everything through code to prevent this issue. Our current solution is something along the lines of: |
|
|
And this is our other animation code for animating a color when we don't know what color we're animating from: |
|
|
Hi Sergio, I looked into this a little further as I encountered this problem again. The way to fix it in WPF is to add 'x:Shared="False"' to the SolorColorBrush. This isn't supported in the Unity version of Noesis, but it would solve the problem. This creates a new instance of the color object instead of using the reference. Here's the working WPF example: |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2014-12-03 00:01 | MrHayato | New Issue | |
| 2014-12-03 00:41 | MrHayato | Note Added: 0001856 | |
| 2014-12-03 01:32 | sfernandez | Assigned To | => sfernandez |
| 2014-12-03 01:32 | sfernandez | Status | new => confirmed |
| 2015-01-21 13:04 | sfernandez | Note Added: 0002000 | |
| 2015-01-21 13:04 | sfernandez | Status | confirmed => feedback |
| 2015-01-26 21:56 | MrHayato | Note Added: 0002015 | |
| 2015-01-26 21:56 | MrHayato | Status | feedback => assigned |
| 2015-01-26 22:24 | MrHayato | Note Added: 0002016 | |
| 2015-02-13 06:43 | MrHayato | Note Added: 0002079 | |
| 2015-07-23 02:38 | jsantos | Category | Unity Package => Unity3D |
| 2018-11-01 02:14 | jsantos | View Status | public => private |
| 2018-11-21 13:45 | jsantos | View Status | private => public |
| 2018-11-21 13:45 | jsantos | Platform | => Any |
| 2018-11-23 16:52 | sfernandez | Status | assigned => resolved |
| 2018-11-23 16:52 | sfernandez | Resolution | open => fixed |
| 2018-11-23 16:52 | sfernandez | Fixed in Version | => 2.1.0f1 |
| 2025-10-10 13:29 | jsantos | Category | Unity3D => Unity |