Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
InfoBubble.xaml.cs
1using Microsoft.Maui.Controls;
2using Microsoft.Maui.Graphics;
3
5{
6 public partial class InfoBubble : ContentView
7 {
8 public InfoBubble()
9 {
10 this.InitializeComponent();
11 }
12
13 // Label Text
14 public static readonly BindableProperty LabelTextProperty =
15 BindableProperty.Create(
16 nameof(LabelText),
17 typeof(string),
18 typeof(InfoBubble),
19 string.Empty);
20
21 public string LabelText
22 {
23 get => (string)this.GetValue(LabelTextProperty);
24 set => this.SetValue(LabelTextProperty, value);
25 }
26
27 // SVG Source (as string)
28 public static readonly BindableProperty SvgSourceProperty =
29 BindableProperty.Create(
30 nameof(SvgSource),
31 typeof(string),
32 typeof(InfoBubble),
33 default(string));
34
35 public string SvgSource
36 {
37 get => (string)this.GetValue(SvgSourceProperty);
38 set => this.SetValue(SvgSourceProperty, value);
39 }
40
41 // Content Color (used for both icon tint and label text)
42 public static readonly BindableProperty ContentColorProperty =
43 BindableProperty.Create(
44 nameof(ContentColor),
45 typeof(Color),
46 typeof(InfoBubble),
47 Colors.Black); // Default value
48
49 public Color ContentColor
50 {
51 get => (Color)this.GetValue(ContentColorProperty);
52 set => this.SetValue(ContentColorProperty, value);
53 }
54
55 // Background Color (of the bubble)
56 public static new readonly BindableProperty BackgroundColorProperty =
57 BindableProperty.Create(
58 nameof(BackgroundColor),
59 typeof(Color),
60 typeof(InfoBubble),
61 Colors.Transparent); // Override base BackgroundColor
62
63 public new Color BackgroundColor
64 {
65 get => (Color)this.GetValue(BackgroundColorProperty);
66 set => this.SetValue(BackgroundColorProperty, value);
67 }
68 }
69}