I don’t need focus navigation between cells.
I tried to set Focusable=”False” in cell style and adjust focusvisualstyle for the row, but selection fails in that case.
I don’t need focus navigation between cells. I tried to set Focusable=False in cell
Share
Yeah you need to set the
Selection Unitfor DataGrid toFullRowand setborderThickness to 0withFocusVisualStyle to null.UPDATE
Above stated xaml is best you can do with xaml only approach but in case you want to handle the tabulation too, then you have to go to code behind. This is how i achieved it –
Code behind (What i am doing here is if user pressed key right or left simply handle them
so as to stop the navigation from one cell to other and in case user press Tab key, focus
should go to the next row if available instead of moving to next cell) –
In the above code i have used some utility functions required to travel the Visual tree to find necessary parent or child in the Visual tree. For your reference the code for it as follows –