您是否尝试过设置此处描述的样式:
http://msdn.microsoft.com/en-us/library/ee957369.aspx
在“绑定到内容大小”下?
绑定到内容大小
如 ScatterView 概述中所述,默认情况下,ScatterViewItem 不一定会扩展或收缩到其内容的大小。您可以显式设置 ScatterViewItem 的 Height 和 Width 属性,但有时您的内容可能是未知大小的控件,或者您的内容可能具有可变大小。
在这种情况下,我们建议您将 ScatterViewItem 的尺寸绑定到内容的尺寸。为此,您需要定义一个 Style 对象(通常在主应用程序窗口的 Resources 部分中)。下面的代码示例显示了一个 Style 对象声明,您可以将其应用于 ScatterViewItem 控件以使其绑定到其内容的尺寸。
<Style x:Key="ScatterViewItemStyle" TargetType="{x:Type s:ScatterViewItem}">
<Setter Property="MinWidth" Value="{Binding Path=Content.MinWidth, RelativeSource={RelativeSource Self}, Mode=OneWay}"/>
<Setter Property="MinHeight" Value="{Binding Path=Content.MinHeight, RelativeSource={RelativeSource Self}, Mode=OneWay}"/>
<Setter Property="MaxWidth" Value="{Binding Path=Content.MaxWidth, RelativeSource={RelativeSource Self}, Mode=OneWay}"/>
<Setter Property="MaxHeight" Value="{Binding Path=Content.MaxHeight, RelativeSource={RelativeSource Self}, Mode=OneWay}"/>
<Setter Property="Width" Value="{Binding Path=Content.Width, RelativeSource={RelativeSource Self}, Mode=TwoWay}"/>
<Setter Property="Height" Value="{Binding Path=Content.Height, RelativeSource={RelativeSource Self}, Mode=TwoWay}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type s:ScatterViewItem}">
<ContentPresenter />
</ControlTemplate>
</Setter.Value>
</Setter> </Style>
如果要创建使用其内容尺寸的 ScatterViewItem,请将样式应用于 ScatterViewItem,如以下代码示例所示。
<s:ScatterViewItem Style="{StaticResource ScatterViewItemStyle}">
<Rectangle Height="250" Width="250" Fill="Red" /> </s:ScatterViewItem>