I'm confused why my app is closing, I have added the PointerDownThemeAnimation and it works fine but only one time, when I try to click it again the aplication stops. Why?
Here is my code:
private void staryrynek1(object sender, PointerRoutedEventArgs e)
{
pointerDownStoryboard.Begin();
}
private void staryrynek(object sender, PointerRoutedEventArgs e)
{
pointerUpStoryboard.Begin();
this.Frame.Navigate(typeof(StaryRynek));
}
and
<Grid x:Name="staryrynek_grid" Margin="10,92,10,0" VerticalAlignment="Top" PointerPressed="staryrynek1" PointerReleased="staryrynek">
<Grid.Resources>
<Storyboard x:Name="pointerDownStoryboard">
<PointerDownThemeAnimation TargetName="staryrynek_grid" />
</Storyboard>
<Storyboard x:Name="pointerUpStoryboard">
<PointerUpThemeAnimation TargetName="staryrynek_grid" />
</Storyboard>
</Grid.Resources>
<Grid.Background>
<SolidColorBrush Color="Black" Opacity="0.495"/>
</Grid.Background>
<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Top" Width="380" FontSize="29.333" Text="Stary Rynek"/>
</Grid>