ToolWindow.Header Title Style inconsistent

Docking/MDI for WPF Forum

Posted 12 years ago by Marc Ziss
Avatar
I've been struggling with what should probably be an easy question. I have a need to change the Toolwindows text from the default Title to different text. I accomplished this using a ToolWindow.Header the problem is the colors are now different then the rest of the style. In this example the nonselected tab text for the TextBlock "Chart Objects" is black and the nonselected tab text for the Title "XML Viewer: is white (which is correct). Is there a style / trigger that needs to be applied to the TextBlock I set up for "Chart Objects"?
Thanks,
Marc

                        <docking:ToolWindow Title="{Binding CurrentSlide.SlideTitle, StringFormat=Chart Objects ({0}), 
                                             Converter={StaticResource DocumentTitleConverter}}">
                            
                            <docking:ToolWindow.Header>
                                <TextBlock  AutomationProperties.Name="Title" Text="Chart Objects"/>                                                                                               
                            </docking:ToolWindow.Header>
                                             
                            <views:ChartObjectWorkbenchView />

                        </docking:ToolWindow>

                        <docking:ToolWindow
                                x:Name="xmlViewer"
                                Title="XML Viewer" DataContext="{Binding PresentationViewModel}">
                            
                            <ContentControl />
                            
                        </docking:ToolWindow>

Comments (2)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Marc,

I believe in your first case ("Chart Object"), the TextBlock becomes a logical child of the ToolWindow and will inherit it's Foreground property, which is not used by the tab's foreground (as this would also affect the Content).

You should be able to use this instead, and still have the proper Foreground inherited:
<docking:ToolWindow Header="Chart Objects"
                    Title="{Binding CurrentSlide.SlideTitle, StringFormat=Chart Objects ({0}), Converter={StaticResource DocumentTitleConverter}}">
    <views:ChartObjectWorkbenchView />
</docking:ToolWindow>


Actipro Software Support

Posted 12 years ago by Marc Ziss
Avatar
It worked! I was trying to do too much work because I didnt know you could simply use the text. You guys have made it very easy to customize. Great job!
Thanks again for your quick response
Marc
The latest build of this product (v24.1.1) 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.