www.pudn.com > SLICommand.zip > MainPage.xaml, change:2012-04-06,size:1112b


<UserControl x:Class="SLICommand.MainPage" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" 
    xmlns:local="clr-namespace:SLICommand" 
    d:DesignHeight="300" d:DesignWidth="400"> 
    <UserControl.DataContext> 
        <local:BtnViewModel /> 
    </UserControl.DataContext> 
    <Grid x:Name="LayoutRoot" Background="White"> 
        <Button Content="第一个" Height="23" HorizontalAlignment="Left" 
                Command="{Binding BtnCommand}" CommandParameter="第一个Command" 
                Margin="94,80,0,0" Name="button1" VerticalAlignment="Top" Width="75" /> 
        <Button Command="{Binding BtnCommandTrue}" CommandParameter="第二个Command"  
                Content="第二个" Height="23" HorizontalAlignment="Left" Margin="94,140,0,0" 
                Name="button2" VerticalAlignment="Top" Width="75" /> 
    </Grid> 
</UserControl>