Tool Window float start position

Docking/MDI for WPF Forum

Posted 14 years ago by Mark Benda
Version: 9.1.0505
Avatar
I have tool windows that are floating and I'd like to be able to specify location coordinates. I have tried setting the rafting location, but this doesn't seem to alter the tool window location. Is there a way I can specify a position?

The current layout is (pseudo-xaml-code)
<document window>
<docksite>
<split container>
<workspace/>
<tool window container/> <-- here I specify toolwindows
</split container>
</docksite>
</document window>

Comments (5)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Maybe you could get the root Window via Window.GetWindow(toolWindowInstance) and move it that way (assuming the tool window is active and rafted already)?

If you don't already have the tool windows rafted (and they are still hidden) then you can use the Undock method overload that accepts a Point to position them.


Actipro Software Support

Posted 14 years ago by Mark Benda
Avatar
What I'd like to do is specify the location of the current tool window instance. Something like a toolwindowinstance.top and toolwindowinstance.left, I see that we have RaftingLocation and I can set that, but the tool window doesn't alter its position.

For testing, I created a context menu on the toolwindow with the following click event handler, which doesn't move the window like I hoped:
private void ToolWindow_Click(object sender, RoutedEventArgs e)
{
Point current = RaftingLocation.Value;
current.X += 50;
current.Y += 50;
RaftingLocation = current;
}

is there some other way I can move the window?
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Mark,

Right now the RaftingLocation property is just used to store the location for if the tool window hides and needs to be restored.

The only way with the current code to move it would be to do what I previously said by getting the root rafting Window and moving that.


Actipro Software Support

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Mark,

I didn't know you were using hosted rafting windows. I see it with your example you posted (but since seemed to have deleted) and have it resolved for the next build.


Actipro Software Support

Posted 14 years ago by Mark Benda
Avatar
Yes I'm using hosted rafting windows. Thanks for getting that into the next build.
The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.