Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to Scroll A grid

$
0
0

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>

........


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>