Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
BasePopup.cs
1using Microsoft.Maui.Controls;
2
4{
8 [ContentProperty(nameof(CustomContent))]
9 public class BasePopup : BasicPopup
10 {
11 public static readonly BindableProperty CustomContentProperty = BindableProperty.Create(
12 nameof(CustomContent),
13 typeof(View),
14 typeof(BasePopup),
15 null,
16 propertyChanged: OnCustomContentChanged);
17
18 public View? CustomContent
19 {
20 get => (View?)this.GetValue(CustomContentProperty);
21 set => this.SetValue(CustomContentProperty, value);
22 }
23
24 private static void OnCustomContentChanged(BindableObject bindable, object? oldValue, object? newValue)
25 {
26 if (bindable is BasePopup popup)
27 {
28 popup.CardContent = newValue as View;
29 }
30 }
31 }
32}
Compatibility wrapper so old Mopups based popups work using the new popup infrastructure.
Definition: BasePopup.cs:10
Provides a centered card layout with configurable sizing constraints.
Definition: BasicPopup.cs:10