Is there a way to set Focus from one control to another using WPF Triggers?
Like the following example:
Look if you're using any Dispatcher then it would be helpful but this is a short trick I used in my code. Just use the Loaded event in your XAML and make a new handler. In that handler paste this code and bingo! you're ready to go
Your loaded event with some arguments here...
{
Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Normal, new System.Action(() => {
The element to be focused goes here......
}));
}
PS: It requires Windows. Threading if you didn't know ;)