2017-10-10 5 views
0

c'est mon pop-up:ScrollView étend mon pop-up dans xamarin.forms

<!--<ScrollView>--> 

    <Grid > 
    <Grid.ColumnDefinitions> 
     <ColumnDefinition Width="0.5*"/> 
     <ColumnDefinition Width="9*"/> 
     <ColumnDefinition Width="0.5*"/> 
    </Grid.ColumnDefinitions> 

    <Grid.RowDefinitions> 
     <RowDefinition Height="2.3*"/> 
     <RowDefinition Height="5.4*"/> 
     <RowDefinition Height="2.3*"/> 
    </Grid.RowDefinitions> 
    <Image Source="recuperarFundo" Grid.Column="1" Grid.Row="1" Aspect="Fill" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"/> 

    <Grid Grid.Column="1" Grid.Row="1" RowSpacing="0" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"> 
     <Grid.RowDefinitions> 
     <RowDefinition Height="3*"/> 
     <RowDefinition Height="4*"/> 
     <RowDefinition Height="3*"/> 
     </Grid.RowDefinitions> 

     <Grid Grid.Row="0" VerticalOptions="CenterAndExpand"> 
     <Image Source="cadastrarVoltar" Margin="20,0,0,0" Grid.Column="0" Grid.Row="0" VerticalOptions="Start" HorizontalOptions="Start"> 
      <!--<Image.Margin> 
      <OnPlatform x:TypeArguments="Thickness" 
        Android="20,0,0,0" 
        iOS="20,0,0,0"/> 
      </Image.Margin>--> 
      <Image.GestureRecognizers> 
      <TapGestureRecognizer Tapped="OnClose"/> 
      </Image.GestureRecognizers> 
     </Image> 

     <Image Source="loginlogo" Margin="0,10,0,10" Grid.Column="0" Grid.Row="0" VerticalOptions="Center" HorizontalOptions="Center"/> 

     </Grid> 

     <Grid Grid.Row="1" VerticalOptions="CenterAndExpand"> 

     <Image Source="recuperarForms" Aspect="Fill" Grid.Column="0" Grid.Row="0" Margin="20,0,20,0"/> 

     <Grid Grid.Column="0" Grid.Row="0" RowSpacing="0" Padding="25,0,25,0" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"> 
      <Grid.RowDefinitions> 
      <RowDefinition Height="5*"/> 
      <RowDefinition Height="5*"/> 
      </Grid.RowDefinitions> 

      <local:MyLabel x:Name="recupera_lbl" Text="Para recuperar sua senha, digite abaixo o e-mail cadastrado" Margin ="20,0,20,0" VerticalOptions="CenterAndExpand" HorizontalTextAlignment="Center" HorizontalOptions="CenterAndExpand" NamedFontSize="Small" Style="{Binding labelsfont}"/> 

      <local:MyEntry x:Name="recuperar_entry" Grid.Row="1" VerticalOptions="Center" Placeholder="Seu e-mail" TextColor="{StaticResource MarromClaro}" PlaceholderColor="{StaticResource MarromClaro}" FontSize="Small" HorizontalOptions="Fill" HorizontalTextAlignment="Center"/> 

     </Grid> 
     </Grid> 

     <Grid Grid.Row="2" VerticalOptions="FillAndExpand"> 
     <ActivityIndicator Grid.Row="0" Grid.Column ="0" x:Name="recuperar_indicator" Color="DarkRed" HorizontalOptions="CenterAndExpand" IsVisible="false" IsRunning="true"/> 
     <Image Grid.Row="0" Grid.Column ="0" x:Name="recuperar_button" Source="recuperarButton" HorizontalOptions="CenterAndExpand"> 
      <Image.GestureRecognizers> 
      <TapGestureRecognizer Tapped="CallingRecuperarSenhaAsync"/> 
      </Image.GestureRecognizers> 
     </Image> 
     </Grid> 
    </Grid> 

    </Grid> 
<!--</ScrollView>--> 
</pages:PopupPage> 

J'utilise xamarin.forms et Rg.plugin.popup ... Le problème est: quand j'ouvre le clavier popup est pétrie. Ensuite, pour résoudre cela, j'ai mis tout le code à l'intérieur d'un ScrollView et dans d'autres popups il a résolu le problème, mais seulement dans ce popup, où le code est dessus, quand j'utilise le scrollView ma disposition est étendue.

Sans ScrollView:

enter image description here

avec ScrollView:

enter image description here

Le défilement peut faire défiler, et il n'a pas de sens parce que mon pop-up est petit et il remplit pas la écran, ou je ne peux pas voir que c'est plus grand que la taille de mon écran ... Quelqu'un peut-il aider?

+0

Peut-être que vous pouvez essayer le menu contextuel dans SlideOverKit https://github.com/XAM-Consulting/SlideOverKit –

+0

Je ne peux pas, mon projet est fait ... il est trop tard pour cette option:/ –

+0

J'ai essayé d'utiliser au début de mon projet. Mais ça n'a pas marché facilement, alors j'ai changé pour rg.plugin.pop –

Répondre

0

J'ai placé 'HeightRequest' dans la grille et l'ai placé à l'intérieur d'un stacklayout. J'ai entendu dire que la stacklayout n'utilisait que la taille nedded, je ne sais pas si c'est vrai, mais ça marche ici.