wpf-animation

Animate the DropDown opening and Closing of a WPF ComboBox.

How can I animate the Combobox dropdown opening and closing? I am using the Aero style for the window as <ResourceDictionary Source="/PresentationFramework.Aero, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" /> But the combobox dropdown is no...

Any free animation available for WPF?

Being developer its very hard to designing and Animate the thing... Are there any animation libraries (like WPF themes) available out there for WPF ?? ...

Wpf Databinding within <UserControl.Resources>

I'm having an issue when triggering a storyboard from the code behind. I've just changed the storyboard to use a dependency property, which works, but only after the calling FindResource() twice. I build the dependency property using a UIPropertyMetadata object to set the initial value which appears to work. Does anyone know what I'm doi...

Animate the Window movements from tray.

In my project I am sending the window to tray on close. How can I give an animated effect for this ie, the movement from the current window position to tray. And also the reverse, means on double clicking on the notifyicon in tray, the window is coming to front? ...

Refactor: Fade Transition on WPF Frame

I found and inserted the code below on my navigation-based WPF application~ It worked on my (development) machine no problem but when I released it on the workstations, it was quite slow. I noticed that when the application is not maximized, it works at normal speed, but when the app is maximized, it looked like the application stops for...

WPF/Silverlight: Why do animation classes require dependency properties?

Why do animation classes (like DoubleAnimation) require dependency properties? Dependency properties have a lot of overhead when compared to a simple property. Wouldn't passing in an object and property name and using to reflection to retrieve a setter delegate have made the animation classes more flexible and generally more usable? I...

WPF Animation Not Playing

I have the following xaml to show a rotating ellipse: <Ellipse x:Name="ellipse" Stroke="{StaticResource _SpinnerGradientBrush}" StrokeThickness="20" RenderTransformOrigin="0.5,0.5" > <Ellipse.RenderTransform> <TransformGroup> <RotateTransform Angle="0" /> ...

WPF sluggish rendering/animation performance?

I've been trying to animate around 1000 lines which are all added to a Canvas, and it is extremely slow to the extend that animation is not feasible at all. At first I thought it was probably because of all the calculations, but then I tried a very simple experiment. I generated around 1000 random lines and I tried to move them to new r...

WPF Animation - Why Can't "By" have a negitive value?

I am poking around the animation in WPF and I am confused. For RectAnimation, By cannot be negative for height and width. So, if you use the "By" keyword, rectangles can only grow (instead of "To")? Here is some example code: <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsof...

WPF Animation - Don't Want to use Content

This is a two part question from a WPF animation newbie. First, here is my code: public void AnimatePaneBox(ContentControl destination, UIElementCollection source) { // Create a NameScope for this page so that // Storyboards can be used. NameScope.SetNameScope(this, new NameScope()); Canvas ...

WPF Animation - Bring a Canvas to front

I have an animation that I have setup on a transparent canvas. I set that canvas to be the content of a button and then run the animation. (See this question for the code.) The problem is that sometimes the animation gets put behind other UI elements of my app (I am using Avalon Dock and it is in front of the DockableContent it is in,...

Animation with MVVM pattern

Hello, What is the best way to trigger an animation while using the MVVM pattern? More specifically, I have a form which has several fields. When a user click's the save button, I would like to show an animation. I have been able to achieve this by exposing a property ShowMessage and setting it to True and a DataTrigger picks up this va...

WPF - Wait Animation on a seperate thread?

(Note: I have seen this question and it uses a cursor not an animation.) I have a wait animation (that I did not make but found on the internet). I want to show it while my app is doing some processing. However, it gets stuck while my app is processing. Is there a way to make it keep going smooth? I usually think of a thread for t...

Grow/Shrink WPF Animation

Hi, In WPF, when a user gets focus in a TextBox, I would like some animation that would make the TextBox becomes multiline and make its width bigger (while he is typing) and when the focus is lost, that the textbox goes back to its original size. The size is unknown. Also, ultimately, that TextBox needs to be within a WPF Datagrid. I...

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" ...

Exception animating a scale layout transform in WPF

I have create a storyboard in C# to animation a scale transform on a canvas. The scale transform is a layout transform. Here is my C# code for the animation: Storyboard Configuring = new Storyboard(); if (NexusRoot != null) { var current = (NexusRoot.LayoutTransform as ScaleTransform).ScaleX; Duration duration = new Duration(TimeSpan.F...

WPF InvalidateMeasure not called during or after animation

I have a custom ListBox whith the following ListBoxItem style. It contains a few animations to scale the ListBoxItem when the mouse hovers over it. <Style x:Key="notesListBoxStyle" TargetType="{x:Type ListBoxItem}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListBoxItem}"> ...

WPF - Perform color animation based on previous and current value of a TextBlock

Hi, I have to change the color of a TextBlock to indicate whether the number is positive or negative - red for negative, blue for positive. I have done this by using a DataTrigger and a Converter which returns True/False whether the number is negative/positive. Next requirement is a bit trickier: when the number changes, perform a slow ...

WPF - Color animation on Polygons

Hi, I'm trying to perform a color animation on the fill property of a polygon and getting this error - Cannot convert the value in attribute 'Style' to object of type 'System.Windows.Style'. Cannot resolve all property references in the property path 'Fill.Color'. Verify that applicable objects support the properties. Error at object ...

WPF Memory Leak but only when total document footprint exceeds threshold.

WPF Memory Leak Problem. Memory stable with small documents, but grows until OOM exception with large documents. Background: We've developed a WPF application for controlling a dynamic display. There is a Design component, where the user lays out the display document, and a document Display component. Elements in the display can con...