Reputation: 83
I have loaded the DataGrid in to the Items Control, I have query on while the content of the DataGrid exceeds from the screen size the scroll bar is not shown automatically inside the container for scrolling purpose. I have noticed that the issue occurs only when set the height of the container as Auto. If i set the height as star means its working fine as expected manner. I hope this may state my struggling clearly could you please share you suggestion on this.
Upvotes: 1
Views: 99
Reputation: 169200
ScrollViewers
and virtualization don't work when setting the Height
of the parent Panel
to Auto
because this basically means that the ScrollViewer
gets an infinite or unknown height and there is no way to tell when to actually display the scroll bars.
A ScrollViewer
needs some kind of size contraint to be able to work properly and that's why you should either set the Height
to a fixed value or to *
to make it occupy all available space. Height=Auto
won't work.
Upvotes: 2