Posted 4 years ago by EntityDev
Version: 14.1.0323
Avatar

I honestly don't know what property of which object I am refering to. The best I can do is to show with screenshots.

In this image, a ToolWindow docked at the top shows a margin or gap between the ToolWindow and the control above it. The renderer is the MetroLightDockRenderer. The red rectangle shows this gap:

MetroLightToolWindowTopMargin

In this image, there is no gap between the ToolWindow and the control above it. The renderer is the VisualStudio2005DockRenderer:

VisualStudio2005TopMargin

I need to be able to reproduce that gap or margin in my inherited renderer or by overriding the draw method which does the job. Whether or which property or draw method is used to do this I cannot determine. I can of course inherit the MetroLightDockRenderer and I'll have that gap. However, this renderer is a very poor choice as a base because it draws everything else in a way that is not desirable. The AutoHide tabs are not really tabs at all, and the ToolWindow TitleBars have dots drawn on them. I would need to override a lot more drawing than I'd prefer. One of the other renderers is much more suitable as a base.

Can you help me to define exactly where/when/how this gap is created, please?

In addition, none of the renderers draw TitleBars with rounded corners. And again, I don't know that it's done in the renderer. I have studied the matter and I cannot determine where the actual TitleBar is drawn. As such, I also do not know if the method which draws them is overrideable.

I'm able to draw the DockContainerTitleBarBackground and the DockContainerTitleBarForeground, but this of course draws or paints upon the already drawn TitleBar. At least, I believe that to be true. How can we override the drawing of the actual TitleBar?

I've been picking away at this rendering business bit by bit, but would love to cut to the chase. Is it possible without purchasing source code to get a working example of a TitleBar being drawn? Perhaps it is done in one of your NotInheritable objects. If so, I fully understand. If not, please give some concrete guidance in VB.Net, if possible.

Many Thanks

[Modified 4 years ago]

Comments (2)

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

Hello,

You want to alter the dock renderer's AutoHideTabStripPanelMargin property for that particular margin.

The dock renderer's DrawDockContainerTitleBarBackground and DrawDockContainerTitleBarForeground methods render the title bar itself.  Although the title bar is contained in the dock container and thus the DrawDockContainerBackground might also render behind the title bar.  If you want rounded borders, you might have to override those two background methods.

We can send you our renderer code if you email us.


Actipro Software Support

Posted 4 years ago by EntityDev
Avatar

AutoHideTabStripPanelMargin, eh? I wouldn't have thought to look there.

Beautiful, thanks so much. I'll do it.

The latest build of this product (v2020.1 build 0400) was released 9 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.