Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IconEntry.cs
1using System;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6using Microsoft.Maui.Controls.Shapes;
7using Path = Microsoft.Maui.Controls.Shapes.Path;
8
10{
12 {
13 #region Properties
17 public static readonly BindableProperty IconProperty = BindableProperty.Create(
18 nameof(IconPath),
19 typeof(Geometry),
20 typeof(IconEntry)
21 );
22
26 public Geometry IconPath
27 {
28 get => (Geometry)this.GetValue(IconProperty);
29 set => this.SetValue(IconProperty, value);
30 }
31 #endregion
32
33 public IconEntry() : base()
34 {
35 Path IconPath = new Path();
36 IconPath.SetBinding(Path.DataProperty, new Binding(nameof(this.IconPath), source: this));
37 IconPath.SetBinding(Path.FillProperty, new Binding(nameof(this.TextColor), source: this));
38
39 IconPath.VerticalOptions = LayoutOptions.Center;
40 IconPath.HorizontalOptions = LayoutOptions.Center;
41 IconPath.WidthRequest = 24;
42 IconPath.HeightRequest = 24;
43 IconPath.Aspect = Microsoft.Maui.Controls.Stretch.Fill;
44 this.LeftView = IconPath;
45 }
46 }
47}
A customizable entry control that allows setting views on the left and right sides of the entry.
Color TextColor
Gets or sets the text color of the entry.
Definition: IconEntry.cs:12
Geometry IconPath
Gets or sets the view displayed on the right side of the entry.
Definition: IconEntry.cs:27
static readonly BindableProperty IconProperty
Bindable property for the view displayed on the right side of the entry.
Definition: IconEntry.cs:17