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

RadWindow.Alert does not center in fullscreen mode

5 Answers 115 Views
Window
This is a migrated thread and some comments may be shown as answers.
Madeleine
Top achievements
Rank 1
Madeleine asked on 09 Nov 2010, 09:29 AM
Hi,

I'm running an OOB Silverlight application. When the application is not fullscreen, the RadWindow.Alert() centers iteself nicely on the screen. However, when in Fullscreen mode, the window seems to go off on the bottom right of the screen. Do you know what could be causing this?

Kind regards,
Madeleine

5 Answers, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 11 Nov 2010, 10:58 AM
Hi Madeleine,

I am not able to reproduce the problem. I used the application attached. Here is what I am doing: Installed it on my PC (OOB), make the application full screen open the Alert window. Let me know if you are doing something else.

Sincerely yours,
Boyan
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
Madeleine
Top achievements
Rank 1
answered on 17 Jan 2011, 09:51 AM
Hi,

Thank you for the response. I still have this problem though, and it seems to be because of some RenderTransform that we add in fullscreen mode. When the application enters fullscreen mode, the following code is executed:

 if (Current.Host.Content.IsFullScreen)
            {
                double hostContentActualHeight = Current.Host.Content.ActualHeight;
                double hostContentActualWidth = Current.Host.Content.ActualWidth;


                double heightRatio = hostContentActualHeight / _contentActualSize.Height;
                double widthRatio = hostContentActualWidth / _contentActualSize.Width;


                double ratio = 1.0;


                if (heightRatio < widthRatio && heightRatio < 1) ratio = heightRatio;
                else if (widthRatio < 1) ratio = widthRatio;
                _busyIndicator.RenderTransform = new ScaleTransform { ScaleY = heightRatio, ScaleX = widthRatio };
            }
            else
            {
                _busyIndicator.RenderTransform = null;
                _busyIndicator.Width = 1024;
                _busyIndicator.Height = 768;
            }

The _busyIndicator that the RenderTransform property is being set on is the rootvisual of the application. After this is called, then the window is positioned in a very strange location as described in the first post.
0
Boyan
Telerik team
answered on 20 Jan 2011, 12:53 PM
Hello Madeleine,

I am still not able to reproduce the issue. I played with the code you send me but with no success. Maybe my _contentActualSize is different. It will be best if you can send me a  sample project where we can investigate what is causing the issue.

Greetings,
Boyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Nathaniel
Top achievements
Rank 1
answered on 02 Aug 2011, 06:24 PM
How do I prevent pre-defined dialogs (Alert, Confirm) from being dragged off of the screen?
0
Miroslav Nedyalkov
Telerik team
answered on 04 Aug 2011, 01:08 PM
Hello Nathaniel,

 You could use the WindowStyle property of the DialogParameters object (that could be passed as a parameter of the Alert or Confirm methods) to set the IsRestricted or RestrictedAreaMargin properties of the RadWindow control.

Hope this helps.

All the best,
Miroslav Nedyalkov
the Telerik team

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

Tags
Window
Asked by
Madeleine
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Madeleine
Top achievements
Rank 1
Nathaniel
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Share this question
or