This project is read-only.

Startup location for a FloatingWindow

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

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

It doesn't help to change the AnchorStyle. 

Thank you!
Feb 24, 2009 at 6:57 PM
No one?

Feb 26, 2009 at 4:22 PM
Hi, maybe I miss something, for starttup location do you mean left/top properties?
Mar 5, 2009 at 9:41 AM
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!

Mar 19, 2009 at 8:35 AM
No idea? Or am I unclear?

Thank you!

Mar 19, 2009 at 9: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,

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