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

Stop Non Modal RadWindow from Re-centering When it Gains Focus

3 Answers 49 Views
Window
This is a migrated thread and some comments may be shown as answers.
Corey
Top achievements
Rank 2
Corey asked on 04 Dec 2012, 09:43 PM
Hi,

I'm currently working on a project that allows the user to open multiple non modal RadWindows at one time.  I've run into a simple block and I was hoping someone at Telerik would be able to help.

When there is more than one of these non modal windows open at any given time, the user has to click between them obviously (I'm allowing drag and drop between the two or more windows).  The window startup location for each window is currently set to CenterOwner.  The user can then drag the windows and place them wherever they want on the screen.  However, when the user selects a previously unselected window,  the window immediately jumps to the center of the screen again instead of remaining where it last was.  This can prove pretty annoying when dealing with drag and drop.

There has to be a way to keep the windows from re-centering.  I've tried setting the startup location to Manual and even setting the Top and Left properties but have had no success.  Please help.

Thanks

3 Answers, 1 is accepted

Sort by
0
Accepted
Alek
Telerik team
answered on 05 Dec 2012, 02:38 PM
Hello Corey,

We've created a simple project but we couldn't manage to reproduce the issue. As an attached file you can find a video where it is shown how our application behaves.

Can you tell us what version of RadControls you are using?

If it's possible we would like kindly to ask you to send us a sample project where the described behavior emerges in order to investigate the situation.

Greetings,
Alek
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Corey
Top achievements
Rank 2
answered on 05 Dec 2012, 03:53 PM
I found the problem after you convinced me it was definitely something on my end.  One of my co-workers had created an event handler for when the RadWindow's size changed.  Every time the size would change, the window would be re-centered on the screen.  Simply removing that handler for these specific RadWindows has fixed the problem.

But this begs the question as to why the RadWindow's SizeChanged event is triggered.  I was only clicking and dragging from inside the RadWindows.  I wasn't changing their size.
0
Alek
Telerik team
answered on 06 Dec 2012, 01:50 PM
Hi Corey,

With your note about the event we managed to reproduce the behavior. 

Basically SizeChanged is a platform event and it is one of the events that are called when the initial layout passes.

After dragging the first window and the client clicks over the second one in order to show it on the front we are closing the first window hosted pop-up and reopen it, therefor layout is called again and the event is triggered.

Greetings, Alek
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Window
Asked by
Corey
Top achievements
Rank 2
Answers by
Alek
Telerik team
Corey
Top achievements
Rank 2
Share this question
or