I came across exactly this and just posted an example in WPF Component ComboBox DropDown did not appear in the place that worked for me. An interested reader can go there to read my comment, but here's a snippet (NOTE: WindoBaseLoadedHandler is the "Loaded =" handler specified in XAML):
protected void WindowBaseLoadedHandler(object sender, RoutedEventArgs e) {
... non-essential lines of code removed ...
if (DataContext != null) { Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() => { this.IsEnabled = false; LoginDlg loginDlg = new LoginDlg(); loginDlg.ShowDialog(); if (!loginDlg.Success) { ...termination logic removed... } this.IsEnabled = true; })); }
John
source share