Reputation: 179
I have a RadGridView and for one column/Cell of Grid, I want to change it's default "Part_CellBorder" style. I tried many things but I am not getting the proper way to do that.
Can anyone suggest what would be the proper way to dynamically change the style of Part_CellBorder (BorderThickness). Because I don't want to create separate style for this.
Upvotes: 0
Views: 176
Reputation: 169420
I'm afraid you can't modify the PART_CellBorder
element without creating a complete custom ControlTemplate
for the cell, i.e. you will have copy the entire default ControlTemplate
and then edit it as per your requirements.
The other option would be to try to programmatically get a reference to the PART_CellBorder
element at runtime and then modify it by setting any of its properties. But there is no way to override only a part of a ControlTemplate
:
WPF: Is there a way to override part of a ControlTemplate without redefining the whole style?
Upvotes: 0