<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://xceed.com/CS/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tag 'animation'</title><link>http://xceed.com/CS/search/SearchResults.aspx?o=DateDescending&amp;tag=animation&amp;orTags=0</link><description>Search results matching tag 'animation'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Debug Build: 61120.2)</generator><item><title>Animation in xaml to get you started.</title><link>http://xceed.com/CS/blogs/xamlhero/archive/2009/02/16/animation-in-xaml-to-get-you-started.aspx</link><pubDate>Mon, 16 Feb 2009 16:14:00 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:18643</guid><dc:creator>Matt</dc:creator><description>&lt;div&gt;My previous post was xamlless so I thought I'd give some basic examples to get you started if you're not familiar with animations.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;First I'll show you how to create this smooth translate and opacity animation and how to tweak it to what you want. Here's the storyboard I declared in my project resources :&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;Storyboard x:Key="showItemsStoryboard"&gt;&lt;/div&gt;&lt;div&gt;  &amp;lt;DoubleAnimation &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="WHITE-SPACE:pre;"&gt;&lt;/span&gt;      Storyboard.TargetProperty="Opacity"&lt;/div&gt;&lt;div&gt;                              DecelerationRatio="0.5"&lt;/div&gt;&lt;div&gt;                              To="1"&lt;/div&gt;&lt;div&gt;                              Duration="00:00:00.400"/&gt;         &lt;/div&gt;&lt;div&gt;  &amp;lt;DoubleAnimation &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="WHITE-SPACE:pre;"&gt;&lt;/span&gt;      Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)"&lt;/div&gt;&lt;div&gt;                              To="0"&lt;/div&gt;&lt;div&gt;                              DecelerationRatio="0.5"&lt;/div&gt;&lt;div&gt;                              Duration="00:00:00.400"/&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/Storyboard&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;There are various ways you can do this but I prefer using a more generic approach where I will not be dependent on the type of object I will be animating, hence the UIElement.RenderTransform. You could also set this explicitly by using the Storyboard.TargetName property and naming (x:Name) your TranslateTransform, which would look like this : &lt;br&gt;&lt;br&gt; &amp;lt;DoubleAnimation &lt;div&gt;&lt;span class="Apple-tab-span" style="WHITE-SPACE:pre;"&gt;&lt;/span&gt;                              Storyboard.TargetName="myTranslate"&lt;/div&gt;&lt;div&gt;                              Storyboard.TargetProperty="X"&lt;/div&gt;&lt;div&gt;                              To="0"&lt;/div&gt;&lt;div&gt;                              DecelerationRatio="0.5"&lt;/div&gt;&lt;div&gt;                              Duration="00:00:00.400"/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;  &lt;/div&gt;&lt;div&gt;Either way, it does not really change anything for the current example. Now, the only thing left is to make sure the object you will be animating has a TranslateTransform attached and its opacity set to 0 :&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;TextBlock Opacity="0"&gt;&lt;/div&gt;&lt;div&gt; &amp;lt;TextBlock.RenderTransform&gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;TranslateTransform X="-15"/&gt;&lt;/div&gt;&lt;div&gt; &amp;lt;/TextBlock.RenderTransform&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/TextBlock&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Your control is now ready to be animated, for testing purposes you can just add the following code in your xaml :&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt; &amp;lt;TextBlock.Triggers&gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;EventTrigger RoutedEvent="TextBlock.Loaded"&gt;&lt;/div&gt;&lt;div&gt;       &amp;lt;EventTrigger.Actions&gt;&lt;/div&gt;&lt;div&gt;        &amp;lt;BeginStoryboard Storyboard="{StaticResource showItemsStoryboard}"/&gt;&lt;/div&gt;&lt;div&gt;       &amp;lt;/EventTrigger.Actions&gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;/EventTrigger&gt;&lt;/div&gt;&lt;div&gt; &amp;lt;/TextBlock.Triggers&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;There are various elements you can play with to get the effect you want, at this point it's just a matter of changing the duration along with the Acceleration or DecelerationRatio and the TranslateTransform X value. Keep in mind that in a lot of cases a simple Opacity animation should be enough without adding the translate. The key is to not over do it &lt;img src="http://xceed.com/CS/emoticons/emotion-1.gif" alt="Smile" /&gt;.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Another fun yet dangerous (in a design point of view) thing to play with when working with animation, is the ScaleTransform. If you read my &lt;a class="" target="_blank" href="http://xceed.com/CS/blogs/xamlhero/archive/2009/02/10/because-you-can-animate-doesn-t-mean-you-should.aspx"&gt;previous post&lt;/a&gt; you will understand why. ScaleTransform animation surfs on the thin line between corny and cool. Scaling elements can be intresting in splash screens or when you initially layout your elements. Here is an example : &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt; &amp;lt;DoubleAnimation Storyboard.TargetProperty="Opacity"&lt;/div&gt;&lt;div&gt;                          To="1"&lt;/div&gt;&lt;div&gt;                          Duration="00:00:00.400"/&gt;         &lt;/div&gt;&lt;div&gt;         &amp;lt;DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"&lt;/div&gt;&lt;div&gt;                          To="1"&lt;/div&gt;&lt;div&gt;                          Duration="00:00:00.400"/&gt;&lt;/div&gt;&lt;div&gt;         &amp;lt;DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"&lt;/div&gt;&lt;div&gt;                          To="1"&lt;/div&gt;&lt;div&gt;                          Duration="00:00:00.400"/&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Make sure your element has both the opacity set to 0 and has a ScaleTransform attached : &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;TextBlock Text="Hello World"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="WHITE-SPACE:pre;"&gt;&lt;/span&gt;  Opacity="0"&gt;&lt;/div&gt;&lt;div&gt; &amp;lt;TextBlock.RenderTransform&gt;&lt;/div&gt;&lt;div&gt;   &amp;lt;ScaleTransform ScaleX="0.75" ScaleY="0.75"/&gt;&lt;/div&gt;&lt;div&gt; &amp;lt;/TextBlock.RenderTransform&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/TextBlock&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I would advise against starting with a ScaleX and ScaleY at 0 as the effect will be too drastic. You can try it out and see what I mean. &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Just to demonstrate what you could do :&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/1G9nTNGv5x8&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed mce_src="http://www.youtube.com/v/1G9nTNGv5x8&amp;amp;hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344" src="http://www.youtube.com/v/1G9nTNGv5x8&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;/object&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;So how does that all tie in the datagrid? Well, it's really up to you and your creativity. An easy example would be to use an animation like a scaleTransform in a cell's error style. If some data is invalid, you could then scale it to bring the information to the user's attention. &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;If you want to try this out, create a new Style with TargetType xcdg:DataCell (assuming you added Xceed's namespace with xcdg) give it a key like : myCellErrorStyle&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;In this style you can add something like this (tweak it to what you want) :&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt; &amp;lt;Setter Property="RenderTransformOrigin"&lt;/div&gt;&lt;div&gt;              Value="0.5,0.5"/&gt;&lt;/div&gt;&lt;div&gt;      &lt;/div&gt;&lt;div&gt;      &amp;lt;Setter Property="RenderTransform"&gt;&lt;/div&gt;&lt;div&gt;         &amp;lt;Setter.Value&gt;&lt;/div&gt;&lt;div&gt;            &amp;lt;ScaleTransform ScaleX="1" ScaleY="1"/&gt;&lt;/div&gt;&lt;div&gt;         &amp;lt;/Setter.Value&gt;&lt;/div&gt;&lt;div&gt;      &amp;lt;/Setter&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;        &amp;lt;Style.Triggers&gt;&lt;/div&gt;&lt;div&gt;            &amp;lt;Trigger Property="IsValidationErrorRestrictive"&lt;/div&gt;&lt;div&gt;                     Value="True"&gt;&lt;/div&gt;&lt;div&gt;                &amp;lt;Setter Property="Background"&lt;/div&gt;&lt;div&gt;                        Value="Red"&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;            &amp;lt;/Trigger&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;            &amp;lt;Trigger Property="IsValidationErrorRestrictive"&lt;/div&gt;&lt;div&gt;                     Value="False"&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;                &amp;lt;Setter Property="Background"&lt;/div&gt;&lt;div&gt;                        Value="Orange"&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;Trigger.EnterActions&gt;&lt;/div&gt;&lt;div&gt;               &amp;lt;BeginStoryboard&gt;&lt;/div&gt;&lt;div&gt;                  &amp;lt;Storyboard AutoReverse="True"&gt;&lt;/div&gt;&lt;div&gt;                     &amp;lt;DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"&lt;/div&gt;&lt;div&gt;                                      To="1.1"&lt;/div&gt;&lt;div&gt;                                      Duration="00:00:00.25"/&gt;&lt;/div&gt;&lt;div&gt;                     &amp;lt;DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"&lt;/div&gt;&lt;div&gt;                                      To="1.1"&lt;/div&gt;&lt;div&gt;                                      Duration="00:00:00.25"/&gt;                                      &lt;/div&gt;&lt;div&gt;                  &amp;lt;/Storyboard&gt;                     &lt;/div&gt;&lt;div&gt;               &amp;lt;/BeginStoryboard&gt;&lt;/div&gt;&lt;div&gt;            &amp;lt;/Trigger.EnterActions&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;            &amp;lt;/Trigger&gt;&lt;/div&gt;&lt;div&gt;        &amp;lt;/Style.Triggers&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Now, on the datagrid you have a property named CellErrorStyle, you can set it to your myCellErrorStyle and voila!&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Questions? Comments? Please feel free to share :).&lt;/div&gt;</description></item><item><title>Because you can animate, doesn't mean you should.</title><link>http://xceed.com/CS/blogs/xamlhero/archive/2009/02/10/because-you-can-animate-doesn-t-mean-you-should.aspx</link><pubDate>Tue, 10 Feb 2009 17:56:00 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:18529</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;A lot has changed since WinForms but one of the variables that hasn't changed much, is the programmer. WinForms programmers who were used to static environments are now asked to "upgrade" to WPF, which brings a whole new world of possibilities. One of these possibilities is animation. In an ideal world, a company that moves from WinForms to WPF should have an integrator and an artist. Obviously, not all of WPF programmers are that fortunate and some have to take on the three roles. Here's an example of what I consider a good use of animation. &lt;br&gt;&lt;br&gt;If working with Catherine (our artist) has taught me anything in the past three year is that "less is more", which she often loves to remind me. This is especially true with animations and more so if you have little or no experience with it. Stick with the basics. Why do you want to animate X and Y? The answer can't always be "because it's cool” or “because I can". Animations should be used to guide the user’s eyes on the screen, to give them a visual queue that something changed. It's easy to go over the top and do too much. Here's an example of what I would not recommend :&lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/ekAX18Mq7fE&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed mce_src="http://www.youtube.com/v/ekAX18Mq7fE&amp;amp;hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344" src="http://www.youtube.com/v/ekAX18Mq7fE&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;/object&gt;&lt;br&gt;&lt;br&gt;Unfortunately, this is the type of things we see in WPF applications. Too much visual noise, which overwhelms the user. I would recommend a much smoother approach. For example:&lt;/p&gt;&lt;p&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/AhsUSyNJ_p0&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed mce_src="http://www.youtube.com/v/AhsUSyNJ_p0&amp;amp;hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344" src="http://www.youtube.com/v/AhsUSyNJ_p0&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;/object&gt;&lt;br&gt;&lt;br&gt;In the end, if your application is built around a "light" animation philosophy, odds are that you'll get a much slicker application. Try not to vary the type of animation you are using either. Mixing ScaleTransforms with RotateTransform can make a user nauseous. If you don't feel you have the knowledge required to determine when you should use animation, refer to the pros like what you see in &lt;a&gt;Zune&lt;/a&gt;, which uses very smooth animation like the one I demonstrated.&lt;/p&gt;&lt;p&gt;Also feel free to follow me on &lt;a href="http://twitter.com/mattd1980"&gt;twitter&lt;/a&gt; !&lt;br&gt;&lt;/p&gt;</description></item><item><title>Raising the bar with smooth scrolling</title><link>http://xceed.com/CS/blogs/componentinsider/archive/2008/11/17/continuing-to-raise-the-bar-for-datagrids.aspx</link><pubDate>Mon, 17 Nov 2008 20:35:00 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:16947</guid><dc:creator>Odi [Xceed]</dc:creator><description>&lt;P&gt;In the past two years,&amp;nbsp;Xceed has&amp;nbsp;worked on the performance of Xceed DataGrid for WPF, and&amp;nbsp;with August's release of&amp;nbsp;v3.0, we feel we've achieved a great level of performance. The best in the industry if you not only count scrolling speed, but loading, sorting and grouping time as well.&lt;/P&gt;
&lt;P&gt;Despite the new performance increases, there are still scenarios with slower systems on which the scrolling performance is not fast enough. The industry's solution to that (including Microsoft's own WPF datagrid) is to provide a "deferred scrolling mode". In deferred mode, a datagrid's display isn't updated while you are dragging the scrollbar, it updates only when you stop dragging.&amp;nbsp;This scheme doesn't let you know where you will land&amp;nbsp;when&amp;nbsp;you let go of the thumb, so "scroll tips" were invented to display information about the first row of the page you would land on. Not a very good experience.&lt;/P&gt;
&lt;P&gt;Earlier this year, we started working on Xceed DataGrid for WPF's "perceived performance". We added smooth scrolling to the datagrid, physics-like animation effects, and background generation and display of&amp;nbsp;data items. The combination of these features provides a much better experience than with deferred scrolling, and boy does it look and feel delicious. When a user performs a "page down" action, the datagrid immediately responds by starting to smooth scroll to the next page, while fading-in the datarows as their containers and contents&amp;nbsp;are generated. By the time the animation has slowed down, everything is properly displayed as expected. Instead of a delay on a slower computer when the user hits "page down", they get immediate feedback, giving the datagrid&amp;nbsp;a snappy and fast feel to it.&amp;nbsp;Here's a &lt;A class="" title="Smooth Scrolling Xceed DataGrid for WPF" href="http://mschnlnine.vo.llnwd.net/d1/ch9/5/7/0/2/4/4/TCSSmoothDatagridsXceed_2MB_ch9.wmv"&gt;Channel 9 video (WMV High)&lt;/A&gt; on the new feature, and a couple more new related features such as group headers that always stay in view and touch gesture support.&lt;/P&gt;&lt;IFRAME style="WIDTH:321px;HEIGHT:265px;" src="http://channel9.msdn.com/shows/Continuum/442075/player/" frameBorder=0 width=320 scrolling=no height=325 mce_src="http://channel9.msdn.com/shows/Continuum/442075/player/"&gt;&lt;/IFRAME&gt;&lt;BR&gt;&lt;BR&gt;&lt;A href="http://channel9.msdn.com/shows/Continuum/SmoothDatagridsXceed/"&gt;Smooth Scrolling Datagrids with Xceed on Microsoft Channel9&lt;/A&gt;&lt;BR&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think it is clear that the industry looks toward Xceed as the trend-setter in WPF datagrid controls, and even WPF controls in general. We were the first to release one, the first to provide an XBAP demo (and a still unequaled one even after two years of availability), the first to announce the use in a major application&amp;nbsp;such as Visual Studio Team System 2010, the first to bring 3D to datagrids, and now the first to demonstrate smooth scrolling, physics effects, touch gesture support, and background generation of UI elements to increase perceived performance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item></channel></rss>