2010-10-28 19 views

Répondre

1

Pour l'instant, il n'y a aucune commande équivalente dans le contrôle pour accomplir ceci. Je ne suis pas sûr de vos besoins, mais si c'était moi, je lierais la largeur de chaque contrôle dans le panneau soit à quelque chose qui a la bonne largeur. Dans cet exemple, j'ai un contrôle d'échantillon sur la page qui a 200 de largeur, puis j'ai réglé tous les enfants WrapPanel pour qu'ils correspondent, quoi que ce soit.

<Grid x:Name="LayoutRoot" Background="White"> 
    <TextBlock x:Name="MyTarget" Text="Hello World" Width="200"/> 
    <toolkit:WrapPanel Name="wrapPanel1" Margin="0,30"> 
     <TextBlock Text="The" Width="{Binding ElementName=MyTarget, Path=Width}" /> 
     <TextBlock Text="Quick" Width="{Binding ElementName=MyTarget, Path=Width}"/> 
     <TextBlock Text="Brown" Width="{Binding ElementName=MyTarget, Path=Width}"/> 
     <TextBlock Text="Fox" Width="{Binding ElementName=MyTarget, Path=Width}"/> 
     <TextBlock Text="Jumped" Width="{Binding ElementName=MyTarget, Path=Width}"/> 
     <TextBlock Text="Over" Width="{Binding ElementName=MyTarget, Path=Width}"/> 
     <TextBlock Text="The" Width="{Binding ElementName=MyTarget, Path=Width}"/> 
     <TextBlock Text="Lazy" Width="{Binding ElementName=MyTarget, Path=Width}"/> 
     <TextBlock Text="Dog" Width="{Binding ElementName=MyTarget, Path=Width}"/> 
    </toolkit:WrapPanel> 
</Grid>