-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCard.cs
46 lines (38 loc) · 1.43 KB
/
Card.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
namespace NativeCode.Mobile.AppCompat.Controls
{
using System.Windows.Input;
using Xamarin.Forms;
public class Card : ContentView, ICommandProvider
{
public static readonly BindableProperty CommandProperty = BindableProperty.Create<FloatingButton, ICommand>(x => x.Command, default(ICommand));
public static readonly BindableProperty CommandParameterProperty = BindableProperty.Create<FloatingButton, object>(
x => x.CommandParameter,
default(object));
public static readonly BindableProperty RadiusProperty = BindableProperty.Create<Card, double>(x => x.Radius, 20.0d);
public Card()
{
this.Padding = new Thickness(20);
}
/// <summary>
/// Gets or sets the command.
/// </summary>
public ICommand Command
{
get { return (ICommand)this.GetValue(CommandProperty); }
set { this.SetValue(CommandProperty, value); }
}
/// <summary>
/// Gets or sets the command parameter.
/// </summary>
public object CommandParameter
{
get { return this.GetValue(CommandParameterProperty); }
set { this.SetValue(CommandParameterProperty, value); }
}
public double Radius
{
get { return (double)this.GetValue(RadiusProperty); }
set { this.SetValue(RadiusProperty, value); }
}
}
}