windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridview-b33084db.md
Allows you to customize scrollbar annotation color and alignment.
Namespace : DevExpress.XtraGrid.Views.Grid
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[DXCategory("Events")]
public event EventHandler<GridScrollAnnotationsStyleEventArgs> ScrollAnnotationsStyle
<DXCategory("Events")>
Public Event ScrollAnnotationsStyle As EventHandler(Of GridScrollAnnotationsStyleEventArgs)
The ScrollAnnotationsStyle event's data class is DevExpress.XtraGrid.Views.Grid.GridScrollAnnotationsStyleEventArgs.
Note
Show Me Run the Scrollbar Annotations & Bookmarks module in the XtraGrid MainDemo to see the complete example.
Handle the ScrollAnnotationsStyle event to customize scrollbar annotations.
void OnScrollAnnotationsStyle(object sender, GridScrollAnnotationsStyleEventArgs e) {
var styleColor = style.GetColor(e.Kind);
if(!styleColor.IsEmpty)
e.Color = styleColor;
}
Private Sub OnScrollAnnotationsStyle(ByVal sender As Object, ByVal e As GridScrollAnnotationsStyleEventArgs) Handles gridView.ScrollAnnotationsStyle
Dim styleColor As Color = style.GetColor(e.Kind)
If (Not styleColor.IsEmpty) Then
e.Color = styleColor
End If
End Sub
See Also