Thank you for the referenced sample.
What I can suggest for the described scenario is to activate the MainWindow when it is Loaded. Here is what I have in mind:
public partial class MainWindow : Window
this.Loaded += (s, e) => this.Activate();
Do give this a try and let me know how it goes.
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin
, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.