storyboard

wpf storyboard death

C#: public partial class MainWindow : Window { Storyboard a = new Storyboard(); int i; public MainWindow() { InitializeComponent(); a.Completed += new EventHandler(a_Completed); a.Duration = TimeSpan.FromMilliseconds(10); a.Begin(); } void a_Completed(object sender, EventArgs e) ...

How can I animate a static object in a WPF storyboard

I have a WPF program to which I need to add a "Demo mode". Since I want my designers to be able to modify the demo mode without me having to recompile the program each time, I tough it would be a great idea to use a storyboard from an external XAML file. The "Demo mode" is basically a storyboard animating some of the application's depend...

Silverlight: Make part of a storyboard repeat

Is it possible to create a storyboard where the second half repeates, but the first half doesn't? Or alternatively, can I cause one storyboard to start after another finishes, all in xaml? ...

WPF starting animation from vb.net code giving error

I'm trying to trigger an animation declared in the window's XAML file from the window's vb code when an event is raised (calling a function), like a window's "loaded" event. Here's how I declare the animation (as a storyboard): Dim StartAnimation As Storyboard = DirectCast(FindName("ServiceOn"), Storyboard) Dim StopAnimation As Storybo...

Why does accessing my Storyboard x:Name work in Silverlight but not in WPF?

The following WPF code gets the error: The name 'zipButtonOut' does not exist in the current context. However, the identical code works in Silverlight as I demonstrate here: http://tanguay.info/web/index.php?pg=codeExamples&id=65 What do I have to do to the WPF code to be able to access the Storyboard within Window.Resources? I tri...

Using a Storyboard animation on a programatically-added control

I'm trying to fade in a new control to my application's "app" area which is programatically added after the existing controls are removed. My code looks like this: void settingsButton_Clicked(object sender, EventArgs e) { ContentCanvas.Children.Clear(); // Fade in settings panel NameScope.SetNameScope(this, new NameScope())...

WPF - Can't stop an animating StoryBoard, IsControllable not working?

I have a 3D cube which I'm animating using a shared storyboard. The animation code is in the selectionChanged event of a combobox and is INTENDED to make sure that any animation that is still running be stopped before the next begins; but it's not working like that! I realize this is some pretty messy code but i still don't see why my ...

Binding to properties of Storyboard declared in UserControl

Hi there, I'm struggling with a binding that only works when declared inside a Window's resources area. As soon as I move the declaration to a UserControl's resources area, the binding fails. No error message, but the value is not updated when the value of the slider (source) is changed. I would like to use the storyboard inside one of ...

Removing FrameworkElements on Animation Completion

I've been teaching myself WPF through Sells/Griffiths' "Programming WPF", and I've found it a great resource, but I'm trying to take some of the concepts they've introduced me to and go a step further, and I'm running into a conceptual snag on how to put the pieces together to accomplish what I'm trying to do. In this exercise, I'm tryi...

Multiple storyboards on one property

I have multiple storyboards that access the same property (not at the same time). After one storyboard changed the property, the other one seems to have no access to it and does not change anything.. What can I do against this? Sample: <ListBox> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem"> <Sett...

WPF - Databind slider value to StoryBoard?

Hi, I'm trying to create a sound volume control and for that I've created a storyboard which is animating the volume visually. And I've put this inside an common slider control. And I want to databind the value of the slider directly to the storyboards timeline position. If the slider is value 0, then the storyboard should be at 00:00 et...

Restarting a WPF Storyboard

What is the proper way to stop and restart a storyboard from .net code? I'm trying ... myStory.Stop(this); Expecting that a subsequent call to .Begin(this); would restart from the timeline at zero, but instead, the storyboard picks up right where it was stopped. I have tried .Remove(this); and I tried .Seek(TimeSpan.Zero); w...

WPF animation first run

I have a simple WPF application that contains a user control that is animated in and out by a pair of storyboards on the main window. I am animating the user control's opacity, scaletransform.scalex and scaletransform.scaley to pop it in and out of view. It looks cool except for the first time it runs. The animation is set to take 3/1...

WPF ListboxItem loaded multiple times

I have a trigger on a storyboard for my listboxitem where the trigger is 'Loaded'. It appears that every time the listbox scrolls the item gets the 'Loaded' event. I really only want the storyboard to run once, when the listboxitem gets displayed. I assumed that the Loaded event would only get triggered once. Any help would be great. ...

How to animate a resource in XAML?

In an XAML document, I have a gradient brush as a resource and a bunch of shapes that use this resource. I would like to animate the brush using a storyboard, but I don't know how to set the brush in resources as the target of storyboard. Simply using its name does not work, {StaticResource name} does not work either. Is it even possible...

WPF Credits effect problem: StoryBoard to animate a StackPanel that extends the height of the window

This is my first WPF project. I'm trying to get a rolling credits effect with a bunch of banner-shaped PNG's stacked on top of each other vertically. My current approach is to have a bunch of images in a StackPanel. Each image is approx 1024x150, and there is about 30 images. They stack vertically. I start the StackPanel at 0,200, so ...

WPF Animation - Animating Bezier curve points

I'm working on a project that involves drawing curved paths between two objects. Currently, I've been writing some test code to play around with bezier curves and animation. The first test is simply to move the endpoint (Point3) from the origin object (a rectangle) to the destination object (another rectangle), in a straight line. her...

What is the best way to start an animation when a bound value changes?

This is a situation that comes up often: In the View, you have a control bound to a ViewModel property (backed by a INotifyPropertyChanged). For example: <TextBlock Text="{Binding Path=Subtotal}"/> When the property changes, you need to bring the user attention to the fact with some creative animation. How I can utilize the fact that...

What are estimate points ,Story points and how to measure them in SCRUM?

Lets take an example suppose we got 5 stories A,B and C,D,E. Importance Name Estimate 90 B 70 A 50 C 35 E 10 D The stories are ordered based on their importance(priority) now how you do estimate them? Is it estimated based on size of the feature? If so what does that numeric Value so for exam...

WPF -- Animation Question

New to WPF. Simple scenario. Can't figure out the right way to do this. Say I have a single Button. I also have four TextBlocks. I want that one button to trigger an animation (Opacity from 0 to 1) on all of the TextBlocks at the same time. Thanks in advance! ...