Alert\Confirm Multi-Monitor Problem

12 posts, 0 answers
  1. Gili Korman Golander
    Gili Korman Golander avatar
    14 posts
    Member since:
    Jan 2010

    Posted 04 Jul 2010 Link to this post

    Hello,

    We are using RadWindow's built-in dialogs alert and confirm.
    We are setting the owner in the DialogProperties to be our app's main window.

    We have found an issue with multiple monitors - here is the scenario:
    1. We open our app's main window on the primary monitor.
    2. We then move it to the secondary monitor.
    3. We call alert or confirm within the app and the alert/confirm dialog is displayed - but on the primary monitor.

    Our clients operate within a multi-monitor environment as a standard, so this issue is critical to us.
    How can we solve this issue?

    Thanks,
    Gili

  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1715 posts
    Member since:
    Sep 2012

    Posted 07 Jul 2010 Link to this post

    Hi Gili,

     You could change the WindowStartupLocation to be CenterOwner instead of CenterScreen - this should center the Alert to the MainWindow. You can change this property using the WindowStyle property of the DialogParameters class.

    Hope this helps!

    Sincerely yours,
    Miroslav Nedyalkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

  3. DevCraft Release
  4. Gili Korman Golander
    Gili Korman Golander avatar
    14 posts
    Member since:
    Jan 2010

    Posted 29 Jul 2010 Link to this post

    Additional correspondence between my colleague and Telerik resulted in an understanding that the RadWindow predefined windows (Alert, Confirm) do not support WindowStartupLocation.

    We have asked for it to be added as a feature, so all those who are interested in it please vote for it at: http://www.telerik.com/support/pits.aspx#/public/wpf/2836

    Thanks,
    Gili

  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1715 posts
    Member since:
    Sep 2012

    Posted 30 Jul 2010 Link to this post

    Hello Gili,

     Yes, you are right - it was my mistake. Please accept my apologize for it. 

    Kind regards,
    Miroslav Nedyalkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

  6. Christian
    Christian avatar
    12 posts
    Member since:
    Aug 2010

    Posted 17 Mar 2011 Link to this post

    Hi,

    I have had the same problem with the Alert and Confirm Message boxes. That's why I created a small RadMessageBox class following the design pattern of the standard WPF MessageBox.

    I wanted to post this article on my code project articles pages but it was rejected by CP because of the use of the commercial telerik libs. So I published it on our own website.

    You can find the article here.

    Regards,
    Chris

  7. Christian
    Christian avatar
    12 posts
    Member since:
    Aug 2010

    Posted 23 Mar 2011 Link to this post

    The article was now also published on CodeProject.

  8. George
    Admin
    George avatar
    1320 posts
    Member since:
    Sep 2012

    Posted 28 Mar 2011 Link to this post

    Hello Christian,

     
    Thank you for your article.  It would be great if you post the project in our CodeLibrary. Could you post it?

    Kind regards,
    George
    the Telerik team

  9. Christian
    Christian avatar
    12 posts
    Member since:
    Aug 2010

    Posted 28 Mar 2011 Link to this post

    Yes, no problem at all... Do you want the article to be posted completly or just the link to the CP article?

    And where would you like to see the article at?

    http://www.telerik.com/community/code-library/wpf/general.aspx could be a good place for it?

  10. George
    Admin
    George avatar
    1320 posts
    Member since:
    Sep 2012

    Posted 29 Mar 2011 Link to this post

    Hello Christian,

    This is the right place for the project. Thank you. 

    Kind regards,
    George
    the Telerik team

  11. Calvin
    Calvin avatar
    39 posts
    Member since:
    Jul 2011

    Posted 04 Jan 2012 Link to this post

    I see that this issue was subsequently fixed...which makes me wonder if I don't understand how the centering mechanism is supposed to work. 

    The following test illustrates the problem:

      var message = "Test Message";
    
      //Displays on primary monitor when the app is shown on the secondary monitor.  When the app is on the primary monitor, doesn't center on parent ContentControl
    RadWindow
    .Alert(new DialogParameters() { Owner = (ContentControl)View, DialogStartupLocation = WindowStartupLocation.CenterOwner, Content = 
    message
     }); 
    
      //Always displays on the correct monitor, but isn't centered on parent content control
    RadWindow
    .Alert(message);

    I would like to center the RadWindow on the owning view (which in my implementation is composed into a larger view).  But the DialogParameters approach isn't working for me.  It always displays on the primary monitor and it doesn't center the window on it's owner even when the owner is on the primary monitor.

    If this issue has been resolved, then perhaps I am missing something here.  Please shed some light on what must be done to get the desired behavior.

    Many thanks!

    I'm using version 2011.3.1220.40.

  12. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1715 posts
    Member since:
    Sep 2012

    Posted 05 Jan 2012 Link to this post

    Hello,

    The value of the Owner property is supposed to be of type Window or RadWindow. In order to achieve the desired effect, please use the following code:

    RadWindow.Alert(new DialogParameters() { Owner = Window.GetWindow(View), DialogStartupLocation = WindowStartupLocation.CenterOwner, Content =
    message
     
     });

    Hope this helps.

    Greetings,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  13. Calvin
    Calvin avatar
    39 posts
    Member since:
    Jul 2011

    Posted 05 Jan 2012 Link to this post

    Yes indeed, that tip helped!  Thanks

Back to Top
DevCraft Release