RadContextMenu with RadCalendar

2 posts, 1 answers
  1. Paul Gallen
    Paul Gallen avatar
    156 posts
    Member since:
    Jun 2008

    Posted 12 Nov 2008 Link to this post


    With regards to the RadContextMenu documentation it states:

    "You can attach RadContextMenu to any UI element on your page. All you have to do is create your object, put a RadContextMenu inside its closing tags and define the event that will open the context menu".

    I tried this with the RadCalendar, and VS complained stating:The RadCalendar does not support direct Content.

    Sorry Iam am new to XAML, so a bit confused. Isn't the RadCalendar a UI element?

    Thanks Paul

  2. Answer
    Hristo avatar
    832 posts

    Posted 13 Nov 2008 Link to this post

    Hello Paul Gallen,

    RadContextMenu have attached property ContextMenu that you should set in order to attach RadContextMenu. Here is an example on how to do it.

    <UserControl x:Class="SilverlightApplication15.Page" 
            Width="400" Height="300">  
        <Grid x:Name="LayoutRoot" Background="White">  
                    <nav:RadContextMenu EventName="SelectionChanged">  
                        <nav:RadMenuItem Header="File">  
                            <nav:RadMenuItem Header="New" /> 
                            <nav:RadMenuItem Header="Exit" /> 
                        <nav:RadMenuItem Header="Edit">  
                            <nav:RadMenuItem Header="Cut" /> 
                            <nav:RadMenuItem Header="Copy" /> 
                            <nav:RadMenuItem Header="Paste">  
                                <nav:RadMenuItem Header="With tags" /> 
                                <nav:RadMenuItem Header="Text Only" /> 
                        <nav:RadMenuItem Header="Help">  
                            <nav:RadMenuItem Header="About" /> 

    If you have more questions, I'll be glad to help.

    Sincerely yours,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft banner
Back to Top