[SOLVED] ColorAnimation bug

Please report bugs here. If you are unsure whether something is a bug or an expected behavior, please post it on the "Technical Support" forum instead, and wait for a moderator to handle/move the post.
Sesztak
Posts: 172
Joined: Fri Jun 24, 2016 2:19 am

[SOLVED] ColorAnimation bug

Postby Sesztak » Sat Sep 17, 2016 7:38 am

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

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: ColorAnimation bug

Postby JS-Support @Userware » Mon Sep 19, 2016 5:22 am

Thanks. We have been able to reproduce the issue. We are intestigating it. I will keep you updated shortly.

Regards,
JS-Support

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: ColorAnimation bug

Postby JS-Support @Userware » Sat Sep 24, 2016 3:58 am

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

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: ColorAnimation bug

Postby JS-Support @Userware » Mon Oct 10, 2016 3:06 am

Hi,

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

Regards,
JS-Support


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 3 guests