Tracking Top Most Window

4 posts, 0 answers
  1. Rashad Rivera
    Rashad Rivera avatar
    63 posts
    Member since:
    Aug 2009

    Posted 02 Jul 2011 Link to this post

    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

  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 06 Jul 2011 Link to this post

    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!

  3. UI for WPF is Visual Studio 2017 Ready
  4. Rashad Rivera
    Rashad Rivera avatar
    63 posts
    Member since:
    Aug 2009

    Posted 09 Jul 2011 Link to this post

    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();
        }
    }
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 11 Jul 2011 Link to this post

    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!

Back to Top