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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfBackdropPage Swiping Event listeners

Thread ID:

Created:

Updated:

Platform:

Replies:

145079 Jun 5,2019 02:01 PM UTC Jun 6,2019 12:06 PM UTC Xamarin.Forms 3
loading
Tags: SfBackdropPage
Kleverton
Asked On June 5, 2019 02:01 PM UTC

Hi!

I'd like to know if there are any events I can listen to when the user swipes the front layer of the backdrop up or down.

I've already tested all of the available events, but none of then were triggeredwhen swiping.

If there isn't an event, is there any way to set the Max height of the front layer, or change the Margin dinamically?

What I need to achieve is this:




Here's the code for what I've achieved so far:

<?xml version="1.0" encoding="UTF-8"?>
<backdrop:SfBackdropPage
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:backdrop="clr-namespace:Syncfusion.XForms.Backdrop;assembly=Syncfusion.SfBackdrop.XForms"
    x:Class="MembersAPP.Views.Explore.NewsDetailsView"
    BackLayerRevealOption="Auto"
    IsBackLayerRevealed="True"
    BackgroundColor="Red">

    <!--<NavigationPage.TitleView>
        <Image
            Grid.Row="0"
            HorizontalOptions="FillAndExpand"
            Source="{Binding CurrentArticle.CoverImage}"
            VerticalOptions="Start"
            Aspect="AspectFill"/>
    </NavigationPage.TitleView>-->   
    
    <backdrop:SfBackdropPage.BackLayer>
        <backdrop:BackdropBackLayer
            HeightRequest="195">
            <Grid
                VerticalOptions="Start"
                BackgroundColor="Transparent">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>

                <Image
                    Grid.Row="0"
                    Source="{Binding CurrentArticle.CoverImage}"
                    VerticalOptions="Start"
                    Aspect="AspectFill"/>
            </Grid>
        </backdrop:BackdropBackLayer>
    </backdrop:SfBackdropPage.BackLayer>

    <backdrop:SfBackdropPage.FrontLayer>
        <backdrop:BackdropFrontLayer
            RevealedHeight="250"
            Margin="0, -12, 0, 0"
            >
            <Grid
                VerticalOptions="StartAndExpand">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>

                <Label
                    Text="Hey"
                    HorizontalOptions="CenterAndExpand"
                    />
            </Grid>
        </backdrop:BackdropFrontLayer>
    </backdrop:SfBackdropPage.FrontLayer>

</backdrop:SfBackdropPage>

Thank you!


Bharathiraja K [Syncfusion]
Replied On June 6, 2019 10:51 AM UTC

Hi Kleverton, 
 
Greetings from Syncfusion. We have only BackdropStateChanged (open and close) event feature in the backdrop control and it will be available in our upcoming Volume2 release which is scheduled to be rolled out in the June 2019. 
 
Event behavior:  
That event is called when the action is completed (open or closed.) 
 
Let us know, if your requirement is different from the scenario. 
 
Please refer the below help document to set Maximum Height.  
 
Code Snippet [XAML]: 
<backdrop:SfBackdropPage 
…. 
IsBackLayerRevealed="True" 
BackLayerRevealOption="Fill" > 
 
…. 
 
<backdrop:SfBackdropPage.FrontLayer> 
        <backdrop:BackdropFrontLayer RevealedHeight="200" > 
            <Grid /> 
        </backdrop:BackdropFrontLayer> 
    </backdrop:SfBackdropPage.FrontLayer> 
</backdrop:SfBackdropPage> 
 
 
Regards, 
Bharathi. 


Kleverton
Replied On June 6, 2019 11:33 AM UTC

Thank you for the information provided!

I was able to resolve my issue by listening to the following event on the SfBackdropPage codebehind file:

protected async override void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            base.OnPropertyChanged(propertyName);

            if (propertyName == "IsBackLayerRevealed")    
            {
                    [...]

Thanks!

Bharathiraja K [Syncfusion]
Replied On June 6, 2019 12:06 PM UTC

Hi Rohith, 
 
We are glad that your requirement was achieved by yourself.  
 
Regards, 
Bharathi. 


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

Live Chat Icon For mobile
Live Chat Icon