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

ContextMenuTemplate should contain a RadContextMenu as root element - Issue

8 Answers 190 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Rabeek Ahamed M
Top achievements
Rank 1
Rabeek Ahamed M asked on 25 Jun 2015, 12:05 PM

Hi,

I just started using the RadDocking control in my project. The XAML designer shows the error "ContextMenuTemplate should contain a RadContextMenu as root element".  Blend 2013 is not showing the page designer because of this issue. But the project is compiling and running without any issue.

 Please find the attached image for the code.

 

Thanks in advance

Rabeek Ahamed

8 Answers, 1 is accepted

Sort by
0
Rabeek Ahamed M
Top achievements
Rank 1
answered on 29 Jun 2015, 08:12 AM

Any update on the above issue...

The page design is not displaying in Blend 2013. We are unable to design the page. Your support will help us to design using Blend. Please help.

Thanks in Advance

Rabeek Ahamed

0
Masha
Telerik team
answered on 29 Jun 2015, 11:30 AM
Hi Rabeek,

Can you share more details about  which styling approach is used? Did you use XAML or NoXaml binaries? Also which theme is used where the VisualStudio designer is broken?

Looking forward to receiving your reply.

Regards,
Masha
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Rabeek Ahamed M
Top achievements
Rank 1
answered on 30 Jun 2015, 10:30 AM

Hi,

Xaml shows the error  "ContextMenuTemplate should contain a RadContextMenu as root element" When I mouse over on the telerik:RadDocumentPane code. Attached the screenshot for your reference.  Can you please explain in what scenario this error occur and is there any workaround to get out of this issue.

I am using Visual studio 2013 and Blend 2013. The style and theme is not specifically mentioned, it is taking the default. The page design is not showing up for this RadDocking control.

 

Please find the xaml below:

<UserControl x:Class="View.paView"                       
                        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"                      
                        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
                        mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="1000" Background ="White">
 
    <UserControl.Resources>
         
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>       
        <Grid Margin="0,10,0,0" Grid.Row="1">
            <Border Grid.Row="1">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <StackPanel Grid.Row="0" HorizontalAlignment="Right" Orientation="Horizontal"  VerticalAlignment="Top" Margin="0 0 0 0" >                       
 
                        <StackPanel Orientation="Horizontal"  HorizontalAlignment="Right" Margin="10 0 10 0">
                            <telerik:RadButton x:Name="btnExport" Margin="0,0,10,5" Command="{Binding GenerateExcelCommand}"
                                               Cursor="Hand" Width="30" Height="27">
                                <telerik:RadButton.Content>
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="/Images/icon_export_to_excel.png" Width="16" Height="16" ToolTip="Export to excel"></Image>
                                    </StackPanel>
                                </telerik:RadButton.Content>
                            </telerik:RadButton>
                        </StackPanel>
                    </StackPanel>
                    <telerik:RadDocking x:Name="radDocking1" 
                                    Grid.Row="1" Margin="0 0 0 10"                                 
                                    BorderThickness="0"
                                    Padding="0" >
                        <telerik:RadDocking.DocumentHost>
                            <telerik:RadSplitContainer>
                                <telerik:RadPaneGroup>
                                    <telerik:RadDocumentPane Title="" Visibility="Collapsed" PaneHeaderVisibility="Collapsed" CanUserClose="False">
                                        <telerik:RadDocumentPane.Content>
                                            <Grid>
                                                <TextBlock Text="test" />
                                            </Grid>
                                        </telerik:RadDocumentPane.Content>
                                    </telerik:RadDocumentPane>
                                </telerik:RadPaneGroup>
                            </telerik:RadSplitContainer>
                        </telerik:RadDocking.DocumentHost>
 
                        <telerik:RadSplitContainer Grid.Column="1" Grid.Row="0" MinWidth="600" Width="Auto" InitialPosition="DockedRight">
                            <telerik:RadPaneGroup >
                                <telerik:RadPane Header="PNR Snapshot"  IsPinned="{Binding IsCrypticPinned, Mode=TwoWay}" ScrollViewer.CanContentScroll="True" CanUserClose="False" CanFloat="False" >
                                    <Grid >
                                        <TextBlock Text="test" />
                                    </Grid>
                                </telerik:RadPane>
                            </telerik:RadPaneGroup>
                        </telerik:RadSplitContainer>
                    </telerik:RadDocking>
                </Grid>
            </Border>
        </Grid>
    </Grid>
</UserControl>

0
Masha
Telerik team
answered on 30 Jun 2015, 12:53 PM
Hello Rabeek,

I wasn't able to reproduce the described problem. I've attached a sample video how the designer looks at our side with the provided user control. Also, I've provided a runnable project(with trial binaries) which is used in the video.

What I can suggest you would be try cleaning/rebuilding the solution, deleting bin and obj folders of the projects and you can also try removing the ShadowCache of the designer. In order to achieve this, you should do the following:
1) Close all visual studio instances.
2) Go to  C:\Users\<username>\AppData\Local\Microsoft\VisualStudio\<visual_studio_version,for_example_12.0>\Designer\ShadowCache and delete the folders there - this is the cache of VisualStudio's designer.


After that, you need to rebuild the solution.

I hope this helps.

Regards,
Masha
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Rabeek Ahamed M
Top achievements
Rank 1
answered on 01 Jul 2015, 06:39 AM

Hi,

The sample project works fine in my PC. I did not find any difference between the sample and my Xaml except the telerik version. My project is using telerik version 2012.3.1129.40, but the sample project uses the version 2015.2.623.40. Is this the reason ?

Regards,

Rabeek Ahamed

0
Masha
Telerik team
answered on 01 Jul 2015, 08:26 AM
Hi Rabeek,

I've tested the project with the 2012.3.1129.40 assemblies and the VisualStudio2013 designer works without problems. I've attached the project with included  2012.3.1129.40 trial binaries.  Do you reproduce the problem with this assemblies version? Do you use implicit styles (it yes, which theme are you using) or default XAML binaries? 

If you can modify the project with the issue being reproduced would also be very helpful.

Regards,
Masha
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
hart
Top achievements
Rank 1
Veteran
answered on 03 Feb 2016, 01:53 PM
FYI: I have been performing development on the same Solution for almost a year now, and today I started getting this same issue.  I know your going to say .. something must have changed, however, I have not imported any new objects or controls into my application.  I am using Telerik controls version 2014.3.1202.45.  I created this Docking User Control about 2 weeks ago, and today, it is yelling at me.  One note: approx. 1 week ago I did add an InstallShield project to create an installation package -- not sure how these 2 could be connected.
0
hart
Top achievements
Rank 1
Veteran
answered on 03 Feb 2016, 02:03 PM

Update:  Closed my solution, and then I delete all of my BIN and OBJ folders in the project where I am having issues -- rebuilt the solution and problem went away.

 

Tags
Docking
Asked by
Rabeek Ahamed M
Top achievements
Rank 1
Answers by
Rabeek Ahamed M
Top achievements
Rank 1
Masha
Telerik team
hart
Top achievements
Rank 1
Veteran
Share this question
or