0

我有Grid一些Images。

我想制作另一个Grid将是这个副本的Grid,“只是更小”。我希望每一个Image我将添加到第一个Grid也将添加到另一个Grid

如果有人可以帮助我。

4

2 回答 2

1

如果您使用 MVVM,您将拥有一个驱动第一个网格内容的绑定。将第二个网格重新绑定到相同的数据成员,即使在对该集合执行编辑后,它也会更新以显示相同的内容。

于 2009-10-14T11:59:59.507 回答
0

使用视觉刷

<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>
于 2009-10-14T13:23:42.503 回答