How to add a right click context menu on a TextBox in Silverlight and also support simple editing commands, like Cut, Copy and Paste? This is pretty easy with RadContextMenu for Silverlight and I will show you now:
First I declared a TextBox and set the RadContextMenu.ContextMenu attached property on it:
<TextBox x:Name="TextContainer" AcceptsReturn="True" TextWrapping="Wrap" Text="Right click to open a fully functional context menu that depends on the selection and the clipboard content">
<telerikNavigation:RadContextMenu.ContextMenu>
<telerikNavigation:RadContextMenu ItemClick="ContextMenuClick" Opened="ContextMenuOpened" Closed="ContextMenuClosed">
<telerikNavigation:RadMenuItem Header="Cut" />
<telerikNavigation:RadMenuItem Header="Copy" />
<telerikNavigation:RadMenuItem Header="Paste" />
</telerikNavigation:RadContextMenu>
</telerikNavigation:RadContextMenu.ContextMenu>
</TextBox>
If you want to open the context menu with Right click, you need to make the Silverlight plug-in windowless. Otherwise, you should set the EventName and/or ModifierKey properties on RadContextMenu to configure it...