 | XAML - <UserControl x:Class="dSucs.ColourMemoGame.View.ColourMemoGameView"
- 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:ed="http://schemas.microsoft.com/expression/2010/drawing"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
- xmlns:local="clr-namespace:dSucs.ColourMemoGame.View"
- xmlns:cmg="clr-namespace:dSucs.ColourMemoGame"
- mc:Ignorable="d"
- d:DesignHeight="576" d:DesignWidth="720" Tag="GameView00" >
- <UserControl.Resources>
- <cmg:ViewTemplateChooser x:Key="TemplateChooser" />
- <Storyboard x:Name="sbResetGame">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationZ)" Storyboard.TargetName="cardBoardContent">
- <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="90"/>
- <EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="180"/>
- <EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="90"/>
- <EasingDoubleKeyFrame KeyTime="0:0:1.2" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="cardBoardContent">
- <DiscreteObjectKeyFrame KeyTime="0:0:0.3">
- <DiscreteObjectKeyFrame.Value>
- <Visibility>Visible</Visibility>
- </DiscreteObjectKeyFrame.Value>
- </DiscreteObjectKeyFrame>
- <DiscreteObjectKeyFrame KeyTime="0:0:0.6">
- <DiscreteObjectKeyFrame.Value>
- <Visibility>Collapsed</Visibility>
- </DiscreteObjectKeyFrame.Value>
- </DiscreteObjectKeyFrame>
- <DiscreteObjectKeyFrame KeyTime="0:0:0.9">
- <DiscreteObjectKeyFrame.Value>
- <Visibility>Visible</Visibility>
- </DiscreteObjectKeyFrame.Value>
- </DiscreteObjectKeyFrame>
- </ObjectAnimationUsingKeyFrames>
- </Storyboard>
- <Style x:Key="btnZoom" TargetType="Button">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Grid>
- <ed:Callout AnchorPoint="-0.388,-0.222" CalloutStyle="Oval" Content="" FontSize="14.666999816894531" Stroke="Black" StrokeThickness="0" Margin="0,4,0,-4">
- <ed:Callout.Fill>
- <RadialGradientBrush RadiusX="0.531" RadiusY="0.643" GradientOrigin="0.887,0.825" Center="0.493,0.52">
- <GradientStop Color="#FFEFDFF1" Offset="0.643"/>
- <GradientStop Color="#FFD65FD1" Offset="0.891"/>
- <GradientStop Color="#FFD65FD1" Offset="0.509"/>
- </RadialGradientBrush>
- </ed:Callout.Fill>
- </ed:Callout>
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="btnScoop" TargetType="Button">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Grid>
- <ed:Callout AnchorPoint="1.236,1.246" CalloutStyle="Oval" Content="" FontSize="14.666999816894531" Stroke="Black" StrokeThickness="0">
- <ed:Callout.Fill>
- <RadialGradientBrush RadiusX="0.531" RadiusY="0.643" GradientOrigin="0.887,0.825" Center="0.493,0.52">
- <GradientStop Color="#FFEFDFF1" Offset="0.43"/>
- <GradientStop Color="#FFD65FD1" Offset="0.891"/>
- <GradientStop Color="#FFD65FD1" Offset="0.052"/>
- </RadialGradientBrush>
- </ed:Callout.Fill>
- </ed:Callout>
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="btnLogin" TargetType="Button">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Grid>
- <Rectangle Stroke="Black" StrokeThickness="0">
- <Rectangle.Fill>
- <RadialGradientBrush RadiusX="0.531" RadiusY="0.643" GradientOrigin="0.887,0.825" Center="0.493,0.52">
- <GradientStop Color="#FFEFDFF1" Offset="0.743"/>
- <GradientStop Color="#FF9AD65F" Offset="0.943"/>
- <GradientStop Color="#FF95D65F" Offset="0.057"/>
- <GradientStop Color="#FF87C2DD" Offset="0.274"/>
- </RadialGradientBrush>
- </Rectangle.Fill>
- </Rectangle>
- <ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="btnInfo" TargetType="Button">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Grid>
- <Ellipse Stroke="Black" StrokeThickness="0">
- <Ellipse.Fill>
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
- <GradientStop Color="#FF4D52CD" Offset="0.009"/>
- <GradientStop Color="#FF0C47C5" Offset="0.987"/>
- <GradientStop Color="#FFCDECDA" Offset="0.483"/>
- </LinearGradientBrush>
- </Ellipse.Fill>
- </Ellipse>
- <Ellipse Stroke="Black" Margin="10,0,11,0" StrokeThickness="0">
- <Ellipse.Fill>
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
- <GradientStop Color="#FF192D85" Offset="0.352"/>
- <GradientStop Color="#FF1818A4" Offset="0.691"/>
- <GradientStop Color="#FFCDDBEC" Offset="0.483"/>
- </LinearGradientBrush>
- </Ellipse.Fill>
- </Ellipse>
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </UserControl.Resources>
-
- <UserControl.Background>
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
- <GradientStop Color="Black" Offset="0"/>
- <GradientStop Color="#FFA2CFC9" Offset="0.368"/>
- </LinearGradientBrush>
- </UserControl.Background>
-
-
- <Grid x:Name="LayoutRoot" Margin="1" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" Height="576" VerticalAlignment="Center" HorizontalAlignment="Center" Width="745">
- <Grid.Background>
- <RadialGradientBrush>
- <GradientStop Color="Black" Offset="1"/>
- <GradientStop Color="#FFA3D4BE" Offset="0.935"/>
- </RadialGradientBrush>
- </Grid.Background>
- <Grid.RenderTransform>
- <CompositeTransform Rotation="0.226"/>
- </Grid.RenderTransform>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="401*"/>
- <ColumnDefinition Width="207*"/>
- </Grid.ColumnDefinitions>
-
- <Grid x:Name="GameContainer" Margin="47.049,-13.188,196.472,23.574" MinHeight="450" Height="535" VerticalAlignment="Center" HorizontalAlignment="Left" Width="560" RenderTransformOrigin="0.5,0.5" Grid.ColumnSpan="2">
- <Grid.RenderTransform>
- <CompositeTransform Rotation="0.502"/>
- </Grid.RenderTransform>
- <Grid.Background>
- <RadialGradientBrush RadiusX="0.514">
- <GradientStop Color="#FFCDBBBB" Offset="1"/>
- <GradientStop Color="#FF7EBBCD"/>
- </RadialGradientBrush>
- </Grid.Background>
- <ContentControl x:Name="cardBoardContent" Content="{Binding CardBoardVM, Converter={StaticResource TemplateChooser}}" Margin="10,10,49.16,10" Grid.Column="1" Width="470" Height="520" HorizontalAlignment="Center" VerticalAlignment="Center" >
- <i:Interaction.Triggers>
- <ei:DataTrigger Binding="{Binding IsResetGame, UpdateSourceTrigger=PropertyChanged}" Value="True">
- <ei:ControlStoryboardAction Storyboard="{StaticResource sbResetGame}"/>
- </ei:DataTrigger>
- </i:Interaction.Triggers>
- <ContentControl.Projection>
- <PlaneProjection/>
- </ContentControl.Projection>
- </ContentControl>
- </Grid>
- <Grid Grid.Column="1" HorizontalAlignment="Right" Height="420.882" Margin="23.694,-3.424,-27.247,0" VerticalAlignment="Top" Width="215" RenderTransformOrigin="0.483,0.541">
- <Grid.RenderTransform>
- <CompositeTransform Rotation="-13.432" TranslateX="4.113" TranslateY="0.4"/>
- </Grid.RenderTransform>
- <Grid.Background>
- <RadialGradientBrush>
- <GradientStop Color="#FFD0DCE6" Offset="0.091"/>
- <GradientStop Color="#FF73A0C5" Offset="0.426"/>
- </RadialGradientBrush>
- </Grid.Background>
- <TextBlock x:Name="tbScore" HorizontalAlignment="Center" Margin="-6.376,84.038,12.101,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="209.275" Height="22.937" RenderTransformOrigin="0.5,0.5" Foreground="#FFF9FBF7" FontSize="15" Text="{Binding Path=ScoreInfo, FallbackValue='Score=10, Moves=30'}">
- <TextBlock.RenderTransform>
- <CompositeTransform Rotation="14.086"/>
- </TextBlock.RenderTransform>
- </TextBlock>
- <Image HorizontalAlignment="Left" Height="36.288" Margin="116.417,29.068,0,0" VerticalAlignment="Top" Width="86.419" Source="/SilverLightBlend;component/Images/logo.png" RenderTransformOrigin="0.456,0.892">
- <Image.RenderTransform>
- <CompositeTransform Rotation="10.342" TranslateX="-3.334" TranslateY="-1.184"/>
- </Image.RenderTransform>
- </Image>
- <Button Content=" Reset Game " HorizontalAlignment="Left" Height="44.289" Margin="-23.195,437.577,0,-60.984" Style="{StaticResource ButtonStyle_ResetGame}" VerticalAlignment="Top" Width="145.926" Command="{Binding CmdResetGame}" TabIndex="17" ToolTipService.ToolTip="Click to reset the currently loaded game"/>
- <TextBox HorizontalAlignment="Left" Height="250.17" Margin="-70.463,135.023,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="204.728" RenderTransformOrigin="0.5,0.5" Background="#FFE6E680" IsReadOnly="True" Text="{Binding Path=MessageInfo, FallbackValue='Click on any card and navigate using arrow keys or mouse, choose any two cards by pressing (Enter Key) or clicking by mouse. If Two cards are matched, a one point will be awared, if matching fails once point will be taken back.'}">
- <TextBox.RenderTransform>
- <CompositeTransform Rotation="13.7"/>
- </TextBox.RenderTransform>
- </TextBox>
-
- </Grid>
- <Image Grid.Column="1" Margin="110.424,0,19.047,520.971" Source="/Images/logo.png" Stretch="Fill"/>
- <TextBlock x:Name="tbTopScore" HorizontalAlignment="Center" Margin="34.643,106,55,0" TextWrapping="Wrap" Width="164" Height="22" RenderTransformOrigin="0.5,0.5" FontSize="12" Text="{Binding Path=HighScoreInfo, FallbackValue='High Score=10, Rank=3'}" Grid.Column="1" VerticalAlignment="Top" Foreground="#FF051E70">
- <TextBlock.RenderTransform>
- <CompositeTransform Rotation="0.919"/>
- </TextBlock.RenderTransform>
- </TextBlock>
- <Button x:Name="btnInformation" Style="{StaticResource btnInfo}" Grid.Column="1" HorizontalAlignment="Left" Margin="78.724,-0.007,0,0" VerticalAlignment="Top" Width="50" Height="50" BorderThickness="0" Command="{Binding CmdInformation}" ToolTipService.ToolTip="Click for more Information.">
- <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
- <ContentPresenter Content="Info"></ContentPresenter>
- </StackPanel>
- </Button>
- <TextBlock x:Name="tbHighestEver" HorizontalAlignment="Center" Margin="9.643,125,21,0" TextWrapping="Wrap" Width="223" Height="22" RenderTransformOrigin="0.5,0.5" Foreground="#FF6F0574" Text="{Binding HighestEverScoreInfo, FallbackValue='Highest ever score by some one=10'}" Grid.Column="1" VerticalAlignment="Top" TextDecorations="Underline">
- <TextBlock.RenderTransform>
- <CompositeTransform Rotation="0.919"/>
- </TextBlock.RenderTransform>
- </TextBlock>
- <Button Command="{Binding CmdFullScreen}" Style="{StaticResource btnZoom}" Grid.Column="1" HorizontalAlignment="Left" Margin="189.643,518,0,0" VerticalAlignment="Top" Width="57" Height="50" ToolTipService.ToolTip="{Binding FsToolTip}">
- <i:Interaction.Triggers>
- <ei:DataTrigger Binding="{Binding IsFullScreen, UpdateSourceTrigger=PropertyChanged}" Value="true">
- <ei:ChangePropertyAction PropertyName="Style" Value="{StaticResource btnScoop}" />
- </ei:DataTrigger>
- <ei:DataTrigger Binding="{Binding IsFullScreen, UpdateSourceTrigger=PropertyChanged}" Value="false">
- <ei:ChangePropertyAction PropertyName="Style" Value="{StaticResource btnZoom}" />
- </ei:DataTrigger>
- </i:Interaction.Triggers>
- </Button>
- <Button Command="{Binding CmdLogin}" Height="33" VerticalAlignment="Top" Background="#FF366791" Foreground="#FF9E2525" Style="{StaticResource btnLogin}" ToolTipService.ToolTip="{Binding SignInMsg, FallbackValue='Click here to Sign Out'}" Margin="9.643,53,19,0" Grid.Column="1" >
- <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
- <ContentPresenter Content="{Binding Path=WelComeMessage, FallbackValue='Sign In'}" />
- </StackPanel>
- </Button>
- </Grid>
- </UserControl>
|