Version

We recommend that you use the xamDataGrid control instead of the xamGrid control. The xamGrid is being planned for retirement over the next few years and will not receive any new features. We will continue to provide support and critical bug fixes for the xamGrid during this time. For help or questions on migrating your codebase to the xamDataGrid, please contact support.

Customize Animation of Column Moving

You can customize the animation that is used when the column moving feature is enabled and the ColumnMovingType is set to Immediate. This can be done by setting the ColumnMovingSettings object’s AnimationDuration and EasingFunction properties.

Setting the EasingFunction property specifies which EasingFunctionBase will be used to animate the immediate moving of columns. You can also create your own custom easing functions by inheriting from the EasingFunctionBase class, for more information see EasingFunctionBase.

The following demonstrates how to customize the animation of column moving.

In XAML:

<Grid x:Name="LayoutRoot" Background="White">
   <ig:XamGrid x:Name="MyDataGrid" AutoGenerateColumns="False">
      <ig:XamGrid.ColumnMovingSettings>
         <ig:ColumnMovingSettings AllowColumnMoving="Immediate" AnimationDuration="20">
            <ig:ColumnMovingSettings.EasingFunction>
               <BounceEase />
            </ig:ColumnMovingSettings.EasingFunction>
         </ig:ColumnMovingSettings>
      </ig:XamGrid.ColumnMovingSettings>
      …
  </ig:XamGrid>
</Grid>

In Visual Basic:

Me.MyDataGrid.ColumnMovingSettings.AllowColumnMoving = Infragistics.Controls.Grids.ColumnMovingType.Immediate
Me.MyDataGrid.ColumnMovingSettings.AnimationDuration = "20"
Me.MyDataGrid.ColumnMovingSettings.EasingFunction = New BounceEase()

In C#:

this.MyDataGrid.ColumnMovingSettings.AllowColumnMoving = Infragistics.Controls.Grids.ColumnMovingType.Immediate;
this.MyDataGrid.ColumnMovingSettings.AnimationDuration = 20;
this.MyDataGrid.ColumnMovingSettings.EasingFunction = new BounceEase();