WPF provides a library of common commands, which include
Sample code given below:
[XAML]
<Window x:Class='SDKSamples.Window1'
xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
Title='MenuItemCommandTask'>
<DockPanel>
<Menu DockPanel.Dock='Top'>
<MenuItem Command='ApplicationCommands.Paste' Width='75' />
</Menu>
<TextBox BorderBrush='Black' BorderThickness='2' Margin='25'
TextWrapping='Wrap'>
The MenuItem will not be enabled until
this TextBox gets keyboard focus
</TextBox>
</DockPanel>
<Window>
Share with