private void ShowCustomScrollAnnotation(DevExpress.Xpf.Grid.ScrollBarCustomRowAnnotationEventArgs e, SolidColorBrush brush) { e.ScrollBarAnnotationInfo = new DevExpress.Xpf.Grid.ScrollBarAnnotationInfo() { Alignment = DevExpress.Xpf.Grid.ScrollBarAnnotationAlignment.Right, Brush = brush, MinHeight = 3, Width = 10 }; }
private void MyScrollBarCustomRowAnnotationEventHandler(object sender, DevExpress.Xpf.Grid.ScrollBarCustomRowAnnotationEventArgs e) { TestData data = e.Row as TestData; if (data == null) { return; } int number = data.Number; if (number > 10 && number < 15) { ShowCustomScrollAnnotation(e, Brushes.LightCoral); } if (number > 2 && number < 4) { ShowCustomScrollAnnotation(e, Brushes.Green); } }