Skip to main content

TableView.AllowPerPixelScrolling Property

Gets or sets whether per-pixel scrolling is enabled. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.2.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public bool AllowPerPixelScrolling { get; set; }

Property Value

Type Description
Boolean

true to enable per-pixel scrolling; false to enable row by row scrolling.

Remarks

To learn more, see Per-Pixel Scrolling.

Note

If per-pixel scrolling is enabled and data rows are of different height, the last (bottom) visible row may not be displayed entirely.

Example

This example shows how to implement a custom animation displayed when a user vertically scrolls the GridControl (per-pixel scrolling):

  1. Set the TableView.AllowScrollAnimation property to true.
  2. Set the TableView.ScrollAnimationMode property to Custom.
  3. Handle the TableView.CustomScrollAnimation event and specify a custom scroll animation.

Grid - Custom Scrolling

View Example: Implement Custom Scroll Animation

<dxg:GridControl Name="grid" AutoGenerateColumns="AddNew">
    <dxg:GridControl.View>
        <dxg:TableView Name="view"
                       AutoWidth="True"
                       AllowScrollAnimation="True"
                       ScrollAnimationMode="Custom"
                       CustomScrollAnimation="view_CustomScrollAnimation"/>
    </dxg:GridControl.View>
</dxg:GridControl>
void view_CustomScrollAnimation(object sender, DevExpress.Xpf.Grid.CustomScrollAnimationEventArgs e) {
    e.Storyboard = new Storyboard();
    DoubleAnimation animation = new DoubleAnimation {
        From = e.OldOffset,
        To = e.NewOffset,
        Duration = new Duration(TimeSpan.FromMilliseconds(600)),
        EasingFunction = new ExponentialEase() { Exponent = 0 }
    };
    e.Storyboard.Children.Add(animation);
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the AllowPerPixelScrolling property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also