Xaml Grid layout column/row definition explanation RRS feed

  • Question

  • User14506 posted

    Could someone please explain the difference between using Auto, .3, .3, and 30? I figured out my layout by testing different things i found regarding grid layouts, but i cant figure out why setting all the column definitions to .3 worked. Is it just splitting the row into thirds? Then why doesn't just setting .3 work? everything disappears.

    Thank you!

    Monday, April 4, 2016 7:43 PM


  • User120969 posted

    My understanding is Auto = Fit the content * = Fill available space. So 3 columns each set as * take up 1/3 each N (where N is any number) = Take exactly N pixels (where pixels varies by device).

    I think of it as * makes the columns fight to fill the screen. When you have used Auto or N this guarantees those columns space and anything * fights for control of the rest.

    I'm not sure .3* is actually valid, it's probably interpreting the * as 'Fill' and ignoring the .3.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, April 4, 2016 8:06 PM