-
Notifications
You must be signed in to change notification settings - Fork 0
/
SelfDefineCommand.xaml
25 lines (23 loc) · 1.2 KB
/
SelfDefineCommand.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<UserControl x:Class="wpfTestStudio.SelfDefineCommand"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:wpfTestStudio"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.CommandBindings>
<CommandBinding Command="local:DataCommands.Requery"
CanExecute="CommandBinding_CanExecute"
Executed="CommandBinding_Executed"/>
</UserControl.CommandBindings>
<StackPanel Orientation="Horizontal">
<Button Command="local:DataCommands.Requery">Requery</Button>
<TextBox x:Name="textbox" TextChanged="textbox_TextChanged">
<TextBox.CommandBindings>
<CommandBinding Command="local:DataCommands.Requery"
Executed="CommandBinding_Executed"/>
</TextBox.CommandBindings>
</TextBox>
</StackPanel>
</UserControl>