.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> Silverlight >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Right Click in Silverlight.

Posted By:Subhransu Sekhar Jena       Posted Date: September 26, 2014    Points: 40    Category: Silverlight    URL: http://www.dotnetspark.com  

We know that silverlight doesn't provide right click operation. But we can do this in silverlight 4.0 and later.
 

We know that silverlight doesn't provide right click operation. But we can do this in silverlight 4.0 and later. For this we have to create context menu in your application.


<controlsInputToolkit:ContextMenuService.ContextMenu>
        <controlsInputToolkit:ContextMenu
            Height="Auto"
            Name="contextMenu1"
            Width="Auto">
            <controlsInputToolkit:MenuItem
                x:Name="CopyMenuItem"
                Header="Copy"
                IsEnabled="True"
                Click="CopyItemClick">
                <controlsInputToolkit:MenuItem.Icon>
                    <Image
                        Height="30"
                        Width="30"
                        Source="image.jpg"></Image>
                </controlsInputToolkit:MenuItem.Icon>
            </controlsInputToolkit:MenuItem>
                               .
                               .
                               .
                               .
                   .Here we can create any no.of menu items
                               .
                               .
                               .
</controlsInputToolkit:ContextMenuService.ContextMenu>


     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend