2013-07-05 2 views
-1

J'ai une application panoramique dont l'un de ses éléments est horizontal, mais quand je défiler vers la gauche ou la droite, la moitié d'un élément apparaît soit dans la gauche ou la droite et ne semble pas au milieu de l'écran: comme la troisième tuile icicomment faire pour faire défiler un élément de panorama horizontal correctement?

enter image description here

<phone:PanoramaItem Header="third item" Orientation="Horizontal"> 

</phone:PanoramaItem> 

Je veux que le point soit vu en trois phases pour laisser tout son contenu apparaissent une fois au milieu. Comment puis-je faire cela? merci

+0

Ajuster la taille de votre contenu (rectangles) –

+0

ne sais pas où ce commentaire est venu. J'ai donné la réponse à votre question, juste sous la forme d'un commentaire –

+0

@ShawnKendrot merci pour votre réponse. Je ne vous parle pas de mon commentaire précédent. Je veux dire ces gars-là qui juste downvote sans expliquer la raison. merci encore – user2490629

Répondre

2

Dans l'exemple de Windows Phone Panorama App, la taille des "mosaïques" est de 173x173. Si vous réglez la taille d'être 140x140 vous pourrez voir toute la place

<phone:PanoramaItem Header="third item" Orientation="Horizontal"> 
    <!--Double wide Panorama with large image placeholders--> 
    <Grid> 
     <StackPanel Margin="0,4,16,0" Orientation="Vertical" VerticalAlignment="Top"> 
      <StackPanel HorizontalAlignment="Left" Orientation="Horizontal"> 
       <Border Background="#FFFFC700" Height="140" Width="140" Margin="12,0,0,0"/> 
       <Border Background="#FFFFC700" Height="140" Width="140" Margin="12,0,0,0"/> 
       <Border Background="#FFFFC700" Height="140" Width="140" Margin="12,0,0,0"/> 
       <Border Background="#FFFFC700" Height="140" Width="140" Margin="12,0,0,0"/> 
      </StackPanel> 
      <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Margin="0,12,0,0"> 
       <Border Background="#FFFFC700" Height="140" Width="140" Margin="12,0,0,0"/> 
       <Border Background="#FFFFC700" Height="140" Width="140" Margin="12,0,0,0"/> 
       <Border Background="#FFFFC700" Height="140" Width="140" Margin="12,0,0,0"/> 
       <Border Background="#FFFFC700" Height="140" Width="140" Margin="12,0,0,0"/> 
      </StackPanel> 
     </StackPanel> 
    </Grid> 
</phone:PanoramaItem> 
Questions connexes