We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Create full screen and transparent SfPopup

Thread ID:

Created:

Updated:

Platform:

Replies:

141131 Nov 26,2018 10:41 AM UTC Nov 27,2018 07:06 AM UTC Xamarin.Forms 1
loading
Tags: SfPopup
Jan Najlepsi
Asked On November 26, 2018 10:41 AM UTC

Hi it is possible create full screen and transparent SfPopup? My goal is create busy popup dialog.

I tried this.

                _popupLayout = new SfPopupLayout();
      
                _popupLayout.PopupView.ShowHeader = false;
                _popupLayout.PopupView.ShowCloseButton = false;
                _popupLayout.PopupView.ShowFooter = false;

                _popupLayout.PopupView.HeaderTitle = string.Empty;

                _popupLayout.PopupView.Opacity = 0;

                _popupLayout.Opacity = 0;

                var templateView = new DataTemplate(() => new BusyDialogView
                {
                    BindingContext = new BusyIndicatorStatusViewModel { IsBusy = true, Title = "Awesome busy message" }
                });

                _popupLayout.PopupView.ContentTemplate = templateView;


BusyDialogView

    <ContentView.Content>
        <StackLayout Opacity="0.1">
            <sfBusyIndicator:SfBusyIndicator
                AnimationType="SingleCircle"
                HorizontalOptions="Center"
                IsBusy="{Binding IsBusy}"
                TextColor="{StaticResource BusyIndicatorColor}"
                VerticalOptions="Center" />
            <Label
                Margin="0,-50,0,0"
                HorizontalTextAlignment="Center"
                Text="{Binding Title}"
                TextColor="{StaticResource BusyIndicatorColor}" />
        </StackLayout>
    </ContentView.Content>


But popup is still white background.

Vigneshkumar Ramasamy [Syncfusion]
Replied On November 27, 2018 07:06 AM UTC

Hi Jan,  
 
Thanks for contacting Syncfusion Support.  
 
Your requirement “To create a transparent popup” can be achieved by setting SfPopupLayout.PopupView.PopupStyle.BorderColor as Transparent and Transparent background color to the view loaded in the DataTemplate of the SfPopupLayout.PopupView.ContentTemplate.   
 
Your requirement to create a full screen popup can be achieved by setting SfPopupLayout.PopupView.HorizontalOptions andSfPopupLayout.PopupView.VerticalOptions as “FillAndExpand”.   
 
Please find the code snippet of the same below.  
 
<sfPopup:SfPopupLayout x:Name="popupLayout">  
    <sfPopup:SfPopupLayout.PopupView>  
        <sfPopup:PopupView ShowHeader="False" ShowFooter="False"VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" >  
            <sfPopup:PopupView.PopupStyle>  
                <sfPopup:PopupStyle BorderColor="Transparent"/>  
            </sfPopup:PopupView.PopupStyle>  
            <sfPopup:PopupView.ContentTemplate>  
                <DataTemplate>  
                    <Label BackgroundColor="Transparent" Text="Popup Content"/>  
                </DataTemplate>  
            </sfPopup:PopupView.ContentTemplate>  
        </sfPopup:PopupView>  
  
    </sfPopup:SfPopupLayout.PopupView>  
    <sfPopup:SfPopupLayout.Content>  
        <StackLayout>  
            <Button x:Name="isOpenButton" Text="Click to open popup"Clicked="isOpenButton_Clicked"/>  
        </StackLayout>  
    </sfPopup:SfPopupLayout.Content>  
</sfPopup:SfPopupLayout>  
 
We have prepared the sample as per your requirement, you can download the same from the below link.  
 
Regards,  
Vigneshkumar R 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;