question

LloydSheen-3317 avatar image
0 Votes"
LloydSheen-3317 asked JarvanZhang-MSFT commented

Is there a max num of rows in a Grid in XAMARIN?

I have a little app that creates XAML for a type that shows all properties for a class. This allows me to use this in Xamarin in a Grid.

As part of the code generation it creates a row for each property. I then have the background BindingContext which is set during a ListView selectedItem. This works well except that I have a class that has 9 properties. The code sets the row and column for each property and that works .... until the Row number is 8. At this point the property no longer shows.

I have done the following to see what happens.

  1. Added a BackgroundColor to see the Grid and it shows the in rest of my phone below the ListView.

  2. Added a bunch of RowDefinitions (about 5 more) just to check if I did not have enough rows.

  3. Changed the Row of the last property to 7 and then the property name for the last property overwrites the previous row's info.

  4. The value of the last property to show was a ListView so I changed it so that it didn't exist and the last entry showed.


I have no idea what is happening. It seems to be because I present a ListView and as soon as I either change it or delete it the last. Since I am just using a grid I have no idea why this is.







dotnet-xamarin
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

pugthegreat avatar image
0 Votes"
pugthegreat answered

Could be that it is out of visible screen bounds. Maybe wrap the ListView in a ScrollView to solve the problem.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JarvanZhang-MSFT avatar image
0 Votes"
JarvanZhang-MSFT answered JarvanZhang-MSFT commented

Hello,​

Welcome to our Microsoft Q&A platform!

This works well except that I have a class that has 9 properties. The code sets the row and column for each property and that works .... until the Row number is 8.

The height of the views in the grid may be higher than the grid's height. To fix the issue, try using a ScrollView to wrap the Grid.

<ScrollView>
    <Grid>
        <!--the content-->
    </Grid>
</ScrollView>


Best Regards,

Jarvan Zhang


If the response is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, @LloydSheen-3317
I have not heard from you for a couple of days. Please let me know if there is anything that I can help here.

0 Votes 0 ·