|
15 | 15 | <conv:ColorNameToBrushConverter x:Key="ColorConverter" /> |
16 | 16 | </Page.Resources> |
17 | 17 |
|
18 | | - <Grid> |
| 18 | + <Grid> |
19 | 19 | <Grid.RowDefinitions> |
20 | 20 | <RowDefinition Height="Auto" /> |
21 | 21 | <RowDefinition Height="Auto" /> |
|
25 | 25 |
|
26 | 26 | <!--<StackPanel Orientation="Vertical" Grid.Row="0"> |
27 | 27 | --><!-- TODO: Create component for this, to make it (more) generic. --><!-- |
28 | | - <Grid Visibility="{Binding Path=ViewModel.InfoMessage.IsVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"> |
29 | | - <Grid.ColumnDefinitions> |
30 | | - <ColumnDefinition Width="Auto" /> |
31 | | - <ColumnDefinition Width="*" /> |
32 | | - <ColumnDefinition Width="Auto" /> |
33 | | - </Grid.ColumnDefinitions> |
| 28 | + <Grid Visibility="{Binding Path=ViewModel.InfoMessage.IsVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"> |
| 29 | + <Grid.ColumnDefinitions> |
| 30 | + <ColumnDefinition Width="Auto" /> |
| 31 | + <ColumnDefinition Width="*" /> |
| 32 | + <ColumnDefinition Width="Auto" /> |
| 33 | + </Grid.ColumnDefinitions> |
34 | 34 |
|
35 | | - <TextBlock Text="Information: " VerticalAlignment="Center" Margin="8,0" /> |
36 | | - <TextBlock Grid.Column="1" Text="{Binding ViewModel.InfoMessage.Message, Mode=OneWay}" VerticalAlignment="Center" Margin="8,0" /> |
37 | | - <Button |
38 | | - Grid.Column="2" |
39 | | - Content="{Binding ViewModel.InfoMessage.ActionTitle, Mode=OneWay}" Padding="30,8" |
40 | | - Command="{Binding ViewModel.InfoMessage.ActionCommand, Mode=OneWay}" /> |
41 | | - </Grid> |
42 | | - <Grid Visibility="{Binding Path=ViewModel.ErrorMessage.IsVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"> |
43 | | - <Grid.ColumnDefinitions> |
44 | | - <ColumnDefinition Width="Auto" /> |
45 | | - <ColumnDefinition Width="*" /> |
46 | | - <ColumnDefinition Width="Auto" /> |
47 | | - </Grid.ColumnDefinitions> |
| 35 | + <TextBlock Text="Information: " VerticalAlignment="Center" Margin="8,0" /> |
| 36 | + <TextBlock Grid.Column="1" Text="{Binding ViewModel.InfoMessage.Message, Mode=OneWay}" VerticalAlignment="Center" Margin="8,0" /> |
| 37 | + <Button |
| 38 | + Grid.Column="2" |
| 39 | + Content="{Binding ViewModel.InfoMessage.ActionTitle, Mode=OneWay}" Padding="30,8" |
| 40 | + Command="{Binding ViewModel.InfoMessage.ActionCommand, Mode=OneWay}" /> |
| 41 | + </Grid> |
| 42 | + <Grid Visibility="{Binding Path=ViewModel.ErrorMessage.IsVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"> |
| 43 | + <Grid.ColumnDefinitions> |
| 44 | + <ColumnDefinition Width="Auto" /> |
| 45 | + <ColumnDefinition Width="*" /> |
| 46 | + <ColumnDefinition Width="Auto" /> |
| 47 | + </Grid.ColumnDefinitions> |
48 | 48 |
|
49 | | - <TextBlock Text="Error: " VerticalAlignment="Center" Margin="8,0" /> |
50 | | - <TextBlock Grid.Column="1" Text="{Binding ViewModel.ErrorMessage.Message, Mode=OneWay}" VerticalAlignment="Center" Margin="8,0" /> |
51 | | - <Button |
52 | | - Grid.Column="2" |
53 | | - Content="{Binding ViewModel.ErrorMessage.ActionTitle, Mode=OneWay}" Padding="30,8" |
54 | | - Command="{Binding ViewModel.ErrorMessage.ActionCommand, Mode=OneWay}" /> |
55 | | - </Grid> |
56 | | - </StackPanel>--> |
| 49 | + <TextBlock Text="Error: " VerticalAlignment="Center" Margin="8,0" /> |
| 50 | + <TextBlock Grid.Column="1" Text="{Binding ViewModel.ErrorMessage.Message, Mode=OneWay}" VerticalAlignment="Center" Margin="8,0" /> |
| 51 | + <Button |
| 52 | + Grid.Column="2" |
| 53 | + Content="{Binding ViewModel.ErrorMessage.ActionTitle, Mode=OneWay}" Padding="30,8" |
| 54 | + Command="{Binding ViewModel.ErrorMessage.ActionCommand, Mode=OneWay}" /> |
| 55 | + </Grid> |
| 56 | + </StackPanel>--> |
57 | 57 | <components:GameResultDisplay |
58 | 58 | Panel.ZIndex="1" |
59 | 59 | Grid.Row="0"/> |
|
92 | 92 | ViewModel="{Binding ViewModel, ElementName=Self, Mode=OneWay}" /> |
93 | 93 |
|
94 | 94 | <ScrollViewer Grid.Row="2" Padding="0,0,0,15" x:Name="pegScrollViewer"> |
95 | | - <ListView |
| 95 | + <ListView |
96 | 96 | BorderThickness="0" |
97 | 97 | SelectedIndex="-1" |
98 | 98 | IsHitTestVisible="False" |
99 | 99 | HorizontalContentAlignment="Stretch" |
100 | | - Visibility="{Binding ViewModel.GameStatus, Mode=OneWay, Converter={StaticResource GameStatusVisibilityConverter}, ConverterParameter=Running}" |
101 | | - ItemsSource="{Binding ViewModel.GameMoves, Mode=OneWay}" |
102 | | - ItemTemplate="{StaticResource PegsTemplate}" /> |
| 100 | + Visibility="{Binding ViewModel.GameStatus, Mode=OneWay, Converter={StaticResource GameStatusVisibilityConverter}, ConverterParameter=Running}" |
| 101 | + ItemsSource="{Binding ViewModel.GameMoves, Mode=OneWay}" |
| 102 | + ItemTemplate="{StaticResource PegsTemplate}" /> |
103 | 103 | </ScrollViewer> |
104 | 104 |
|
105 | 105 | <Grid Grid.Row="3"> |
|
111 | 111 | <TextBlock Grid.Column="0" Text="{Binding ViewModel.GameStatus,Mode=OneWay}" /> |
112 | 112 | <ProgressBar |
113 | 113 | Grid.Column="1" |
114 | | - Height="15" |
115 | | - Minimum="0" Maximum="100" IsIndeterminate="True" |
116 | | - Visibility="{Binding ViewModel.InProgress, Converter={StaticResource BooleanToVisibilityConverter}}" /> |
| 114 | + Height="15" |
| 115 | + Minimum="0" Maximum="100" IsIndeterminate="True" |
| 116 | + Visibility="{Binding ViewModel.InProgress, Converter={StaticResource BooleanToVisibilityConverter}}" /> |
117 | 117 | <Button Grid.Column="2" Click="Button_Click" Content="To TestPage" Padding="15,2" /> |
118 | 118 | </Grid> |
119 | | - </Grid> |
| 119 | + </Grid> |
120 | 120 | </Page> |
0 commit comments