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.
You can refer to the following sample link for animating GridCell when underlying property gets changed in SfDataGrid.
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:||.NET Framework:||Product Version:|