wpf-devexpress-dot-xpf-dot-grid-dot-tableview-171ef432.md
Allows creating a new scrollbar annotation based on data row values and a row handle.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public event EventHandler<ScrollBarCustomRowAnnotationEventArgs> ScrollBarCustomRowAnnotation
Public Event ScrollBarCustomRowAnnotation As EventHandler(Of ScrollBarCustomRowAnnotationEventArgs)
The ScrollBarCustomRowAnnotation event's data class is ScrollBarCustomRowAnnotationEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Row | Returns a data source object that corresponds to a data row for which an event has been raised. |
| RowHandle | Gets the handle of a row, for which an event has been raised. |
| ScrollBarAnnotationInfo | Gets or sets the information about the layout and appearance of custom scrollbar annotation marks. |
Use the ScrollBarCustomRowAnnotation event to create a new scrollbar annotation based on a row value (available via the ScrollBarCustomRowAnnotationEventArgs.Row property) and a row handle (available via the ScrollBarCustomRowAnnotationEventArgs.RowHandle property). You can define the appearance of scrollbar annotation marks using the ScrollBarCustomRowAnnotationEventArgs.ScrollBarAnnotationInfo property.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ScrollBarCustomRowAnnotation event.
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.
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>
wpf-grid-scrollbar-annotations/CS/WpfApplication25/obj/Debug/net8.0-windows/MainWindow.g.cs#L133
#line 29 "..\..\..\MainWindow.xaml"
this.myView.ScrollBarCustomRowAnnotation += new System.EventHandler<DevExpress.Xpf.Grid.ScrollBarCustomRowAnnotationEventArgs>(this.MyScrollBarCustomRowAnnotationEventHandler);
wpf-grid-scrollbar-annotations/VB/WpfApplication25/obj.NetFX/Debug/MainWindow.g.vb#L131
#ExternalSource("..\..\MainWindow.xaml",29)
AddHandler Me.myView.ScrollBarCustomRowAnnotation, New System.EventHandler(Of DevExpress.Xpf.Grid.ScrollBarCustomRowAnnotationEventArgs)(AddressOf Me.MyScrollBarCustomRowAnnotationEventHandler)
See Also