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

ScrollView cut off page content

$
0
0

I'm trying to create a page with ScrollView and PullToRefreshLayout from James Montemagno (https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout). When the page is open, the PullToRefreshLayout starts refresh, but when I hide the refresher, the ScrollView focus my page on center and cut off the top. If I scroll down the page, the top is visible, but at the first moment, the top is cut off. The problem occurs only for iOS. In Android platform, works like a charm. Has anyone had this problem? How can I solve that?

That's my page:

<pull:PullToRefreshLayout
            x:Name="RefreshLayout"
            IsPullToRefreshEnabled="True"
            RefreshCommand="{Binding RecarregarCommand}"
            IsRefreshing="{Binding IsBusy}">
            <customViews:AlwaysScrollView x:Name="Scroll"
                                          Padding="0,18,0,0">

                <StackLayout Spacing="{StaticResource CardSpacing}"
                             Padding="0,0,0,18"
                             HorizontalOptions="FillAndExpand"
                             VerticalOptions="FillAndExpand"
                             IsClippedToBounds="True">

                    <Image x:Name="ItemFoto"
                            Source="{Binding UrlLogoClinica}"
                            Aspect="AspectFit"
                            MinimumWidthRequest="150"
                            HeightRequest="150"
                            VerticalOptions="Start"
                            HorizontalOptions="FillAndExpand"
                            Margin="16,0,16,16">
                        <Image.GestureRecognizers>
                            <TapGestureRecognizer Command="{Binding DetalheClinicaCommand}"/>
                        </Image.GestureRecognizers>
                    </Image>

                    <customViews:TableViewSemScroll
                        Intent="Menu"
                        HeightRequest="100"
                        HasUnevenRows="True"
                        Margin="0"
                        VerticalOptions="Start"
                        HorizontalOptions="FillAndExpand">
                        <TableRoot>
                            <TableSection Title="{x:Static resx:AppResources.TituloPaciente}">
                                <TextCell Text="{Binding Paciente.Nome}"
                                          StyleId="disclosure"
                                          Command="{Binding EditarCommand}"/>
                            </TableSection>
                        </TableRoot>
                    </customViews:TableViewSemScroll>

                    <customViews:CardView IsVisible="{Binding IsListaAgendaVisivel}"
                                          Margin="0">
                        <StackLayout Spacing="0">
                            <customViews:LabelSection Text="{x:Static resx:AppResources.TituloAgenda}"/>
                            <customViews:HeaderDivider/>
                            <customViews:ListViewSemScroll
                                x:Name="ListAgenda"
                                ItemsSource="{Binding ListaAgenda}"
                                SeparatorColor="{StaticResource ListSeparator}"
                                RowHeight="44">
                                <customViews:ListViewSemScroll.Behaviors>
                                    <behaviors:EventToCommandBehavior 
                                    EventName="ItemTapped" 
                                    Command="{Binding ItemSelectCommand}" 
                                    EventArgsConverter="{StaticResource ItemToObject}"/>
                                </customViews:ListViewSemScroll.Behaviors>
                                <customViews:ListViewSemScroll.ItemTemplate>
                                    <DataTemplate>
                                        <ImageCell 
                                            ImageSource="{Binding NomeIcone}"
                                            Text="{Binding Nome}"
                                            StyleId="disclosure"/>
                                    </DataTemplate>
                                </customViews:ListViewSemScroll.ItemTemplate>
                            </customViews:ListViewSemScroll>
                            <customViews:FooterDivider/>
                        </StackLayout>
                    </customViews:CardView>

                    <!-- OTHER LISTVIEWS -->

                </StackLayout>
            </customViews:AlwaysScrollView>

        </pull:PullToRefreshLayout>

customViews:TableViewSemScroll = TableView with scroll disabled
customViews:ListViewSemScroll = ListView with scroll disabled


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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