This question is locked. New answers and comments are not allowed.
I have a view containing multiple data-bound list boxes in a pivot. I was wanting to make use of the Item Added Animation and because there are a number of similar lists throughout the application am using xaml styles. However I'm seeing a crash whenever two lists with the same style are on the page, but only when the animations are set.
The assembly version is Telerik.Windows.Controls.Primitives, Version=2012.3.1311.3040, Culture=neutral, PublicKeyToken=5803cfa389c90ce7
The style I'm using is the following.
The stack trace is as follows:
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.Queue`1.Dequeue()
at Telerik.Windows.Controls.RadVirtualizingDataControl.OnItemAddedAnimation_Ended(Object sender, EventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at Telerik.Windows.Controls.RadAnimation.OnEnded()
at Telerik.Windows.Controls.RadAnimation.OnStopped(PlayAnimationInfo info)
at Telerik.Windows.Controls.RadAnimationManager.StopStoryboard(PlayAnimationInfo info)
at Telerik.Windows.Controls.RadAnimationManager.OnStoryboardCompleted(Object sender, EventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
Removing the animation properties stops the error 100% of the time as does moving the animation definition from the style to the list box, but given this style is being used twenty plus times this isn't a long term maintainable solution.
Cheers
The assembly version is Telerik.Windows.Controls.Primitives, Version=2012.3.1311.3040, Culture=neutral, PublicKeyToken=5803cfa389c90ce7
The style I'm using is the following.
<
Style
x:Key
=
"AnimatedList"
TargetType
=
"telerikPrimitives:RadDataBoundListBox"
>
<
Setter
Property
=
"Margin"
Value
=
"0,0,-12,0"
/>
<
Setter
Property
=
"ItemAddedAnimation"
>
<
Setter.Value
>
<
telerikCore:RadFadeAnimation
StartOpacity
=
"0"
EndOpacity
=
"1"
Duration
=
"0:0:1"
>
<
telerikCore:RadFadeAnimation.Easing
>
<
ExponentialEase
Exponent
=
"6"
EasingMode
=
"EaseOut"
/>
</
telerikCore:RadFadeAnimation.Easing
>
</
telerikCore:RadFadeAnimation
>
</
Setter.Value
>
</
Setter
>
<
Setter
Property
=
"ItemRemovedAnimation"
>
<
Setter.Value
>
<
telerikCore:RadFadeAnimation
StartOpacity
=
"1"
EndOpacity
=
"0"
Duration
=
"0:0:1"
>
<
telerikCore:RadFadeAnimation.Easing
>
<
ExponentialEase
Exponent
=
"6"
EasingMode
=
"EaseIn"
/>
</
telerikCore:RadFadeAnimation.Easing
>
</
telerikCore:RadFadeAnimation
>
</
Setter.Value
>
</
Setter
>
</
Style
>
The stack trace is as follows:
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.Queue`1.Dequeue()
at Telerik.Windows.Controls.RadVirtualizingDataControl.OnItemAddedAnimation_Ended(Object sender, EventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at Telerik.Windows.Controls.RadAnimation.OnEnded()
at Telerik.Windows.Controls.RadAnimation.OnStopped(PlayAnimationInfo info)
at Telerik.Windows.Controls.RadAnimationManager.StopStoryboard(PlayAnimationInfo info)
at Telerik.Windows.Controls.RadAnimationManager.OnStoryboardCompleted(Object sender, EventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
Removing the animation properties stops the error 100% of the time as does moving the animation definition from the style to the list box, but given this style is being used twenty plus times this isn't a long term maintainable solution.
Cheers