I have a WPF application window with a set of three buttons (Button A, B, C) and these buttons have command binding to respective View Model property.
When Button A is clicked it's command executes (another application is launched, Button A is disabled as CommandCanExecute condition is updated to return false). This results in application window being deactivated.
Clicking Button B doesn’t execute it's command but instead only activates the window and sets the focus to the Main window. 2nd click is required on Button B to execute its command.
The desired functionality is on click of Button B, while the application window is not active, the application window activates and command associated with Button B is executed. I have also tried removing the command and adding a click handler for test purpose but this displays same behaviour.
I appreciate any help with this issue.