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

Styling RadPaneGroup Problem

8 Answers 119 Views
Docking
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 18 Nov 2009, 07:57 AM

Hello,

I am having problems applying a template to the DocumentHostTemplate of the RadPaneGroup control with the Q3 release.

Basically, my template is being ignored and the default telerik template is used.

<ControlTemplate x:Key="JPaneGroupDocumentTemplate" TargetType="telerikDocking:RadPaneGroup">  
        <Grid> 
            <Grid.RowDefinitions> 
                <RowDefinition Height="auto"/>  
                <RowDefinition Height="*"/>  
            </Grid.RowDefinitions> 
        <!-- VSM removed to save space... --> 
            <Border BorderBrush="{StaticResource JPaneBorderBrush}" BorderThickness="0, 0, 0, 1" Background="{StaticResource JDockBackground}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Visibility="{TemplateBinding BackgroundVisibility}"/>  
            <ItemsPresenter x:Name="ItemsPresenterElement" Margin="0" Grid.Row="0"/>  
            <Border x:Name="border" Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="0, 0, 3, 3">  
                <ContentPresenter x:Name="ContentElement" Content="{TemplateBinding SelectedContent}" ContentTemplate="{TemplateBinding SelectedContentTemplate}"/>  
            </Border> 
            <Telerik_Windows_Controls_Docking:RadGridResizer x:Name="DockResizer" HorizontalAlignment="Left" VerticalAlignment="Stretch" Visibility="Collapsed" Grid.RowSpan="2" Placement="Left" ShowsPreview="True"/>  
        </Grid> 
    </ControlTemplate> 
 
    <Style TargetType="telerikDocking:RadPaneGroup">  
        <Setter Property="Template" Value="{StaticResource PaneGroupTemplate}"/>  
        <Setter Property="BottomTemplate" Value="{StaticResource PaneGroupTemplate}"/>  
        <Setter Property="TopTemplate" Value="{StaticResource JPaneGroupDocumentTemplate}"/>  
        <Setter Property="DocumentHostTemplate" Value="{StaticResource JPaneGroupDocumentTemplate}"/>  
        <Setter Property="LeftTemplate" Value="{StaticResource PaneGroupTemplate}"/>  
        <Setter Property="RightTemplate" Value="{StaticResource PaneGroupTemplate}"/>  
        <Setter Property="ItemsPanel">  
            <Setter.Value> 
                <ItemsPanelTemplate> 
                    <Telerik_Windows_Controls_Primitives:TabStripPanel/> 
                </ItemsPanelTemplate> 
            </Setter.Value> 
        </Setter> 
        <Setter Property="BorderThickness" Value="1, 0, 1, 1"/>  
        <Setter Property="BorderBrush" Value="{StaticResource JPaneBorderBrush}"/>  
        <Setter Property="Background" Value="{StaticResource JPaneContentBackground}"/>  
        <Setter Property="HorizontalAlignment" Value="Stretch"/>  
        <Setter Property="VerticalAlignment" Value="Stretch"/>  
        <Setter Property="Align" Value="Left"/>  
        <Setter Property="TabStripPlacement" Value="Bottom"/>  
        <Setter Property="AllTabsEqualHeight" Value="True"/>  
        <Setter Property="BackgroundVisibility" Value="Visible"/>  
        <Setter Property="MinWidth" Value="5"/>  
        <Setter Property="MinHeight" Value="5"/>  
    </Style> 
 

My PaneGroupTemplate is being applied though, so the Style must be loading correctly via the StyleManager.

I've been struggling with this for a number of hours now, and as it works on my Q2 build and not Q3 I'm really at a loss!

Many thanks,
James.

8 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 20 Nov 2009, 12:44 PM
Hello James,

It looks like the template is applied if you set this style explicitly. How do you set it, because there is no x:Key set to the Style in your XAML?

If you could send us a sample project and describe what is expected this would help us a lot in finding out what the problem is.

Regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
James
Top achievements
Rank 1
answered on 20 Nov 2009, 05:50 PM
Hi Miroslav,

Thanks for the tip- adding a Key to the Style and explicitly setting all PaneGroups to use that style works.

In Q2 this was not required though, the Theme would implicitly set the style correctly against all PaneGroup controls.

This is not a big deal for me though, but I have put together a test harness demonstrating the problem for you, that the DocumentHostTemplate Style never gets applied:
http://cid-47007997392d2bb4.skydrive.live.com/self.aspx/.Public/RadPaneGroupTemplateIssue.zip?lc=5129

Or maybe I am doing something wrong now for this not to work for me in Q3?

Cheers,
James.
0
James
Top achievements
Rank 1
answered on 20 Nov 2009, 08:58 PM

Actually this is causing me problems after all, as soon as I drag and dock DocumentPanes within the DocumentHost the new RadPaneGroup that is dynamically created by RadDocking does not have my custom style applied- this would not be a problem if the Style was applied implicitly by the StyleManager.

Please help!

Regards,
James.

0
Miroslav Nedyalkov
Telerik team
answered on 24 Nov 2009, 03:29 PM
Hello James,

After some investigation I found out that you don't have theme for the whole Docking control, but only for the RadPaneGroup. This was working before Q3 release, because we had some missing things in the theming mechanism of the Docking control, but now it doesn't work. You need to change the ControlTemplate of the Docking control and to pass your theme to the DocumentHost (and to the AutoHideAreas if you need to). I would recommend you to take the whole XAML for the Docking control and replace the Style of the RadPaneGroup with the style you already created. Please, find the attached project that demonstrates how to do that.

Regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
James
Top achievements
Rank 1
answered on 07 Dec 2009, 08:27 AM
Thanks Miroslav, I see what I need now :)
Regards,
James.
0
James
Top achievements
Rank 1
answered on 09 Dec 2009, 08:14 AM

Hi Miroslav,

I've discovered another issue with templating the RadDocking control, this time it's the DocumentPane control.

I can't get my style to apply implicitly. If I assign the style manually it works fine, so I think it's an issue with the Style Manager (or my code!).

I have posted the sample project we used last time, with the addition of a DocumentPane style.

Can you see where I'm going wrong?

http://cid-47007997392d2bb4.skydrive.live.com/self.aspx/.Public/RadDocumentPaneTemplateIssue.zip

Thanks for your help,
James.

0
Miroslav Nedyalkov
Telerik team
answered on 10 Dec 2009, 01:16 PM
Hi James,

 Unfortunately I cannot download the file. Could you please open a support ticket and attach the project in the thread.


Greetings,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
James
Top achievements
Rank 1
answered on 10 Dec 2009, 10:39 PM
No problem, I have submitted a support ticket (265968).
Regards,
James.
Tags
Docking
Asked by
James
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
James
Top achievements
Rank 1
Share this question
or