locked
[UWP][XAML]StackPanel vs ItemsStackPanel: What is the difference? RRS feed

  • General discussion

  • I use a lot of ItemsControl(s), most of them with a StackPanel as the ItemsPanelTemplate. However, I recently noticed that there is also an ItemsStackPanel. Based on the names, ItemsStackPanel sounds like it was designed for this purpose, but I am wondering if there are any significant differences. I would also ask a similar question for WrapGrid & VariableSizedWrapGrid. Should I use ItemsStackPanel instead of StackPanel for my ItemsControl(s), or does it not make any difference? Thanks.

    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

    Wednesday, September 11, 2019 12:52 AM

All replies

  • Hi,

    ItemsStackPanel in addition to StackPanel support grouping and virtualization.

    WrapGrid positions child elements sequentially from left to right or top to bottom. When elements extend beyond the container edge, elements are positioned in the next row or column. Can only be used to display items in an ItemsControl also support virtualization.

    VariableSizedWrapGrid provides a grid-style layout panel where each tile/cell can be variable size based on content.


    Make the community better together

    Wednesday, October 16, 2019 8:05 AM