Skip to content

Commit

Permalink
Removed close on click if button is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Erling Moxnes Kristiansen committed Feb 11, 2020
1 parent bc93a50 commit abc6478
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class FloatingActionMenuBehaviour : Behavior<ModalityLayout>
typeof(bool),
typeof(Internal.Xaml.FloatingActionMenu),
false,
BindingMode.TwoWay,
propertyChanged: IsOpenPropertyChanged);

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ public string Title

private void MenuButton_OnClicked(object sender, EventArgs e)
{
if (FloatingActionMenuParent != null)
if (FloatingActionMenuParent != null && !IsEnabled)
{
FloatingActionMenuParent.m_behaviour.IsOpen = false;
}

if (Command != null && IsEnabled)
if (IsEnabled)
{
Command?.Execute(CommandParameter);
}
Expand Down
1 change: 0 additions & 1 deletion src/DIPS.Xamarin.UI/Internal/Xaml/FloatingActionMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
xmlns:ValueConverters="clr-namespace:DIPS.Xamarin.UI.Converters.ValueConverters"
mc:Ignorable="d"
x:Name="CodeBehind"
BackgroundColor="Blue"
x:Class="DIPS.Xamarin.UI.Internal.Xaml.FloatingActionMenu">

<ContentView.Content>
Expand Down

0 comments on commit abc6478

Please sign in to comment.