This approach does not work for several reasons - the border thickness is bound and converted based on setters from the RadGridView and the VerticalGridLinesWidth. Furthermore, the current state of the grid view cell is set via a multitrigger for IsCurrent = true and IsInEditMode = false (in the WPF-only themes - Green, Office2016/Touch, Material) and via a VisualState x:Name="Current" (in the rest of the themes), in which a visual element in the template of the cell is shown/hidden. So in order to modify the visual appearance of the GridViewCell in the IsCurrent state, you can extract the control template
for the cell and edit the setters of the Background_Current
Border in it. In my opinion, it is cleaner and easier to copy the style from the generated resource dictionaries in the Themes.Implicit
folder from the installation to be sure that it is properly extracted, rather than relying on the VS designer as there are some issues with the process that we are aware of and had reported to Microsoft. The same approach could be used to modify other states of the GridViewCell, such as IsMouseOver, IsSelected, is in edit mode, ect.
I hope that you help you in implementing a custom look for the GridViewCell. If you have any other queries, please do not hesitate to contact us further.
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin
, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.