| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- 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 async void OnClick()
- {
- if (IsEnabled)
- {
- Scale = 0.5;
- await this.ScaleTo(1, 150);
- Clicked?.Invoke(this, EventArgs.Empty);
- }
- }
-
- }
- }
|