Mega Code Archive

 
Categories / VB.Net / WPF
 

Multiple command targets

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Grid>   <Grid.RowDefinitions>     <RowDefinition Height="Auto" />     <RowDefinition />     <RowDefinition />   </Grid.RowDefinitions>   <Menu Grid.Row="0">     <MenuItem Header="_Edit">       <MenuItem Header="Cut"   Command="ApplicationCommands.Cut" />       <MenuItem Header="Copy"  Command="ApplicationCommands.Copy" />       <MenuItem Header="Paste" Command="ApplicationCommands.Paste" />     </MenuItem>   </Menu>   <TextBox Grid.Row="1" AcceptsReturn="True" />   <ListBox Grid.Row="2">     <TextBlock Text="One" />     <TextBlock Text="Two" />   </ListBox> </Grid> </Page>