Background for TabbedMdiContainer

Docking/MDI for WPF Forum

Posted 11 years ago by uran1
Version: 4.5.0457
Avatar
Is it possible to set backgound for TabbedMdiContainer. Solutions below does set only tab color, not background color for all container (i.e. when to conainer does not have any DocumentWindow I cannot set custom background color or image)

<docking:TabbedMdiContainer Name="tabbedMdiContainer" Background="Gold" >
</docking:TabbedMdiContainer>


<docking:TabbedMdiContainer Name="tabbedMdiContainer" >
<DockPanel.Background >
<ImageBrush ImageSource="Images\Logo.png" />
</DockPanel.Background>
</docking:TabbedMdiContainer>

Best regards

Comments (9)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Right now it appears that Background property sets the area "behind" the document tabs. But by your message you want to set the area behind the content of the document windows right?


Actipro Software Support

Posted 11 years ago by uran1
Avatar
Not exactly. I want to set custom background in case, when no document is loaded.

Set code:

<ribbon:RibbonWindow
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
    xmlns:docking="http://schemas.actiprosoftware.com/winfx/xaml/docking"
    xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"
    xmlns:Themes="clr-namespace:ActiproSoftware.Windows.Themes;assembly=ActiproSoftware.Shared.Wpf30"
    xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=PresentationFramework"
    xmlns:Media="clr-namespace:System.Windows.Media;assembly=PresentationCore"
    xmlns:Drawing="clr-namespace:System.Drawing;assembly=System.Drawing"
      x:Class="MainApp.MainWindow"
      ApplicationName="AAA" WindowState="Maximized"  
    Themes:ThemeManager.Theme="Office2007Black"
  
  
  >
    <DockPanel LastChildFill="True" x:Name="MainDockPanel" >
        <ribbon:Ribbon x:Name="ribbon" DockPanel.Dock="Top"  >
            <ribbon:Ribbon.Tabs>
                <ribbon:Tab Label="General">
                    <ribbon:Group Label="Files">
                        <ribbon:Button  Label="Load plugin"/>
                    </ribbon:Group>
                </ribbon:Tab>
            </ribbon:Ribbon.Tabs>
        </ribbon:Ribbon>
        <docking:DockSite x:Name="dockSite" >
            <docking:Workspace>
                <docking:TabbedMdiHost x:Name="tabbedMdiHost">

                    <docking:TabbedMdiContainer  Name="tabbedMdiContainer" Background="Gold">
                       
                    </docking:TabbedMdiContainer>
                </docking:TabbedMdiHost>
            </docking:Workspace>
        </docking:DockSite>
    </DockPanel>
</ribbon:RibbonWindow>
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
In that case maybe set the TabbedMdiHost.Background instead. But when no documents are loaded you should not have en empty TabbedMdiContainer in there. The TabbedMdiHost should be empty in that case.


Actipro Software Support

Posted 11 years ago by David Mullin
Avatar
I, however, do want to set the color of the tab itself, and the color of the frame around the document window. I've tried setting the Background property on Workspace, TabbedMdiHost, TabbedMdiContainer, and DocumentWindow, but none of these seem to work. What am I missing?

David Mullin
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi David,

We'll update the tabbed MDI theme so that it uses the Background when unselected. Also the TabbedMdiContainer should control the background of the area around the tabs.

Could you possibly mock up a screen showing how you could like to additionally customize everything and send that over? We'll see what we can do to add functionality for future builds to accommodate. We're open to suggestions in this area on what you'd like to see.


Actipro Software Support

Posted 11 years ago by David Mullin
Avatar
Consider this Xaml:

<docking:Workspace>
    <docking:TabbedMdiHost x:Name="tabbedMdiHost">
        <docking:TabbedMdiContainer Background="Orange">
            <docking:DocumentWindow Title="Main 1" x:Name="Main1" Background="Red">
            </docking:DocumentWindow>
        </docking:TabbedMdiContainer>
    </docking:TabbedMdiHost>
</docking:Workspace>
The background of the area around the tab is orange, as indicated. The background of the unselected tab is one color, and the selected tab (as well as the frame around the document) is another color. I'd like to be able to control the color of the selected tab and the frame around the document (well, and the unselected tab as well - perhaps two Background properties?).

It would be nice if there were properties on the DocumentWindow that controled these settings, rather than on the container - that way, it would be possible to have color coded tabs (if I so desired).

David
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Thanks David, we'll mark down this info and will add a TODO item for it.


Actipro Software Support

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi David,

Just in case you missed it, we add support for colored tabs in our previous release.


Actipro Software Support

Posted 10 years ago by David Mullin
Avatar
I did see that - thanks!

David
The latest build of this product (v2019.1 build 0681) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.