ウィジェットを自分に挿入しItemsControl
てサイズ変更可能にしたい。どうすればこれを達成できますか?
これは私のXAMLです:
<ItemsControl ItemsSource="{Binding TestForList, Mode=OneWay}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Margin="5"
BorderThickness="1"
BorderBrush="Black">
<TextBlock FontSize="100" Text="{Binding}" />
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
バインドするもの:
public List<string> TestForList
{
get
{
return new List<string> { "A", "B", "C" };
}
}
サイズを変更できるように、どういうわけかアイテム間にスプリッターを追加したいと思います。これを実現するための組み込み機能はありますか?