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
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
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
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: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
>
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
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
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
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.