|
8 | 8 | mc:Ignorable="d" |
9 | 9 | d:DataContext="{d:DesignInstance models:GameListWindowModel, IsDesignTimeCreatable=True}" |
10 | 10 | WindowStyle="ToolWindow" |
| 11 | + FocusManager.FocusedElement="{Binding ElementName=SearchTextBox}" |
11 | 12 | Title="GamesDB" Height="450" Width="800"> |
12 | | - <Grid x:Name="Grid"> |
| 13 | + <Grid x:Name="Grid" Margin="5"> |
13 | 14 | <Grid.RowDefinitions> |
14 | 15 | <RowDefinition Height="30"/> |
15 | 16 | <RowDefinition/> |
16 | 17 | <RowDefinition Height="30"/> |
17 | 18 | </Grid.RowDefinitions> |
18 | | - <TextBox Grid.Row="0" VerticalContentAlignment="Center" Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}"></TextBox> |
19 | | - <DataGrid Grid.Row="1" ItemsSource="{Binding Entries}" AutoGenerateColumns="False" SelectedItem="{Binding SelectedGame}" CanUserAddRows="False" CanUserDeleteRows="False" IsReadOnly="True"> |
| 19 | + <Grid Grid.Row="0"> |
| 20 | + <Grid.ColumnDefinitions> |
| 21 | + <ColumnDefinition Width="50"/> |
| 22 | + <ColumnDefinition/> |
| 23 | + </Grid.ColumnDefinitions> |
| 24 | + <Label VerticalContentAlignment="Center">Search</Label> |
| 25 | + <TextBox Grid.Column="1" Margin="5,0,0,0" Name="SearchTextBox" VerticalContentAlignment="Center" Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}"></TextBox> |
| 26 | + </Grid> |
| 27 | + <DataGrid Margin="0,5,0,5" Grid.Row="1" ItemsSource="{Binding Entries}" AutoGenerateColumns="False" SelectedItem="{Binding SelectedGame}" CanUserAddRows="False" CanUserDeleteRows="False" IsReadOnly="True"> |
20 | 28 | <DataGrid.ContextMenu> |
21 | 29 | <ContextMenu> |
22 | 30 | <MenuItem Header="Copy GameID" Click="CopyGameID_Click"></MenuItem> |
|
37 | 45 | <Grid Grid.Row="2" x:Name="Actions"> |
38 | 46 | <Grid.ColumnDefinitions> |
39 | 47 | <ColumnDefinition/> |
| 48 | + <ColumnDefinition Width="Auto"/> |
40 | 49 | <ColumnDefinition/> |
41 | 50 | </Grid.ColumnDefinitions> |
42 | | - <Button Grid.Column="0" Click="Cancel_Click">Cancel</Button> |
43 | | - <Button Grid.Column="1" Click="Select_Click" IsEnabled="{Binding HasSelected}">Select</Button> |
| 51 | + <StackPanel Grid.Column="1" Orientation="Horizontal"> |
| 52 | + <Button Width="100" Click="Cancel_Click">Cancel</Button> |
| 53 | + <Button Width="100" Margin="10,0,0,0" Click="Select_Click" IsEnabled="{Binding HasSelected}">Select</Button> |
| 54 | + </StackPanel> |
44 | 55 | </Grid> |
45 | 56 | </Grid> |
46 | 57 | </Window> |
0 commit comments