Hi i have a ListView that binds to a collection. I set the height of the ListView to auto for it to take up all the space in the region. However there is not scrollbar after i set the height to auto. If i give it a height then the scrollbar would show up.
the markup is pretty much like the following
<Grid>
<StackPanel>
<Expander>
<DataGrid>
<Expander>
<ListView>
I have a hunch that your
ListViewis inside a panel that allows it to expand vertically without limit.If you put a
ListViewinside aStackPanel, for example, theListView‘s height can exceed the height of theStackPanel. TheListViewhas increased its height to show all its items, as far as it’s concerned, thus no scrollbar.However, if you change that
StackPanelto aGrid, where controls automatically try to fit themselves inside that area, theListViewwill automatically have a scrollbar when it contains more items than it can display.This will probably be solved most simply by adjusting your layout that contains the
ListView.