I just created an empty WPF app in VS 2015.
It has
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
var mainWindowHandle = new WindowInteropHelper(this).Handle;
}
}
But mainWindowHandle
is 0
always.
Is it OK? Should it be > 0
?