diff --git a/samples/ThirdPartyControlsSample/Elements/Material.Components/MDComboBox.generated.cs b/samples/ThirdPartyControlsSample/Elements/Material.Components/MDComboBox.generated.cs
new file mode 100644
index 00000000..e5891c54
--- /dev/null
+++ b/samples/ThirdPartyControlsSample/Elements/Material.Components/MDComboBox.generated.cs
@@ -0,0 +1,233 @@
+//
+// This code was generated by a BlazorBindings.Maui component generator.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+
+using BlazorBindings.Core;
+using BlazorBindings.Maui.Elements;
+using MC = Microsoft.Maui.Controls;
+using MCM = Material.Components.Maui;
+using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Rendering;
+using Microsoft.Maui.Graphics;
+using System.Collections;
+using System.Threading.Tasks;
+
+#pragma warning disable CA2252
+
+namespace BlazorBindings.Maui.Elements.Material.Components
+{
+ public partial class MDComboBox : SKTouchCanvasView
+ {
+ static MDComboBox()
+ {
+ RegisterAdditionalHandlers();
+ }
+
+ [Parameter] public Color ActiveIndicatorColor { get; set; }
+ [Parameter] public int? ActiveIndicatorHeight { get; set; }
+ [Parameter] public float? ActiveIndicatorOpacity { get; set; }
+ [Parameter] public Color BackgroundColour { get; set; }
+ [Parameter] public string FontFamily { get; set; }
+ [Parameter] public bool? FontItalic { get; set; }
+ [Parameter] public float? FontSize { get; set; }
+ [Parameter] public int? FontWeight { get; set; }
+ [Parameter] public Color ForegroundColor { get; set; }
+ [Parameter] public bool? IsOutline { get; set; }
+ [Parameter] public IList ItemsSource { get; set; }
+ [Parameter] public string LabelText { get; set; }
+ [Parameter] public Color LabelTextColor { get; set; }
+ [Parameter] public float? LabelTextOpacity { get; set; }
+ [Parameter] public Color OutlineColor { get; set; }
+ [Parameter] public int? OutlineWidth { get; set; }
+ [Parameter] public int? SelectedIndex { get; set; }
+ [Parameter] public MCM.Tokens.Shape? Shape { get; set; }
+ [Parameter] public Color StateLayerColor { get; set; }
+ [Parameter] public string Text { get; set; }
+ [Parameter] public RenderFragment ChildContent { get; set; }
+ [Parameter] public EventCallback SelectedIndexChanged { get; set; }
+
+ public new MCM.ComboBox NativeControl => (MCM.ComboBox)((BindableObject)this).NativeControl;
+
+ protected override MCM.ComboBox CreateNativeElement() => new();
+
+ protected override void HandleParameter(string name, object value)
+ {
+ switch (name)
+ {
+ case nameof(ActiveIndicatorColor):
+ if (!Equals(ActiveIndicatorColor, value))
+ {
+ ActiveIndicatorColor = (Color)value;
+ NativeControl.ActiveIndicatorColor = ActiveIndicatorColor;
+ }
+ break;
+ case nameof(ActiveIndicatorHeight):
+ if (!Equals(ActiveIndicatorHeight, value))
+ {
+ ActiveIndicatorHeight = (int?)value;
+ NativeControl.ActiveIndicatorHeight = ActiveIndicatorHeight ?? (int)MCM.ComboBox.ActiveIndicatorHeightProperty.DefaultValue;
+ }
+ break;
+ case nameof(ActiveIndicatorOpacity):
+ if (!Equals(ActiveIndicatorOpacity, value))
+ {
+ ActiveIndicatorOpacity = (float?)value;
+ NativeControl.ActiveIndicatorOpacity = ActiveIndicatorOpacity ?? (float)MCM.ComboBox.ActiveIndicatorOpacityProperty.DefaultValue;
+ }
+ break;
+ case nameof(BackgroundColour):
+ if (!Equals(BackgroundColour, value))
+ {
+ BackgroundColour = (Color)value;
+ NativeControl.BackgroundColour = BackgroundColour;
+ }
+ break;
+ case nameof(FontFamily):
+ if (!Equals(FontFamily, value))
+ {
+ FontFamily = (string)value;
+ NativeControl.FontFamily = FontFamily;
+ }
+ break;
+ case nameof(FontItalic):
+ if (!Equals(FontItalic, value))
+ {
+ FontItalic = (bool?)value;
+ NativeControl.FontItalic = FontItalic ?? (bool)MCM.ComboBox.FontItalicProperty.DefaultValue;
+ }
+ break;
+ case nameof(FontSize):
+ if (!Equals(FontSize, value))
+ {
+ FontSize = (float?)value;
+ NativeControl.FontSize = FontSize ?? (float)MCM.ComboBox.FontSizeProperty.DefaultValue;
+ }
+ break;
+ case nameof(FontWeight):
+ if (!Equals(FontWeight, value))
+ {
+ FontWeight = (int?)value;
+ NativeControl.FontWeight = FontWeight ?? (int)MCM.ComboBox.FontWeightProperty.DefaultValue;
+ }
+ break;
+ case nameof(ForegroundColor):
+ if (!Equals(ForegroundColor, value))
+ {
+ ForegroundColor = (Color)value;
+ NativeControl.ForegroundColor = ForegroundColor;
+ }
+ break;
+ case nameof(IsOutline):
+ if (!Equals(IsOutline, value))
+ {
+ IsOutline = (bool?)value;
+ NativeControl.IsOutline = IsOutline ?? (bool)MCM.ComboBox.IsOutlineProperty.DefaultValue;
+ }
+ break;
+ case nameof(ItemsSource):
+ if (!Equals(ItemsSource, value))
+ {
+ ItemsSource = (IList)value;
+ NativeControl.ItemsSource = ItemsSource;
+ }
+ break;
+ case nameof(LabelText):
+ if (!Equals(LabelText, value))
+ {
+ LabelText = (string)value;
+ NativeControl.LabelText = LabelText;
+ }
+ break;
+ case nameof(LabelTextColor):
+ if (!Equals(LabelTextColor, value))
+ {
+ LabelTextColor = (Color)value;
+ NativeControl.LabelTextColor = LabelTextColor;
+ }
+ break;
+ case nameof(LabelTextOpacity):
+ if (!Equals(LabelTextOpacity, value))
+ {
+ LabelTextOpacity = (float?)value;
+ NativeControl.LabelTextOpacity = LabelTextOpacity ?? (float)MCM.ComboBox.LabelTextOpacityProperty.DefaultValue;
+ }
+ break;
+ case nameof(OutlineColor):
+ if (!Equals(OutlineColor, value))
+ {
+ OutlineColor = (Color)value;
+ NativeControl.OutlineColor = OutlineColor;
+ }
+ break;
+ case nameof(OutlineWidth):
+ if (!Equals(OutlineWidth, value))
+ {
+ OutlineWidth = (int?)value;
+ NativeControl.OutlineWidth = OutlineWidth ?? (int)MCM.ComboBox.OutlineWidthProperty.DefaultValue;
+ }
+ break;
+ case nameof(SelectedIndex):
+ if (!Equals(SelectedIndex, value))
+ {
+ SelectedIndex = (int?)value;
+ NativeControl.SelectedIndex = SelectedIndex ?? (int)MCM.ComboBox.SelectedIndexProperty.DefaultValue;
+ }
+ break;
+ case nameof(Shape):
+ if (!Equals(Shape, value))
+ {
+ Shape = (MCM.Tokens.Shape?)value;
+ NativeControl.Shape = Shape ?? (MCM.Tokens.Shape)MCM.ComboBox.ShapeProperty.DefaultValue;
+ }
+ break;
+ case nameof(StateLayerColor):
+ if (!Equals(StateLayerColor, value))
+ {
+ StateLayerColor = (Color)value;
+ NativeControl.StateLayerColor = StateLayerColor;
+ }
+ break;
+ case nameof(Text):
+ if (!Equals(Text, value))
+ {
+ Text = (string)value;
+ NativeControl.Text = Text;
+ }
+ break;
+ case nameof(ChildContent):
+ ChildContent = (RenderFragment)value;
+ break;
+ case nameof(SelectedIndexChanged):
+ if (!Equals(SelectedIndexChanged, value))
+ {
+ void NativeControlSelectedIndexChanged(object sender, MCM.Core.SelectedIndexChangedEventArgs e)
+ {
+ var value = NativeControl.SelectedIndex;
+ SelectedIndex = value;
+ InvokeEventCallback(SelectedIndexChanged, value);
+ }
+
+ SelectedIndexChanged = (EventCallback)value;
+ NativeControl.SelectedIndexChanged -= NativeControlSelectedIndexChanged;
+ NativeControl.SelectedIndexChanged += NativeControlSelectedIndexChanged;
+ }
+ break;
+
+ default:
+ base.HandleParameter(name, value);
+ break;
+ }
+ }
+
+ protected override void RenderAdditionalElementContent(RenderTreeBuilder builder, ref int sequence)
+ {
+ base.RenderAdditionalElementContent(builder, ref sequence);
+ RenderTreeBuilderHelper.AddListContentProperty(builder, sequence++, ChildContent, x => x.Items);
+ }
+
+ static partial void RegisterAdditionalHandlers();
+ }
+}
diff --git a/samples/ThirdPartyControlsSample/Elements/Material.Components/MDComboBoxItem.generated.cs b/samples/ThirdPartyControlsSample/Elements/Material.Components/MDComboBoxItem.generated.cs
new file mode 100644
index 00000000..1c14ced8
--- /dev/null
+++ b/samples/ThirdPartyControlsSample/Elements/Material.Components/MDComboBoxItem.generated.cs
@@ -0,0 +1,33 @@
+//
+// This code was generated by a BlazorBindings.Maui component generator.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+
+using BlazorBindings.Core;
+using BlazorBindings.Maui.Elements;
+using MC = Microsoft.Maui.Controls;
+using MCM = Material.Components.Maui;
+using Microsoft.AspNetCore.Components;
+using System.Threading.Tasks;
+
+#pragma warning disable CA2252
+
+namespace BlazorBindings.Maui.Elements.Material.Components
+{
+ public partial class MDComboBoxItem : MDMenuItem
+ {
+ static MDComboBoxItem()
+ {
+ RegisterAdditionalHandlers();
+ }
+
+ public new MCM.ComboBoxItem NativeControl => (MCM.ComboBoxItem)((BindableObject)this).NativeControl;
+
+ protected override MCM.ComboBoxItem CreateNativeElement() => new();
+
+
+ static partial void RegisterAdditionalHandlers();
+ }
+}
diff --git a/samples/ThirdPartyControlsSample/Elements/Material.Components/MDMenuItem.generated.cs b/samples/ThirdPartyControlsSample/Elements/Material.Components/MDMenuItem.generated.cs
new file mode 100644
index 00000000..c7864c88
--- /dev/null
+++ b/samples/ThirdPartyControlsSample/Elements/Material.Components/MDMenuItem.generated.cs
@@ -0,0 +1,165 @@
+//
+// This code was generated by a BlazorBindings.Maui component generator.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+
+using BlazorBindings.Core;
+using BlazorBindings.Maui.Elements;
+using MC = Microsoft.Maui.Controls;
+using MCM = Material.Components.Maui;
+using Microsoft.AspNetCore.Components;
+using Microsoft.Maui.Graphics;
+using System.Threading.Tasks;
+
+#pragma warning disable CA2252
+
+namespace BlazorBindings.Maui.Elements.Material.Components
+{
+ public partial class MDMenuItem : SKTouchCanvasView
+ {
+ static MDMenuItem()
+ {
+ RegisterAdditionalHandlers();
+ }
+
+ [Parameter] public Color BackgroundColour { get; set; }
+ [Parameter] public string FontFamily { get; set; }
+ [Parameter] public bool? FontItalic { get; set; }
+ [Parameter] public float? FontSize { get; set; }
+ [Parameter] public int? FontWeight { get; set; }
+ [Parameter] public Color ForegroundColor { get; set; }
+ [Parameter] public string IconData { get; set; }
+ [Parameter] public global::IconPacks.Material.IconKind? IconKind { get; set; }
+ [Parameter] public global::SkiaSharp.SKPicture IconSource { get; set; }
+ [Parameter] public Color RippleColor { get; set; }
+ [Parameter] public Color StateLayerColor { get; set; }
+ [Parameter] public string Text { get; set; }
+ [Parameter] public string TrailIconData { get; set; }
+ [Parameter] public global::IconPacks.Material.IconKind? TrailIconKind { get; set; }
+ [Parameter] public global::SkiaSharp.SKPicture TrailIconSource { get; set; }
+
+ public new MCM.MenuItem NativeControl => (MCM.MenuItem)((BindableObject)this).NativeControl;
+
+ protected override MCM.MenuItem CreateNativeElement() => new();
+
+ protected override void HandleParameter(string name, object value)
+ {
+ switch (name)
+ {
+ case nameof(BackgroundColour):
+ if (!Equals(BackgroundColour, value))
+ {
+ BackgroundColour = (Color)value;
+ NativeControl.BackgroundColour = BackgroundColour;
+ }
+ break;
+ case nameof(FontFamily):
+ if (!Equals(FontFamily, value))
+ {
+ FontFamily = (string)value;
+ NativeControl.FontFamily = FontFamily;
+ }
+ break;
+ case nameof(FontItalic):
+ if (!Equals(FontItalic, value))
+ {
+ FontItalic = (bool?)value;
+ NativeControl.FontItalic = FontItalic ?? (bool)MCM.MenuItem.FontItalicProperty.DefaultValue;
+ }
+ break;
+ case nameof(FontSize):
+ if (!Equals(FontSize, value))
+ {
+ FontSize = (float?)value;
+ NativeControl.FontSize = FontSize ?? (float)MCM.MenuItem.FontSizeProperty.DefaultValue;
+ }
+ break;
+ case nameof(FontWeight):
+ if (!Equals(FontWeight, value))
+ {
+ FontWeight = (int?)value;
+ NativeControl.FontWeight = FontWeight ?? (int)MCM.MenuItem.FontWeightProperty.DefaultValue;
+ }
+ break;
+ case nameof(ForegroundColor):
+ if (!Equals(ForegroundColor, value))
+ {
+ ForegroundColor = (Color)value;
+ NativeControl.ForegroundColor = ForegroundColor;
+ }
+ break;
+ case nameof(IconData):
+ if (!Equals(IconData, value))
+ {
+ IconData = (string)value;
+ NativeControl.IconData = IconData;
+ }
+ break;
+ case nameof(IconKind):
+ if (!Equals(IconKind, value))
+ {
+ IconKind = (global::IconPacks.Material.IconKind?)value;
+ NativeControl.IconKind = IconKind ?? (global::IconPacks.Material.IconKind)MCM.MenuItem.IconKindProperty.DefaultValue;
+ }
+ break;
+ case nameof(IconSource):
+ if (!Equals(IconSource, value))
+ {
+ IconSource = (global::SkiaSharp.SKPicture)value;
+ NativeControl.IconSource = IconSource;
+ }
+ break;
+ case nameof(RippleColor):
+ if (!Equals(RippleColor, value))
+ {
+ RippleColor = (Color)value;
+ NativeControl.RippleColor = RippleColor;
+ }
+ break;
+ case nameof(StateLayerColor):
+ if (!Equals(StateLayerColor, value))
+ {
+ StateLayerColor = (Color)value;
+ NativeControl.StateLayerColor = StateLayerColor;
+ }
+ break;
+ case nameof(Text):
+ if (!Equals(Text, value))
+ {
+ Text = (string)value;
+ NativeControl.Text = Text;
+ }
+ break;
+ case nameof(TrailIconData):
+ if (!Equals(TrailIconData, value))
+ {
+ TrailIconData = (string)value;
+ NativeControl.TrailIconData = TrailIconData;
+ }
+ break;
+ case nameof(TrailIconKind):
+ if (!Equals(TrailIconKind, value))
+ {
+ TrailIconKind = (global::IconPacks.Material.IconKind?)value;
+ NativeControl.TrailIconKind = TrailIconKind ?? default;
+ }
+ break;
+ case nameof(TrailIconSource):
+ if (!Equals(TrailIconSource, value))
+ {
+ TrailIconSource = (global::SkiaSharp.SKPicture)value;
+ NativeControl.TrailIconSource = TrailIconSource;
+ }
+ break;
+
+ default:
+ base.HandleParameter(name, value);
+ break;
+ }
+ }
+
+ static partial void RegisterAdditionalHandlers();
+ }
+}
diff --git a/samples/ThirdPartyControlsSample/Elements/Material.Components/MDNavigationBar.generated.cs b/samples/ThirdPartyControlsSample/Elements/Material.Components/MDNavigationBar.generated.cs
index 629ebc5d..cb65ddf0 100644
--- a/samples/ThirdPartyControlsSample/Elements/Material.Components/MDNavigationBar.generated.cs
+++ b/samples/ThirdPartyControlsSample/Elements/Material.Components/MDNavigationBar.generated.cs
@@ -25,9 +25,8 @@ static MDNavigationBar()
}
[Parameter] public bool? HasLabel { get; set; }
- [Parameter] public MCM.Core.ItemCollection Items { get; set; }
[Parameter] public int? SelectedIndex { get; set; }
- [Parameter] public RenderFragment SelectedItem { get; set; }
+ [Parameter] public RenderFragment ChildContent { get; set; }
public new MCM.NavigationBar NativeControl => (MCM.NavigationBar)((BindableObject)this).NativeControl;
@@ -44,13 +43,6 @@ protected override void HandleParameter(string name, object value)
NativeControl.HasLabel = HasLabel ?? (bool)MCM.NavigationBar.HasLabelProperty.DefaultValue;
}
break;
- case nameof(Items):
- if (!Equals(Items, value))
- {
- Items = (MCM.Core.ItemCollection)value;
- NativeControl.Items = Items;
- }
- break;
case nameof(SelectedIndex):
if (!Equals(SelectedIndex, value))
{
@@ -58,8 +50,8 @@ protected override void HandleParameter(string name, object value)
NativeControl.SelectedIndex = SelectedIndex ?? (int)MCM.NavigationBar.SelectedIndexProperty.DefaultValue;
}
break;
- case nameof(SelectedItem):
- SelectedItem = (RenderFragment)value;
+ case nameof(ChildContent):
+ ChildContent = (RenderFragment)value;
break;
default:
@@ -71,7 +63,7 @@ protected override void HandleParameter(string name, object value)
protected override void RenderAdditionalElementContent(RenderTreeBuilder builder, ref int sequence)
{
base.RenderAdditionalElementContent(builder, ref sequence);
- RenderTreeBuilderHelper.AddContentProperty(builder, sequence++, SelectedItem, (x, value) => x.SelectedItem = (MCM.NavigationBarItem)value);
+ RenderTreeBuilderHelper.AddListContentProperty(builder, sequence++, ChildContent, x => x.Items);
}
static partial void RegisterAdditionalHandlers();
diff --git a/samples/ThirdPartyControlsSample/Extensions/NavigationExtensions.cs b/samples/ThirdPartyControlsSample/Extensions/NavigationExtensions.cs
index 134b89fa..cbecc419 100644
--- a/samples/ThirdPartyControlsSample/Extensions/NavigationExtensions.cs
+++ b/samples/ThirdPartyControlsSample/Extensions/NavigationExtensions.cs
@@ -7,7 +7,9 @@ public static class NavigationExtensions
{
public static async Task