diff --git a/.gitignore b/.gitignore
index 9491a2f..68f960e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -360,4 +360,6 @@ MigrationBackup/
.ionide/
# Fody - auto-generated XML schema
-FodyWeavers.xsd
\ No newline at end of file
+FodyWeavers.xsd
+/templates/FmgLib.MauiMarkup.TemplateApp/bin/*
+/templates/FmgLib.MauiMarkup.TemplateApp/obj/*
diff --git a/FmgLib.MauiMarkup.sln b/FmgLib.MauiMarkup.sln
index 1254df7..83398f8 100644
--- a/FmgLib.MauiMarkup.sln
+++ b/FmgLib.MauiMarkup.sln
@@ -5,10 +5,6 @@ VisualStudioVersion = 17.9.34414.90
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{A4956394-4BE4-4C5A-BDD3-59F439A1FD98}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libs", "libs", "{8254CDF2-DB64-4ED2-8305-85CB3461710E}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FmgLib.MauiMarkup", "libs\FmgLib.MauiMarkup\FmgLib.MauiMarkup.csproj", "{7FE9B834-EEF6-4D65-8EE8-B085997B1F26}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FE0466FD-1CF3-4D08-B3B2-B6E0EB476831}"
ProjectSection(SolutionItems) = preProject
LICENSE.txt = LICENSE.txt
@@ -19,30 +15,28 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneratedExam", "sample\Gen
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{8E033618-BADE-4A6C-AC14-56EF722D8F61}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FmgLib.MauiMarkup.Generator.Test", "tests\FmgLib.MauiMarkup.Generator.Test\FmgLib.MauiMarkup.Generator.Test.csproj", "{57DB4E88-894E-46B4-A6FA-6BD3630BEB4B}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyOrderApp", "sample\MyOrderApp\MyOrderApp.csproj", "{ACC42464-7EAF-446F-8CD9-3D64C97ADA1A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyFinance", "sample\MyFinance\MyFinance.csproj", "{0F20FD8E-1997-4953-8B28-FC2AB893CF4F}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{9F405AEA-B646-47DD-A094-B4DA5F087273}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FmgLib.MauiMarkup", "src\FmgLib.MauiMarkup\FmgLib.MauiMarkup.csproj", "{D2A04B78-1200-47E4-8DD4-F36BBB31B323}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FmgLib.MauiMarkup.Generator", "src\FmgLib.MauiMarkup.Generator\FmgLib.MauiMarkup.Generator.csproj", "{A0F9BAC1-D4D6-4ADB-9CA5-F536FCA0F06D}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FmgLib.MauiMarkup.Generator.Test", "tests\FmgLib.MauiMarkup.Generator.Test\FmgLib.MauiMarkup.Generator.Test.csproj", "{DAC53472-0370-4B41-8A21-ECB0B8BD660C}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7FE9B834-EEF6-4D65-8EE8-B085997B1F26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7FE9B834-EEF6-4D65-8EE8-B085997B1F26}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7FE9B834-EEF6-4D65-8EE8-B085997B1F26}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7FE9B834-EEF6-4D65-8EE8-B085997B1F26}.Release|Any CPU.Build.0 = Release|Any CPU
{61CFBCD6-A21C-46CA-8264-5F21A0467F18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{61CFBCD6-A21C-46CA-8264-5F21A0467F18}.Debug|Any CPU.Build.0 = Debug|Any CPU
{61CFBCD6-A21C-46CA-8264-5F21A0467F18}.Release|Any CPU.ActiveCfg = Release|Any CPU
{61CFBCD6-A21C-46CA-8264-5F21A0467F18}.Release|Any CPU.Build.0 = Release|Any CPU
- {57DB4E88-894E-46B4-A6FA-6BD3630BEB4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {57DB4E88-894E-46B4-A6FA-6BD3630BEB4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {57DB4E88-894E-46B4-A6FA-6BD3630BEB4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {57DB4E88-894E-46B4-A6FA-6BD3630BEB4B}.Release|Any CPU.Build.0 = Release|Any CPU
{ACC42464-7EAF-446F-8CD9-3D64C97ADA1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ACC42464-7EAF-446F-8CD9-3D64C97ADA1A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ACC42464-7EAF-446F-8CD9-3D64C97ADA1A}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
@@ -55,16 +49,29 @@ Global
{0F20FD8E-1997-4953-8B28-FC2AB893CF4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F20FD8E-1997-4953-8B28-FC2AB893CF4F}.Release|Any CPU.Build.0 = Release|Any CPU
{0F20FD8E-1997-4953-8B28-FC2AB893CF4F}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {D2A04B78-1200-47E4-8DD4-F36BBB31B323}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D2A04B78-1200-47E4-8DD4-F36BBB31B323}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D2A04B78-1200-47E4-8DD4-F36BBB31B323}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D2A04B78-1200-47E4-8DD4-F36BBB31B323}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A0F9BAC1-D4D6-4ADB-9CA5-F536FCA0F06D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A0F9BAC1-D4D6-4ADB-9CA5-F536FCA0F06D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A0F9BAC1-D4D6-4ADB-9CA5-F536FCA0F06D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A0F9BAC1-D4D6-4ADB-9CA5-F536FCA0F06D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DAC53472-0370-4B41-8A21-ECB0B8BD660C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DAC53472-0370-4B41-8A21-ECB0B8BD660C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DAC53472-0370-4B41-8A21-ECB0B8BD660C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DAC53472-0370-4B41-8A21-ECB0B8BD660C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
- {7FE9B834-EEF6-4D65-8EE8-B085997B1F26} = {8254CDF2-DB64-4ED2-8305-85CB3461710E}
{61CFBCD6-A21C-46CA-8264-5F21A0467F18} = {A4956394-4BE4-4C5A-BDD3-59F439A1FD98}
- {57DB4E88-894E-46B4-A6FA-6BD3630BEB4B} = {8E033618-BADE-4A6C-AC14-56EF722D8F61}
{ACC42464-7EAF-446F-8CD9-3D64C97ADA1A} = {A4956394-4BE4-4C5A-BDD3-59F439A1FD98}
{0F20FD8E-1997-4953-8B28-FC2AB893CF4F} = {A4956394-4BE4-4C5A-BDD3-59F439A1FD98}
+ {D2A04B78-1200-47E4-8DD4-F36BBB31B323} = {9F405AEA-B646-47DD-A094-B4DA5F087273}
+ {A0F9BAC1-D4D6-4ADB-9CA5-F536FCA0F06D} = {9F405AEA-B646-47DD-A094-B4DA5F087273}
+ {DAC53472-0370-4B41-8A21-ECB0B8BD660C} = {8E033618-BADE-4A6C-AC14-56EF722D8F61}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2698E1E7-D253-457B-AF1B-6754123E0A11}
diff --git a/README.md b/README.md
index 5d3198d..c5299e0 100644
--- a/README.md
+++ b/README.md
@@ -1,20 +1,3 @@
-### Free .NET MAUI Libraries by FmgLib
-
-
-| NuGet Package | Link | Repo Info |
-|--------------|------|-------|
-| `FmgLib.MauiMarkup` | [](https://www.nuget.org/packages/FmgLib.MauiMarkup/) | [](https://github.com/FmgLib/FmgLib.MauiMarkup/stargazers) [](https://github.com/FmgLib/FmgLib.MauiMarkup/forks) [](https://github.com/FmgLib/FmgLib.MauiMarkup/commits) |
-| `FmgLib.MauiMarkup.Template` | [](https://www.nuget.org/packages/FmgLib.MauiMarkup.Template/) | - |
-
-
-### Free .NET MAUI Project Templates by FmgLib
-
-| Template | Link |
-|--------------|------|
-| `FmgLib .NET MAUI Markup App` | [](https://marketplace.visualstudio.com/items?itemName=FmgLib.FmgLibMauiMarkupTemplate&ssr=false#overview) [](https://marketplace.visualstudio.com/items?itemName=FmgLib.FmgLibMauiMarkupTemplate&ssr=false#overview)|
-
-
-
# Getting Started
### Creating a new FmgLib.MauiMarkup project from CLI
@@ -132,7 +115,6 @@ This would set the `AbsoluteLayout.LayoutBounds` attached property to the specif
| Maui bağlı özelliği | FmgLib.MauiMarkup metodu |
|-|-|
- |`Shell.ItemTemplate`|`ShellItemTemplate()`|
|`FlyoutBase.ContextFlyout`|`ContextFlyout()`|
|`Grid.Column`|`Column()`|
|`Grid.Row`|`Row()`|
@@ -148,7 +130,7 @@ This would set the `AbsoluteLayout.LayoutBounds` attached property to the specif
|`BindableLayout.ItemTemplate`|`BindableLayoutItemTemplate()`|
|`BindableLayout.TemplateSelector`|`BindableItemTemplateSelector()`|
|`Shell.PresentationMode`|`ShellPresentationMode()`|
- |`ShellBackgroundColor`|`ShellBackgroundColor()`|
+ |`Shell.BackgroundColor`|`ShellBackgroundColor()`|
|`Shell.ForegroundColor`|`ShellForegroundColor()`|
|`Shell.TitleColor`|`ShellTitleColor()`|
|`Shell.DisabledColor`|`ShellDisabledColor()`|
@@ -156,8 +138,27 @@ This would set the `AbsoluteLayout.LayoutBounds` attached property to the specif
|`Shell.NavBarHasShadow`|`ShellNavBarHasShadow()`|
|`Shell.NavBarIsVisible`|`ShellNavBarIsVisible()`|
|`Shell.TitleView`|`ShellTitleView()`|
+ |`Shell.TabBarBackgroundColor`|`ShellTabBarBackgroundColor()`|
+ |`Shell.TabBarForegroundColor`|`ShellTabBarForegroundColor()`|
+ |`Shell.TabBarTitleColor`|`ShellTabBarTitleColor()`|
+ |`Shell.TabBarDisabledColor`|`ShellTabBarDisabledColor()`|
+ |`Shell.TabBarUnselectedColor`|`ShellTabBarUnselectedColor()`|
+ |`Shell.TabBarIsVisible`|`ShellTabBarIsVisible()`|
+ |`Shell.FlyoutBackdrop`|`ShellFlyoutBackdrop()`|
+ |`Shell.FlyoutBehavior`|`ShellFlyoutBehavior()`|
+ |`Shell.FlyoutHeight`|`ShellFlyoutHeight()`|
+ |`Shell.FlyoutWidth`|`ShellFlyoutWidth()`|
+ |`Shell.FlyoutItemIsVisible`|`ShellFlyoutItemIsVisible()`|
+ |`Shell.BackButtonBehavior`|`ShellBackButtonBehavior()`|
+ |`Shell.ItemTemplate`|`ShellItemTemplate()`|
+ |`Shell.MenuItemTemplate`|`ShellMenuItemTemplate()`|
+ |`Shell.SearchHandler`|`ShellSearchHandler()`|
|`NavigationPage.HasNavigationBar`|`NavigationPageHasNavigationBar()`|
|`NavigationPage.BackButtonTitle`|`NavigationPageBackButtonTitle()`|
+ |`NavigationPage.HasBackButton`|`NavigationPageHasBackButton()`|
+ |`NavigationPage.IconColor`|`NavigationPageIconColor()`|
+ |`NavigationPage.TitleIconImageSource`|`NavigationPageTitleIconImageSource()`|
+ |`NavigationPage.TitleView`|`NavigationPageTitleView()`|
|`SemanticProperties.Hint`|`SemanticHint()`|
|`SemanticProperties.Description`|`SemanticDescription()`|
|`SemanticProperties.HeadingLevel`|`SemanticHeadingLevel()`|
diff --git a/sample/MyFinance/MyFinance.csproj b/sample/MyFinance/MyFinance.csproj
index 5154272..7ef8573 100644
--- a/sample/MyFinance/MyFinance.csproj
+++ b/sample/MyFinance/MyFinance.csproj
@@ -68,7 +68,7 @@
-
+
diff --git a/sample/MyFinance/Views/AddOrEditPage.cs b/sample/MyFinance/Views/AddOrEditPage.cs
index 33272fe..6df84fc 100644
--- a/sample/MyFinance/Views/AddOrEditPage.cs
+++ b/sample/MyFinance/Views/AddOrEditPage.cs
@@ -31,7 +31,7 @@ public override void Build()
.PickerButtonAreaTemplate(() =>
new HorizontalStackLayout()
.Margin(10)
- .AlignBottomEnd()
+ .AlignBottomRight()
.Spacing(10)
.Children(
new Button()
@@ -57,7 +57,7 @@ public override void Build()
new CheckEdit()
.Label("Gelir")
- .AlignStart()
+ .AlignLeft()
.IsChecked(e => e.Path("OperationItem.IsIncome")),
new Button()
diff --git a/sample/MyFinance/Views/ChartPage.cs b/sample/MyFinance/Views/ChartPage.cs
index 8028f25..e523c8f 100644
--- a/sample/MyFinance/Views/ChartPage.cs
+++ b/sample/MyFinance/Views/ChartPage.cs
@@ -35,7 +35,7 @@ public override void Build()
.TextColor(Green)
.FontSize(12)
.Column(1)
- .AlignBottomEnd(),
+ .AlignBottomRight(),
new Label()
.Text(e => e.Path("TotalExpense"))
@@ -43,7 +43,7 @@ public override void Build()
.FontSize(12)
.Column(1)
.Row(1)
- .AlignTopEnd()
+ .AlignTopRight()
)
),
diff --git a/sample/MyFinance/Views/ItemsPage.cs b/sample/MyFinance/Views/ItemsPage.cs
index 3239ab0..3ea3ded 100644
--- a/sample/MyFinance/Views/ItemsPage.cs
+++ b/sample/MyFinance/Views/ItemsPage.cs
@@ -14,69 +14,64 @@ public override void Build()
.RowDefinitions(e => e.Star(.7).Star(9.3))
.Spacing(10)
.Margin(10)
- .Children(() =>
- {
- return [
- new Grid()
- .ColumnDefinitions(e => e.Star(8).Star(1).Star(1))
- .Spacing(20)
- .FillHorizontal()
- .Children(() =>
- {
- return [
- new Label()
- .Text("İŞLEMLER")
- .FontAttributes(Bold)
- .FontSize(34)
- .AlignStart(),
+ .Children(
+ new Grid()
+ .ColumnDefinitions(e => e.Star(8).Star(1).Star(1))
+ .Spacing(20)
+ .FillHorizontal()
+ .Children(
+ new Label()
+ .Text("İŞLEMLER")
+ .FontAttributes(Bold)
+ .FontSize(34)
+ .AlignLeft(),
- new ImageButton()
- .Source("wallet.png")
- .SizeRequest(40, 40)
- .Command(e => e.Path("GotoAddPageCommand"))
- .Column(1),
+ new ImageButton()
+ .Source("wallet.png")
+ .SizeRequest(40, 40)
+ .Command(e => e.Path("GotoAddPageCommand"))
+ .Column(1),
- new ImageButton()
- .Source("filter.png")
- .SizeRequest(40, 40)
- .Command(e => e.Path("ShowFilterPopupCommand"))
- .Column(2)
- .AlignEnd()
- ];
- }),
+ new ImageButton()
+ .Source("filter.png")
+ .SizeRequest(40, 40)
+ .Command(e => e.Path("ShowFilterPopupCommand"))
+ .Column(2)
+ .AlignRight()
+ ),
- new ShimmerView()
- .WaveWidth(0.7)
- .WaveOpacity(0.8)
- .WaveDuration(new TimeSpan(0, 0, 0, 1))
- .IsLoading(e => e.Path("IsLoadingItems"))
- .Row(1)
- .LoadingView(() =>
- {
- return new DXCollectionView()
- .ItemsSource(e => e.Path("LoadingItems"))
- .IsScrollBarVisible(false)
- .ItemTemplate(() =>
- new Border()
- .Margin(5, 5)
- .BackgroundColor(LightGray)
- .StrokeShape(new RoundRectangle().CornerRadius(25))
- .HeightRequest(60)
- .StrokeThickness(0)
- );
- })
- .Content(() =>
- {
- return new DXCollectionView()
- .Assign(out var collectionView)
- .ItemsSource(e => e.Path("Items"))
- .IsRefreshing(e => e.Path("IsRefreshing").BindingMode(TwoWay))
- .IsLoadMoreEnabled(e => e.Path("IsLoadMoreEnabled"))
- .LoadMoreCommand(e => e.Path("LoadMoreCommand"))
- .IndicatorColor(DeepSkyBlue)
- .ItemTemplate(() =>
- new SwipeContainer()
- .StartSwipeItems(
+ new ShimmerView()
+ .WaveWidth(0.7)
+ .WaveOpacity(0.8)
+ .WaveDuration(new TimeSpan(0, 0, 0, 1))
+ .IsLoading(e => e.Path("IsLoadingItems"))
+ .Row(1)
+ .LoadingView(
+ new DXCollectionView()
+ .ItemsSource(e => e.Path("LoadingItems"))
+ .IsScrollBarVisible(false)
+ .ItemTemplate(() =>
+ new Border()
+ .Margin(5, 5)
+ .BackgroundColor(LightGray)
+ .StrokeShape(new RoundRectangle().CornerRadius(25))
+ .HeightRequest(60)
+ .StrokeThickness(0)
+ )
+ )
+ .Content(
+ new DXCollectionView()
+ .Assign(out var collectionView)
+ .ItemsSource(e => e.Path("Items"))
+ .IsRefreshing(e => e.Path("IsRefreshing").BindingMode(TwoWay))
+ .IsLoadMoreEnabled(e => e.Path("IsLoadMoreEnabled"))
+ .LoadMoreCommand(e => e.Path("LoadMoreCommand"))
+ .IndicatorColor(DeepSkyBlue)
+ .ItemTemplate(() =>
+ new SwipeContainer()
+ .StartSwipeItems(
+ new SwipeItemCollection
+ {
new SwipeItem()
{
BackgroundColor = Orange
@@ -88,8 +83,12 @@ public override void Build()
AddOrEditPageViewModel.Id = ((OperationItemsVM)e.Item).Id;
await AppShell.Current.GoToAsync($"//{nameof(AddOrEditPage)}");
})
- )
- .EndSwipeItems(
+ }
+
+ )
+ .EndSwipeItems(
+ new SwipeItemCollection
+ {
new SwipeItem()
{
BackgroundColor = Red
@@ -101,224 +100,217 @@ public override void Build()
BindingContext.DeleteId = ((OperationItemsVM)e.Item).Id;
BindingContext.IsDeletePopupShow = true;
})
- )
- .ItemView(
- new DXStackLayout()
- .Children_ContentProp(
- new Grid()
- .RowDefinitions(e => e.Star().Star())
- .ColumnDefinitions(e => e.Star(1).Star(6).Star(3))
- .Spacing(5)
- .Margin(5)
- .Children(
- new DXImage()
- .Source(e => e.Path("Icon"))
- .SizeRequest(30, 30)
- .RowSpan(2),
+ }
+ )
+ .ItemView(
+ new DXStackLayout()
+ .Children(
+ new Grid()
+ .RowDefinitions(e => e.Star().Star())
+ .ColumnDefinitions(e => e.Star(1).Star(6).Star(3))
+ .Spacing(5)
+ .Margin(5)
+ .Children(
+ new DXImage()
+ .Source(e => e.Path("Icon"))
+ .SizeRequest(30, 30)
+ .RowSpan(2),
- new Label()
- .FontAttributes(Bold)
- .TextColor(Black)
- .Text(e => e.Path("Title"))
- .AlignBottom()
- .Column(1),
+ new Label()
+ .FontAttributes(Bold)
+ .TextColor(Black)
+ .Text(e => e.Path("Title"))
+ .AlignBottom()
+ .Column(1),
- new Label()
- .TextColor(DarkGray)
- .Text(e => e.Path("Description"))
- .FontSize(12)
- .FontAttributes(Italic)
- .AlignTop()
- .Column(1)
- .Row(1),
+ new Label()
+ .TextColor(DarkGray)
+ .Text(e => e.Path("Description"))
+ .FontSize(12)
+ .FontAttributes(Italic)
+ .AlignTop()
+ .Column(1)
+ .Row(1),
- new Label()
- .Text(e => e.Path("Date"))
- .TextColor(DarkGray)
- .FontSize(10)
- .Column(2)
- .AlignBottomEnd(),
+ new Label()
+ .Text(e => e.Path("Date"))
+ .TextColor(DarkGray)
+ .FontSize(10)
+ .Column(2)
+ .AlignBottomRight(),
- new Label()
- .Text(e => e.Path("Amount"))
- .TextColor(e => e.Path("Color"))
- .FontSize(12)
- .Column(2)
- .Row(1)
- .AlignTopEnd()
- ),
+ new Label()
+ .Text(e => e.Path("Amount"))
+ .TextColor(e => e.Path("Color"))
+ .FontSize(12)
+ .Column(2)
+ .Row(1)
+ .AlignTopRight()
+ ),
- new BoxView()
- .Color(LightGray)
- .HeightRequest(1)
- )
+ new BoxView()
+ .Color(LightGray)
+ .HeightRequest(1)
)
- );
- }),
+ )
+ )
+ ),
- new DXPopup()
- .IsOpen(e => e.Path("IsShowPopup"))
- .RowSpan(2)
- .AnimationDuration(new TimeSpan(0, 0, 0, 1))
- .VerticalAlignment(PopupVerticalAlignment.Center)
- .HorizontalAlignment(PopupHorizontalAlignment.Center)
- .AllowShadow(true)
- .AllowScrim(false)
- .ShadowHorizontalOffset(20)
- .ShadowVerticalOffset(20)
- .CornerRadius(20)
- .ShadowRadius(20)
- .ShadowColor(Gray)
- .Content(() =>
- {
- return new Grid()
- .WidthRequest(250)
- .HeightRequest(200)
- .Padding(15)
- .Margin(10)
- .RowDefinitions(e => e.Absolute(50).Absolute(50).Absolute(50))
- .RowSpacing(10)
- .Children(() =>{
- return [
- new ComboBoxEdit()
- .SelectedIndex(e => e.Path("OperationType"))
- .ItemsSource(new List
- {
- "Tümü",
- "Gelir",
- "Gider"
- }),
+ new DXPopup()
+ .IsOpen(e => e.Path("IsShowPopup"))
+ .RowSpan(2)
+ .AnimationDuration(new TimeSpan(0, 0, 0, 1))
+ .VerticalAlignment(PopupVerticalAlignment.Center)
+ .HorizontalAlignment(PopupHorizontalAlignment.Center)
+ .AllowShadow(true)
+ .AllowScrim(false)
+ .ShadowHorizontalOffset(20)
+ .ShadowVerticalOffset(20)
+ .CornerRadius(20)
+ .ShadowRadius(20)
+ .ShadowColor(Gray)
+ .Content(
+ new Grid()
+ .WidthRequest(250)
+ .HeightRequest(200)
+ .Padding(15)
+ .Margin(10)
+ .RowDefinitions(e => e.Absolute(50).Absolute(50).Absolute(50))
+ .RowSpacing(10)
+ .Children(
+ new ComboBoxEdit()
+ .SelectedIndex(e => e.Path("OperationType"))
+ .ItemsSource(new List
+ {
+ "Tümü",
+ "Gelir",
+ "Gider"
+ }),
- new ComboBoxEdit()
- .SelectedIndex(e => e.Path("DateType"))
- .Row(1)
- .ItemsSource(new List
- {
- "Son 1 Haftalık Veri",
- "Son 1 Aylık Veri",
- "Son 6 Aylık Veri",
- "Son 1 Yıllık Veri"
- }),
+ new ComboBoxEdit()
+ .SelectedIndex(e => e.Path("DateType"))
+ .Row(1)
+ .ItemsSource(new List
+ {
+ "Son 1 Haftalık Veri",
+ "Son 1 Aylık Veri",
+ "Son 6 Aylık Veri",
+ "Son 1 Yıllık Veri"
+ }),
- new Button()
- .Text("Filtrele")
- .FontAttributes(Bold)
- .Command(e => e.Path("ApplyFilterCommand"))
- .Row(2)
- ];
- });
- }),
+ new Button()
+ .Text("Filtrele")
+ .FontAttributes(Bold)
+ .Command(e => e.Path("ApplyFilterCommand"))
+ .Row(2)
+ )
+ ),
- new DXPopup()
- .IsOpen(e => e.Path("IsDeletePopupShow"))
- .RowSpan(2)
- .AnimationDuration(new TimeSpan(0, 0, 0, 1))
- .VerticalAlignment(PopupVerticalAlignment.Center)
- .HorizontalAlignment(PopupHorizontalAlignment.Center)
- .AllowShadow(true)
- .AllowScrim(false)
- .ShadowHorizontalOffset(20)
- .ShadowVerticalOffset(20)
- .CornerRadius(20)
- .ShadowRadius(20)
- .ShadowColor(Gray)
- .Content(() =>
- {
- return new Grid()
- .WidthRequest(250)
- .HeightRequest(130)
- .Padding(15)
- .Margin(10)
- .RowDefinitions(e => e.Absolute(50).Absolute(50))
- .RowSpacing(5)
- .Children(() => {
- return [
- new Label().Text("Silmek istediğinizden emin misiniz?"),
+ new DXPopup()
+ .IsOpen(e => e.Path("IsDeletePopupShow"))
+ .RowSpan(2)
+ .AnimationDuration(new TimeSpan(0, 0, 0, 1))
+ .VerticalAlignment(PopupVerticalAlignment.Center)
+ .HorizontalAlignment(PopupHorizontalAlignment.Center)
+ .AllowShadow(true)
+ .AllowScrim(false)
+ .ShadowHorizontalOffset(20)
+ .ShadowVerticalOffset(20)
+ .CornerRadius(20)
+ .ShadowRadius(20)
+ .ShadowColor(Gray)
+ .Content(
+ new Grid()
+ .WidthRequest(250)
+ .HeightRequest(130)
+ .Padding(15)
+ .Margin(10)
+ .RowDefinitions(e => e.Absolute(50).Absolute(50))
+ .RowSpacing(5)
+ .Children(
+ new Label().Text("Silmek istediğinizden emin misiniz?"),
- new HorizontalStackLayout()
- .Spacing(10)
- .Row(1)
- .AlignBottomEnd()
- .Children(
- new Button()
- .Text("Hayır")
- .FontAttributes(Bold)
- .BackgroundColor(DeepSkyBlue)
- .Command(e => e.Path("CancelCommand")),
+ new HorizontalStackLayout()
+ .Spacing(10)
+ .Row(1)
+ .AlignBottomRight()
+ .Children(
+ new Button()
+ .Text("Hayır")
+ .FontAttributes(Bold)
+ .BackgroundColor(DeepSkyBlue)
+ .Command(e => e.Path("CancelCommand")),
- new Button()
- .Text("Evet")
- .FontAttributes(Bold)
- .BackgroundColor(Red)
- .Command(e => e.Path("YesCommand"))
- .Row(2)
- )
- ];
- });
- }),
+ new Button()
+ .Text("Evet")
+ .FontAttributes(Bold)
+ .BackgroundColor(Red)
+ .Command(e => e.Path("YesCommand"))
+ .Row(2)
+ )
+ )
+ ),
- new DXPopup()
- .IsOpen(e => e.Path("IsInfoPopupShow"))
- .AllowScrim(false)
- .AnimationDuration(new TimeSpan(0, 0, 0, 1))
- .VerticalAlignment(PopupVerticalAlignment.Center)
- .HorizontalAlignment(PopupHorizontalAlignment.Center)
- .BackgroundColor(e => e.Path("InfoPopupColor"))
- .RowSpan(3)
- .Content(() =>
- {
- return new Grid()
- .WidthRequest(250)
- .HeightRequest(150)
+ new DXPopup()
+ .IsOpen(e => e.Path("IsInfoPopupShow"))
+ .AllowScrim(false)
+ .AnimationDuration(new TimeSpan(0, 0, 0, 1))
+ .VerticalAlignment(PopupVerticalAlignment.Center)
+ .HorizontalAlignment(PopupHorizontalAlignment.Center)
+ .BackgroundColor(e => e.Path("InfoPopupColor"))
+ .RowSpan(3)
+ .Content(
+ new Grid()
+ .WidthRequest(250)
+ .HeightRequest(150)
+ .Padding(0)
+ .Children(
+ new Frame()
+ .CornerRadius(25)
+ .BackgroundColor(e => e.Path("InfoPopupColor"))
+ .BorderColor(e => e.Path("InfoPopupColor"))
+ .FillBothDirections()
.Padding(0)
- .Children(
- new Frame()
- .CornerRadius(25)
- .BackgroundColor(e => e.Path("InfoPopupColor"))
- .BorderColor(e => e.Path("InfoPopupColor"))
+ .Content(
+ new Grid()
+ .RowDefinitions(e => e.Star(2).Star(7).Star(1))
.FillBothDirections()
- .Padding(0)
- .Content(
- new Grid()
- .RowDefinitions(e => e.Star(2).Star(7).Star(1))
- .FillBothDirections()
- .Margin(10)
- .Padding(10)
- .Children(
- new Label()
- .Text(e => e.Path("InfoPopupTitle"))
- .FontAttributes(Bold)
- .FontSize(18)
- .TextColor(Black)
- .Center()
- .Row(0),
+ .Margin(10)
+ .Padding(10)
+ .Children(
+ new Label()
+ .Text(e => e.Path("InfoPopupTitle"))
+ .FontAttributes(Bold)
+ .FontSize(18)
+ .TextColor(Black)
+ .Center()
+ .Row(0),
- new Label()
- .Text(e => e.Path("InfoPopupDesc"))
- .FontAttributes(Italic)
- .LineBreakMode(WordWrap)
- .FontSize(12)
- .TextColor(Black)
- .Center()
- .Row(1),
+ new Label()
+ .Text(e => e.Path("InfoPopupDesc"))
+ .FontAttributes(Italic)
+ .LineBreakMode(WordWrap)
+ .FontSize(12)
+ .TextColor(Black)
+ .Center()
+ .Row(1),
- new Button()
- .Text("OK")
- .TextColor(Black)
- .FontAttributes(Bold)
- .FontSize(15)
- .Row(2)
- .HeightRequest(30)
- .BackgroundColor(DeepSkyBlue)
- .CenterHorizontal()
- .Padding(0)
- .Command(e => e.Path("ClosePopupCommand"))
- )
+ new Button()
+ .Text("OK")
+ .TextColor(Black)
+ .FontAttributes(Bold)
+ .FontSize(15)
+ .Row(2)
+ .HeightRequest(30)
+ .BackgroundColor(DeepSkyBlue)
+ .CenterHorizontal()
+ .Padding(0)
+ .Command(e => e.Path("ClosePopupCommand"))
)
- );
- })
- ];
- })
+ )
+ )
+ )
+ )
);
}
diff --git a/sample/MyFinance/Views/LoginPage.cs b/sample/MyFinance/Views/LoginPage.cs
index 1b94d89..e0ec1d1 100644
--- a/sample/MyFinance/Views/LoginPage.cs
+++ b/sample/MyFinance/Views/LoginPage.cs
@@ -72,7 +72,7 @@ public override void Build()
.Children(
new CheckEdit()
.Label("Remember for 30 days")
- .AlignStart()
+ .AlignLeft()
.IsChecked(e => e.Path("Login.IsRememberMe")),
new Label()
@@ -81,7 +81,7 @@ public override void Build()
.TextDecorations(Underline)
.TextCenterVertical()
.Column(1)
- .AlignEnd()
+ .AlignRight()
)
),
diff --git a/sample/MyFinance/Views/MainPage.cs b/sample/MyFinance/Views/MainPage.cs
index a9c8efc..dd4b887 100644
--- a/sample/MyFinance/Views/MainPage.cs
+++ b/sample/MyFinance/Views/MainPage.cs
@@ -7,20 +7,19 @@ public partial class MainPage(MainPageViewModel viewModel) : FmgLibContentPage
- {
- return new Grid()
+ .Content(
+ new Grid()
.RowDefinitions(e => e.Star(.8).Star(1.2).Star(1.2).Star(6.8))
.Spacing(15)
- .Margin(20, 20, 20, 10)
+ .Margin(20,20,20,10)
.Children(
new HorizontalStackLayout()
- .AlignStart()
+ .AlignLeft()
.Spacing(5)
.Children(
new DXImage()
.Source("profile.png")
- .SizeRequest(60, 60),
+ .SizeRequest(60,60),
new VerticalStackLayout()
.CenterVertical()
@@ -48,7 +47,7 @@ public override void Build()
new Grid()
.RowDefinitions(e => e.Star().Star())
.ColumnDefinitions(e => e.Star(7).Star(3))
- .Spacing(10, 3)
+ .Spacing(10,3)
.Children(
new Label()
.Text(e => e.Path("TotalBalance"))
@@ -61,7 +60,7 @@ public override void Build()
.TextColor(Green)
.FontSize(12)
.Column(1)
- .AlignBottomEnd(),
+ .AlignBottomRight(),
new Label()
.Text(e => e.Path("TotalExpense"))
@@ -69,7 +68,7 @@ public override void Build()
.FontSize(12)
.Column(1)
.Row(1)
- .AlignTopEnd()
+ .AlignTopRight()
)
),
@@ -123,7 +122,7 @@ public override void Build()
.FontAttributes(Bold)
.TextColor(Black)
.Text("Son 10 İşlem ")
- .AlignEnd(),
+ .AlignRight(),
new Border()
.StrokeThickness(1)
@@ -141,7 +140,7 @@ public override void Build()
.Children(
new DXImage()
.Source(e => e.Path("Icon"))
- .SizeRequest(30, 30)
+ .SizeRequest(30,30)
.RowSpan(2),
new Label()
@@ -165,7 +164,7 @@ public override void Build()
.TextColor(DarkGray)
.FontSize(10)
.Column(2)
- .AlignBottomEnd(),
+ .AlignBottomRight(),
new Label()
.Text(e => e.Path("Amount"))
@@ -173,12 +172,12 @@ public override void Build()
.FontSize(12)
.Column(2)
.Row(1)
- .AlignTopEnd()
+ .AlignTopRight()
)
)
)
)
- );
- });
+ )
+ );
}
-}
\ No newline at end of file
+}
diff --git a/sample/MyOrderApp/Imports.cs b/sample/MyOrderApp/Imports.cs
index a241873..7fe9e72 100644
--- a/sample/MyOrderApp/Imports.cs
+++ b/sample/MyOrderApp/Imports.cs
@@ -16,6 +16,5 @@
global using MyOrderApp.Converters;
global using MyOrderApp.Extensions;
// Static
-global using static CommunityToolkit.Maui.Markup.GridRowsColumns;
global using static Microsoft.Maui.Graphics.Colors;
global using MC = Microsoft.Maui.Controls;
diff --git a/sample/MyOrderApp/MyOrderApp.csproj b/sample/MyOrderApp/MyOrderApp.csproj
index 93ecb73..c99536b 100644
--- a/sample/MyOrderApp/MyOrderApp.csproj
+++ b/sample/MyOrderApp/MyOrderApp.csproj
@@ -78,7 +78,6 @@
-
diff --git a/sample/MyOrderApp/Views/BasketPage.cs b/sample/MyOrderApp/Views/BasketPage.cs
index 7e87325..69af552 100644
--- a/sample/MyOrderApp/Views/BasketPage.cs
+++ b/sample/MyOrderApp/Views/BasketPage.cs
@@ -72,14 +72,14 @@ public override void Build()
//.Bind(Label.TextProperty, "Product.Name")
.FontSize(11)
.FontAttributes(FontAttributes.Italic)
- .AlignStart()
+ .AlignTopLeft()
.LineBreakMode(LineBreakMode.TailTruncation),
new Frame()
.BorderColor(Colors.DarkGray)
.HeightRequest(50)
.WidthRequest(120)
- .AlignStart()
+ .AlignTopLeft()
.Padding(0)
.Content(
new HorizontalStackLayout()
@@ -128,7 +128,7 @@ public override void Build()
new VerticalStackLayout()
.Spacing(20)
.Column(2)
- .AlignEnd()
+ .AlignBottomRight()
.Children(
new Image()
.Source("remove.png")
@@ -178,7 +178,7 @@ public override void Build()
//.Bind(Label.TextProperty, nameof(BindingContext.TotalProductPrice))
.Column(1)
.Row(0)
- .AlignEnd(),
+ .AlignBottomRight(),
new Label()
.Text("KDV")
@@ -190,7 +190,7 @@ public override void Build()
//.Bind(Label.TextProperty, nameof(BindingContext.TotalKdv))
.Column(1)
.Row(1)
- .AlignEnd(),
+ .AlignBottomRight(),
new Label()
.Text("TOPLAM")
@@ -206,7 +206,7 @@ public override void Build()
.FontSize(16)
.Column(1)
.Row(2)
- .AlignEnd(),
+ .AlignBottomRight(),
new Button()
.Text("SİPARİŞ ET")
diff --git a/sample/MyOrderApp/Views/CategoriesPage.cs b/sample/MyOrderApp/Views/CategoriesPage.cs
index 6ee1218..5fca6b1 100644
--- a/sample/MyOrderApp/Views/CategoriesPage.cs
+++ b/sample/MyOrderApp/Views/CategoriesPage.cs
@@ -61,7 +61,7 @@ public override void Build()
.Source("chevron.png")
.SizeRequest(25,25)
.Column(1)
- .AlignEnd()
+ .AlignBottomRight()
.Assign(out var image)
.Triggers(
new MultiTrigger(typeof(Image))
diff --git a/sample/MyOrderApp/Views/FavoritesPage.cs b/sample/MyOrderApp/Views/FavoritesPage.cs
index 2fd25c8..e4a0f02 100644
--- a/sample/MyOrderApp/Views/FavoritesPage.cs
+++ b/sample/MyOrderApp/Views/FavoritesPage.cs
@@ -72,7 +72,7 @@ public override void Build()
.Source(e => e.Path(nameof(ProductVM.IsFavorite)).Converter(new BoolToFavoriteImageConverter()))
//.Bind(ImageButton.SourceProperty, nameof(ProductVM.IsFavorite), converter: new BoolToFavoriteImageConverter())
.BackgroundColor(Colors.Transparent)
- .AlignStart()
+ .AlignTopLeft()
.SizeRequest(30, 30)
.Command(BindingContext.ChangeFavoriteCommand)
//.Bind(ImageButton.CommandParameterProperty, ".")
@@ -115,7 +115,7 @@ public override void Build()
//.Bind(Label.TextProperty, nameof(ProductVM.Name))
.FontAttributes(FontAttributes.Bold)
.FontSize(11)
- .AlignStart()
+ .AlignTopLeft()
.LineBreakMode(LineBreakMode.TailTruncation)
.FontAutoScalingEnabled(true),
diff --git a/sample/MyOrderApp/Views/HomePage.cs b/sample/MyOrderApp/Views/HomePage.cs
index 307f8b9..ede7327 100644
--- a/sample/MyOrderApp/Views/HomePage.cs
+++ b/sample/MyOrderApp/Views/HomePage.cs
@@ -82,7 +82,7 @@ public override void Build()
.FontSize(18)
.CenterVertical()
.Column(0)
- .AlignStart(),
+ .AlignTopLeft(),
new Label()
@@ -90,7 +90,7 @@ public override void Build()
.FontSize(15)
.CenterVertical()
.Column(1)
- .AlignEnd()
+ .AlignBottomRight()
.TextDecorations(TextDecorations.Underline)
.GestureRecognizers(
new TapGestureRecognizer()
@@ -135,7 +135,7 @@ public override void Build()
.Source(e => e.Path(nameof(ProductVM.IsFavorite)).Converter(new BoolToFavoriteImageConverter()))
//.Bind(ImageButton.SourceProperty, nameof(ProductVM.IsFavorite), converter: new BoolToFavoriteImageConverter())
.BackgroundColor(Colors.Transparent)
- .AlignStart()
+ .AlignTopLeft()
.SizeRequest(30, 30)
.Command(BindingContext.ChangeFavoriteCommand)
//.Bind(ImageButton.CommandParameterProperty, ".")
@@ -177,7 +177,7 @@ public override void Build()
//.Bind(Label.TextProperty, nameof(ProductVM.Name))
.FontAttributes(FontAttributes.Bold)
.FontSize(11)
- .AlignStart()
+ .AlignTopLeft()
.LineBreakMode(LineBreakMode.TailTruncation)
.FontAutoScalingEnabled(true),
@@ -247,7 +247,7 @@ public override void Build()
.FontSize(18)
.CenterVertical()
.Column(0)
- .AlignStart(),
+ .AlignTopLeft(),
new Label()
@@ -255,7 +255,7 @@ public override void Build()
.FontSize(15)
.CenterVertical()
.Column(1)
- .AlignEnd()
+ .AlignBottomRight()
.TextDecorations(TextDecorations.Underline)
.GestureRecognizers(
new TapGestureRecognizer()
@@ -264,15 +264,15 @@ public override void Build()
),
new FlexLayout()
- .ItemsSources(BindingContext.Categories)
+ .BindableLayoutItemsSource(BindingContext.Categories)
.Assign(out var flex)
.Wrap(FlexWrap.Wrap)
.FlexBasis(FlexBasis.Auto)
- .ItemTemplates(new DataTemplate(() =>
+ .BindableLayoutItemTemplate(new DataTemplate(() =>
new Frame()
.CornerRadius(15)
- .BorderColor(Colors.LightGray)
- .BackgroundColor(Colors.LightGray)
+ .BorderColor(LightGray)
+ .BackgroundColor(LightGray)
.MinimumHeightRequest(30)
.WidthRequest(180)
.Padding(0)
diff --git a/sample/MyOrderApp/Views/ProductsPage.cs b/sample/MyOrderApp/Views/ProductsPage.cs
index 565c873..3cda3fc 100644
--- a/sample/MyOrderApp/Views/ProductsPage.cs
+++ b/sample/MyOrderApp/Views/ProductsPage.cs
@@ -72,7 +72,7 @@ public override void Build()
new ImageButton()
.Source(e => e.Path(nameof(ProductVM.IsFavorite)).Converter(new BoolToFavoriteImageConverter()))
.BackgroundColor(Colors.Transparent)
- .AlignStart()
+ .AlignTopLeft()
.SizeRequest(30, 30)
.Command(BindingContext.ChangeFavoriteCommand)
.CommandParameter(e => e.Path(".")),
@@ -110,7 +110,7 @@ public override void Build()
.Text(e => e.Path(nameof(ProductVM.Name)))
.FontAttributes(FontAttributes.Bold)
.FontSize(11)
- .AlignStart()
+ .AlignTopLeft()
.LineBreakMode(LineBreakMode.TailTruncation)
.FontAutoScalingEnabled(true),
diff --git a/src/FmgLib.MauiMarkup.Generator/Extensions/ExtensionGenerator.AnimateTo.cs b/src/FmgLib.MauiMarkup.Generator/Extensions/ExtensionGenerator.AnimateTo.cs
new file mode 100644
index 0000000..b895fa9
--- /dev/null
+++ b/src/FmgLib.MauiMarkup.Generator/Extensions/ExtensionGenerator.AnimateTo.cs
@@ -0,0 +1,26 @@
+namespace FmgLib.MauiMarkup.Generator.Extensions;
+
+public partial class ExtensionGenerator
+{
+ void GenerateExtensionMethod_AnimateTo(PropInfo info, string transformationName)
+ {
+
+ if (mainSymbol.IsSealed)
+ builder.Append($@"
+ public static Task Animate{info.propertyName}To(this {info.MainSymbolName} self, {info.propertyTypeName} value, uint length = 250, Easing? easing = null)");
+ else
+ builder.Append($@"
+ public static Task Animate{info.propertyName}To(this T self, {info.propertyTypeName} value, uint length = 250, Easing? easing = null)
+ where T : {info.MainSymbolName}");
+
+
+ builder.Append($@"
+ {{
+ {info.propertyTypeName} fromValue = self.{info.propertyName};
+ var transform = (double t) => Transformations.{transformationName}(fromValue, value, t);
+ var callback = ({info.propertyTypeName} actValue) => {{ self.{info.propertyName} = actValue; }};
+ return Transformations.AnimateAsync<{info.propertyTypeName}>(self, ""Animate{info.propertyName}To"", transform, callback, length, easing);
+ }}
+ ");
+ }
+}
\ No newline at end of file
diff --git a/src/FmgLib.MauiMarkup.Generator/Extensions/ExtensionGenerator.BindingBuilder.cs b/src/FmgLib.MauiMarkup.Generator/Extensions/ExtensionGenerator.BindingBuilder.cs
new file mode 100644
index 0000000..b7f1a38
--- /dev/null
+++ b/src/FmgLib.MauiMarkup.Generator/Extensions/ExtensionGenerator.BindingBuilder.cs
@@ -0,0 +1,71 @@
+namespace FmgLib.MauiMarkup.Generator.Extensions;
+
+public partial class ExtensionGenerator
+{
+ void GenerateExtensionMethod_BindablePropertyBuilder(PropInfo info)
+ {
+ if (mainSymbol.IsSealed)
+ GenerateExtensionMethod_BindablePropertyBuilder_Sealed(info);
+ else
+ GenerateExtensionMethod_BindablePropertyBuilder_Normal(info);
+ }
+
+ void GenerateExtensionMethod_BindablePropertyBuilder_Sealed(PropInfo info)
+ {
+ builder.Append($@"
+ public static {info.MainSymbolName} {info.propertyName}(this {info.MainSymbolName} self, Func, IPropertyBuilder<{info.propertyTypeName}>> configure)
+ {{
+ var context = new PropertyContext<{info.propertyTypeName}>(self, {info.BindablePropertyName});
+ configure(context).Build();
+ return self;
+ }}
+ ");
+ }
+
+ void GenerateExtensionMethod_BindablePropertyBuilder_Normal(PropInfo info)
+ {
+ builder.Append($@"
+ public static T {info.propertyName}(this T self, Func, IPropertyBuilder<{info.propertyTypeName}>> configure)
+ where T : {info.MainSymbolName}
+ {{
+ var context = new PropertyContext<{info.propertyTypeName}>(self, {info.BindablePropertyName});
+ configure(context).Build();
+ return self;
+ }}
+ ");
+ }
+
+
+ void GenerateExtensionMethod_BindablePropertyBuilder(AttachedFieldInfo info)
+ {
+ if (mainSymbol.IsSealed)
+ GenerateExtensionMethod_BindablePropertyBuilder_Sealed(info);
+ else
+ GenerateExtensionMethod_BindablePropertyBuilder_Normal(info);
+ }
+
+ void GenerateExtensionMethod_BindablePropertyBuilder_Sealed(AttachedFieldInfo info)
+ {
+ builder.Append($@"
+ public static {info.DeclaringTypeName} {info.propertyName}(this {info.DeclaringTypeName} self, Func, IPropertyBuilder<{info.ReturnTypeName}>> configure)
+ {{
+ var context = new PropertyContext<{info.propertyTypeName}>(self, {info.BindablePropertyName});
+ configure(context).Build();
+ return self;
+ }}
+ ");
+ }
+
+ void GenerateExtensionMethod_BindablePropertyBuilder_Normal(AttachedFieldInfo info)
+ {
+ builder.Append($@"
+ public static T {info.propertyName}(this T self, Func, IPropertyBuilder<{info.ReturnTypeName}>> configure)
+ where T : {info.DeclaringTypeName}
+ {{
+ var context = new PropertyContext<{info.ReturnTypeName}>(self, {info.BindablePropertyName});
+ configure(context).Build();
+ return self;
+ }}
+ ");
+ }
+}
\ No newline at end of file
diff --git a/src/FmgLib.MauiMarkup.Generator/Extensions/ExtensionGenerator.ContentProp.cs b/src/FmgLib.MauiMarkup.Generator/Extensions/ExtensionGenerator.ContentProp.cs
new file mode 100644
index 0000000..2e42bc8
--- /dev/null
+++ b/src/FmgLib.MauiMarkup.Generator/Extensions/ExtensionGenerator.ContentProp.cs
@@ -0,0 +1,131 @@
+namespace FmgLib.MauiMarkup.Generator.Extensions;
+
+public partial class ExtensionGenerator
+{
+ void GenerateExtensionMethod_ContentProp_Single(PropInfo info)
+ {
+ if (mainSymbol.IsSealed)
+ GenerateExtensionMethod_ContentProp_Single_Sealed(info);
+ else
+ GenerateExtensionMethod_ContentProp_Single_Normal(info);
+ }
+
+ void GenerateExtensionMethod_ContentProp_List(PropInfo info, string elementTypeName, string fluentMethodName = "")
+ {
+ if (mainSymbol.IsSealed)
+ GenerateExtensionMethod_ContentProp_List_Sealed(info, elementTypeName, fluentMethodName);
+ else
+ GenerateExtensionMethod_ContentProp_List_Normal(info, elementTypeName, fluentMethodName);
+ }
+
+
+
+ void GenerateExtensionMethod_ContentProp_Single_Sealed(PropInfo info)
+ {
+ builder.Append($@"
+ public static {info.MainSymbolName} {info.propertyName}_ContentProp(this {info.MainSymbolName} self,
+ {info.propertyTypeName} {info.camelCaseName})
+ {{
+ self.{info.propertyName} = {info.camelCaseName};
+ return self;
+ }}
+
+ public static {info.MainSymbolName} {info.propertyName}_ContentProp(this {info.MainSymbolName} self,
+ Func<{info.propertyTypeName}> configure)
+ {{
+ var {info.camelCaseName} = configure();
+ self.{info.propertyName} = {info.camelCaseName};
+ return self;
+ }}
+ ");
+ }
+
+ void GenerateExtensionMethod_ContentProp_Single_Normal(PropInfo info)
+ {
+ builder.Append($@"
+ public static T {info.propertyName}_ContentProp(this T self,
+ {info.propertyTypeName} {info.camelCaseName})
+ where T : {info.MainSymbolName}
+ {{
+ self.{info.propertyName} = {info.camelCaseName};
+ return self;
+ }}
+
+ public static T {info.propertyName}_ContentProp(this T self,
+ Func<{info.propertyTypeName}> configure)
+ where T : {info.MainSymbolName}
+ {{
+ var {info.camelCaseName} = configure();
+ self.{info.propertyName} = {info.camelCaseName};
+ return self;
+ }}
+ ");
+ }
+
+
+
+ void GenerateExtensionMethod_ContentProp_List_Sealed(PropInfo info, string elementTypeName, string fluentMethodName = "")
+ {
+ var tail = info.propertyTypeName.EndsWith("?") ? "?" : "";
+ builder.Append($@"
+ public static {info.MainSymbolName} {(string.IsNullOrEmpty(fluentMethodName) ? info.propertyName : fluentMethodName)}(this {info.MainSymbolName} self,
+ IList<{elementTypeName}> {info.camelCaseName})
+ {{
+ foreach (var item in {info.camelCaseName})
+ self.{info.propertyName}{tail}.Add(item);
+ return self;
+ }}
+
+ public static {info.MainSymbolName} {(string.IsNullOrEmpty(fluentMethodName) ? info.propertyName : fluentMethodName)}(this {info.MainSymbolName} self,
+ params {elementTypeName}[] {info.camelCaseName})
+ {{
+ foreach (var item in {info.camelCaseName})
+ self.{info.propertyName}{tail}.Add(item);
+ return self;
+ }}
+
+ public static {info.MainSymbolName} {(string.IsNullOrEmpty(fluentMethodName) ? info.propertyName : fluentMethodName)}(this {info.MainSymbolName} self,
+ Func<{elementTypeName}[]> configure)
+ {{
+ var {info.camelCaseName} = configure();
+ foreach (var item in {info.camelCaseName})
+ self.{info.propertyName}{tail}.Add(item);
+ return self;
+ }}
+ ");
+ }
+
+ void GenerateExtensionMethod_ContentProp_List_Normal(PropInfo info, string elementTypeName, string fluentMethodName = "")
+ {
+ var tail = info.propertyTypeName.EndsWith("?") ? "?" : "";
+ builder.Append($@"
+ public static T {(string.IsNullOrEmpty(fluentMethodName) ? info.propertyName : fluentMethodName)}(this T self,
+ IList<{elementTypeName}> {info.camelCaseName})
+ where T : {info.MainSymbolName}
+ {{
+ foreach (var item in {info.camelCaseName})
+ self.{info.propertyName}{tail}.Add(item);
+ return self;
+ }}
+
+ public static T {(string.IsNullOrEmpty(fluentMethodName) ? info.propertyName : fluentMethodName)}(this T self,
+ params {elementTypeName}[] {info.camelCaseName})
+ where T : {info.MainSymbolName}
+ {{
+ foreach (var item in {info.camelCaseName})
+ self.{info.propertyName}{tail}.Add(item);
+ return self;
+ }}
+
+ public static T {(string.IsNullOrEmpty(fluentMethodName) ? info.propertyName : fluentMethodName)}(this T self,
+ Func<{elementTypeName}[]> configure)
+ where T : {info.MainSymbolName}
+ {{
+ var {info.camelCaseName} = configure();
+ foreach (var item in {info.camelCaseName})
+ self.{info.propertyName}{tail}.Add(item);
+ return self;
+ }}
+ ");
+ }
+}
diff --git a/src/FmgLib.MauiMarkup.Generator/Extensions/ExtensionGenerator.DataTemplate.cs b/src/FmgLib.MauiMarkup.Generator/Extensions/ExtensionGenerator.DataTemplate.cs
new file mode 100644
index 0000000..b1107ed
--- /dev/null
+++ b/src/FmgLib.MauiMarkup.Generator/Extensions/ExtensionGenerator.DataTemplate.cs
@@ -0,0 +1,35 @@
+namespace FmgLib.MauiMarkup.Generator.Extensions;
+
+public partial class ExtensionGenerator
+{
+ void GenerateExtensionMethod_DataTemplate(PropInfo info)
+ {
+ if (mainSymbol.IsSealed)
+ GenerateExtensionMethod_DataTemplate_Sealed(info);
+ else
+ GenerateExtensionMethod_DataTemplate_Normal(info);
+ }
+
+ void GenerateExtensionMethod_DataTemplate_Sealed(PropInfo info)
+ {
+ builder.Append($@"
+ public static {info.MainSymbolName} {info.propertyName}(this {info.MainSymbolName} self, System.Func