Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
[Bug] [Fixed] #1712 (#1713)
Browse files Browse the repository at this point in the history
  • Loading branch information
rxDietel committed Nov 25, 2021
1 parent fc0080e commit 52a260c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
<StackLayout Style="{StaticResource PopupLayout}">
<Label
Style="{StaticResource Title}"
Text="Simple Popup" />
Text="Simple Popup Without Light Dismiss" />
<BoxView Style="{StaticResource Divider}" />
<Label
Style="{StaticResource Content}"
Text="{OnPlatform
Android='This is a native popup with a Xamarin.Forms View being rendered. The behaviors of the popup will confirm to 100% native look and feel, but still allows you to use your Xamarin.Forms controls.',
iOS='This is a native popup with a Xamarin.Forms View being rendered. The behaviors of the popup will confirm to 100% native look and feel, but still allows you to use your Xamarin.Forms controls.',
UWP='UWP Flyouts do not support toggling light dismiss mode. On UWP this will always dismiss the flyout if you tap outside of the control'}" />
UWP='UWP Flyouts do not have native support for toggling light dismiss mode. On UWP this will disrupt the closing of the flyout if you tap outside of the control'}" />
<Button
Text="Close"
VerticalOptions="EndAndExpand"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ void ConfigureControl()

void SetEvents()
{
if (Element?.IsLightDismissEnabled is true)
Closing += OnClosing;
Closing += OnClosing;

if (Element != null)
Element.Dismissed += OnDismissed;
Expand Down Expand Up @@ -273,6 +272,8 @@ void OnClosing(object? sender, object e)
{
if (isOpen && Element?.IsLightDismissEnabled is true)
Element.LightDismiss();
if (isOpen && e is FlyoutBaseClosingEventArgs args)
args.Cancel = true;
}

void OnOpened(object sender, object e) =>
Expand Down

0 comments on commit 52a260c

Please sign in to comment.