windowsforms-devexpress-dot-xtratreelist-dot-treelist-58ea09c0.md
Allows you to customize the scrollbar annotation color and alignment.
Namespace : DevExpress.XtraTreeList
Assembly : DevExpress.XtraTreeList.v25.2.dll
NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList
[DXCategory("Events")]
public event EventHandler<TreeListScrollAnnotationsStyleEventArgs> ScrollAnnotationsStyle
<DXCategory("Events")>
Public Event ScrollAnnotationsStyle As EventHandler(Of TreeListScrollAnnotationsStyleEventArgs)
The ScrollAnnotationsStyle event's data class is DevExpress.XtraTreeList.TreeListScrollAnnotationsStyleEventArgs.
Note
Run the Scrollbar Annotations & Bookmarks demo to see the complete example.
Handle the ScrollAnnotationsStyle event to customize scrollbar annotations.
void OnScrollAnnotationsStyle(object sender, TreeListScrollAnnotationsStyleEventArgs e) {
var styleColor = ucScrollAnnotationsOptions.GetColor(e.Kind);
if(!styleColor.IsEmpty)
e.Color = styleColor;
}
Private Sub OnScrollAnnotationsStyle(ByVal sender As Object, ByVal e As TreeListScrollAnnotationsStyleEventArgs)
Dim styleColor = ucScrollAnnotationsOptions.GetColor(e.Kind)
If Not styleColor.IsEmpty Then
e.Color = styleColor
End If
End Sub
See Also