Question

toolwindow float sizetocontent

Posted 3 years ago by Avatar Mary Fontana - Rudolph Technologies
I would like to float the toolwindow with the FloatSizingBehavior.SizeToContent
I replaced the DockSite menu for Float to call Float with sizetocontent parameter.
How would I do the same thing when the toolwindow is dragged or when you doubleclick the tab for the tool window?

Thanks,
Mary

[Modified at 04/24/2011 09:13 PM]

Comments (3)

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Mary,

Unfortunately, that is not currently supported. I've marked down a TODO item to see about adding that feature in the future.

Actipro Software Support
Posted 3 years ago by Mary Fontana - Rudolph Technologies
Thanks. Then is there a way to change the default height/width of toolwindow when it is dragged with mouse or when double click mouse?
Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Mary,

If you have a custom ToolWindow class, then you may be able to override the OnStateChanged method and look for the Floating state. Then you'd need to get the parent RaftingWindow (via Window.GetWindow) or the RaftingWindowControl (via VisualTreeHelperExtended.GetAncestor), depending on if you are using hosted rafting windows or not. Then you could set the resize the window. You may need to dispatch the code that sets the size though, as the visual tree may not be fully setup.

Other than that, you could create a custom DockSite class that overrides the CreateRaftingWindow and size the Window that way. You'd either need to create a class that derives from RaftingWindow or RaftingWindowControl, and again size it when appropriate.

Actipro Software Support
Information The latest build of this product (2014.1 build 0602) was released 2 months ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.