This is a migrated thread and some comments may be shown as answers.

Problem with Custom Theme for Docking

2 Answers 98 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 14 Oct 2011, 06:31 PM
I'm trying to modify the existing Docking.xaml theme to put the close button on the document tab instead of the tabstrip.  The StyleManager seems to accepts the theme (GetTheme returns my theme); however the display still reflects the original Office_BlackTheme with the button on the tabstrip and not on the document tab.  I've included the project, and code snippets of how I use it.

Xaml:
<telerik:RadDocking x:Name="radDock">
    <telerik:RadDocking.DocumentHost>
        <telerik:RadSplitContainer>
            <telerik:RadPaneGroup>
                <telerik:RadDocumentPane Header="Document 1"
                                         Title="Document 1" />
                <telerik:RadDocumentPane Header="Document 2"
                                         Title="Document 2" />
            </telerik:RadPaneGroup>
        </telerik:RadSplitContainer>
    </telerik:RadDocking.DocumentHost>
</telerik:RadDocking>

Code-behind:
StyleManager.SetTheme(radDock, new OfficeBlack_Docking());

Sample Theme Project


If anyone can help it would be greatly appreciated.  I am evaluating the product for purchase by my company and my trial period has expired, so this is my only recourse for resolution.

Thanks in advance,
Steve

2 Answers, 1 is accepted

Sort by
0
Pana
Telerik team
answered on 18 Oct 2011, 01:35 PM
Hi,

I do not know why but I failed using your theme. For some reason it has resources that were referenced as StaticResources far before they are defined. Instead of updating the resource positions I just got the RadDocking styles from my installation folder of RadControls for WPF:

C:\Program Files (x86)\Telerik\RadControls for WPF Q2 2011\Themes\OfficeBlack\Themes\Office\Black\Docking.xaml

Then in the RadPane style for the DocumentHost I added a close button and removed the close button from the RadPaneGroup style for DocumentHost. Please search the attached project for "NOTE:" comments to find where the changes were applied.

Kind regards,
Pana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Thomas
Top achievements
Rank 1
answered on 18 Oct 2011, 05:20 PM
Hi Steve,

I don't know if you have solved this issue but I posted a response to someone asking a very similar question. I don't know your requirements but the solution I used to add a close button to the pane tab does not require creating a custom theme. I was originally going down the same road as you but decided that it was too much reworking of the RadDocking control templates and styles.

My solution uses a Style for the RadPane/RadDocumentPane and only changes the RadPane.HeaderTemplate with a DataTemplate containing the close button. It does not remove the close button on the tabstrip though if that was a requirement for you. Removing the close button from the tabstrip appears to require a custom theme approach such as you are implementing. I found that leaving the tabstrip close button did not pose any real issue other than a redundant means of closing the selected tab.

You can take a look at the solution I proposed and decide if it meets your requirements.

Here is the post:
http://www.telerik.com/community/forums/wpf/docking/placing-closing-x-in-each-pane-header-as-with-vs.aspx

Hope this helps.
Tags
Docking
Asked by
Steve
Top achievements
Rank 1
Answers by
Pana
Telerik team
Thomas
Top achievements
Rank 1
Share this question
or