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

4 posts, 1 answers
  1. Corey
    Corey avatar
    26 posts
    Member since:
    Nov 2012

    Posted 04 Dec 2012 Link to this post

    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
  2. Answer
    Alek
    Admin
    Alek avatar
    78 posts

    Posted 05 Dec 2012 Link to this post

    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.

  3. DevCraft banner
  4. Corey
    Corey avatar
    26 posts
    Member since:
    Nov 2012

    Posted 05 Dec 2012 Link to this post

    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.
  5. Alek
    Admin
    Alek avatar
    78 posts

    Posted 06 Dec 2012 Link to this post

    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.

Back to Top