Live Chat Icon For mobile
Live Chat Icon

What built-in commands are defined in the WPF framework?

Platform: WPF| Category: Input and Commands.

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

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.