开发者

listbox scrollbar not visible when item height is too big

开发者 https://www.devze.com 2023-03-18 08:12 出处:网络
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).

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号