How to render FullRow DockableToolBar without round eges?

Docking/MDI for Windows Forms Forum

Posted 11 years ago by Kevin McCormick
Version: 2.0.0109

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?


Comments (2)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
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 11 years ago by Kevin McCormick
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 (v21.1.0) was released 13 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.