MainView.xaml 1.5 KB

1234567891011121314151617181920212223242526272829
  1. <Window x:Class="Awesomeness.GUI.Views.MainView"
  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:Awesomeness.GUI"
  7. xmlns:viewmodels="clr-namespace:Awesomeness.GUI.ViewModels"
  8. d:DataContext="{d:DesignInstance Type=viewmodels:MainViewModel}"
  9. mc:Ignorable="d"
  10. Title="MainWindow" Height="450" Width="800">
  11. <Grid>
  12. <Grid.ColumnDefinitions>
  13. <ColumnDefinition Width="100" />
  14. <ColumnDefinition Width="100" />
  15. <ColumnDefinition Width="auto" />
  16. </Grid.ColumnDefinitions>
  17. <Grid.RowDefinitions>
  18. <RowDefinition Height="auto" />
  19. <RowDefinition Height="auto" />
  20. <RowDefinition Height="auto" />
  21. </Grid.RowDefinitions>
  22. <Button Grid.Column="0" Grid.Row="0" Content="Clear" Command="{Binding ResetNameCommand}"/>
  23. <Label Grid.Column="0" Grid.Row="1" Content="{Binding FirstName}" />
  24. <TextBox Grid.Column="0" Grid.Row="2" Text="{Binding FirstName, UpdateSourceTrigger=PropertyChanged}" />
  25. <Button Grid.Column="1" Grid.Row="2" Content="Set model" Command="{Binding SetNameCommand}"/>
  26. <Button Grid.Column="2" Grid.Row="2" Content="Get from model" Command="{Binding GetNameCommand}"/>
  27. </Grid>
  28. </Window>