I have a DataGrid
and I'm subscribing to PreparingCellForEdit
. On it there is a code that returns the DataGridCell
by getting the element from keyboard focus.
var cell = Keyboard.FocusedElement as DataGridCell;
When I have the cell I need to find out if there is a focusable element inside it that is enabled, visible and editable.
Example:
FieldX | FieldY
--------------------------
[ ]+ | [ ]+
[ ]* | (not visible)
+ Enabled, visible, focusable
* IsEnabled = false
How can I find out if there is such an element inside the cell?