Back to Devexpress

TreeList.ScrollAnnotationsStyle Event

windowsforms-devexpress-dot-xtratreelist-dot-treelist-58ea09c0.md

latest2.2 KB
Original Source

TreeList.ScrollAnnotationsStyle Event

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

Declaration

csharp
[DXCategory("Events")]
public event EventHandler<TreeListScrollAnnotationsStyleEventArgs> ScrollAnnotationsStyle
vb
<DXCategory("Events")>
Public Event ScrollAnnotationsStyle As EventHandler(Of TreeListScrollAnnotationsStyleEventArgs)

Event Data

The ScrollAnnotationsStyle event's data class is DevExpress.XtraTreeList.TreeListScrollAnnotationsStyleEventArgs.

Remarks

Note

Run the Scrollbar Annotations & Bookmarks demo to see the complete example.

Handle the ScrollAnnotationsStyle event to customize scrollbar annotations.

csharp
void OnScrollAnnotationsStyle(object sender, TreeListScrollAnnotationsStyleEventArgs e) {
    var styleColor = ucScrollAnnotationsOptions.GetColor(e.Kind);
    if(!styleColor.IsEmpty)
        e.Color = styleColor;
}
vb
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

Scrollbar Annotations

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace