This is a migrated thread and some comments may be shown as answers.

Tracking Top Most Window

3 Answers 121 Views
Window
This is a migrated thread and some comments may be shown as answers.
Rashad Rivera
Top achievements
Rank 1
Rashad Rivera asked on 02 Jul 2011, 04:51 PM

Hello All,

I have complained in the past about the RadWindow's inability to show consistantly (seen here), and even with Teleriks recomendations to invoke the window via Dispatcher.BeginInvoke(), the simple truth is the window just won't show if the host application is not the active window.  But that is another topic and not the focus of this thread.

Currently, I have a need to build a re-authentication function in my application that shows a RadWindow dialog to the user; requesting their credentials.  This re-authentication process fires 10 minutes before the user's logon token expires.  The issue I'm having is as follows:

  1. If the user does not have the window focused (let's say they are checking e-mail), the Re-authentication RadWindow does not show.  =(
  2. If the user is interacting with an other active RadWindow dialog (call it ActiveWindow1 for short), while the Re-authentication RadWindow is trying to display, it false behind the ActiveWindow1 and the user is unaware of the fact that thier logon is about to expire. 

My question is this:  Is there a way to test for the discover the top most RadWindow dialog before invoking my Re-authentication window?  This way I can either minimize it, hide it, or assign it as the Owner of the new dialog.  Short of creating my own custom RadWindow class that tracks every window via some private static collection; I don't see a way of accomplishing this beahavior.

- Rashad Rivera
  www.omegusprime.com

3 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 06 Jul 2011, 08:27 AM
Hi Rashad,

 Currently we are working on the Window and Docking controls intensively to fix some issues. We are also targeting the issue you mentioned.

When the user is interacting with another RadWindow control the new one should be shown on the top, no matter the owner is. Could you please give us some more details on this matter, as it could be an issue we are not aware of?

As for the collections of the currently opened windows you could use the RadWindowManager singleton class that holds all the opened RadWindows.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Rashad Rivera
Top achievements
Rank 1
answered on 09 Jul 2011, 06:57 AM
Yes I have a perfect example. 

1) Navigate to http://demos.telerik.com/wpf/
2) pick the Window and UserControl sample (you will see a dialog labeld "Daily Report"
3) Open another application like Notepad.exe
4) Click the "Send" button on the sample app and *quickly* activate the notpade.exe instance.  (by activate I mean click in the text area.  This changes focus off the IE browser hosting the WPF sample app)

- You will see that the "Alert" dialog never displays and the sample becomes unresponsive.  I looked closer into this and noticed the following behavior issues with RadWindow

1) If the host application does not have focus, the RadWindow being asked to ShowDialog will not appear.  It is active, but *not loaded*.  I know this because I wrote a timer that checks the "IsLoaded" property and it never becomes 'true'.  As I posted a while ago, the only way to correct this issue is by the following hack

if (!m_Window.IsLoaded) {
    try {
        m_Window.ShowDialog();
    } catch (ArgumentException) {
        m_Window.Close();
        m_Window.ShowDialog();
    }
}
0
Miroslav Nedyalkov
Telerik team
answered on 11 Jul 2011, 08:39 AM
Hello Rashad,

 Thank you for reporting us the issue and explaining it in details.
 This problem is targeted in the 2011 Q2 version of RadControls for WPF and should no longer exist. This version will be released in the middle of July. Hope this time frame is good for you.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Window
Asked by
Rashad Rivera
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Rashad Rivera
Top achievements
Rank 1
Share this question
or