|
20 | 20 | </Style> |
21 | 21 | </Page.Resources> |
22 | 22 | <Grid x:Name="ContentArea"> |
| 23 | + <VisualStateManager.VisualStateGroups> |
| 24 | + <VisualStateGroup> |
| 25 | + <VisualState x:Name="WideState"> |
| 26 | + <VisualState.StateTriggers> |
| 27 | + <AdaptiveTrigger MinWindowWidth="641" /> |
| 28 | + </VisualState.StateTriggers> |
| 29 | + <VisualState.Setters> |
| 30 | + <Setter Target="NameInput.(Grid.Column)" Value="0" /> |
| 31 | + <Setter Target="NameInput.(Grid.RowSpan)" Value="2" /> |
| 32 | + <Setter Target="NameSubmitButton.(Grid.Column)" Value="1" /> |
| 33 | + <Setter Target="NameSubmitButton.(Grid.RowSpan)" Value="2" /> |
| 34 | + |
| 35 | + <Setter Target="PegSelection.Margin" Value="80,0,0,0" /> |
| 36 | + </VisualState.Setters> |
| 37 | + </VisualState> |
| 38 | + <VisualState x:Name="NarrowState"> |
| 39 | + <VisualState.StateTriggers> |
| 40 | + <AdaptiveTrigger MinWindowWidth="0" /> |
| 41 | + </VisualState.StateTriggers> |
| 42 | + <VisualState.Setters> |
| 43 | + <Setter Target="NameInput.(Grid.Row)" Value="0" /> |
| 44 | + <Setter Target="NameInput.(Grid.ColumnSpan)" Value="2" /> |
| 45 | + <Setter Target="NameSubmitButton.(Grid.Row)" Value="1" /> |
| 46 | + <Setter Target="NameSubmitButton.(Grid.ColumnSpan)" Value="2" /> |
| 47 | + |
| 48 | + <Setter Target="PegSelection.Margin" Value="0" /> |
| 49 | + </VisualState.Setters> |
| 50 | + </VisualState> |
| 51 | + </VisualStateGroup> |
| 52 | + </VisualStateManager.VisualStateGroups> |
23 | 53 | <Grid.RowDefinitions> |
24 | 54 | <RowDefinition Height="auto" /> |
25 | 55 | <RowDefinition Height="auto" /> |
|
32 | 62 | <Grid |
33 | 63 | Grid.Row="0" |
34 | 64 | ColumnSpacing="25" |
| 65 | + RowSpacing="15" |
35 | 66 | Visibility="{x:Bind ViewModel.GameStatus, Mode=OneWay, Converter={StaticResource GameStatusVisibility}, ConverterParameter=Start}"> |
36 | 67 | <Grid.ColumnDefinitions> |
37 | 68 | <ColumnDefinition /> |
38 | 69 | <ColumnDefinition Width="Auto" /> |
39 | 70 | </Grid.ColumnDefinitions> |
40 | | - <Grid Grid.Column="0"> |
41 | | - <!-- The extra grid and the empy (enabled) TextBlock are necessary for showing the tooltip over the (disabled) TextBox. --> |
| 71 | + <Grid.RowDefinitions> |
| 72 | + <RowDefinition Height="Auto" /> |
| 73 | + <RowDefinition Height="Auto" /> |
| 74 | + </Grid.RowDefinitions> |
| 75 | + <Grid x:Name="NameInput"> |
| 76 | + <!--The extra grid and the empy (enabled) TextBlock are necessary for showing the tooltip over the (disabled) TextBox.--> |
42 | 77 | <TextBlock /> |
43 | 78 | <TextBox |
44 | 79 | IsEnabled="{x:Bind ViewModel.IsNameEnterable, Mode=OneWay}" |
|
54 | 89 | </ToolTipService.ToolTip> |
55 | 90 | </Grid> |
56 | 91 | <Button |
57 | | - Grid.Column="1" |
| 92 | + x:Name="NameSubmitButton" |
58 | 93 | VerticalAlignment="Bottom" |
59 | 94 | HorizontalAlignment="Stretch" |
60 | 95 | Padding="35,8" |
|
67 | 102 | </Button> |
68 | 103 | </Grid> |
69 | 104 | <!--Gamebar section--> |
70 | | - <StackPanel |
71 | | - Orientation="Horizontal" |
| 105 | + <components:PegSelectionComponent |
| 106 | + x:Name="PegSelection" |
72 | 107 | Grid.Row="1" |
73 | | - Visibility="{x:Bind ViewModel.GameStatus, Mode=OneWay, Converter={StaticResource GameStatusVisibility}, ConverterParameter=Cancelable}"> |
74 | | - <components:PegSelectionComponent |
75 | | - Grid.Row="3" |
76 | | - Margin="65,0,0,0" |
| 108 | + Visibility="{x:Bind ViewModel.GameStatus, Mode=OneWay, Converter={StaticResource GameStatusVisibility}, ConverterParameter=Cancelable}" |
77 | 109 | ViewModel="{x:Bind ViewModel, Mode=OneWay}" /> |
78 | | - </StackPanel> |
79 | 110 | <!--Move section--> |
80 | 111 | <ScrollViewer Grid.Row="2" Padding="0,0,0,15" x:Name="pegScrollViewer"> |
81 | 112 | <ListBox |
|
0 commit comments