Hello,
I put a datagrid in a window. The size of the window is smaller than the size of the datagrid, but there is no scrollbar turned on automatically.
How could I turn on the scrollbar?
Thanks.
Check the layout properties for the XamDataGrid in your layout. Is it in a Grid? Is the Grid set to Auto Size Width and Height and Vertical and Horizontal Alignment set to Stretch? Are those same properties for the XamDataGrid also set to Width=Auto and Height=Auto and VerticalAlignment=Stretch and HorizontalAlignment=Stretch. These are the default settings. So if your XAML does not have any of these properties set, then you should be OK.
If the element is set to be positioned VerticalAlignment to Top and HorizontalAlignment to Left, then the element (such as the XamDataGrid) will span to the right and to the bottom. However, if they are set to Stretch with Auto Width and Height, the grid will span to fit its container. And the scrollbars will automatically appear.
Additionally, make sure that VerticalScrollbarVisibility and HorizontalScrollbarVisibility are set to Auto or Visible (or not set at all in your XAML).
If this does not solve your issue, paste the XAML here that we might see what is going on.
Thanks!
Hi
Did you manage to resolve this issue ? Did the solution provided by Curtis help ? Let me know if you have further questions. Thanks.