Click here to Skip to main content
15,886,199 members
Articles / Mobile Apps / Windows Phone 7

Windows Phone 7 Calcoolation

Rate me:
Please Sign up or sign in to vote.
4.96/5 (46 votes)
16 May 2011CPOL7 min read 93.9K   1.2K   51  
Math-based, sudoku-like game for Windows Phone 7
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:Metro.Controls">

	<Style TargetType="local:MetroContentControl">
		<Setter Property="Foreground" Value="#FF000000"/>
		<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
		<Setter Property="VerticalContentAlignment" Value="Stretch"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:MetroContentControl">
					<Grid x:Name="root" RenderTransformOrigin="0.5,0.5">
						<Grid.RenderTransform>
							<CompositeTransform TranslateX="-30"/>
						</Grid.RenderTransform>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="LayoutStates">
								<VisualState x:Name="AfterLoaded">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames
											BeginTime="00:00:00"
											Storyboard.TargetProperty="(UIElement.Opacity)"
											Storyboard.TargetName="root">
											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
											<SplineDoubleKeyFrame KeyTime="00:00:00.400" Value="1"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames
											BeginTime="00:00:00"
											Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)"
											Storyboard.TargetName="root">
											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="-30"/>
											<EasingDoubleKeyFrame KeyTime="00:00:00.700" Value="0">
												<EasingDoubleKeyFrame.EasingFunction>
													<CubicEase EasingMode="EaseOut"/>
												</EasingDoubleKeyFrame.EasingFunction>
											</EasingDoubleKeyFrame>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="AfterUnLoaded">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames
											BeginTime="00:00:00"
											Storyboard.TargetProperty="(UIElement.Opacity)"
											Storyboard.TargetName="root">
											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
											<SplineDoubleKeyFrame KeyTime="00:00:00.100" Value="0"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames
											BeginTime="00:00:00"
											Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)"
											Storyboard.TargetName="root">
											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
											<SplineDoubleKeyFrame KeyTime="00:00:00.100" Value="-30"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="BeforeLoaded"/>
								<VisualState x:Name="BeforeUnloaded"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<ContentPresenter
							Cursor="{TemplateBinding Cursor}"
							ContentTemplate="{TemplateBinding ContentTemplate}"
							Content="{TemplateBinding Content}"
							HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
							Margin="{TemplateBinding Padding}"
							VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Instructor / Trainer Alura Cursos Online
Brazil Brazil

Comments and Discussions