Document Tab "Close" Button Foreground

Docking/MDI for WPF Forum

Posted 10 years ago by Mike Strobel - Software Engineer, CDC Software
Avatar
I've noticed that the "Close" button for document tabs uses the same foreground brush regardless of whether the button is being drawn in the TabbedMdiContainer or within the document tabs themselves. This is a problem for me, as our workspace has a dark background, and thus we would like the document list drop-down indicator to render in white. However, the document tab background remains light, and thus we would like the close buttons to render in black. I have tried placing the following in our shell's resource dictionary without luck:
<SolidColorBrush x:Key="{x:Static apthemes:DockingCommonDictionary.TabbedMdiContainerButtonForegroundNormalBrushKey}"
                 Color="White" />
<Style TargetType="{x:Type apdocking:DocumentTabDecorator}"
       BasedOn="{StaticResource {x:Type apdocking:DocumentTabDecorator}}">
  <Style.Resources>
    <SolidColorBrush x:Key="{x:Static apthemes:DockingCommonDictionary.TabbedMdiContainerButtonForegroundNormalBrushKey}"
                     Color="Black" />
  </Style.Resources>
</Style>
With the above resources, the document list drop-down indicator renders in white, as do the "close" buttons (hosted within the document tabs). Any idea why this isn't working? Could the default style be changed such that the close button uses the document tab foreground brush when being rendered inside the tabs?

Thanks,
Mike

[Modified at 11/26/2008 08:45 AM]

Comments (1)

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

Thanks for the post. We updated our template so that the close button on document tabs will look correct when used on dark backgrounds. This update will be in the next maintenance release.


Actipro Software Support

The latest build of this product (v2018.1 build 0675) 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.