customize the context menu on the Silverlight viewer

22 views
Skip to first unread message

Support

unread,
Feb 8, 2013, 4:36:05 PM2/8/13
to silv...@googlegroups.com

Q: Is there a way we can customize the context menu on the Silverlight viewer?  We need to add some custom functions when the user selects text and right clicks.  We use telerik’s context menu control in other areas of our application, but when I try to set a custom context menu on the control, it’s ignored.

--------------

A: Yes, you can customize the context menu. There is sample code showing this in the ReaderControl sample project, specifically in the file CustomDocumentViewer.cs. The custom menu is registered in the method protected override void OnContentLoaded(object sender, RoutedEventArgs e) with the line ContextMenuService.SetContextMenu((sender as DependencyObject), menu);.

 

 

Reply all
Reply to author
Forward
0 new messages