General information
Category:
Windows Presentation Foundation (WPF)
Hi Matt,
Have you checked the KeyboardNavigation.TabNavigation property? This property controls how navigation is handled in WPF containers.
Focus can fail for any of the following reasons:-
1] Element Enabled = false
2] Element IsVisible = false
3] Element Focusable = false
Or
4] Element is in a control and not the main xaml (not been loaded)
5] LostKeyboardFocus and PreviewLostKeyboardFocus are preventing it
Where you are trying to set the Focus in your code put a new line in that makes a call to the textbox PredictFocus method and set a breakpoint. PredictFocus will not shift the focus but it will tell you what should be focused next and help resolve containers that are not releasing the focus.
HTH
Neil
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only