WPF animation and performance
-
Hi everybody! I am using DoubleAnimation to move some controls into view. Simplified structure of my window is as follows(I replaced smaller then with '[', and bigger than with ']': [StackPanel] [Canvas ClipToBounds="true"] [Border] [Panel] [/Panel] [More elements ... /] [/Border] [Border] [Panel] [/Panel] [/Border] ... [/Canvas] [/StackPanel] With the animation I am animating the Canvas.Top property of Border instance. While the animation is running Border element is visible, but the panel isnide the border has its Opacity property set to 0. The problem is that the animation is not running smoothly. Would it help if I set the visibility property of the panel to Visiblity.Collapsed or Visibility.Hidden. Could the reason for poor performance be that I am running in debug mode of VS2008?(For some reason I cannot switch to release mode). The application is running on Intel core 2 duo 1.83GHz cpu, and ATI mobility radeon X1600. Any advice will be welcome. Thanks in advance, Uros
-
Hi everybody! I am using DoubleAnimation to move some controls into view. Simplified structure of my window is as follows(I replaced smaller then with '[', and bigger than with ']': [StackPanel] [Canvas ClipToBounds="true"] [Border] [Panel] [/Panel] [More elements ... /] [/Border] [Border] [Panel] [/Panel] [/Border] ... [/Canvas] [/StackPanel] With the animation I am animating the Canvas.Top property of Border instance. While the animation is running Border element is visible, but the panel isnide the border has its Opacity property set to 0. The problem is that the animation is not running smoothly. Would it help if I set the visibility property of the panel to Visiblity.Collapsed or Visibility.Hidden. Could the reason for poor performance be that I am running in debug mode of VS2008?(For some reason I cannot switch to release mode). The application is running on Intel core 2 duo 1.83GHz cpu, and ATI mobility radeon X1600. Any advice will be welcome. Thanks in advance, Uros
Uros, give this a try and post the results. Change the Opacity of all controls to 100%. Ensure that you are not using any BitMapEffects and lets us know how the animation works.
Cheers, Karl
» CodeProject 2008 MVP » Microsoft MVP - Client App Dev My Blog | Mole's Home Page | MVP ProfileJust a grain of sand on the worlds beaches.