![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Databound animation I have a custom control that exposes a Dependency Property called Angle and an Event called AngleChanged. I've tryed to set an Event Trigger on AngleChanged in a Style for this control that animates a Path by Rotating it the Angle amount. But, when I set the To property of the DoubleAnimation (TargetProperty=Angle) rotation to a Binding to the Angle Dependency Property, <DoubleAnimation Storyboard.TargetName="Hand" Storyboard.TargetProperty="(RotateTransform.Angle)" To="{Binding Path=Angle, RelativeSource={RelativeSource TemplatedParent}}" Duration="0:0:1" /> I get the following runtime error: "This Storyboard timeline tree could not be frozen. Please remove thread-bound values such as bindings or dynamic resource references." Any ideas? If I set the Angle rotation to an absolute value in the animation (To="10") it works fine. Thanks. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Databound animation You could try setting the Mode of the Binding to OneTime or OneWay: To="{Binding Path=Angle,Mode=OneTime,...}" I'm not quite sure if it would make a difference, but it might be worth trying... Pascal Joao Paulo Duque Vieira wrote: > I have a custom control that exposes a Dependency Property called Angle > and an Event called AngleChanged. > I've tryed to set an Event Trigger on AngleChanged in a Style for this > control that animates a Path by Rotating it the Angle amount. > > But, when I set the To property of the DoubleAnimation > (TargetProperty=Angle) rotation to a Binding to the Angle Dependency > Property, > <DoubleAnimation Storyboard.TargetName="Hand" > Storyboard.TargetProperty="(RotateTransform.Angle)" > To="{Binding Path=Angle, > RelativeSource={RelativeSource TemplatedParent}}" > Duration="0:0:1" /> > > > I get the following runtime error: > > "This Storyboard timeline tree could not be frozen. Please remove > thread-bound values such as bindings or dynamic resource references." > > Any ideas? > If I set the Angle rotation to an absolute value in the animation > (To="10") it works fine. > > Thanks. > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Databound animation Hello Pascal, Thanks, but the result is the same. ![]() > You could try setting the Mode of the Binding to OneTime or OneWay: > > To="{Binding Path=Angle,Mode=OneTime,...}" > > I'm not quite sure if it would make a difference, but it might be > worth trying... > > Pascal > > Joao Paulo Duque Vieira wrote: > >> I have a custom control that exposes a Dependency Property called >> Angle >> and an Event called AngleChanged. >> I've tryed to set an Event Trigger on AngleChanged in a Style for >> this >> control that animates a Path by Rotating it the Angle amount. >> But, when I set the To property of the DoubleAnimation >> (TargetProperty=Angle) rotation to a Binding to the Angle Dependency >> Property, >> <DoubleAnimation Storyboard.TargetName="Hand" >> Storyboard.TargetProperty="(RotateTransform.Angle)" >> To="{Binding Path=Angle, >> RelativeSource={RelativeSource TemplatedParent}}" >> Duration="0:0:1" /> >> I get the following runtime error: >> >> "This Storyboard timeline tree could not be frozen. Please remove >> thread-bound values such as bindings or dynamic resource references." >> >> Any ideas? >> If I set the Angle rotation to an absolute value in the animation >> (To="10") it works fine. >> Thanks. >> |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Databound animation I had a similar problem and ended up resorting to using C# instead. http://forums.microsoft.com/MSDN/Sho...50651&SiteID=1 I'll be following this thread with interest |
My System Specs![]() |
| | #5 (permalink) |
| Vista Ultimate 32bit | Re: Databound animation I don't know if anyone is paying attention to this thread anymore, but I was doing something that similarly required TemplatedParent in the storyboard animation and I was able to find a solution. The key was to bind the properties of the Content element of the ControlTemplate to the properties of the TemplatedParent, so.. So what you have to do is have some element in your control that binds to the Templated Parent property, and then the storyboard animation bound to that control, and it should work. Last edited by brianshapiro; 04-13-2008 at 01:03 PM.. |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Untrapable exception when deleting last row in databound DataGridV | .NET General | |||