Mega Code Archive

 
Categories / VB.Net Tutorial / WPF
 

Add CommandTarget for Button

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <StackPanel>   <Button Command="Copy" Content="Copy" CommandTarget="{Binding ElementName=targetControl}" />   <Button Command="Paste" Content="Paste" CommandTarget="{Binding ElementName=targetControl}" />   <TextBox x:Name="targetControl" /> </StackPanel> </Page>