Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
415
Making height a small as possible
posted

How do i get the height of the grid to match the space used by the rows.

aka, if I have to rows, its two rows high, if i have 10 then its 10.

Also  setting a max would be nice.

I see maxheight but that doesn't seem todo the trick. Tried multiple different methods

Parents
No Data
Reply
  • 40030
    Verified Answer
    Offline posted

    Hi, 

    So if you're not setting a height or width of the xamWebGrid, then it's getting it's height and width from it's container. 

    If you want the grid to size to available content, then it needs to be in a container that will give it a height of "infinity" Such as a StackPanel with it's orientation set to Vertical. 

    However, you'll never get scrollbars for the XamWebGrid which means it can't virtualize it's data.  Howver, if you only have 10 rows, that won't be an issue. 

    -SteveZ

Children
No Data