I want to insert widgets into my ItemsControl
and make them resizeable. How do I achieve this?
This is my 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>
Which binds to:
public List<string> TestForList
{
get
{
return new List<string> { "A", "B", "C" };
}
}
I want to somehow add splitters between items so they can be resized. Is there anything built-in to achieve this?
You should be able to add an adorner. I would do a sample up, but I don't want to. Have a look at this article this be the article
I don't think there's anything built-in to do this. My first thought is that you'll need to create your own custom Panel implementation that handles this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With