2012-03-09 5 views
2

私はxamlページを持っていますが、トランジション効果は働かず、ページは通常の方法で何の効果もありません。ページのコードは以下の通りです:xamlページでのトランジションの使い方は?

<phone:PhoneApplicationPage 
x:Class="eenGastos.listadoGastos" 
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" 
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" 
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
FontFamily="{StaticResource PhoneFontFamilyNormal}" 
FontSize="{StaticResource PhoneFontSizeNormal}" 
Foreground="{StaticResource PhoneForegroundBrush}" 
SupportedOrientations="Portrait" Orientation="Portrait" 
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480" 
shell:SystemTray.IsVisible="True" 
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"> 
<toolkit:TransitionService.NavigationInTransition> 
    <toolkit:NavigationInTransition> 
     <toolkit:NavigationInTransition.Backward> 
      <toolkit:TurnstileTransition Mode="BackwardIn"/> 
     </toolkit:NavigationInTransition.Backward> 
     <toolkit:NavigationInTransition.Forward> 
      <toolkit:TurnstileTransition Mode="ForwardIn"/> 
     </toolkit:NavigationInTransition.Forward> 
    </toolkit:NavigationInTransition> 
</toolkit:TransitionService.NavigationInTransition> 
<toolkit:TransitionService.NavigationOutTransition> 
    <toolkit:NavigationOutTransition> 
     <toolkit:NavigationOutTransition.Backward> 
      <toolkit:TurnstileTransition Mode="BackwardOut"/> 
     </toolkit:NavigationOutTransition.Backward> 
     <toolkit:NavigationOutTransition.Forward> 
      <toolkit:TurnstileTransition Mode="ForwardOut"/> 
     </toolkit:NavigationOutTransition.Forward> 
    </toolkit:NavigationOutTransition> 
</toolkit:TransitionService.NavigationOutTransition> 

<!--LayoutRoot es la cuadrícula raíz donde se coloca todo el contenido de la página--> 
<Grid x:Name="LayoutRoot" Background="Transparent"> 
    <Grid.RowDefinitions> 
     <RowDefinition Height="Auto"/> 
     <RowDefinition Height="*"/> 
    </Grid.RowDefinitions> 

    <!--TitlePanel contiene el nombre de la aplicación y el título de la página--> 
    <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28"> 
     <TextBlock x:Name="ApplicationTitle" Text="eenGastos" Style="{StaticResource PhoneTextNormalStyle}"/> 
     <TextBlock x:Name="PageTitle" Text="Lista de gastos" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/> 
    </StackPanel> 


    <ListBox Margin="0,140,0,28" Name="lstGastos" Height="592" Width="450"> 
     <ListBox.ItemTemplate> 
      <DataTemplate> 
       <StackPanel Orientation="Horizontal" Margin="0,0,0,0"> 
        <Image Height="80" Width="80" Margin="2,0,2,0" Name="Image1" VerticalAlignment="Center" Source="{Binding imagenTipoGasto}"/> 
        <!--"images/gastos/iconosGasto/iconoCOMIDA.png"--> 
        <StackPanel Width="370" Height="90"> 
         <Grid> 
          <TextBlock Text="{Binding Concepto}" HorizontalAlignment="Left" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" Foreground="White"/> 
          <Grid Width="100" HorizontalAlignment="Right"> 
           <TextBlock Text="{Binding Total}" HorizontalAlignment="left" Style="{StaticResource PhoneTextExtraLargeStyle}" Foreground="Green"/> 
           <TextBlock Text="{Binding ISOA}" HorizontalAlignment="right" Style="{StaticResource PhoneTextExtraLargeStyle}" Foreground="Green"/> 
          </Grid>         
         </Grid> 
         <Grid> 
          <TextBlock Text="{Binding Fecha}" Height="43" Width="100" HorizontalAlignment="Left" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}" Foreground="Green"/> 
          <TextBlock Text="{Binding FormaPago}" Width="200" TextWrapping="Wrap" Margin="70,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}" Foreground="Green"/> 
         </Grid> 
        </StackPanel> 
       </StackPanel> 
      </DataTemplate> 
     </ListBox.ItemTemplate> 
    </ListBox> 
    <ProgressBar 
      x:Name="pbEnCurso" 
      IsIndeterminate="true" 
      Visibility="Collapsed" Grid.ColumnSpan="2" Background="Yellow" Foreground="Yellow" /> 
</Grid> 

ページへのトランジション効果を挿入行う方法?コードで間違って何?。また、このコードは次のコードで表示されます。

NavigationService.Navigate(New Uri("/listadoGastos.xaml", UriKind.Relative)) 

ありがとうございます!

+1

私はこの問題の解決策を発見しました。私のApp.xaml.vbではInitializePhoneApplication()内にこのコードがありました... 'RootFrame = New PhoneApplicationFrame()'この行は 'RootFrame = New TransitionFrame()'のために再現されなければなりません。移行はすべてのマイページに表示されます... – Camacho

答えて

3

http://blog.rsuter.com/?p=74

ヒントを参照してください:あなたはすべてのページでそれを再利用するApp.xamlに遷移定義を移動することができます...

関連する問題