forked from xamarin/Xamarin.Forms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBorderElement.cs
22 lines (17 loc) · 939 Bytes
/
BorderElement.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System;
namespace Xamarin.Forms
{
static class BorderElement
{
public const int DefaultCornerRadius = -1;
public static readonly BindableProperty BorderColorProperty =
BindableProperty.Create(nameof(IBorderElement.BorderColor), typeof(Color), typeof(IBorderElement), Color.Default,
propertyChanged: OnBorderColorPropertyChanged);
public static readonly BindableProperty BorderWidthProperty = BindableProperty.Create(nameof(IBorderElement.BorderWidth), typeof(double), typeof(IBorderElement), -1d);
public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(nameof(IBorderElement.CornerRadius), typeof(int), typeof(IBorderElement), defaultValue: DefaultCornerRadius);
static void OnBorderColorPropertyChanged(BindableObject bindable, object oldValue, object newValue)
{
((IBorderElement)bindable).OnBorderColorPropertyChanged((Color)oldValue, (Color)newValue);
}
}
}