Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to Scroll A grid

biconixbiconix Member ✭✭

I created a grid of buttons in XAML. in portrait mode it works great. in landscape, there is not enough space for all the buttons.
How can I allow the grid to scroll so that all the buttons would be visible and selectable?
Here is the XAML:
<ContentPage.Resources>

        <Style x:Key="ButtonSettings" TargetType="Button">
            <Setter Property= "VerticalOptions" Value="Center" />
            <Setter Property= "BackgroundColor"  Value= "Orange"/>
            <Setter Property= "TextColor" Value="Black" />
            <Setter Property= "FontSize" Value="Large"  />
            <Setter Property= "BorderRadius" Value="10"/>
            <Setter Property= "BorderWidth" Value="2"/>
            <Setter Property= "BorderColor" Value="Black"/>
            <Setter Property= "HorizontalOptions" Value="Center"/>
        </Style>

    </ResourceDictionary>
</ContentPage.Resources>

<ContentPage.BindingContext>
    <local:MainPageViewModel />
</ContentPage.BindingContext>

<Grid BackgroundColor="Chocolate">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition Height="*" />
        <RowDefinition Height="*" />
        <RowDefinition Height="*" />
        <RowDefinition Height="*" />
        <RowDefinition Height="*" />
        <RowDefinition Height="*" />
        <RowDefinition Height="*" />
        <RowDefinition Height="*" />
        <RowDefinition Height=".5*" />
        <RowDefinition Height=".5*" />
        <RowDefinition Height=".5*" />
    </Grid.RowDefinitions>

........

Best Answer

Answers

Sign In or Register to comment.