Context menu on image

4 posts, 0 answers
  1. Pierre
    Pierre avatar
    212 posts
    Member since:
    Apr 2007

    Posted 08 Jul 2010 Link to this post

    It is possible to add a right click context menu on a <Image> tag in SL4 ?
  2. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 09 Jul 2010 Link to this post

    Hi Pierre,

    Yes, it is possible. If fact you can attach RadContextMenu on any UIElement.
    You can find examples here:
    http://demos.telerik.com/silverlight/#ContextMenu/FirstLook

    Let us know if you need more help.

    Kind regards,
    Hristo
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Jon Barron
    Jon Barron avatar
    24 posts
    Member since:
    Oct 2012

    Posted 13 Dec 2010 Link to this post

    Can you please be a little more specific. Looking at the First look demo, it is not obvious where specifically you are attaching a context menu to an image.
  5. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 14 Dec 2010 Link to this post

    Hello Jon Barron,

    You can read the Getting Started section from RadContextMenu online help from here:
    http://www.telerik.com/help/silverlight/contextmenu-getting-started.html

    At the relevant part is that you have to use the RadContextMenu.ContextMenu attached property to attach context menu on a UIElement:
    <telerik:RadButton Content="Right Click me">
       <telerik:RadContextMenu.ContextMenu>
          <telerik:RadContextMenu x:Name="contextMenu" ItemClick="ContextMenuClick">
             <telerik:RadMenuItem Header="Set Vista as Background" />
             <telerik:RadMenuItem Header="Set Beach as Background" />
             <telerik:RadMenuItem Header="Set Forest as Background" />
          </telerik:RadContextMenu>
       </telerik:RadContextMenu.ContextMenu>
    </telerik:RadButton>

    Let us know if you need more help.

    Regards,
    Hristo
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top