Hi,
I have a problem with the SfPopupLayout.
If I put au scrollable content with a long text, the footer is overlapped by the content.
What can i do for having the header and the footer always visible and only my content scrollable?
My code :
<?xml version="1.0" encoding="UTF-8"?>
<ResourceDictionary
xmlns:popuplayout="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:button="clr-namespace:Syncfusion.XForms.Buttons;assembly=Syncfusion.Buttons.XForms"
x:Class="Services.Styles.CustomPopup">
<popuplayout:SfPopupLayout
x:Key="popup"
Padding="10"
Opened="SfPopupLayout_Opened"
StaysOpen="True">
<popuplayout:SfPopupLayout.PopupView>
<popuplayout:PopupView
ShowCloseButton="False"
AnimationMode="None"
AutoSizeMode="Both"
>
<popuplayout:PopupView.PopupStyle>
<popuplayout:PopupStyle HeaderTextAlignment="Center"
HeaderBackgroundColor="White"
CornerRadius="20"
BorderThickness="0"
>
</popuplayout:PopupStyle>
</popuplayout:PopupView.PopupStyle>
<popuplayout:PopupView.HeaderTemplate>
<DataTemplate >
<Label
Text="{Binding Popup_TexteEntete}"
Padding="10"
BackgroundColor="{Binding Popup_BackgroundColorEntete}"
Style="{StaticResource labelTexteBlanc}"
HorizontalTextAlignment="Start"
VerticalTextAlignment="Center"
/>
</DataTemplate>
</popuplayout:PopupView.HeaderTemplate>
<popuplayout:PopupView.ContentTemplate>
<DataTemplate>
<ScrollView x:Name="scrollContent" BackgroundColor="White" Padding="10" VerticalOptions="FillAndExpand" >
<Label
VerticalOptions="FillAndExpand"
x:Name="texteDescription"
TextType="Html"
Style="{StaticResource labelTexteBleu}"
BackgroundColor="White"
Text="{Binding Popup_TexteDescription}"/>
</ScrollView>
</DataTemplate>
</popuplayout:PopupView.ContentTemplate>
<popuplayout:PopupView.FooterTemplate>
<DataTemplate>
<StackLayout x:Name="footerTemplate"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Orientation="Horizontal"
BackgroundColor="AliceBlue"
Padding="0"
Margin="0"
Spacing="0">
<button:SfButton
x:Name="bouton1"
Text="{Binding Popup_TexteBouton1}"
IsVisible="{Binding Popup_TexteBouton1 , Converter={StaticResource StringNullOrEmptyToBool}}"
HorizontalOptions="StartAndExpand"
VerticalOptions="StartAndExpand"
Padding="0"
Margin="0"
BackgroundColor="Green"
Style="{StaticResource sfButtonLabelBleu}"
Command="{Binding Popup_Bouton1Command}"
/>
<button:SfButton x:Name="bouton2"
IsVisible="{Binding Popup_TexteBouton2 , Converter={StaticResource StringNullOrEmptyToBool}}"
Text="{Binding Popup_TexteBouton2}"
HorizontalOptions="EndAndExpand"
VerticalOptions="StartAndExpand"
Style="{StaticResource sfButtonLabelBleu}"
BackgroundColor="Red"
Padding="0"
Margin="0"
Command="{Binding Popup_Bouton2Command}"
/>
</StackLayout>
</DataTemplate>
</popuplayout:PopupView.FooterTemplate>
</popuplayout:PopupView>
</popuplayout:SfPopupLayout.PopupView>
</popuplayout:SfPopupLayout>
</ResourceDictionary>
the green button is overlapped by the scrollview content. I think the autosize popup is calculate after the scrollview size calculate. Do you have a solution?
|
<popuplayout:SfPopupLayout x:Name="popupLayout"
Padding="10"
Opened="SfPopupLayout_Opened"
StaysOpen="True">
<popuplayout:SfPopupLayout.PopupView>
<popuplayout:PopupView
IsFullScreen="True"
ShowCloseButton="False"
AnimationMode="None"
AutoSizeMode="Both">
…
</popuplayout:SfPopupLayout> |