开发者

listbox scrollbar not visible when item height is too big

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜