- Home
- Forum
- Xamarin.Forms
- SfBackdropPage Swiping Event listeners
SfBackdropPage Swiping Event listeners
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!
SIGN IN To post a reply.
3 Replies
BK
Bharathiraja K
Syncfusion Team
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.
KL
Kleverton
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!
BK
Bharathiraja K
Syncfusion Team
June 6, 2019 12:06 PM UTC
Hi Rohith,
We are glad that your requirement was achieved by yourself.
Regards,
Bharathi.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
KL Kleverton
- Jun 5, 2019 02:01 PM UTC
- Jun 6, 2019 12:06 PM UTC