wpf-devexpress-dot-xpf-dot-grid-dot-tableview-17f2fb5f.md
Gets or sets whether per-pixel scrolling is enabled. This is a dependency property.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public bool AllowPerPixelScrolling { get; set; }
Public Property AllowPerPixelScrolling As Boolean
| Type | Description |
|---|---|
| Boolean |
true to enable per-pixel scrolling; false to enable row by row scrolling.
|
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.
This example shows how to implement a custom animation displayed when a user vertically scrolls the GridControl (per-pixel scrolling):
true.Custom.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);
}
Private Sub view_CustomScrollAnimation(ByVal sender As Object, ByVal e As DevExpress.Xpf.Grid.CustomScrollAnimationEventArgs)
e.Storyboard = New Storyboard()
Dim animation As DoubleAnimation = New DoubleAnimation With {.From = e.OldOffset, .[To] = e.NewOffset, .Duration = New Duration(TimeSpan.FromMilliseconds(600)), .EasingFunction = New ExponentialEase() With {.Exponent = 0}}
e.Storyboard.Children.Add(animation)
End Sub
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.
reporting-wpf-printing-library-use-the-composite-link/CS/MainWindow.xaml#L34
<dxg:GridControl.View>
<dxg:TableView AllowPerPixelScrolling="True" Name="tableView1" ShowTotalSummary="True" />
</dxg:GridControl.View>
wpf-use-devexpress-theme-in-applications/CS/DevExpress.Examples.ThemeSwitcher/MainWindow.xaml#L29
<dxg:GridControl.View>
<dxg:TableView AllowPerPixelScrolling="True" ShowTotalSummary="True" />
</dxg:GridControl.View>
<dxg:GridControl.View>
<dxg:TableView AllowPerPixelScrolling="True"
ShowSearchPanelMode="Never"
use-unbounddatasource-to-populate-wpf-data-grid-with-data/CS/UnboundSource/MainWindow.xaml#L40
<dxg:GridControl.View>
<dxg:TableView AllowPerPixelScrolling="True" ShowTotalSummary="True" />
</dxg:GridControl.View>
wpf-grid-scrollbar-annotations/CS/WpfApplication25/MainWindow.xaml#L29
<dxg:GridControl.View>
<dxg:TableView x:Name="myView" AllowPerPixelScrolling="True" ShowSearchPanelMode="Always" ScrollBarAnnotationMode="{Binding EditValue, ElementName= myListBoxEdit, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay }" ScrollBarCustomRowAnnotation ="MyScrollBarCustomRowAnnotationEventHandler" SearchPanelAllowFilter="False" Loaded="MyLoadedEventHandler">
<dxg:TableView.FormatConditions>
See Also