|
4 | 4 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 | 6 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 7 | + xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 8 | + xmlns:non_win="http://uno.ui/not_win" |
7 | 9 | xmlns:animations="using:CommunityToolkit.WinUI.Animations" |
8 | 10 | xmlns:converter="using:CodeBreaker.Uno.Converters" |
9 | 11 | xmlns:cme="using:CodeBreaker.Uno.CustomMarkupExtensions" |
10 | | - mc:Ignorable="d" |
| 12 | + mc:Ignorable="d non_win" |
11 | 13 | d:DesignHeight="300" |
12 | 14 | d:DesignWidth="400"> |
13 | 15 | <UserControl.Resources> |
|
22 | 24 | </animations:ImplicitAnimationSet> |
23 | 25 | </UserControl.Resources> |
24 | 26 | <Grid> |
25 | | - <StackPanel Orientation="Vertical" |
26 | | - Visibility="{x:Bind ViewModel.GameStatus, Mode=OneWay, Converter={StaticResource GameStatusToVisibilityConverter}, ConverterParameter=Won}" |
27 | | - animations:Implicit.ShowAnimations="{StaticResource EntranceAnimation}" |
28 | | - animations:Implicit.HideAnimations="{StaticResource ExitAnimation}"> |
| 27 | + <!-- Won - (Modern) Windows --> |
| 28 | + <win:StackPanel |
| 29 | + Orientation="Vertical" |
| 30 | + Visibility="{x:Bind ViewModel.GameStatus, Mode=OneWay, Converter={StaticResource GameStatusToVisibilityConverter}, ConverterParameter=Won}" |
| 31 | + animations:Implicit.ShowAnimations="{StaticResource EntranceAnimation}" |
| 32 | + animations:Implicit.HideAnimations="{StaticResource ExitAnimation}"> |
29 | 33 | <Image Source="ms-appx:///Assets/Animations/WonAnimation_300_opt.gif" MaxHeight="300" /> |
30 | 34 | <TextBlock Text="{cme:ResourceString Name=GamePage_WonMessage}" FontSize="{ThemeResource TextStyleExtraLargeFontSize}" HorizontalAlignment="Center" Margin="0,50,0,20" /> |
31 | 35 | <Button Content="{cme:ResourceString Name=GamePage_WonButtonText}" HorizontalAlignment="Center" Margin="0,0,0,100" Command="{x:Bind ViewModel.StartGameCommand, Mode=OneTime}" /> |
32 | | - </StackPanel> |
33 | | - <StackPanel Orientation="Vertical" |
34 | | - Visibility="{x:Bind ViewModel.GameStatus, Mode=OneWay, Converter={StaticResource GameStatusToVisibilityConverter}, ConverterParameter=Lost}" |
35 | | - animations:Implicit.ShowAnimations="{StaticResource EntranceAnimation}" |
36 | | - animations:Implicit.HideAnimations="{StaticResource ExitAnimation}"> |
| 36 | + </win:StackPanel> |
| 37 | + <!-- Won - Other Platforms --> |
| 38 | + <non_win:StackPanel |
| 39 | + Orientation="Vertical" |
| 40 | + Visibility="{x:Bind ViewModel.GameStatus, Mode=OneWay, Converter={StaticResource GameStatusToVisibilityConverter}, ConverterParameter=Won}"> |
| 41 | + <Image Source="ms-appx:///Assets/Animations/WonAnimation_300_opt.gif" MaxHeight="300" /> |
| 42 | + <TextBlock Text="{cme:ResourceString Name=GamePage_WonMessage}" FontSize="{ThemeResource TextStyleExtraLargeFontSize}" HorizontalAlignment="Center" Margin="0,50,0,20" /> |
| 43 | + <Button Content="{cme:ResourceString Name=GamePage_WonButtonText}" HorizontalAlignment="Center" Margin="0,0,0,100" Command="{x:Bind ViewModel.StartGameCommand, Mode=OneTime}" /> |
| 44 | + </non_win:StackPanel> |
| 45 | + <!-- Lost - (Modern) Windows --> |
| 46 | + <win:StackPanel |
| 47 | + Orientation="Vertical" |
| 48 | + Visibility="{x:Bind ViewModel.GameStatus, Mode=OneWay, Converter={StaticResource GameStatusToVisibilityConverter}, ConverterParameter=Lost}" |
| 49 | + animations:Implicit.ShowAnimations="{StaticResource EntranceAnimation}" |
| 50 | + animations:Implicit.HideAnimations="{StaticResource ExitAnimation}"> |
| 51 | + <Image Source="ms-appx:///Assets/Animations/LostAnimation_300_opt.gif" MaxHeight="300" /> |
| 52 | + <TextBlock Text="{cme:ResourceString Name=GamePage_LostMessage}" FontSize="{ThemeResource TextStyleExtraLargeFontSize}" HorizontalAlignment="Center" Margin="0,50,0,20" /> |
| 53 | + <Button Content="{cme:ResourceString Name=GamePage_LostButtonText}" HorizontalAlignment="Center" Margin="0,0,0,100" Command="{x:Bind ViewModel.StartGameCommand, Mode=OneTime}" /> |
| 54 | + </win:StackPanel> |
| 55 | + <!-- Lost - Other Platforms --> |
| 56 | + <non_win:StackPanel |
| 57 | + Orientation="Vertical" |
| 58 | + Visibility="{x:Bind ViewModel.GameStatus, Mode=OneWay, Converter={StaticResource GameStatusToVisibilityConverter}, ConverterParameter=Lost}"> |
37 | 59 | <Image Source="ms-appx:///Assets/Animations/LostAnimation_300_opt.gif" MaxHeight="300" /> |
38 | 60 | <TextBlock Text="{cme:ResourceString Name=GamePage_LostMessage}" FontSize="{ThemeResource TextStyleExtraLargeFontSize}" HorizontalAlignment="Center" Margin="0,50,0,20" /> |
39 | 61 | <Button Content="{cme:ResourceString Name=GamePage_LostButtonText}" HorizontalAlignment="Center" Margin="0,0,0,100" Command="{x:Bind ViewModel.StartGameCommand, Mode=OneTime}" /> |
40 | | - </StackPanel> |
| 62 | + </non_win:StackPanel> |
41 | 63 | </Grid> |
42 | 64 | </UserControl> |
0 commit comments