Problem with Custom Theme for Docking

3 posts, 0 answers
  1. Steve
    Steve avatar
    124 posts
    Member since:
    Jun 2011

    Posted 14 Oct 2011 Link to this post

    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. Pana
    Admin
    Pana avatar
    748 posts

    Posted 18 Oct 2011 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Thomas
    Thomas avatar
    13 posts
    Member since:
    Jun 2011

    Posted 18 Oct 2011 Link to this post

    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.
Back to Top