I am implementing Key Navigation for an application and I want to override the space key functionality when a Combo Box is focused such that it acts like an enter key; like this:
if (!cb.IsDropDownOpen)
{
cb.IsDropDownOpen = true;
}
else
{
cb.SelectedItem = cb.{non-public member HighlightedItem};
cb.IsDropDownOpen = false;
}
The problem is that I need to get the value of that non-public member so that I can set the selected value and close the drop-down (how enter would normally work).
Now the question is: What is the fastest and hassle free way of achieving this?
You’d have to use reflection to get the value of the property
To browse all properties or fields, also check out
(you can read through them all in the debugger)