auto-creamapi-2/auto-creamapi/Views/SearchResultView.xaml
2020-12-28 15:30:22 +01:00

34 lines
2.2 KiB
XML

<views:MvxWindow x:Class="auto_creamapi.Views.SearchResultView"
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"
xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf"
xmlns:viewModels="clr-namespace:auto_creamapi.ViewModels"
d:DataContext="{d:DesignInstance Type=viewModels:SearchResultViewModel}"
mc:Ignorable="d"
Title="Auto-CreamAPI 2: Search Results" Width="420" Height="540" MinWidth="420" MinHeight="540">
<Grid Margin="10,10,10,10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Content="Select a game..." HorizontalAlignment="Left" Margin="0,0,0,10" VerticalAlignment="Top" />
<!-- d:DataContext="{d:DesignInstance models:SteamApp}" MouseDoubleClick="DgApps_OnMouseDoubleClick" -->
<DataGrid Name="DgApps" Grid.Row="1" AutoGenerateColumns="False" IsReadOnly="True" SelectionMode="Single"
ItemsSource="{Binding Apps}" SelectedItem="{Binding Selected}">
<DataGrid.InputBindings>
<MouseBinding Gesture="LeftDoubleClick" Command="{Binding SaveCommand}" />
</DataGrid.InputBindings>
<DataGrid.Columns>
<DataGridTextColumn Header="AppID" Binding="{Binding AppId}" />
<DataGridTextColumn Header="Game Name" Binding="{Binding Name}" />
</DataGrid.Columns>
</DataGrid>
<Button Content="OK" Command="{Binding SaveCommand}" HorizontalAlignment="Right" Margin="0,10,70,0"
Grid.Row="2" VerticalAlignment="Top" Width="60" />
<Button Content="Cancel" Command="{Binding CloseCommand}" HorizontalAlignment="Right" Margin="0,10,0,0"
Grid.Row="2" VerticalAlignment="Top" Width="60" />
</Grid>
</views:MvxWindow>