How to render FullRow DockableToolBar without round eges?

Docking/MDI for Windows Forms Forum

Posted 14 years ago by Kevin McCormick
Version: 2.0.0109
Avatar
Hi,

I'm trying to dock a toolbar inside of a ToolWindow to appear similar to the toolbars that appear in the Visual Studio 2008 Solution Explorer. I can come close by setting CanDrag to false and RequiresFullRow to true, but the edges are still rounded. I doesn't seem obvious which method to override to get the drawing behavior I'm looking for. Any suggestions?

Thanks,
Kevin

Comments (2)

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

To do that you'd want to override the DrawDockableToolBarBackground method of the BarRenderer you use. In the case where the toolBar passed in has a DisplayStyle of BarControlDisplayStyle.ToolBar, maybe always call:
ToolBarDefaultBackgroundFill.Draw(e.Graphics, toolBar.Bounds, Sides.Top);


Actipro Software Support

Posted 14 years ago by Kevin McCormick
Avatar
Thanks! Worked like a charm. I also had to override DrawDockAreaBackground, too, in order to completely fill the dock area.
The latest build of this product (v24.1.1) was released 26 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.