Form Background Image

Docking/MDI for Windows Forms Forum

Posted 18 years ago by Gianni Gardini - Italy
Version: 2.0.73
Environment: Windows XP (32-bit)
Avatar
In a form with a DockManager, if I set the property Form.BackgroundImage I can see the BackgroundImage only in DockManager.DocumentMdiStyle = Standard.
I can not see the image in DockManager.DocumentMdiStyle = Tabbed.

I can not see any image at all at design time (that's is not a great problem).

My application actually start with no DocumentWindow open and I need to display a background.

Comments (4)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Tabbed MDI uses a property off the DockRenderer that is in use. Many of the DockRenderer implementations have a TabbedMdiRootContainerBackgroundFill property. You can set that to an ImageBackgroundFill to achieve this.


Actipro Software Support

Posted 18 years ago by Gianni Gardini - Italy
Avatar
Thank you for the quick reply.
Can you explain how to find TabbedMdiRootContainerBackgroundFill property?
I can not find the right way.

this.dockManager.DockRenderer is IDockRenderer type
IDockRenderer doesn't have a TabbedMdiRootContainerBackgroundFill property.

Do I have to cast?
I don't know what concrete Renderer I have because in InitializeComponent I only have:
this.uiRendererManager1.ColorSchemeType = WindowsColorSchemeType.WindowsClassic;
(now...maybe that will change in future)

It's uiRendererManager who does all the work of creating the Renderers, I can access only the interface.

Is there a way to know what Renderer I have in dockManager.DockRenderer?
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The resolved renderer is always in DockManager.DockRendererResolved. If you have a DockManager.DockRenderer set, it returns that. Otherwise, it returns the global renderer.

The default global renderer will either be VisualStudio2005DockRenderer or Office2003DockRenderer depending on the ColorSchemeType type you chose. I think in your case it will be VisualStudio2005DockRenderer.

So yes, you will want to cast it. You can always do a type check to see what is in the DockRendererResolved property and change your cast based on that.


Actipro Software Support

Posted 18 years ago by Gianni Gardini - Italy
Avatar
Thanks, it works!
The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.