2009-10-14 8 views

Répondre

1

Si vous utilisez MVVM vous avez une liaison qui entraîne le contenu de la première grille. Rebind la seconde grille au même membre de données et il mettra à jour pour afficher le même contenu, même après les modifications ont été effectuées sur cette collection.

0

Utilisez VisualBrush

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> 
<UniformGrid Rows="1"> 
    <StackPanel Name="Original" Width="100" Height="100"> 
     <TextBlock Text="Pretend I'm a list of images"/> 
     <TextBlock Text="Pretend I'm a list of images"/> 
     <TextBlock Text="Pretend I'm a list of images"/> 
     <TextBlock Text="Pretend I'm a list of images"/> 
     <TextBlock Text="Pretend I'm a list of images"/> 
     <TextBlock Text="Pretend I'm a list of images"/> 
     <TextBlock Text="Pretend I'm a list of images"/> 
     <TextBlock Text="Pretend I'm a list of images"/> 
     <TextBlock Text="Pretend I'm a list of images"/> 
     <TextBlock Text="Pretend I'm a list of images"/> 
    </StackPanel> 
    <Rectangle Name="Thumbnail" Width="50" Height="50"> 
     <Rectangle.Fill> 
      <VisualBrush Visual="{Binding ElementName=Original}"/> 
     </Rectangle.Fill> 
    </Rectangle> 
</UniformGrid> 
</Page> 
Questions connexes