Startup location for a FloatingWindow

Feb 12, 2009 at 6:28 AM
Hi!
I wonder if you can specify the startuplocation for a FloatingWindow when you add one from the code?
For example: 

dockingManager.Show(propWin,
DockableContentState.DockableWindow, AnchorStyle.Left);
FloatingWindow fltWindow = Window.GetWindow(propWin) as FloatingWindow;

It doesn't help to change the AnchorStyle. 

Thank you!
/Johannes
Feb 24, 2009 at 5:57 PM
No one?

Feb 26, 2009 at 3:22 PM
Hi, maybe I miss something, for starttup location do you mean left/top properties?
Mar 5, 2009 at 8:41 AM
Hi!
My problem is that the new window appears in the down right corner of the screen, I would like it to appear in the center of the screen.
No mather how I change the AnchorStyle nothing changes.

I mean something similar to the System.Windows.Window where you have the WindowStartupLocation="CenterScreen".

Thank you!

/Johannes
Mar 19, 2009 at 7:35 AM
No idea? Or am I unclear?

Thank you!

/Johannes
Mar 19, 2009 at 8:27 PM
I ran into this issue and after some digging in the discussions found this solution.

                        // resize, start up location window
                        FloatingWindow fltWindow = Window.GetWindow(window) as FloatingWindow;
                        fltWindow.Left = 100;    // start position from the left
                        fltWindow.Top = 100;    // start position from the top
                        fltWindow.Width = 300;
                        fltWindow.Height = 500;

do this after you show your window via DockingManager.Show

Hope this helps,

Jon
Mar 24, 2009 at 7:29 AM
That did it! Thank you so much!

/Johannes