We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to animate the GridCell when underlining property gets changed in SfDataGrid?

Platform: WPF |
Control: SfDataGrid |
.NET Framework: 4.5 |
Product Version:

In SfDataGrid, it is possible to animate the cell background when changing the underlining property by customizing style for GridCell and writing the behavior for the Grid inside GridCell control template.

The following code example demonstrates how to add behavior in GridCell that animates the background of the cell when underlying property get changed.



Note: Above code example shows only the partial ControlTemplate of GridCell for reference. You can edit the ControlTemplate of GridCell by right clicking the SfDataGrid in design view and select the Edit Additional Templates -> Edit Cell Style -> Edit a Copy.

You can set this Style to a particular column alone by setting GridColumn.ColumnStyle property of column by defining key for the style. Otherwise it is applied for all the columns.



You can define the ColourAnimation for animating GridCell. And you can get the GridCell in behavior by using TemplateParent in SfDataGrid. The background of Grid is animated using property changed event.

The following code example shows the AnimatedBehaviour for changing Background of GridCell when underling ViewMode property gets changed.



The following screen shot shows the animated SfDataGrid.

F:\Farjana\F Drive\KB\Animation\WPF.png

You can refer to the following sample link for animating GridCell when underlying property gets changed in SfDataGrid.

Sample Link: AnimateCellGrid_WPF

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment
Unknown [Syncfusion]
Aug 17, 2018

Is the same possible with Xamarin Forms? If yes, could you provide an example?


Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile