Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How to handle tab navigation when a disabled control get focused.

$
0
0

Hi,

In a panel containing a DataGrid and some Buttons, I have problems getting tab navigation to work correct.

When focus leaves the DataGrid in a tabbing sequence, the next control in the tab order is a button that is disabled through binding - causing focus to be set to the panels parent control, and not to the nextenabled control in the tab order.

The problems seems to be that the button is disabled in the same operation that is changing focus. Or stated otherwise: Tabbing out of the datagrid unselects a row, which then disables the button through vm-binding.

Note that other buttons further down in the tab order are enabled, but they do not get focused. 

Hope this is a well known problem with a good solution.



Viewing all articles
Browse latest Browse all 18858

Trending Articles



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