Page 1 of 1

[SOLVED] ColorAnimation bug

Posted: Sat Sep 17, 2016 7:38 am
by Sesztak
Dear JS-Support,

We got null reference exception with ColorAnimation.

Background: we would like to animate a button (with x:Name="buttonDoubleAnimationAndColorAnimationSample") background colour.

Code:
XAML:
<Page.Resources>
<Storyboard x:Key="PlayAnimationGo" x:Name="PlayAnimationNevGo" Duration="0:0:5" >
<ColorAnimation Storyboard.TargetProperty="(Button.Background).(SolidColorBrush.Color)"
From="Red" To="Green" Duration="0:0:5" />
</Storyboard>
</Page.Resources>

C# code behind:
Storyboard.SetTarget(PlayAnimationNevGo, buttonDoubleAnimationAndColorAnimationSample);
PlayAnimationNevGo.Begin();

Exception:
{"Value cannot be null.\r\nParameter name: key"}
StackTrace:
" at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
at Windows.UI.Xaml.Controls.Control.TryFindTemplateChildFromName(String name)
at Windows.UI.Xaml.Controls.Control.GetTemplateChild(String childName)
at Windows.UI.Xaml.Media.Animation.Timeline.GetPropertyPathAndTargetBeforePath(FrameworkElement targetParent, DependencyObject& targetBeforePath, PropertyPath& propertyPath, Boolean isTargetParentTheTarget)
at Windows.UI.Xaml.Media.Animation.ColorAnimation.Apply(FrameworkElement frameworkElement, Boolean useTransitions, String visualStateGroupName, Boolean isTargetParentTheTarget)
at Windows.UI.Xaml.Media.Animation.Storyboard.Begin()
at XXX_DEVOnly_CSHTM5ColorAnimationTEST.MainPage.buttonDoubleAnimationAndColorAnimationSample_Click(Object sender, RoutedEventArgs e) in C:\Users\A\documents\visual studio 2015\Projects\KasszaWEB\XXX_DEVOnly_CSHTM5ColorAnimationTEST\MainPage.xaml.cs:line 23
at Windows.UI.Xaml.Controls.Primitives.ButtonBase.OnClick(RoutedEventArgs eventArgs)
at Windows.UI.Xaml.Controls.Primitives.ButtonBase.OnClick(Object e)
at CallSite.Target(Closure , CallSite , Action`1 , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
at DotNetForHtml5.Core.INTERNAL_EventManager`2.OnEvent(Object e)
at DotNetForHtml5.Core.INTERNAL_EventManager`2.<StartListeningToDomEventsIfNotAlreadyListening>b__7(Object e)
at DotNetForHtml5.Core.INTERNAL_EventsHelper.<>c__DisplayClass1.<AttachToDomEvents>b__0(Object e)
at CallSite.Target(Closure , CallSite , Action`1 , Object )
at DotNetForHtml5.Core.HtmlEventProxy.<>c__DisplayClass4.<.ctor>b__2(Object s, EventArgsWithJSEventObject e)
at DotNetForHtml5.Core.HtmlEventProxy.<>c__DisplayClassa.<OnEvent>b__9()"

Please, confirm, that you can reproduce the issue.

Waiting for your kind reply,
BR,
Péter

Re: ColorAnimation bug

Posted: Mon Sep 19, 2016 5:22 am
by JS-Support @Userware
Thanks. We have been able to reproduce the issue. We are intestigating it. I will keep you updated shortly.

Regards,
JS-Support

Re: ColorAnimation bug

Posted: Sat Sep 24, 2016 3:58 am
by JS-Support @Userware
Hi,

Please check Beta 9.4 which is supposed to fix this issue. You can download it from:

http://forums.cshtml5.com/viewforum.php?f=6

Thanks.
Regards,
JS-Support

Re: ColorAnimation bug

Posted: Mon Oct 10, 2016 3:06 am
by JS-Support @Userware
Hi,

I have just re-tested this with Beta 10.1 and I can confirm that the issue is now fixed.

Regards,
JS-Support