Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to draw custom separators for GridColumns and GridControlBands

$
0
0

This example demonstrates how to draw custom separators for GridColumns and GridControlBands.

To accomplish this task, override GridColumnHeader's ControlTemplate and add an additional border. Then, create a custom class with two attached properties and two converters. In the first converter, return a new Thickness value. In the second converter, return a Boolean value depending on the incoming value type: true if it is GridColumn or GridControlBand, and false in other cases.  
After that, bind a border's BorderBrush and BorderThickness properties to these attached properties using the first converter for the BorderThickness property and add an additional DataTrigger to ControlTemplate to change the border visibility using the second converter.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>