Hi George,
Thanks for the suggested workaround... I wasn't aware of the BringToFront() method.
The problem has been happening consistently for us whenever someone double-clicks the button that triggers the confirm popup. So it's not that rare for us. We've reproduced it on a few different machines.
I tried calling BringToFront from the Loaded event and it didn't work... but I found that if I added a small timer delay, it worked OK.
Here is the code I used:
private
void
ConfirmUsingRadWindow(DialogParameters parameters)
{
var confirm =
new
RadConfirm();
confirm.Content = parameters.Content;
var window =
new
RadWindow();
window.Content = confirm;
window.ResizeMode = ResizeMode.NoResize;
window.CanMove =
true
;
window.Style = parameters.WindowStyle;
window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
//window.IsActiveWindow = true;
confirm.Configure(window, parameters);
window.Loaded += (s, ea) => BringWindowToFrontAfterDelay(window);
window.Closed += parameters.Closed;
window.ShowDialog();
}
private
void
BringWindowToFrontAfterDelay(RadWindow window)
{
var timer =
new
DispatcherTimer();
timer.Interval = TimeSpan.FromMilliseconds(200);
timer.Tick += (s, ea) => BringWindowToFront(window, timer);
timer.Start();
}
private
void
BringWindowToFront(RadWindow window, DispatcherTimer timer)
{
if
( window.IsOpen )
window.BringToFront();
timer.Stop();
}
Thanks for your help,
Richard