Border Options
Views can't easily be given borders without nesting them in frames or implementing custom renderers.

API
The following properties need to be added on the Border static class:
public static readonly BindableProperty BorderThicknessProperty =
BindableProperty.Create(propertyName: nameof(BorderThickness),
returnType: typeof(Thickness), declaringType: typeof(View));
public static readonly BindableProperty BorderColorProperty =
BindableProperty.Create(propertyName: nameof(BorderColor),
returnType: typeof(Color), declaringType: typeof(View));
And on IBorder: BorderThickness
Thickness BorderThickness { get; }
Color BorderColor{ get; }
void OnBorderThicknessPropertyChanged(Thickness oldValue, Thickness newValue);
void OnBorderColorPropertyChanged(Color oldValue, Color newValue);
Renderers will frame the given view using the given border properties
The following Views should implement the IBorder interface:
- Entry
- Button
- Frame
- DatePicker
- Picker
- TimePicker
Scenarios
Let's see an example using C #, XAML and CSS.
C# Example
var entry = new Entry();
entry.BorderThickness = new Thickness (2);
entry.BorderColor = Color.Red;
XAML Example
<Entry
BorderThickness="2"
BorderColor="Red" />
CSS Example
.entry
{
border-width: 2px;
border-color: red;
}
Difficulty : Easy
Border Options
Views can't easily be given borders without nesting them in frames or implementing custom renderers.
API
The following properties need to be added on the
Borderstatic class:And on
IBorder: BorderThicknessRenderers will frame the given view using the given border properties
The following Views should implement the
IBorderinterface:Scenarios
Let's see an example using C #, XAML and CSS.
C# Example
XAML Example
CSS Example
Difficulty : Easy