ContextMenuTemplate should contain a RadContextMenu as root element - Issue

9 posts, 0 answers
  1. Rabeek Ahamed M
    Rabeek Ahamed M avatar
    4 posts
    Member since:
    Apr 2010

    Posted 25 Jun 2015 Link to this post

    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

  2. Rabeek Ahamed M
    Rabeek Ahamed M avatar
    4 posts
    Member since:
    Apr 2010

    Posted 29 Jun 2015 in reply to Rabeek Ahamed M Link to this post

    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

  3. UI for WPF is Visual Studio 2017 Ready
  4. Masha
    Admin
    Masha avatar
    355 posts

    Posted 29 Jun 2015 Link to this post

    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
  5. Rabeek Ahamed M
    Rabeek Ahamed M avatar
    4 posts
    Member since:
    Apr 2010

    Posted 30 Jun 2015 in reply to Masha Link to this post

    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>

  6. Masha
    Admin
    Masha avatar
    355 posts

    Posted 30 Jun 2015 Link to this post

    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
  7. Rabeek Ahamed M
    Rabeek Ahamed M avatar
    4 posts
    Member since:
    Apr 2010

    Posted 01 Jul 2015 in reply to Masha Link to this post

    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

  8. Masha
    Admin
    Masha avatar
    355 posts

    Posted 01 Jul 2015 Link to this post

    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
  9. hart
    hart avatar
    16 posts
    Member since:
    Jul 2008

    Posted 03 Feb Link to this post

    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.
  10. hart
    hart avatar
    16 posts
    Member since:
    Jul 2008

    Posted 03 Feb in reply to hart Link to this post

    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.

     

Back to Top
UI for WPF is Visual Studio 2017 Ready