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

ScrollView appears scrolled down initially

$
0
0

Hello,

I have a scrollview that contains a listview and a videoview.

When the page is shown, the scrollview is scroll down to bottom, so that the video appears. I need to scroll manually up to show the firs listview item. How can I solve it?

This is the XAML file:

`<?xml version="1.0" encoding="utf-8" ?>

<ScrollView>
    <StackLayout Orientation="Vertical" Padding="15">
        <Image x:Name="ImageFin" ></Image>
        <ListView 
            x:Name="PropertiesFin"
            ItemsSource="{Binding Item.Properties}"
            HasUnevenRows="true" 
            VerticalOptions="Start" 
            HorizontalOptions="FillAndExpand">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <ViewCell>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto" />
                            </Grid.RowDefinitions>
                            <StackLayout Padding="10">
                                <Label Text="{Binding .}" 
                                    LineBreakMode="NoWrap"
                                    Style="{DynamicResource ListItemTextStyle}" 
                                    FontSize="16" />
                            </StackLayout>
                        </Grid>
                    </ViewCell>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
        <mm:VideoView x:Name="VideoFin" VerticalOptions="Start" HeightRequest="190" HorizontalOptions="FillAndExpand" />
        <Button x:Name="BtnPlayStop" VerticalOptions="Start" HorizontalOptions="FillAndExpand" Text="Iniciar Video" Clicked="PlayStop_Clicked" BackgroundColor="Silver" TextColor="White"/>
    </StackLayout>
</ScrollView>

`

Any help, please?

Thanks

Jaime


Viewing all articles
Browse latest Browse all 89864

Trending Articles



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