-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathFloatingLabelEntry.cs
102 lines (101 loc) · 3.63 KB
/
FloatingLabelEntry.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
using System;
using System.Collections.Generic;
using System.Text;
using Xamarin.Forms;
using static Xamarin.Forms.Button.ButtonContentLayout;
namespace Skor.Controls
{
public class FloatingLabelEntry : Entry
{
public static readonly BindableProperty ErrorMessageProperty = BindableProperty.Create(
nameof(ErrorMessage),
typeof(string),
typeof(FloatingLabelEntry),
string.Empty);
public string ErrorMessage
{
get { return (string)GetValue(ErrorMessageProperty); }
set { SetValue(ErrorMessageProperty, value); }
}
public static readonly BindableProperty ErrorEnabledProperty = BindableProperty.Create(
nameof(ErrorEnabled),
typeof(bool),
typeof(FloatingLabelEntry),
false);
public bool ErrorEnabled
{
get { return (bool)GetValue(ErrorEnabledProperty); }
set { SetValue(ErrorEnabledProperty, value); }
}
public static readonly BindableProperty LabelColorProperty = BindableProperty.Create(
nameof(LabelColor),
typeof(Color),
typeof(FloatingLabelEntry),
Color.Black);
public Color LabelColor
{
get { return (Color)GetValue(LabelColorProperty); }
set { SetValue(LabelColorProperty, value); }
}
public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(
nameof(CornerRadius),
typeof(double),
typeof(FloatingLabelEntry),
4d);
public double CornerRadius
{
get { return (double)GetValue(CornerRadiusProperty); }
set { SetValue(CornerRadiusProperty, value); }
}
public static readonly BindableProperty FocusColorProperty = BindableProperty.Create(
nameof(FocusColor),
typeof(Color),
typeof(FloatingLabelEntry),
Color.White);
public Color FocusColor
{
get { return (Color)GetValue(FocusColorProperty); }
set { SetValue(FocusColorProperty, value); }
}
public new static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(
nameof(BackgroundColor),
typeof(Color),
typeof(FloatingLabelEntry),
Color.LightGray);
public new Color BackgroundColor
{
get { return (Color)GetValue(BackgroundColorProperty); }
set { SetValue(BackgroundColorProperty, value); }
}
public static readonly BindableProperty DisabledColorProperty = BindableProperty.Create(
nameof(DisabledColor),
typeof(Color),
typeof(FloatingLabelEntry),
Color.WhiteSmoke);
public Color DisabledColor
{
get { return (Color)GetValue(DisabledColorProperty); }
set { SetValue(DisabledColorProperty, value); }
}
public static readonly BindableProperty IconProperty = BindableProperty.Create(
nameof(Icon),
typeof(FileImageSource),
typeof(FloatingLabelEntry),
default(FileImageSource));
public FileImageSource Icon
{
get { return (FileImageSource)GetValue(IconProperty); }
set { SetValue(IconProperty, value); }
}
public static readonly BindableProperty IconPositionProperty = BindableProperty.Create(
nameof(IconPosition),
typeof(ImagePosition),
typeof(FloatingLabelEntry),
ImagePosition.Left);
public ImagePosition IconPosition
{
get { return (ImagePosition)GetValue(IconPositionProperty); }
set { SetValue(IconPositionProperty, value); }
}
}
}