private void LoadTimer_Tick(object sender, EventArgs e)
{
Dispatcher.Invoke(DispatcherPriority.Normal,
(Action)(() =>
{
if (!this.IsShown)
{
(sender as DispatcherTimer).Stop();
if (Contents.Any(c => c.Visibility == Visibility.Visible))
{
this.ShowActivated = this.OwnedWindows.Count <= 0;
/*
Why was this duplicate code here
if (this.OwnedWindows.Count > 0)
this.ShowActivated = false;
else
this.ShowActivated = true;
*/
this.Show();
}
else
{
this.Close();
}
}
}));
}