I have a stackpanel of height 100 and I have a Listbox inside the stackpanel. The Listbox has items which are开发者_运维知识库 bigger than 100 in height (150 for example).
The listbox's scrollbar in this case as the a single item itself is taller than the actual height of the stackpanel.
How do we get the scrollbar to comeup in this situation.
Thanks.
The StackPanel does not constrain the child ListBox height. It is just clipping it.
Use a grid instead or constrain the ListBox to the same height as the StackPanel. Stretching child controls to a StackPanel (in the direction of StackPanel-growth) does not work.
精彩评论