Version

Please note that this control has been retired and is now obsolete to the XamDataGrid control, and as such, we recommend migrating to that control. It will not be receiving any new features, bug fixes, or support going forward. 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();