Answer the question
In order to leave comments, you need to log in
How to arrange elements in UniformGrid using Binding?
Hello. Found this way
<ItemsControl ItemsSource="{Binding Path=Pages}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border BorderThickness="1" BorderBrush="Black" Background="AliceBlue" Margin="10" Width="150" Height="100">
<TextBox Text="{Binding Path=Header}"/>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="4"/>
<!--<WrapPanel/>-->
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question