7 private readonly Border innerBorder;
8 private readonly Label innerLabel;
14 public static readonly BindableProperty
LabelDataProperty = LabelDataElement.LabelDataProperty;
17 public static readonly BindableProperty
LabelStyleProperty = LabelDataElement.LabelStyleProperty;
19 public void OnBorderStylePropertyChanged(Style OldValue, Style NewValue)
21 this.innerBorder.Style = NewValue;
24 public void OnLabelDataPropertyChanged(
string OldValue,
string NewValue)
26 this.innerLabel.Text = NewValue;
29 public void OnLabelStylePropertyChanged(Style OldValue, Style NewValue)
31 this.innerLabel.Style = NewValue;
34 public static Thickness BorderPaddingDefaultValueCreator() => Thickness.Zero;
36 public Style BorderStyle
38 get => (Style)this.GetValue(BorderDataElement.BorderStyleProperty);
39 set => this.SetValue(BorderDataElement.BorderStyleProperty, value);
42 public string LabelData
44 get => (string)this.GetValue(LabelDataElement.LabelDataProperty);
45 set => this.SetValue(LabelDataElement.LabelDataProperty, value);
48 public Style LabelStyle
50 get => (Style)this.GetValue(LabelDataElement.LabelStyleProperty);
51 set => this.SetValue(LabelDataElement.LabelStyleProperty, value);
57 this.innerLabel =
new()
59 HorizontalOptions = LayoutOptions.Center,
62 this.innerBorder =
new()
65 Content = this.innerLabel
68 this.Content = this.innerBorder;
static readonly BindableProperty BorderStyleProperty
Bindable property for BorderStyle.
static readonly BindableProperty LabelDataProperty
Bindable property for LabelData.
static readonly BindableProperty LabelStyleProperty
Bindable property for LabelStyle.