storyboard

WPF Storyboard stops by itself

I have a storyboard that seems to stop randomly by itself, I cannot for the life of me figure out why. It seems to stop and random intervals. private void CreateStoryboard(int from) { int? targetTo; Duration dur; targetTo = 150; dur = 150; Int32Animation element = new Int32Animation(); ...

WPF - Can't get storyboard to affect another local resource

Hi, I've set up a Transformation and a Storyboard as local resources, but when I trigger the storyboard from a button I get the following error: {"'WorldTranslation' name cannot be found in the name scope of 'System.Windows.Controls.Button'."} Can someone point me in the right direction please? <Window.Resources> <Transform3DGro...

How can we improve the performance of our WPF Animations (100 of them)?

We have an application that generates around 100 animations at runtime and they are all added to a single storyboard and then played. The problem is that the animation is extremely slow. The objects that are being animated are shapes and splines and a good amount of computation is done in the backend for generating the custom splines. Th...

WPF PropertyPath Issue - Cannot resolve all property references in property path

Hi, I'm struggling to get a PropertyPath to work - I've got a Transformation in the Window Resources that I'm trying to affect via a StoryBoard - also in Window Resources ... Heres the property path i'm using ... (Viewport2DVisual3D.Transform).(Transform3DGroup)[0].(RotateTransform3D).(RotateTransform3D.Rotation).(AxisAngleRotation3D....

WPF Trigger and StoryBoard Blues

Hi there. I'm having some trouble with making triggers do what I want them to... I have a control that needs to have a contextual menu and a checkbox appear when you mouse over them. Only thing is if the checkbox is checked it should remain visible. Basically I have 4 storyboards - two to show/hide the checkbox, and two to show/hide ...

How do I add sounds to a storyboard in wpf?

Is it even possible? ...

Anyway to start/stop/resume/pause a Storyboard in pure XAML in Silverlight, for any event?

Any way in Silverlight to write pure XAML code for controlling story boards, by responding to any given event for a given control? For eg, when the user move the mouse over a panel, I might need to start the storyboard, and pause it when he moves the mouse out. ...

How can I find out the Duration of a Storyboard in Silverlight?

I have a situation where I need to determine if I've reached the end of a Storyboard, and then need to seek to the end of it. I want to do: storyboard.Seek(timespan); However, if timespan is longer than the storyboard's duration, I get an exception. If I look at storyboard.Duration.TimeSpan I get an error because the Duration is ...

WPF - Assigning storyboard begintime from parent element

I've got a basic spinner type control I've whipped up, and it works reasonably well, but there's a massive amount of repeated code throughout it. It's essentially the same element over and over again except for two properties, and one of those properties is the BeginTime for the Storyboard - each line just endlessly repeats its animati...

Programmatically reverse Storyboard

I have the following storyboard: <Window.Resources> <Storyboard x:Key="ButtonsAnim"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="topRightButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"> <SplineDoubleKeyFrame KeyTime="00:00:00" Value=...

WPF Stop Storyboard on Visibility Changed

Hello, I have a UserControl with a story board and I want to stop the animation when the control's Visibility changes. I created a Trigger to pause the animation and start it depending on the state, but I keep getting an ArgumentException. Here is the XAML: <UserControl.Triggers> <EventTrigger RoutedEvent="FrameworkElement.Loaded...

how to change the height of a grid row in wpf using storyboard

I have a Grid with 2 rows. <Grid> <Grid.RowDefinitions> <RowDefinition Height="150"/> <RowDefinition /> <RowDefinition Height="Auto" x:Name="OtherContactsRow" /> </Grid.RowDefinitions> Something here </Grid> and 2 storyboards <Storyboard x:Key="MaximizedStoryboard"> <DoubleAnimation From="...

Xamly begin a storyboard when a RoutedCommand is called?

Is there a way to begin a storyboard wen an ICommand is executed WITH XAML? ...

So I learned how to make images expand and contract (x,y). Is there a way for me to rotate them?

I have this code for expanding and contracting images in a sexy manner. I'd like to add a little rotation in there, just to make the image pop up, you know? Where/how do I add rotation animations to control? <Style.Triggers> <EventTrigger RoutedEvent="Image.MouseEnter"> <BeginStoryboard> ...

How to set parameters to a storyboard in wpf ?

Let's say that I have this storyboard: <Storyboard x:Key="OnMouseEnterStoryboard"> <DoubleAnimation BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" To="180" /> </Storyboard> It's there a possibility that I can set the To property from code. Something ...

WPF Set Transform in Storyboard Completed Event

Hi there, I have a Storyboard which animates the Y-Coordinate of a Grid via TranslateTransform. Within the Completed-Event of the Storyboard I want to reset the Coordinate. How do I implement this? ...

What's the easiest way to write a boolean animation?

Hello I have the following snippet: <StackPanel> <Popup> <TextBox ToolTip="Edit current date"/> </Popup> <Label "Current Date"/> </StackPanel> I want the popup to show when the StackPanel is clicked, and hidden when it (the Popup) loses focus. I was wondering what would be the shortest way to write this in xaml. ...

Is there any way to inherit from TriggerAction class?

I am not interested in animations and I am trying to make simple setter action to be set without key frames. I wanted to inherit TriggerAction; make properties that set the new value on target, any additional optional properties so I can use: <EventTrigger SourceName="btn" RoutedEvent="Click"> <BooleanActionTrigger TargetName="cb" ...

Performing a Flip animation completely through code WPF

I am try to add a flip animation to a user control I built. The user control is simple it has a 87x87 image front and back and some properties. It is suppose to represent a tile in a game I am working on for fun. I am trying to animate a flipping affect of the user picking the tile from the deck. I feel I need to do this through code...

Pausing a Storyboard in WPF ?

I'm gonna pause a Storyboard in WPF, so I've used below code : Storyboard TheStoryboard; //Constructor public window { TheStoryboard = (Storyboard)this.FindResource("TheStoryboardName"); } private void MenuItemPause_Click(object sender, RoutedEventArgs e) { TheStoryboard.Pause(); } But nothing happen! What is the right way ...