12345678910111213141516171819202122232425262728293031323334353637 |
- using System;
- using System.Runtime.CompilerServices;
- using System.Windows.Input;
- using Xamarin.Forms;
- namespace InABox.Mobile
- {
- public class MobileCard : Frame
- {
-
- public MobileCard()
- {
- CornerRadius = 5;
- Margin = 0;
- Padding = 2;
- BorderColor = Color.Gray;
- BackgroundColor = Color.White;
- HasShadow = false;
- IsEnabled = true;
- GestureRecognizers.Add(new TapGestureRecognizer
- {
- Command = new Command(OnClick)
- });
- }
-
- public event EventHandler Clicked;
-
- protected virtual void OnClick()
- {
- if (IsEnabled)
- Clicked?.Invoke(this, EventArgs.Empty);
- }
-
- }
- }
|