2012-03-09 3 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로 전환 정의를 이동할 수 있습니다 ...

관련 문제