|
Group: Forum Members
Posts: 6,
Visits: 1
|
My application has a DocumentManager that displays document in SingleDocument mode. (DockManager.DocumentStyle.DocumentViewStyle = SingleDocument).
I want all my child NUIDocuments to display a background image. But I want to set the image on my main form, so I only have to set it once, and all the child documents allow the background image to show through.
I can set the background image programmatically using this code: protected override void OnLoad(EventArgs e) { base.OnLoad(e); nDockManager1.RootContainer.Parent = nuiPanel3; // where I want my docs displayed nDockManager1.RootContainer.BackgroundImage = Resource1.globe_bkgd; // my background image in a Resource file nDockManager1.RootContainer.BackgroundImageLayout = ImageLayout.Stretch; nDockManager1.RootContainer.BackColor = Color.Transparent; // needed to show the background image. not sure why. }
I can successfully see my image if my document style is set to "MdiTabbed".
But if I set my image to "SingleDocument" or "MdiStandard" I can only see the background color (and Color.Transparent does not work; it needs to be Color.Red, Color.Green or any other non-transparent color).
I am adding documents with this code: NUIDocument doc = new NUIDocument("My Control Title", -1, new UserControl2()); nDockManager1.DocumentManager.AddDocument(doc);
it adds the controls properly. And if DocumentStyle=MdiTabbed everything works well. But I need to use MdiSingle for display purposes.
Any suggestions?
-tomas
|