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

Alert\Confirm Multi-Monitor Problem

11 Answers 358 Views
Window
This is a migrated thread and some comments may be shown as answers.
Gili Korman Golander
Top achievements
Rank 1
Gili Korman Golander asked on 04 Jul 2010, 01:29 PM
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

11 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 07 Jul 2010, 05:27 PM
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
0
Gili Korman Golander
Top achievements
Rank 1
answered on 29 Jul 2010, 02:28 PM
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
0
Miroslav Nedyalkov
Telerik team
answered on 30 Jul 2010, 12:03 PM
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
0
Christian
Top achievements
Rank 2
answered on 17 Mar 2011, 10:52 AM
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
0
Christian
Top achievements
Rank 2
answered on 23 Mar 2011, 02:43 PM
The article was now also published on CodeProject.
0
George
Telerik team
answered on 28 Mar 2011, 04:30 PM
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
0
Christian
Top achievements
Rank 2
answered on 28 Mar 2011, 05:31 PM
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?
0
George
Telerik team
answered on 29 Mar 2011, 10:13 AM
Hello Christian,

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

Kind regards,
George
the Telerik team
0
Calvin
Top achievements
Rank 2
answered on 05 Jan 2012, 02:05 AM
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.
0
Miroslav Nedyalkov
Telerik team
answered on 05 Jan 2012, 09:14 AM
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 >>

0
Calvin
Top achievements
Rank 2
answered on 05 Jan 2012, 05:08 PM
Yes indeed, that tip helped!  Thanks
Tags
Window
Asked by
Gili Korman Golander
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Gili Korman Golander
Top achievements
Rank 1
Christian
Top achievements
Rank 2
George
Telerik team
Calvin
Top achievements
Rank 2
Share this question
or