-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathGradientFrame.cs
59 lines (57 loc) · 1.97 KB
/
GradientFrame.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
47
48
49
50
51
52
53
54
55
56
57
58
59
using Xamarin.Forms;
namespace Skor.Controls
{
public class GradientFrame: Frame
{
public static readonly BindableProperty StartColorProperty = BindableProperty.Create(
nameof(StartColor),
typeof(Color),
typeof(GradientFrame),
Color.Default);
public Color StartColor
{
get { return (Color)GetValue(StartColorProperty); }
set { SetValue(StartColorProperty, value); }
}
public static readonly BindableProperty EndColorProperty = BindableProperty.Create(
nameof(EndColor),
typeof(Color),
typeof(GradientFrame),
Color.Default);
public Color EndColor
{
get { return (Color)GetValue(EndColorProperty); }
set { SetValue(EndColorProperty, value); }
}
public static readonly BindableProperty CenterColorProperty = BindableProperty.Create(
nameof(CenterColor),
typeof(Color),
typeof(GradientFrame),
Color.Transparent);
public Color CenterColor
{
get { return (Color)GetValue(CenterColorProperty); }
set { SetValue(CenterColorProperty, value); }
}
public static readonly BindableProperty AngleProperty = BindableProperty.Create(
nameof(Angle),
typeof(AngleGradient),
typeof(GradientFrame),
AngleGradient.LeftRight);
public AngleGradient Angle
{
get { return (AngleGradient)GetValue(AngleProperty); }
set { SetValue(AngleProperty, value); }
}
public static readonly BindableProperty ImageProperty = BindableProperty.Create(
nameof(Image),
typeof(FileImageSource),
typeof(GradientFrame),
default(FileImageSource));
public FileImageSource Image
{
get { return (FileImageSource)GetValue(ImageProperty); }
set { SetValue(ImageProperty, value); }
}
}
}