public FloatingActionButton() { SizeRequest = 40; AllowTap = true; GestureRecognizers.Add(new TapGestureRecognizer { Command = new Command(() => { if (TapAction != null) { TapAction.Dispatch(); return; } if (IsOpened) { IsOpened = false; CloseAction.Dispatch(); } else { IsOpened = true; OpenAction.Dispatch(); } }, () => AllowTap) }); }