MainWindow.xaml 1.1 KB

123456789101112131415161718192021222324252627
  1. <Window x:Class="MvvmScaffoldFrame48.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:MvvmScaffoldFrame48"
  7. mc:Ignorable="d"
  8. Title="MainWindow" Height="450" Width="800">
  9. <Grid>
  10. <StackPanel>
  11. <ToolBar>
  12. <Label Content="姓名:"></Label>
  13. <TextBox Text="{Binding Name}" Width="50"></TextBox>
  14. <Label Content="邮箱:"></Label>
  15. <TextBox Text="{Binding Email}" Width="100"></TextBox>
  16. <Button Content="添加"
  17. Command="{Binding AddUserCommand }"></Button>
  18. <Button Content="测试"
  19. Command="{Binding TestCommand }"></Button>
  20. </ToolBar>
  21. <StackPanel>
  22. <DataGrid ItemsSource="{Binding Users}"></DataGrid>
  23. </StackPanel>
  24. </StackPanel>
  25. </Grid>
  26. </Window>