1using Microsoft.Maui.Controls.Shapes;
3using PathShape = Microsoft.Maui.Controls.Shapes.Path;
9 private readonly Border innerBorder;
10 private readonly PathShape innerPath;
16 public static readonly BindableProperty
PathDataProperty = PathDataElement.PathDataProperty;
19 public static readonly BindableProperty
PathStyleProperty = PathDataElement.PathStyleProperty;
21 public void OnBorderStylePropertyChanged(Style OldValue, Style NewValue)
23 this.innerBorder.Style = NewValue;
26 public void OnPathDataPropertyChanged(Geometry OldValue, Geometry NewValue)
28 this.innerPath.Data = NewValue;
31 public void OnPathStylePropertyChanged(Style OldValue, Style NewValue)
33 this.innerPath.Style = NewValue;
36 public Geometry PathData
38 get => (Geometry)this.GetValue(PathDataElement.PathDataProperty);
39 set => this.SetValue(PathDataElement.PathDataProperty, value);
42 public Style BorderStyle
44 get => (Style)this.GetValue(BorderDataElement.BorderStyleProperty);
45 set => this.SetValue(BorderDataElement.BorderStyleProperty, value);
48 public Style PathStyle
50 get => (Style)this.GetValue(PathDataElement.PathStyleProperty);
51 set => this.SetValue(PathDataElement.PathStyleProperty, value);
57 this.innerPath =
new()
61 Aspect = Stretch.Uniform,
62 Style = this.PathStyle
65 this.innerBorder =
new()
68 Content = this.innerPath,
69 Style = this.BorderStyle
72 this.Content = this.innerBorder;