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

Expression Blend throughs exception: Can only base on a Style with target type that is base type 'RadPaneGroup'.

3 Answers 121 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 23 Oct 2013, 08:19 AM
Hi,

I'm adding Docking to my app with the following structure (all unnecessary properties removed):

    <telerik:RadDocking >
        <telerik:RadDocking.DocumentHost>
            <Grid/>
        </telerik:RadDocking.DocumentHost>
           
        <telerik:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedBottom">
            <telerik:RadPaneGroup>
                <telerik:RadPane>  
                    <Grid/>
                </telerik:RadPane>
            </telerik:RadPaneGroup>
        </telerik:RadSplitContainer>
    </telerik:RadDocking>

When I'm creating styles for RadPane and RadPaneGroup, I'm constantly getting exceptions in Design view of Expression Blend and Visual studio that looks like:
"InvalidOperationException: Can only base on a Style with target type that is base type 'RadPaneGroup'." 

As a result, I can't see my control in Design View and can't edit control's property in Properties pane visually. The style is looking like this:

            <Style TargetType="telerik:RadPaneGroup" BasedOn="{StaticResource RadPaneGroupStyle}">
...
            </Style>

What's wrong?
Thank you!

3 Answers, 1 is accepted

Sort by
0
Masha
Telerik team
answered on 28 Oct 2013, 09:29 AM
Hi Andrew,

From the described scenario I guess you're using Windows8 Theme?
This issue appears because of the dynamic resources that are used in the Windows8 theme.
I suggest that you copy the XAML of the controls that you use from [Installation folder]\Themes.Implicit\WPF40\[Theme that you need]\.  Do not forget to reference this files from the respective folder in your application. This way you should not have a problem with the design view anymore.

I hope this will be helpful.

Regards,
Masha
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
tom
Top achievements
Rank 1
answered on 27 Apr 2016, 11:18 AM

I am also getting this with my existing WPF application (based on a custom Window base class) using a RadGridView and VisualStudio2013 Implicit style.

The exception occurs only when I drag a column to the grouping row.

Is the workaround the same, copy all styles into my project?

 

0
tom
Top achievements
Rank 1
answered on 27 Apr 2016, 02:07 PM

I have worked out what is going on. It is nothing to do with the style. 

The error actually arose due to my WindowBase ControlTemplate setup. My style for WindowBase was BasedOn Window, this does not work for some reason. Instead you must copy all the styles and not extend Window. No idea what is going on but whatever it works.

Tags
Docking
Asked by
Andrew
Top achievements
Rank 1
Answers by
Masha
Telerik team
tom
Top achievements
Rank 1
Share this question
or