How to scroll ItemsControl vertically inside of the Viewbox?
How to let ItemsControl scroll vertically, if it's placed in a viewbox?
<Viewbox>
<ItemsControl ItemsSource="..." />
</Viewbox>
I need the Viewbox to scale all the content of my ItemsControl horizontally to the width of the phone (Viewbox does it perfectly, it scales the content in such a way that the widest row of ItemsControl occupies exactly the width, equal to the phone width). But now I cannot scroll the list vertically for some reason, I tried ScrollViewer, scrollbars of Viewbox, scrollbars of ItemsControl -- nothing wor开发者_开发问答ks.
A ViewBox
measures its contents, then transforms it so that it fits perfectly within the space available. This will remove the need for scrollbars!
Considering that phones have a fixed screen size, the ViewBox
is often redundant. Why not just set an explicit size?
精彩评论