<phone:PhoneApplicationPage.Resources>
<Storyboard x:Name="Storyboard1">
<DoubleAnimationUsingKeyFrames AutoReverse="True" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.LocalOffsetY)" Storyboard.TargetName="rectangle">
<EasingDoubleKeyFrame KeyTime="" Value="">
<EasingDoubleKeyFrame.EasingFunction>
<PowerEase EasingMode="EaseIn"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="">
<EasingDoubleKeyFrame.EasingFunction>
<PowerEase EasingMode="EaseOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Name="stdShow">
<DoubleAnimationUsingKeyFrames
Storyboard.TargetName="trm"
Storyboard.TargetProperty="Y"
Duration="">
<EasingDoubleKeyFrame
KeyTime="0:0:0" Value=""/>
<EasingDoubleKeyFrame
KeyTime="0:0:1" Value="">
<EasingDoubleKeyFrame.EasingFunction>
<PowerEase Power=""/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Name="stdHide">
<DoubleAnimationUsingKeyFrames
Duration="0:0:1"
Storyboard.TargetName="trm"
Storyboard.TargetProperty="Y">
<EasingDoubleKeyFrame KeyTime="0:0:0"
Value=""/>
<EasingDoubleKeyFrame KeyTime="0:0:1"
Value="">
<EasingDoubleKeyFrame.EasingFunction>
<PowerEase Power=""/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Name="tbShow">
<DoubleAnimationUsingKeyFrames Duration="0:0:1" Storyboard.TargetName="Rota" Storyboard.TargetProperty="X">
<EasingDoubleKeyFrame KeyTime="0:0:0" Value="-300"/>
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="">
<EasingDoubleKeyFrame.EasingFunction>
<PowerEase Power=""/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Name="tbHide">
<DoubleAnimationUsingKeyFrames Duration="0:0:1" Storyboard.TargetName="Rota" Storyboard.TargetProperty="X">
<EasingDoubleKeyFrame KeyTime="0:0:0" Value=""/>
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-150">
<EasingDoubleKeyFrame.EasingFunction>
<PowerEase Power=""/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</phone:PhoneApplicationPage.Resources>
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions> <Grid x:Name="rectangle" Background="Green" Margin="0,-50,0,607" Height="" >
<Grid.Projection>
<PlaneProjection/>
</Grid.Projection>
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Center">
若要本地化显示的字符串
</TextBlock>
</Grid> <!--TitlePanel 包含应用程序的名称和页标题-->
<StackPanel x:Name="TitlePanel" Grid.Row="" Margin="12,17,0,471">
<TextBlock Text="我的应用程序" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
<TextBlock Text="页面名称" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel> <!--ContentPanel - 在此处放置其他内容-->
<Grid x:Name="ContentPanel" Margin="0,156,-10,10" Grid.RowSpan="">
<Button Width="" Click="Button_Click_1" Margin="0,9,330,530"/>
<Button Width="" Click="Button_Click_2" Margin="0,94,330,445"/>
<Button Width="" Click="Button_Click_3" Margin="0,177,330,362" /> <TextBox x:Name="tb" Visibility="Collapsed" Width="" Height="" HorizontalAlignment="Left">
<TextBox.RenderTransform >
<TranslateTransform x:Name="Rota"/>
</TextBox.RenderTransform>
</TextBox>
<Button Background="Green" Width="" Click="Button_Click_4" Margin="0,269,330,270" /> <StackPanel x:Name="sp" Background="LightBlue"
Height=""
VerticalAlignment="Bottom" Margin="0,0,0,-12">
<TextBlock Foreground="Red"
Margin="20,20,20,20"
FontSize=""
Text="你好,点击下面的按钮吧。"/>
<StackPanel.RenderTransform>
<TranslateTransform x:Name="trm"
Y=""/>
</StackPanel.RenderTransform>
</StackPanel>
</Grid> </Grid>
private void Button_Click_1(object sender, RoutedEventArgs e)
{
if (Storyboard1.GetCurrentState() != ClockState.Stopped)
Storyboard1.Stop();
Storyboard1.Begin(); } private void Button_Click_2(object sender, RoutedEventArgs e)
{
if (stdHide.GetCurrentState() != ClockState.Stopped)
{
stdHide.Stop();
}
stdShow.Begin();
} private void Button_Click_3(object sender, RoutedEventArgs e)
{
if (stdShow.GetCurrentState() != ClockState.Stopped)
{
stdShow.Stop();
}
stdHide.Begin();
}
bool tbbool;
private void Button_Click_4(object sender, RoutedEventArgs e)
{
if (tbbool)
{
tbbool = false;
if (tbShow.GetCurrentState() != ClockState.Stopped)
{
tbShow.Stop();
}
tbHide.Begin();
tbHide.Completed += tbHide_Completed;
}
else
{
tbbool = true;
if (tbHide.GetCurrentState() != ClockState.Stopped)
{
tbHide.Stop();
}
tbShow.Begin();
tb.Visibility = Visibility.Visible;
} } void tbHide_Completed(object sender, EventArgs e)
{
tb.Visibility = Visibility.Collapsed;
}