Set Width and Height of ItemsControl Children
问题 My CustomItemsControl looks like the following: <local:CustomItemsControl x:Name="CustomItemsControl" > <local:CustomItemsControl.ItemTemplate> <DataTemplate> <Border x:Name="rectangle" Background="Orange" CornerRadius="5" /> </DataTemplate> </local:CustomItemsControl.ItemTemplate> </local:CustomItemsControl> Depending on the amount of the items which my CustomItemsControl contain, it should calculate the Width and the Height of "Container" Items. I thought I could achieve that by calling the