Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

[Xamarin.Forms] ListView, unable to scroll

$
0
0

Hi,

I am using the XAML code below and I do not understand why I cannot scroll my ListView (x:Name="list")

`
<ContentPage.Content>

    <StackLayout Padding="20" VerticalOptions="Start" HorizontalOptions = "FillAndExpand">
        <StackLayout HorizontalOptions="Start" Orientation="Horizontal" >
            <Image x:Name="newImage" HeightRequest="100" HorizontalOptions="FillAndExpand"></Image>
            <Image x:Name="compareImage" HeightRequest="100" HorizontalOptions="FillAndExpand"></Image>
        </StackLayout>

        <StackLayout Orientation="Horizontal" WidthRequest="1000" HorizontalOptions="FillAndExpand" >
            <StackLayout  Orientation="Vertical" HorizontalOptions="FillAndExpand">
                <Label Text="Title" TextColor="White"></Label>
                <Editor x:Name="titleEdit" BackgroundColor="White" HorizontalOptions="FillAndExpand"></Editor>

                <Label Text="Description" TextColor="White"></Label>    
                <Editor x:Name="descriptionEdit" BackgroundColor="White" HorizontalOptions="FillAndExpand"></Editor>    
            </StackLayout>      
            <Button x:Name="addNewButton" Text="✓" Clicked="OnAddButtonClicked" WidthRequest="50" HeightRequest="50" HorizontalOptions="End" VerticalOptions="Center"></Button>
        </StackLayout>
        <RelativeLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
            <ListView x:Name="list" RowHeight="80" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
            </ListView>

            <Grid VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">                    
                <Grid.RowDefinitions >
                    <RowDefinition Height="5" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="5" />
                </Grid.ColumnDefinitions>
                <Button x:Name="displayAddNew" Text="+" HorizontalOptions="EndAndExpand" VerticalOptions="EndAndExpand" Grid.Row="4" Grid.Column="4" ></Button>                 
            </Grid>
        </RelativeLayout>
    </StackLayout>
</ContentPage.Content>

`

Anyone got a clue?

Also, something seems wrong with coding tags in this forum...


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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