MainView.xaml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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="auto" />
  14. <ColumnDefinition Width="auto" />
  15. <ColumnDefinition Width="auto" />
  16. <ColumnDefinition Width="auto" />
  17. </Grid.ColumnDefinitions>
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="auto" />
  20. <RowDefinition Height="auto" />
  21. <RowDefinition Height="auto" />
  22. </Grid.RowDefinitions>
  23. <Button Grid.Column="0" Grid.Row="0" Content="Clear" Command="{Binding ResetNameCommand}"/>
  24. <Label Grid.Column="0" Grid.Row="1" Content="{Binding FirstName}" />
  25. <TextBox Grid.Column="0" Grid.Row="2" Text="{Binding FirstName, UpdateSourceTrigger=PropertyChanged}" />
  26. <Button Grid.Column="1" Grid.Row="2" Content="Set model" Command="{Binding SetNameCommand}"/>
  27. <Button Grid.Column="2" Grid.Row="2" Content="Get from model" Command="{Binding GetNameCommand}"/>
  28. <Button Grid.Column="3" Grid.Row="0" Content="Add to list" Command="{Binding AddNameToCatalogCommand}"/>
  29. <ListView Grid.Column="3" Grid.Row="1" Width="200" Height="auto" ItemsSource="{Binding AvailableNames}">
  30. <ListView.View>
  31. <GridView>
  32. <GridViewColumn Header="Name" />
  33. </GridView>
  34. </ListView.View>
  35. </ListView>
  36. </Grid>
  37. </Window>