diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 6f6f91ad..bdf101ee 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -15,7 +15,7 @@ jobs: env: Solution_Name: ./src/MauiReactor.Build.sln TemplatePack_Name: ./src/MauiReactor.TemplatePack/MauiReactor.TemplatePack.csproj - Version: 2.0.12-beta + Version: 2.0.13-beta steps: - name: Checkout diff --git a/src/MauiReactor.Canvas/DropShadow.cs b/src/MauiReactor.Canvas/DropShadow.cs index 761bd5f0..e59683bb 100644 --- a/src/MauiReactor.Canvas/DropShadow.cs +++ b/src/MauiReactor.Canvas/DropShadow.cs @@ -16,71 +16,6 @@ namespace MauiReactor.Canvas; public partial class DropShadow { } -//public partial interface IDropShadow : ICanvasNode -//{ -// PropertyValue? Color { get; set; } -// PropertyValue? Size { get; set; } -// PropertyValue? Blur { get; set; } -//} - -//public partial class DropShadow : CanvasNode, IDropShadow where T : Internals.DropShadow, new() -//{ - -// public DropShadow() -// { - -// } - -// public DropShadow(Action componentRefAction) -// : base(componentRefAction) -// { - -// } - -// PropertyValue? IDropShadow.Color { get; set; } -// PropertyValue? IDropShadow.Size { get; set; } -// PropertyValue? IDropShadow.Blur { get; set; } - - -// protected override void OnUpdate() -// { -// Validate.EnsureNotNull(NativeControl); -// var thisAsIBorder = (IDropShadow)this; - -// SetPropertyValue(NativeControl, Internals.DropShadow.ColorProperty, thisAsIBorder.Color); -// SetPropertyValue(NativeControl, Internals.DropShadow.SizeProperty, thisAsIBorder.Size); -// SetPropertyValue(NativeControl, Internals.DropShadow.BlurProperty, thisAsIBorder.Blur); - -// base.OnUpdate(); -// } - -// protected override void OnAnimate() -// { -// Validate.EnsureNotNull(NativeControl); -// var thisAsIBorder = (IDropShadow)this; - -// SetPropertyValue(NativeControl, Internals.DropShadow.ColorProperty, thisAsIBorder.Color); -// SetPropertyValue(NativeControl, Internals.DropShadow.SizeProperty, thisAsIBorder.Size); -// SetPropertyValue(NativeControl, Internals.DropShadow.BlurProperty, thisAsIBorder.Blur); - -// base.OnAnimate(); -// } -//} - -//public partial class DropShadow : DropShadow -//{ -// public DropShadow() -// { - -// } - -// public DropShadow(Action componentRefAction) -// : base(componentRefAction) -// { - -// } -//} - public static partial class DropShadowExtensions { public static T Size(this T node, float x, float y, RxSizeFAnimation? customAnimation = null) where T : IDropShadow diff --git a/src/MauiReactor.Scaffold/TypeGenerator.cs b/src/MauiReactor.Scaffold/TypeGenerator.cs index 0aee9e3f..4a08e051 100644 --- a/src/MauiReactor.Scaffold/TypeGenerator.cs +++ b/src/MauiReactor.Scaffold/TypeGenerator.cs @@ -99,14 +99,7 @@ public virtual string TransformText() #line default #line hidden - this.Write("\n PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">? "); + this.Write("\n object? "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name)); @@ -438,14 +431,7 @@ public virtual string TransformText() #line default #line hidden - this.Write("\n PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">? "); + this.Write("\n object? "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(InterfaceName())); @@ -1129,21 +1115,14 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\n "); + this.Write(";\n "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName().ToLocalVariableName())); @@ -1255,21 +1234,14 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\n "); + this.Write(";\n "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName().ToLocalVariableName())); @@ -1381,21 +1353,14 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\n "); + this.Write(";\n "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName().ToLocalVariableName())); @@ -1507,21 +1472,14 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\n "); + this.Write(";\n "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName().ToLocalVariableName())); @@ -1633,21 +1591,14 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\n "); + this.Write(";\n "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName().ToLocalVariableName())); @@ -1759,21 +1710,14 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\n return "); + this.Write(";\n return "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName().ToLocalVariableName())); @@ -1900,14 +1844,7 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new Thickness(leftRight, topBottom));\n "); + this.Write(" = new Thickness(leftRight, topBottom);\n "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName().ToLocalVariableName())); @@ -1992,14 +1929,7 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new Thickness(uniformSize));\n "); + this.Write(" = new Thickness(uniformSize);\n "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName().ToLocalVariableName())); @@ -2085,14 +2015,7 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new Thickness(left, top, right, bottom));\n "); + this.Write(" = new Thickness(left, top, right, bottom);\n "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName().ToLocalVariableName())); @@ -2191,14 +2114,7 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new Microsoft.Maui.Graphics.Point(x, y));\n return "); + this.Write(" = new Microsoft.Maui.Graphics.Point(x, y);\n return "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName().ToLocalVariableName())); @@ -2255,14 +2171,7 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new CornerRadius(uniformRadius));\n "); + this.Write(" = new CornerRadius(uniformRadius);\n "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName().ToLocalVariableName())); @@ -2348,14 +2257,7 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new CornerRadius(topLeft, topRight, bottomLeft, bottomRight));\n "); + this.Write(" = new CornerRadius(topLeft, topRight, bottomLeft, bottomRight);\n "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName().ToLocalVariableName())); @@ -2455,14 +2357,7 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(Microsoft.Maui.Controls.ImageSource.FromFile(file));\n return "); + this.Write(" = Microsoft.Maui.Controls.ImageSource.FromFile(file);\n return "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName().ToLocalVariableName())); @@ -2554,14 +2449,7 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly))" + + this.Write(" = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)" + ";\n return "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" @@ -2604,14 +2492,7 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri));\n return "); + this.Write(" = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri);\n return "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName().ToLocalVariableName())); @@ -2653,15 +2534,8 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new UriImageSource\n {\n Uri = imageUri,\n CachingEna" + - "bled = cachingEnabled,\n CacheValidity = cacheValidity\n });\n " + + this.Write(" = new UriImageSource\n {\n Uri = imageUri,\n CachingEn" + + "abled = cachingEnabled,\n CacheValidity = cacheValidity\n };\n " + " return "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" @@ -2704,14 +2578,7 @@ public virtual string TransformText() #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.FullName.ToResevedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream));\n return "); + this.Write(" = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream);\n return "); #line 1 "C:\Source\github\reactorui-maui\src\MauiReactor.Scaffold\TypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName().ToLocalVariableName())); diff --git a/src/MauiReactor.Scaffold/TypeGenerator.tt b/src/MauiReactor.Scaffold/TypeGenerator.tt index 32d7b850..0031caee 100644 --- a/src/MauiReactor.Scaffold/TypeGenerator.tt +++ b/src/MauiReactor.Scaffold/TypeGenerator.tt @@ -25,7 +25,7 @@ public partial interface <#= InterfaceName() #> : <#= BaseInterfaceName() #> <# } #> { <# foreach (var property in Properties) { #> - PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>? <#= property.Name #> { get; set; } + object? <#= property.Name #> { get; set; } <# } #> <# foreach (var ev in Events) { @@ -105,7 +105,7 @@ public abstract partial class <#= TypeName() #> : <#= BaseTypeName() #>, < <# } #> <# foreach (var property in Properties) { #> - PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>? <#= InterfaceName() #>.<#= property.Name #> { get; set; } + object? <#= InterfaceName() #>.<#= property.Name #> { get; set; } <# } #> <# foreach (var ev in Events) { @@ -252,42 +252,42 @@ public static partial class <#= TypeName() #>Extensions <# if (property.PropertyType == typeof(double)) { #> public static T <#= property.Name #>(this T <#= TypeName().ToLocalVariableName() #>, <#= property.PropertyType.FullName.ToResevedWordFullTypeName() #> <#= property.Name.CamelCase() #>, RxDoubleAnimation? customAnimation = null) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; <#= TypeName().ToLocalVariableName() #>.AppendAnimatable(<#= FullTypeName() #>.<#= property.Name #>Property, customAnimation ?? new RxDoubleAnimation(<#= property.Name.CamelCase() #>), v => <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName().ToLocalVariableName() #>; } <# } else if (property.PropertyType == typeof(Rect)) { #> public static T <#= property.Name #>(this T <#= TypeName().ToLocalVariableName() #>, <#= property.PropertyType.FullName.ToResevedWordFullTypeName() #> <#= property.Name.CamelCase() #>, RxRectAnimation? customAnimation = null) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; <#= TypeName().ToLocalVariableName() #>.AppendAnimatable(<#= FullTypeName() #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleRectAnimation(<#= property.Name.CamelCase() #>), v => <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName().ToLocalVariableName() #>; } <# } else if (property.PropertyType == typeof(Point)) { #> public static T <#= property.Name #>(this T <#= TypeName().ToLocalVariableName() #>, <#= property.PropertyType.FullName.ToResevedWordFullTypeName() #> <#= property.Name.CamelCase() #>, RxPointAnimation? customAnimation = null) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; <#= TypeName().ToLocalVariableName() #>.AppendAnimatable(<#= FullTypeName() #>.<#= property.Name #>Property, customAnimation ?? new RxSimplePointAnimation(<#= property.Name.CamelCase() #>), v => <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName().ToLocalVariableName() #>; } <# } else if (property.PropertyType == typeof(Thickness)) { #> public static T <#= property.Name #>(this T <#= TypeName().ToLocalVariableName() #>, <#= property.PropertyType.FullName.ToResevedWordFullTypeName() #> <#= property.Name.CamelCase() #>, RxThicknessAnimation? customAnimation = null) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; <#= TypeName().ToLocalVariableName() #>.AppendAnimatable(<#= FullTypeName() #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleThicknessAnimation(<#= property.Name.CamelCase() #>), v => <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName().ToLocalVariableName() #>; } <# } else if (property.PropertyType == typeof(CornerRadius)) { #> public static T <#= property.Name #>(this T <#= TypeName().ToLocalVariableName() #>, <#= property.PropertyType.FullName.ToResevedWordFullTypeName() #> <#= property.Name.CamelCase() #>, RxCornerRadiusAnimation? customAnimation = null) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; <#= TypeName().ToLocalVariableName() #>.AppendAnimatable(<#= FullTypeName() #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleCornerRadiusAnimation(<#= property.Name.CamelCase() #>), v => <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName().ToLocalVariableName() #>; } <# } else { #> public static T <#= property.Name #>(this T <#= TypeName().ToLocalVariableName() #>, <#= property.PropertyType.FullName.ToResevedWordFullTypeName() #> <#= property.Name.CamelCase() #>) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; return <#= TypeName().ToLocalVariableName() #>; } <# } #> @@ -300,19 +300,19 @@ public static partial class <#= TypeName() #>Extensions <# if (property.PropertyType.Name == "Thickness") { #> public static T <#= property.Name #>(this T <#= TypeName().ToLocalVariableName() #>, double leftRight, double topBottom, RxThicknessAnimation? customAnimation = null) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(new Thickness(leftRight, topBottom)); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new Thickness(leftRight, topBottom); <#= TypeName().ToLocalVariableName() #>.AppendAnimatable(<#= FullTypeName() #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(leftRight, topBottom)), v => <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName().ToLocalVariableName() #>; } public static T <#= property.Name #>(this T <#= TypeName().ToLocalVariableName() #>, double uniformSize, RxThicknessAnimation? customAnimation = null) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(new Thickness(uniformSize)); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new Thickness(uniformSize); <#= TypeName().ToLocalVariableName() #>.AppendAnimatable(<#= FullTypeName() #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(uniformSize)), v => <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName().ToLocalVariableName() #>; } public static T <#= property.Name #>(this T <#= TypeName().ToLocalVariableName() #>, double left, double top, double right, double bottom, RxThicknessAnimation? customAnimation = null) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(new Thickness(left, top, right, bottom)); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new Thickness(left, top, right, bottom); <#= TypeName().ToLocalVariableName() #>.AppendAnimatable(<#= FullTypeName() #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(left, top, right, bottom)), v => <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName().ToLocalVariableName() #>; } @@ -320,7 +320,7 @@ public static partial class <#= TypeName() #>Extensions <# if (property.PropertyType.FullName == "Microsoft.Maui.Graphics.Point") { #> public static T <#= property.Name #>(this T <#= TypeName().ToLocalVariableName() #>, double x, double y) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(new Microsoft.Maui.Graphics.Point(x, y)); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new Microsoft.Maui.Graphics.Point(x, y); return <#= TypeName().ToLocalVariableName() #>; } <# } #> @@ -329,13 +329,13 @@ public static partial class <#= TypeName() #>Extensions <# if (property.PropertyType.Name == "CornerRadius") { #> public static T <#= property.Name #>(this T <#= TypeName().ToLocalVariableName() #>, double uniformRadius, RxCornerRadiusAnimation? customAnimation = null) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(new CornerRadius(uniformRadius)); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new CornerRadius(uniformRadius); <#= TypeName().ToLocalVariableName() #>.AppendAnimatable(<#= FullTypeName() #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleCornerRadiusAnimation(new CornerRadius(uniformRadius)), v => <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName().ToLocalVariableName() #>; } public static T <#= property.Name #>(this T <#= TypeName().ToLocalVariableName() #>, double topLeft, double topRight, double bottomLeft, double bottomRight, RxCornerRadiusAnimation? customAnimation = null) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(new CornerRadius(topLeft, topRight, bottomLeft, bottomRight)); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new CornerRadius(topLeft, topRight, bottomLeft, bottomRight); <#= TypeName().ToLocalVariableName() #>.AppendAnimatable(<#= FullTypeName() #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleCornerRadiusAnimation(new CornerRadius(topLeft, topRight, bottomLeft, bottomRight)), v => <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName().ToLocalVariableName() #>; } @@ -344,7 +344,7 @@ public static partial class <#= TypeName() #>Extensions var propertyName = property.Name; #> public static T <#= propertyName #>(this T <#= TypeName().ToLocalVariableName() #>, string file) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(Microsoft.Maui.Controls.ImageSource.FromFile(file)); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = Microsoft.Maui.Controls.ImageSource.FromFile(file); return <#= TypeName().ToLocalVariableName() #>; } public static T <#= propertyName #>(this T <#= TypeName().ToLocalVariableName() #>, Func action) @@ -356,27 +356,27 @@ public static partial class <#= TypeName() #>Extensions } public static T <#= propertyName #>(this T <#= TypeName().ToLocalVariableName() #>, string resourceName, Assembly sourceAssembly) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly); return <#= TypeName().ToLocalVariableName() #>; } public static T <#= propertyName #>(this T <#= TypeName().ToLocalVariableName() #>, Uri imageUri) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri)); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri); return <#= TypeName().ToLocalVariableName() #>; } public static T <#= propertyName #>(this T <#= TypeName().ToLocalVariableName() #>, Uri imageUri, bool cachingEnabled, TimeSpan cacheValidity) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(new UriImageSource + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new UriImageSource { Uri = imageUri, CachingEnabled = cachingEnabled, CacheValidity = cacheValidity - }); + }; return <#= TypeName().ToLocalVariableName() #>; } public static T <#= propertyName #>(this T <#= TypeName().ToLocalVariableName() #>, Func imageStream) where T : <#= InterfaceName() #> { - <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.PropertyType.FullName.ToResevedWordFullTypeName() #>>(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream)); + <#= TypeName().ToLocalVariableName() #>.<#= property.Name #> = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream); return <#= TypeName().ToLocalVariableName() #>; } <# } #> diff --git a/src/MauiReactor.ScaffoldGenerator/ScaffoldTypeGenerator.cs b/src/MauiReactor.ScaffoldGenerator/ScaffoldTypeGenerator.cs index 0c599234..7275bd5b 100644 --- a/src/MauiReactor.ScaffoldGenerator/ScaffoldTypeGenerator.cs +++ b/src/MauiReactor.ScaffoldGenerator/ScaffoldTypeGenerator.cs @@ -121,14 +121,7 @@ namespace "); #line default #line hidden - this.Write(" PropertyValue<"); - - #line 36 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">? "); + this.Write(" object? "); #line 36 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name)); @@ -580,14 +573,7 @@ namespace "); #line default #line hidden - this.Write(" PropertyValue<"); - - #line 192 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">? "); + this.Write(" object? "); #line 192 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(InterfaceName)); @@ -1722,21 +1708,14 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 443 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 443 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\r\n "); + this.Write(";\r\n "); #line 444 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -1848,21 +1827,14 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 450 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 450 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\r\n "); + this.Write(";\r\n "); #line 451 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -1974,21 +1946,14 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 457 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 457 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\r\n "); + this.Write(";\r\n "); #line 458 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -2100,21 +2065,14 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 464 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 464 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\r\n "); + this.Write(";\r\n "); #line 465 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -2226,21 +2184,14 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 471 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 471 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\r\n "); + this.Write(";\r\n "); #line 472 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -2352,21 +2303,14 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 478 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 478 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\r\n "); + this.Write(";\r\n "); #line 479 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -2478,21 +2422,14 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 485 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 485 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\r\n "); + this.Write(";\r\n "); #line 486 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -2604,21 +2541,14 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 492 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 492 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\r\n "); + this.Write(";\r\n "); #line 493 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -2730,21 +2660,14 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 499 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 499 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\r\n "); + this.Write(";\r\n "); #line 500 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -2856,21 +2779,14 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 506 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">("); + this.Write(" = "); #line 506 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.CamelCase())); #line default #line hidden - this.Write(");\r\n return "); + this.Write(";\r\n return "); #line 507 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -2997,14 +2913,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 519 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new Microsoft.Maui.Thickness(leftRight, topBottom));\r\n "); + this.Write(" = new Microsoft.Maui.Thickness(leftRight, topBottom);\r\n "); #line 520 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -3089,14 +2998,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 525 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new Microsoft.Maui.Thickness(uniformSize));\r\n "); + this.Write(" = new Microsoft.Maui.Thickness(uniformSize);\r\n "); #line 526 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -3182,14 +3084,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 531 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new Microsoft.Maui.Thickness(left, top, right, bottom));\r\n "); + this.Write(" = new Microsoft.Maui.Thickness(left, top, right, bottom);\r\n "); #line 532 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -3289,14 +3184,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 540 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new ThicknessF(leftRight, topBottom));\r\n "); + this.Write(" = new ThicknessF(leftRight, topBottom);\r\n "); #line 541 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -3381,14 +3269,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 546 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new ThicknessF(uniformSize));\r\n "); + this.Write(" = new ThicknessF(uniformSize);\r\n "); #line 547 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -3474,14 +3355,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 552 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new ThicknessF(left, top, right, bottom));\r\n "); + this.Write(" = new ThicknessF(left, top, right, bottom);\r\n "); #line 553 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -3580,14 +3454,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 561 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new CornerRadius(uniformSize));\r\n "); + this.Write(" = new CornerRadius(uniformSize);\r\n "); #line 562 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -3673,14 +3540,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 567 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new CornerRadius(topLeft, topRight, bottomRight, bottomLeft));\r\n "); + this.Write(" = new CornerRadius(topLeft, topRight, bottomRight, bottomLeft);\r\n "); #line 568 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -3780,14 +3640,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 576 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new CornerRadiusF(uniformSize));\r\n "); + this.Write(" = new CornerRadiusF(uniformSize);\r\n "); #line 577 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -3873,14 +3726,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 582 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new CornerRadiusF(topLeft, topRight, bottomRight, bottomLeft));\r\n "); + this.Write(" = new CornerRadiusF(topLeft, topRight, bottomRight, bottomLeft);\r\n "); #line 583 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -3979,14 +3825,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 592 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new Microsoft.Maui.Graphics.Point(x, y));\r\n return "); + this.Write(" = new Microsoft.Maui.Graphics.Point(x, y);\r\n return "); #line 593 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -4042,14 +3881,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 601 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new CornerRadius(uniformRadius));\r\n return "); + this.Write(" = new CornerRadius(uniformRadius);\r\n return "); #line 602 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -4092,14 +3924,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 606 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new CornerRadius(topLeft, topRight, bottomLeft, bottomRight));\r\n ret" + + this.Write(" = new CornerRadius(topLeft, topRight, bottomLeft, bottomRight);\r\n ret" + "urn "); #line 607 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" @@ -4157,14 +3982,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 614 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(Microsoft.Maui.Controls.ImageSource.FromFile(file));\r\n return "); + this.Write(" = Microsoft.Maui.Controls.ImageSource.FromFile(file);\r\n return "); #line 615 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -4206,14 +4024,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 619 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly))" + + this.Write(" = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)" + ";\r\n return "); #line 620 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" @@ -4256,14 +4067,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 624 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri));\r\n return "); + this.Write(" = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri);\r\n return "); #line 625 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -4305,16 +4109,9 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 629 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(new Microsoft.Maui.Controls.UriImageSource\r\n {\r\n Uri " + - "= imageUri,\r\n CachingEnabled = cachingEnabled,\r\n C" + - "acheValidity = cacheValidity\r\n });\r\n return "); + this.Write(" = new Microsoft.Maui.Controls.UriImageSource\r\n {\r\n Uri" + + " = imageUri,\r\n CachingEnabled = cachingEnabled,\r\n " + + "CacheValidity = cacheValidity\r\n };\r\n return "); #line 635 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TypeName.ToLocalVariableName())); @@ -4356,14 +4153,7 @@ protected override void OnRemoveChild(VisualNode widget, Microsoft.Maui.Controls #line default #line hidden - this.Write(" = new PropertyValue<"); - - #line 639 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName())); - - #line default - #line hidden - this.Write(">(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream));\r\n retu" + + this.Write(" = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream);\r\n retu" + "rn "); #line 640 "C:\Source\github\reactorui-maui\src\MauiReactor.ScaffoldGenerator\ScaffoldTypeGenerator.tt" diff --git a/src/MauiReactor.ScaffoldGenerator/ScaffoldTypeGenerator.tt b/src/MauiReactor.ScaffoldGenerator/ScaffoldTypeGenerator.tt index 732e4155..4f9fab07 100644 --- a/src/MauiReactor.ScaffoldGenerator/ScaffoldTypeGenerator.tt +++ b/src/MauiReactor.ScaffoldGenerator/ScaffoldTypeGenerator.tt @@ -33,7 +33,7 @@ namespace <#= Namespace #> <# } #> <# foreach (var property in Properties) { #> - PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>? <#= property.Name #> { get; set; } + object? <#= property.Name #> { get; set; } <# } #> <# foreach (var ev in Events) { @@ -189,7 +189,7 @@ namespace <#= Namespace #> <# } #> <# foreach (var property in Properties) { #> - PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>? <#= InterfaceName #>.<#= property.Name #> { get; set; } + object? <#= InterfaceName #>.<#= property.Name #> { get; set; } <# } #> <# foreach (var ev in Events) { @@ -440,70 +440,70 @@ namespace <#= Namespace #> <# if (property.Type.Equals(TypeofDouble, SymbolEqualityComparer.Default)) { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, <#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #> <#= property.Name.CamelCase() #>, RxDoubleAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxDoubleAnimation(<#= property.Name.CamelCase() #>), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } <# } else if (property.Type.Equals(TypeofFloat, SymbolEqualityComparer.Default)) { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, <#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #> <#= property.Name.CamelCase() #>, RxFloatAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxFloatAnimation(<#= property.Name.CamelCase() #>), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } <# } else if (property.Type.Equals(TypeofRect, SymbolEqualityComparer.Default)) { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, <#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #> <#= property.Name.CamelCase() #>, RxRectAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleRectAnimation(<#= property.Name.CamelCase() #>), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } <# } else if (property.Type.Equals(TypeofPoint, SymbolEqualityComparer.Default)) { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, <#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #> <#= property.Name.CamelCase() #>, RxPointAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimplePointAnimation(<#= property.Name.CamelCase() #>), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } <# } else if (property.Type.Equals(TypeofPointF, SymbolEqualityComparer.Default)) { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, <#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #> <#= property.Name.CamelCase() #>, RxPointFAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimplePointFAnimation(<#= property.Name.CamelCase() #>), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } <# } else if (property.Type.Equals(TypeofThickness, SymbolEqualityComparer.Default)) { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, <#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #> <#= property.Name.CamelCase() #>, RxThicknessAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleThicknessAnimation(<#= property.Name.CamelCase() #>), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } <# } else if (property.Type.Equals(TypeofThicknessF, SymbolEqualityComparer.Default)) { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, <#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #> <#= property.Name.CamelCase() #>, RxThicknessFAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleThicknessFAnimation(<#= property.Name.CamelCase() #>), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } <# } else if (property.Type.Equals(TypeofCornerRadiusF, SymbolEqualityComparer.Default)) { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, <#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #> <#= property.Name.CamelCase() #>, RxCornerRadiusFAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleCornerRadiusFAnimation(<#= property.Name.CamelCase() #>), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } <# } else if (property.Type.Equals(TypeofCornerRadius, SymbolEqualityComparer.Default)) { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, <#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #> <#= property.Name.CamelCase() #>, RxCornerRadiusAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleCornerRadiusAnimation(<#= property.Name.CamelCase() #>), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } <# } else { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, <#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #> <#= property.Name.CamelCase() #>) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(<#= property.Name.CamelCase() #>); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = <#= property.Name.CamelCase() #>; return <#= TypeName.ToLocalVariableName() #>; } <# } #> @@ -516,19 +516,19 @@ namespace <#= Namespace #> <# if (property.Type.Name == "Thickness") { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, double leftRight, double topBottom, RxThicknessAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(new Microsoft.Maui.Thickness(leftRight, topBottom)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new Microsoft.Maui.Thickness(leftRight, topBottom); <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleThicknessAnimation(new Microsoft.Maui.Thickness(leftRight, topBottom)), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, double uniformSize, RxThicknessAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(new Microsoft.Maui.Thickness(uniformSize)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new Microsoft.Maui.Thickness(uniformSize); <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleThicknessAnimation(new Microsoft.Maui.Thickness(uniformSize)), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, double left, double top, double right, double bottom, RxThicknessAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(new Microsoft.Maui.Thickness(left, top, right, bottom)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new Microsoft.Maui.Thickness(left, top, right, bottom); <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleThicknessAnimation(new Microsoft.Maui.Thickness(left, top, right, bottom)), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } @@ -537,19 +537,19 @@ namespace <#= Namespace #> <# if (property.Type.Name == "ThicknessF") { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, float leftRight, float topBottom, RxThicknessFAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(new ThicknessF(leftRight, topBottom)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new ThicknessF(leftRight, topBottom); <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleThicknessFAnimation(new ThicknessF(leftRight, topBottom)), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, float uniformSize, RxThicknessFAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(new ThicknessF(uniformSize)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new ThicknessF(uniformSize); <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleThicknessFAnimation(new ThicknessF(uniformSize)), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, float left, float top, float right, float bottom, RxThicknessFAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(new ThicknessF(left, top, right, bottom)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new ThicknessF(left, top, right, bottom); <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleThicknessFAnimation(new ThicknessF(left, top, right, bottom)), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } @@ -558,13 +558,13 @@ namespace <#= Namespace #> <# if (property.Type.Name == "CornerRadius") { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, float uniformSize, RxCornerRadiusAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(new CornerRadius(uniformSize)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new CornerRadius(uniformSize); <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleCornerRadiusAnimation(new CornerRadius(uniformSize)), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>,float topLeft, float topRight, float bottomRight, float bottomLeft, RxCornerRadiusAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(new CornerRadius(topLeft, topRight, bottomRight, bottomLeft)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new CornerRadius(topLeft, topRight, bottomRight, bottomLeft); <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleCornerRadiusAnimation(new CornerRadius(topLeft, topRight, bottomRight, bottomLeft)), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } @@ -573,13 +573,13 @@ namespace <#= Namespace #> <# if (property.Type.Name == "CornerRadiusF") { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, float uniformSize, RxCornerRadiusFAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(new CornerRadiusF(uniformSize)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new CornerRadiusF(uniformSize); <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleCornerRadiusFAnimation(new CornerRadiusF(uniformSize)), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>,float topLeft, float topRight, float bottomRight, float bottomLeft, RxCornerRadiusFAnimation? customAnimation = null) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(new CornerRadiusF(topLeft, topRight, bottomRight, bottomLeft)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new CornerRadiusF(topLeft, topRight, bottomRight, bottomLeft); <#= TypeName.ToLocalVariableName() #>.AppendAnimatable(global::<#= FullTypeName #>.<#= property.Name #>Property, customAnimation ?? new RxSimpleCornerRadiusFAnimation(new CornerRadiusF(topLeft, topRight, bottomRight, bottomLeft)), v => <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(v.CurrentValue())); return <#= TypeName.ToLocalVariableName() #>; } @@ -589,7 +589,7 @@ namespace <#= Namespace #> <# if (property.Type.GetFullyQualifiedName() == "Microsoft.Maui.Graphics.Point") { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, double x, double y) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(new Microsoft.Maui.Graphics.Point(x, y)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new Microsoft.Maui.Graphics.Point(x, y); return <#= TypeName.ToLocalVariableName() #>; } <# } #> @@ -598,12 +598,12 @@ namespace <#= Namespace #> <# if (property.Type.Name == "CornerRadius") { #> public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, double uniformRadius) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(new CornerRadius(uniformRadius)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new CornerRadius(uniformRadius); return <#= TypeName.ToLocalVariableName() #>; } public static T <#= property.Name #>(this T <#= TypeName.ToLocalVariableName() #>, double topLeft, double topRight, double bottomLeft, double bottomRight) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(new CornerRadius(topLeft, topRight, bottomLeft, bottomRight)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new CornerRadius(topLeft, topRight, bottomLeft, bottomRight); return <#= TypeName.ToLocalVariableName() #>; } <# } #> @@ -611,32 +611,32 @@ namespace <#= Namespace #> var propertyName = property.Name; #> public static T <#= propertyName #>(this T <#= TypeName.ToLocalVariableName() #>, string file) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(Microsoft.Maui.Controls.ImageSource.FromFile(file)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = Microsoft.Maui.Controls.ImageSource.FromFile(file); return <#= TypeName.ToLocalVariableName() #>; } public static T <#= propertyName #>(this T <#= TypeName.ToLocalVariableName() #>, string resourceName, Assembly sourceAssembly) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly); return <#= TypeName.ToLocalVariableName() #>; } public static T <#= propertyName #>(this T <#= TypeName.ToLocalVariableName() #>, Uri imageUri) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri); return <#= TypeName.ToLocalVariableName() #>; } public static T <#= propertyName #>(this T <#= TypeName.ToLocalVariableName() #>, Uri imageUri, bool cachingEnabled, TimeSpan cacheValidity) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(new Microsoft.Maui.Controls.UriImageSource + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new Microsoft.Maui.Controls.UriImageSource { Uri = imageUri, CachingEnabled = cachingEnabled, CacheValidity = cacheValidity - }); + }; return <#= TypeName.ToLocalVariableName() #>; } public static T <#= propertyName #>(this T <#= TypeName.ToLocalVariableName() #>, Func imageStream) where T : <#= InterfaceName #> { - <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = new PropertyValue<<#= property.Type.GetFullyQualifiedName().ToReservedWordFullTypeName() #>>(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream)); + <#= TypeName.ToLocalVariableName() #>.<#= property.Name #> = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream); return <#= TypeName.ToLocalVariableName() #>; } <# } #> diff --git a/src/MauiReactor/ActivityIndicator.cs b/src/MauiReactor/ActivityIndicator.cs index 24dccba9..461afbc7 100644 --- a/src/MauiReactor/ActivityIndicator.cs +++ b/src/MauiReactor/ActivityIndicator.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface IActivityIndicator : IView { - PropertyValue? IsRunning { get; set; } + object? IsRunning { get; set; } - PropertyValue? Color { get; set; } + object? Color { get; set; } } public partial class ActivityIndicator : View, IActivityIndicator where T : Microsoft.Maui.Controls.ActivityIndicator, new() @@ -27,9 +27,9 @@ public ActivityIndicator(Action componentRefAction) : base(componentRefActio { } - PropertyValue? IActivityIndicator.IsRunning { get; set; } + object? IActivityIndicator.IsRunning { get; set; } - PropertyValue? IActivityIndicator.Color { get; set; } + object? IActivityIndicator.Color { get; set; } internal override void Reset() { @@ -74,7 +74,7 @@ public static partial class ActivityIndicatorExtensions public static T IsRunning(this T activityIndicator, bool isRunning) where T : IActivityIndicator { - activityIndicator.IsRunning = new PropertyValue(isRunning); + activityIndicator.IsRunning = isRunning; return activityIndicator; } @@ -88,7 +88,7 @@ public static T IsRunning(this T activityIndicator, Func isRunningFunc) public static T Color(this T activityIndicator, Microsoft.Maui.Graphics.Color color) where T : IActivityIndicator { - activityIndicator.Color = new PropertyValue(color); + activityIndicator.Color = color; return activityIndicator; } diff --git a/src/MauiReactor/BaseShellItem.cs b/src/MauiReactor/BaseShellItem.cs index c9c942cf..4e88f33d 100644 --- a/src/MauiReactor/BaseShellItem.cs +++ b/src/MauiReactor/BaseShellItem.cs @@ -12,15 +12,15 @@ namespace MauiReactor; public partial interface IBaseShellItem : INavigableElement { - PropertyValue? FlyoutIcon { get; set; } + object? FlyoutIcon { get; set; } - PropertyValue? Icon { get; set; } + object? Icon { get; set; } - PropertyValue? IsEnabled { get; set; } + object? IsEnabled { get; set; } - PropertyValue? Title { get; set; } + object? Title { get; set; } - PropertyValue? IsVisible { get; set; } + object? IsVisible { get; set; } Action? AppearingAction { get; set; } @@ -41,15 +41,15 @@ public BaseShellItem(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IBaseShellItem.FlyoutIcon { get; set; } + object? IBaseShellItem.FlyoutIcon { get; set; } - PropertyValue? IBaseShellItem.Icon { get; set; } + object? IBaseShellItem.Icon { get; set; } - PropertyValue? IBaseShellItem.IsEnabled { get; set; } + object? IBaseShellItem.IsEnabled { get; set; } - PropertyValue? IBaseShellItem.Title { get; set; } + object? IBaseShellItem.Title { get; set; } - PropertyValue? IBaseShellItem.IsVisible { get; set; } + object? IBaseShellItem.IsVisible { get; set; } Action? IBaseShellItem.AppearingAction { get; set; } @@ -153,7 +153,7 @@ public static partial class BaseShellItemExtensions public static T FlyoutIcon(this T baseShellItem, Microsoft.Maui.Controls.ImageSource flyoutIcon) where T : IBaseShellItem { - baseShellItem.FlyoutIcon = new PropertyValue(flyoutIcon); + baseShellItem.FlyoutIcon = flyoutIcon; return baseShellItem; } @@ -167,7 +167,7 @@ public static T FlyoutIcon(this T baseShellItem, Func(this T baseShellItem, string file) where T : IBaseShellItem { - baseShellItem.FlyoutIcon = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromFile(file)); + baseShellItem.FlyoutIcon = Microsoft.Maui.Controls.ImageSource.FromFile(file); return baseShellItem; } @@ -181,35 +181,40 @@ public static T FlyoutIcon(this T baseShellItem, Func action) public static T FlyoutIcon(this T baseShellItem, string resourceName, Assembly sourceAssembly) where T : IBaseShellItem { - baseShellItem.FlyoutIcon = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)); + baseShellItem.FlyoutIcon = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly); return baseShellItem; } public static T FlyoutIcon(this T baseShellItem, Uri imageUri) where T : IBaseShellItem { - baseShellItem.FlyoutIcon = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri)); + baseShellItem.FlyoutIcon = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri); return baseShellItem; } public static T FlyoutIcon(this T baseShellItem, Uri imageUri, bool cachingEnabled, TimeSpan cacheValidity) where T : IBaseShellItem { - baseShellItem.FlyoutIcon = new PropertyValue(new UriImageSource { Uri = imageUri, CachingEnabled = cachingEnabled, CacheValidity = cacheValidity }); + baseShellItem.FlyoutIcon = new UriImageSource + { + Uri = imageUri, + CachingEnabled = cachingEnabled, + CacheValidity = cacheValidity + }; return baseShellItem; } public static T FlyoutIcon(this T baseShellItem, Func imageStream) where T : IBaseShellItem { - baseShellItem.FlyoutIcon = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream)); + baseShellItem.FlyoutIcon = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream); return baseShellItem; } public static T Icon(this T baseShellItem, Microsoft.Maui.Controls.ImageSource icon) where T : IBaseShellItem { - baseShellItem.Icon = new PropertyValue(icon); + baseShellItem.Icon = icon; return baseShellItem; } @@ -223,7 +228,7 @@ public static T Icon(this T baseShellItem, Func(this T baseShellItem, string file) where T : IBaseShellItem { - baseShellItem.Icon = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromFile(file)); + baseShellItem.Icon = Microsoft.Maui.Controls.ImageSource.FromFile(file); return baseShellItem; } @@ -237,35 +242,40 @@ public static T Icon(this T baseShellItem, Func action) public static T Icon(this T baseShellItem, string resourceName, Assembly sourceAssembly) where T : IBaseShellItem { - baseShellItem.Icon = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)); + baseShellItem.Icon = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly); return baseShellItem; } public static T Icon(this T baseShellItem, Uri imageUri) where T : IBaseShellItem { - baseShellItem.Icon = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri)); + baseShellItem.Icon = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri); return baseShellItem; } public static T Icon(this T baseShellItem, Uri imageUri, bool cachingEnabled, TimeSpan cacheValidity) where T : IBaseShellItem { - baseShellItem.Icon = new PropertyValue(new UriImageSource { Uri = imageUri, CachingEnabled = cachingEnabled, CacheValidity = cacheValidity }); + baseShellItem.Icon = new UriImageSource + { + Uri = imageUri, + CachingEnabled = cachingEnabled, + CacheValidity = cacheValidity + }; return baseShellItem; } public static T Icon(this T baseShellItem, Func imageStream) where T : IBaseShellItem { - baseShellItem.Icon = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream)); + baseShellItem.Icon = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream); return baseShellItem; } public static T IsEnabled(this T baseShellItem, bool isEnabled) where T : IBaseShellItem { - baseShellItem.IsEnabled = new PropertyValue(isEnabled); + baseShellItem.IsEnabled = isEnabled; return baseShellItem; } @@ -279,7 +289,7 @@ public static T IsEnabled(this T baseShellItem, Func isEnabledFunc) public static T Title(this T baseShellItem, string title) where T : IBaseShellItem { - baseShellItem.Title = new PropertyValue(title); + baseShellItem.Title = title; return baseShellItem; } @@ -293,7 +303,7 @@ public static T Title(this T baseShellItem, Func titleFunc) public static T IsVisible(this T baseShellItem, bool isVisible) where T : IBaseShellItem { - baseShellItem.IsVisible = new PropertyValue(isVisible); + baseShellItem.IsVisible = isVisible; return baseShellItem; } diff --git a/src/MauiReactor/Border.cs b/src/MauiReactor/Border.cs index fdb17ad4..63fbb4ed 100644 --- a/src/MauiReactor/Border.cs +++ b/src/MauiReactor/Border.cs @@ -12,21 +12,21 @@ namespace MauiReactor; public partial interface IBorder : IView { - PropertyValue? Padding { get; set; } + object? Padding { get; set; } - PropertyValue? Stroke { get; set; } + object? Stroke { get; set; } - PropertyValue? StrokeThickness { get; set; } + object? StrokeThickness { get; set; } - PropertyValue? StrokeDashArray { get; set; } + object? StrokeDashArray { get; set; } - PropertyValue? StrokeDashOffset { get; set; } + object? StrokeDashOffset { get; set; } - PropertyValue? StrokeLineCap { get; set; } + object? StrokeLineCap { get; set; } - PropertyValue? StrokeLineJoin { get; set; } + object? StrokeLineJoin { get; set; } - PropertyValue? StrokeMiterLimit { get; set; } + object? StrokeMiterLimit { get; set; } } public partial class Border : View, IBorder where T : Microsoft.Maui.Controls.Border, new() @@ -39,21 +39,21 @@ public Border(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IBorder.Padding { get; set; } + object? IBorder.Padding { get; set; } - PropertyValue? IBorder.Stroke { get; set; } + object? IBorder.Stroke { get; set; } - PropertyValue? IBorder.StrokeThickness { get; set; } + object? IBorder.StrokeThickness { get; set; } - PropertyValue? IBorder.StrokeDashArray { get; set; } + object? IBorder.StrokeDashArray { get; set; } - PropertyValue? IBorder.StrokeDashOffset { get; set; } + object? IBorder.StrokeDashOffset { get; set; } - PropertyValue? IBorder.StrokeLineCap { get; set; } + object? IBorder.StrokeLineCap { get; set; } - PropertyValue? IBorder.StrokeLineJoin { get; set; } + object? IBorder.StrokeLineJoin { get; set; } - PropertyValue? IBorder.StrokeMiterLimit { get; set; } + object? IBorder.StrokeMiterLimit { get; set; } internal override void Reset() { @@ -122,7 +122,7 @@ public static partial class BorderExtensions public static T Padding(this T border, Microsoft.Maui.Thickness padding, RxThicknessAnimation? customAnimation = null) where T : IBorder { - border.Padding = new PropertyValue(padding); + border.Padding = padding; border.AppendAnimatable(Microsoft.Maui.Controls.Border.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(padding), v => border.Padding = new PropertyValue(v.CurrentValue())); return border; } @@ -137,7 +137,7 @@ public static T Padding(this T border, Func padding public static T Padding(this T border, double leftRight, double topBottom, RxThicknessAnimation? customAnimation = null) where T : IBorder { - border.Padding = new PropertyValue(new Thickness(leftRight, topBottom)); + border.Padding = new Thickness(leftRight, topBottom); border.AppendAnimatable(Microsoft.Maui.Controls.Border.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(leftRight, topBottom)), v => border.Padding = new PropertyValue(v.CurrentValue())); return border; } @@ -145,7 +145,7 @@ public static T Padding(this T border, double leftRight, double topBottom, Rx public static T Padding(this T border, double uniformSize, RxThicknessAnimation? customAnimation = null) where T : IBorder { - border.Padding = new PropertyValue(new Thickness(uniformSize)); + border.Padding = new Thickness(uniformSize); border.AppendAnimatable(Microsoft.Maui.Controls.Border.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(uniformSize)), v => border.Padding = new PropertyValue(v.CurrentValue())); return border; } @@ -153,7 +153,7 @@ public static T Padding(this T border, double uniformSize, RxThicknessAnimati public static T Padding(this T border, double left, double top, double right, double bottom, RxThicknessAnimation? customAnimation = null) where T : IBorder { - border.Padding = new PropertyValue(new Thickness(left, top, right, bottom)); + border.Padding = new Thickness(left, top, right, bottom); border.AppendAnimatable(Microsoft.Maui.Controls.Border.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(left, top, right, bottom)), v => border.Padding = new PropertyValue(v.CurrentValue())); return border; } @@ -161,7 +161,7 @@ public static T Padding(this T border, double left, double top, double right, public static T Stroke(this T border, Microsoft.Maui.Controls.Brush stroke) where T : IBorder { - border.Stroke = new PropertyValue(stroke); + border.Stroke = stroke; return border; } @@ -175,7 +175,7 @@ public static T Stroke(this T border, Func str public static T StrokeThickness(this T border, double strokeThickness, RxDoubleAnimation? customAnimation = null) where T : IBorder { - border.StrokeThickness = new PropertyValue(strokeThickness); + border.StrokeThickness = strokeThickness; border.AppendAnimatable(Microsoft.Maui.Controls.Border.StrokeThicknessProperty, customAnimation ?? new RxDoubleAnimation(strokeThickness), v => border.StrokeThickness = new PropertyValue(v.CurrentValue())); return border; } @@ -190,7 +190,7 @@ public static T StrokeThickness(this T border, Func strokeThicknessFu public static T StrokeDashArray(this T border, Microsoft.Maui.Controls.DoubleCollection strokeDashArray) where T : IBorder { - border.StrokeDashArray = new PropertyValue(strokeDashArray); + border.StrokeDashArray = strokeDashArray; return border; } @@ -204,7 +204,7 @@ public static T StrokeDashArray(this T border, Func(this T border, double strokeDashOffset, RxDoubleAnimation? customAnimation = null) where T : IBorder { - border.StrokeDashOffset = new PropertyValue(strokeDashOffset); + border.StrokeDashOffset = strokeDashOffset; border.AppendAnimatable(Microsoft.Maui.Controls.Border.StrokeDashOffsetProperty, customAnimation ?? new RxDoubleAnimation(strokeDashOffset), v => border.StrokeDashOffset = new PropertyValue(v.CurrentValue())); return border; } @@ -219,7 +219,7 @@ public static T StrokeDashOffset(this T border, Func strokeDashOffset public static T StrokeLineCap(this T border, Microsoft.Maui.Controls.Shapes.PenLineCap strokeLineCap) where T : IBorder { - border.StrokeLineCap = new PropertyValue(strokeLineCap); + border.StrokeLineCap = strokeLineCap; return border; } @@ -233,7 +233,7 @@ public static T StrokeLineCap(this T border, Func(this T border, Microsoft.Maui.Controls.Shapes.PenLineJoin strokeLineJoin) where T : IBorder { - border.StrokeLineJoin = new PropertyValue(strokeLineJoin); + border.StrokeLineJoin = strokeLineJoin; return border; } @@ -247,7 +247,7 @@ public static T StrokeLineJoin(this T border, Func(this T border, double strokeMiterLimit, RxDoubleAnimation? customAnimation = null) where T : IBorder { - border.StrokeMiterLimit = new PropertyValue(strokeMiterLimit); + border.StrokeMiterLimit = strokeMiterLimit; border.AppendAnimatable(Microsoft.Maui.Controls.Border.StrokeMiterLimitProperty, customAnimation ?? new RxDoubleAnimation(strokeMiterLimit), v => border.StrokeMiterLimit = new PropertyValue(v.CurrentValue())); return border; } diff --git a/src/MauiReactor/BoxView.cs b/src/MauiReactor/BoxView.cs index 61581cbf..7aba25a9 100644 --- a/src/MauiReactor/BoxView.cs +++ b/src/MauiReactor/BoxView.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface IBoxView : IView { - PropertyValue? Color { get; set; } + object? Color { get; set; } - PropertyValue? CornerRadius { get; set; } + object? CornerRadius { get; set; } } public partial class BoxView : View, IBoxView where T : Microsoft.Maui.Controls.BoxView, new() @@ -27,9 +27,9 @@ public BoxView(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IBoxView.Color { get; set; } + object? IBoxView.Color { get; set; } - PropertyValue? IBoxView.CornerRadius { get; set; } + object? IBoxView.CornerRadius { get; set; } internal override void Reset() { @@ -83,7 +83,7 @@ public static partial class BoxViewExtensions public static T Color(this T boxView, Microsoft.Maui.Graphics.Color color) where T : IBoxView { - boxView.Color = new PropertyValue(color); + boxView.Color = color; return boxView; } @@ -97,7 +97,7 @@ public static T Color(this T boxView, Func col public static T CornerRadius(this T boxView, Microsoft.Maui.CornerRadius cornerRadius, RxCornerRadiusAnimation? customAnimation = null) where T : IBoxView { - boxView.CornerRadius = new PropertyValue(cornerRadius); + boxView.CornerRadius = cornerRadius; boxView.AppendAnimatable(Microsoft.Maui.Controls.BoxView.CornerRadiusProperty, customAnimation ?? new RxSimpleCornerRadiusAnimation(cornerRadius), v => boxView.CornerRadius = new PropertyValue(v.CurrentValue())); return boxView; } @@ -112,7 +112,7 @@ public static T CornerRadius(this T boxView, Func(this T boxView, double uniformRadius, RxCornerRadiusAnimation? customAnimation = null) where T : IBoxView { - boxView.CornerRadius = new PropertyValue(new CornerRadius(uniformRadius)); + boxView.CornerRadius = new CornerRadius(uniformRadius); boxView.AppendAnimatable(Microsoft.Maui.Controls.BoxView.CornerRadiusProperty, customAnimation ?? new RxSimpleCornerRadiusAnimation(new CornerRadius(uniformRadius)), v => boxView.CornerRadius = new PropertyValue(v.CurrentValue())); return boxView; } @@ -120,7 +120,7 @@ public static T CornerRadius(this T boxView, double uniformRadius, RxCornerRa public static T CornerRadius(this T boxView, double topLeft, double topRight, double bottomLeft, double bottomRight, RxCornerRadiusAnimation? customAnimation = null) where T : IBoxView { - boxView.CornerRadius = new PropertyValue(new CornerRadius(topLeft, topRight, bottomLeft, bottomRight)); + boxView.CornerRadius = new CornerRadius(topLeft, topRight, bottomLeft, bottomRight); boxView.AppendAnimatable(Microsoft.Maui.Controls.BoxView.CornerRadiusProperty, customAnimation ?? new RxSimpleCornerRadiusAnimation(new CornerRadius(topLeft, topRight, bottomLeft, bottomRight)), v => boxView.CornerRadius = new PropertyValue(v.CurrentValue())); return boxView; } diff --git a/src/MauiReactor/Button.cs b/src/MauiReactor/Button.cs index 4d23e65c..eab80f65 100644 --- a/src/MauiReactor/Button.cs +++ b/src/MauiReactor/Button.cs @@ -12,35 +12,35 @@ namespace MauiReactor; public partial interface IButton : IView { - PropertyValue? ContentLayout { get; set; } + object? ContentLayout { get; set; } - PropertyValue? Text { get; set; } + object? Text { get; set; } - PropertyValue? TextColor { get; set; } + object? TextColor { get; set; } - PropertyValue? CharacterSpacing { get; set; } + object? CharacterSpacing { get; set; } - PropertyValue? FontFamily { get; set; } + object? FontFamily { get; set; } - PropertyValue? FontSize { get; set; } + object? FontSize { get; set; } - PropertyValue? TextTransform { get; set; } + object? TextTransform { get; set; } - PropertyValue? FontAttributes { get; set; } + object? FontAttributes { get; set; } - PropertyValue? FontAutoScalingEnabled { get; set; } + object? FontAutoScalingEnabled { get; set; } - PropertyValue? BorderWidth { get; set; } + object? BorderWidth { get; set; } - PropertyValue? BorderColor { get; set; } + object? BorderColor { get; set; } - PropertyValue? CornerRadius { get; set; } + object? CornerRadius { get; set; } - PropertyValue? ImageSource { get; set; } + object? ImageSource { get; set; } - PropertyValue? Padding { get; set; } + object? Padding { get; set; } - PropertyValue? LineBreakMode { get; set; } + object? LineBreakMode { get; set; } Action? ClickedAction { get; set; } @@ -65,35 +65,35 @@ public Button(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IButton.ContentLayout { get; set; } + object? IButton.ContentLayout { get; set; } - PropertyValue? IButton.Text { get; set; } + object? IButton.Text { get; set; } - PropertyValue? IButton.TextColor { get; set; } + object? IButton.TextColor { get; set; } - PropertyValue? IButton.CharacterSpacing { get; set; } + object? IButton.CharacterSpacing { get; set; } - PropertyValue? IButton.FontFamily { get; set; } + object? IButton.FontFamily { get; set; } - PropertyValue? IButton.FontSize { get; set; } + object? IButton.FontSize { get; set; } - PropertyValue? IButton.TextTransform { get; set; } + object? IButton.TextTransform { get; set; } - PropertyValue? IButton.FontAttributes { get; set; } + object? IButton.FontAttributes { get; set; } - PropertyValue? IButton.FontAutoScalingEnabled { get; set; } + object? IButton.FontAutoScalingEnabled { get; set; } - PropertyValue? IButton.BorderWidth { get; set; } + object? IButton.BorderWidth { get; set; } - PropertyValue? IButton.BorderColor { get; set; } + object? IButton.BorderColor { get; set; } - PropertyValue? IButton.CornerRadius { get; set; } + object? IButton.CornerRadius { get; set; } - PropertyValue? IButton.ImageSource { get; set; } + object? IButton.ImageSource { get; set; } - PropertyValue? IButton.Padding { get; set; } + object? IButton.Padding { get; set; } - PropertyValue? IButton.LineBreakMode { get; set; } + object? IButton.LineBreakMode { get; set; } Action? IButton.ClickedAction { get; set; } @@ -246,7 +246,7 @@ public static partial class ButtonExtensions public static T ContentLayout(this T button, Microsoft.Maui.Controls.Button.ButtonContentLayout contentLayout) where T : IButton { - button.ContentLayout = new PropertyValue(contentLayout); + button.ContentLayout = contentLayout; return button; } @@ -260,7 +260,7 @@ public static T ContentLayout(this T button, Func(this T button, string text) where T : IButton { - button.Text = new PropertyValue(text); + button.Text = text; return button; } @@ -274,7 +274,7 @@ public static T Text(this T button, Func textFunc) public static T TextColor(this T button, Microsoft.Maui.Graphics.Color textColor) where T : IButton { - button.TextColor = new PropertyValue(textColor); + button.TextColor = textColor; return button; } @@ -288,7 +288,7 @@ public static T TextColor(this T button, Func public static T CharacterSpacing(this T button, double characterSpacing, RxDoubleAnimation? customAnimation = null) where T : IButton { - button.CharacterSpacing = new PropertyValue(characterSpacing); + button.CharacterSpacing = characterSpacing; button.AppendAnimatable(Microsoft.Maui.Controls.Button.CharacterSpacingProperty, customAnimation ?? new RxDoubleAnimation(characterSpacing), v => button.CharacterSpacing = new PropertyValue(v.CurrentValue())); return button; } @@ -303,7 +303,7 @@ public static T CharacterSpacing(this T button, Func characterSpacing public static T FontFamily(this T button, string fontFamily) where T : IButton { - button.FontFamily = new PropertyValue(fontFamily); + button.FontFamily = fontFamily; return button; } @@ -317,7 +317,7 @@ public static T FontFamily(this T button, Func fontFamilyFunc) public static T FontSize(this T button, double fontSize, RxDoubleAnimation? customAnimation = null) where T : IButton { - button.FontSize = new PropertyValue(fontSize); + button.FontSize = fontSize; button.AppendAnimatable(Microsoft.Maui.Controls.Button.FontSizeProperty, customAnimation ?? new RxDoubleAnimation(fontSize), v => button.FontSize = new PropertyValue(v.CurrentValue())); return button; } @@ -332,7 +332,7 @@ public static T FontSize(this T button, Func fontSizeFunc) public static T TextTransform(this T button, Microsoft.Maui.TextTransform textTransform) where T : IButton { - button.TextTransform = new PropertyValue(textTransform); + button.TextTransform = textTransform; return button; } @@ -346,7 +346,7 @@ public static T TextTransform(this T button, Func(this T button, Microsoft.Maui.Controls.FontAttributes fontAttributes) where T : IButton { - button.FontAttributes = new PropertyValue(fontAttributes); + button.FontAttributes = fontAttributes; return button; } @@ -360,7 +360,7 @@ public static T FontAttributes(this T button, Func(this T button, bool fontAutoScalingEnabled) where T : IButton { - button.FontAutoScalingEnabled = new PropertyValue(fontAutoScalingEnabled); + button.FontAutoScalingEnabled = fontAutoScalingEnabled; return button; } @@ -374,7 +374,7 @@ public static T FontAutoScalingEnabled(this T button, Func fontAutoScal public static T BorderWidth(this T button, double borderWidth, RxDoubleAnimation? customAnimation = null) where T : IButton { - button.BorderWidth = new PropertyValue(borderWidth); + button.BorderWidth = borderWidth; button.AppendAnimatable(Microsoft.Maui.Controls.Button.BorderWidthProperty, customAnimation ?? new RxDoubleAnimation(borderWidth), v => button.BorderWidth = new PropertyValue(v.CurrentValue())); return button; } @@ -389,7 +389,7 @@ public static T BorderWidth(this T button, Func borderWidthFunc) public static T BorderColor(this T button, Microsoft.Maui.Graphics.Color borderColor) where T : IButton { - button.BorderColor = new PropertyValue(borderColor); + button.BorderColor = borderColor; return button; } @@ -403,7 +403,7 @@ public static T BorderColor(this T button, Func(this T button, int cornerRadius) where T : IButton { - button.CornerRadius = new PropertyValue(cornerRadius); + button.CornerRadius = cornerRadius; return button; } @@ -417,7 +417,7 @@ public static T CornerRadius(this T button, Func cornerRadiusFunc) public static T ImageSource(this T button, Microsoft.Maui.Controls.ImageSource imageSource) where T : IButton { - button.ImageSource = new PropertyValue(imageSource); + button.ImageSource = imageSource; return button; } @@ -431,7 +431,7 @@ public static T ImageSource(this T button, Func(this T button, string file) where T : IButton { - button.ImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromFile(file)); + button.ImageSource = Microsoft.Maui.Controls.ImageSource.FromFile(file); return button; } @@ -445,35 +445,40 @@ public static T ImageSource(this T button, Func action) public static T ImageSource(this T button, string resourceName, Assembly sourceAssembly) where T : IButton { - button.ImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)); + button.ImageSource = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly); return button; } public static T ImageSource(this T button, Uri imageUri) where T : IButton { - button.ImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri)); + button.ImageSource = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri); return button; } public static T ImageSource(this T button, Uri imageUri, bool cachingEnabled, TimeSpan cacheValidity) where T : IButton { - button.ImageSource = new PropertyValue(new UriImageSource { Uri = imageUri, CachingEnabled = cachingEnabled, CacheValidity = cacheValidity }); + button.ImageSource = new UriImageSource + { + Uri = imageUri, + CachingEnabled = cachingEnabled, + CacheValidity = cacheValidity + }; return button; } public static T ImageSource(this T button, Func imageStream) where T : IButton { - button.ImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream)); + button.ImageSource = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream); return button; } public static T Padding(this T button, Microsoft.Maui.Thickness padding, RxThicknessAnimation? customAnimation = null) where T : IButton { - button.Padding = new PropertyValue(padding); + button.Padding = padding; button.AppendAnimatable(Microsoft.Maui.Controls.Button.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(padding), v => button.Padding = new PropertyValue(v.CurrentValue())); return button; } @@ -488,7 +493,7 @@ public static T Padding(this T button, Func padding public static T Padding(this T button, double leftRight, double topBottom, RxThicknessAnimation? customAnimation = null) where T : IButton { - button.Padding = new PropertyValue(new Thickness(leftRight, topBottom)); + button.Padding = new Thickness(leftRight, topBottom); button.AppendAnimatable(Microsoft.Maui.Controls.Button.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(leftRight, topBottom)), v => button.Padding = new PropertyValue(v.CurrentValue())); return button; } @@ -496,7 +501,7 @@ public static T Padding(this T button, double leftRight, double topBottom, Rx public static T Padding(this T button, double uniformSize, RxThicknessAnimation? customAnimation = null) where T : IButton { - button.Padding = new PropertyValue(new Thickness(uniformSize)); + button.Padding = new Thickness(uniformSize); button.AppendAnimatable(Microsoft.Maui.Controls.Button.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(uniformSize)), v => button.Padding = new PropertyValue(v.CurrentValue())); return button; } @@ -504,7 +509,7 @@ public static T Padding(this T button, double uniformSize, RxThicknessAnimati public static T Padding(this T button, double left, double top, double right, double bottom, RxThicknessAnimation? customAnimation = null) where T : IButton { - button.Padding = new PropertyValue(new Thickness(left, top, right, bottom)); + button.Padding = new Thickness(left, top, right, bottom); button.AppendAnimatable(Microsoft.Maui.Controls.Button.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(left, top, right, bottom)), v => button.Padding = new PropertyValue(v.CurrentValue())); return button; } @@ -512,7 +517,7 @@ public static T Padding(this T button, double left, double top, double right, public static T LineBreakMode(this T button, Microsoft.Maui.LineBreakMode lineBreakMode) where T : IButton { - button.LineBreakMode = new PropertyValue(lineBreakMode); + button.LineBreakMode = lineBreakMode; return button; } diff --git a/src/MauiReactor/CarouselView.cs b/src/MauiReactor/CarouselView.cs index 3e812a90..fe89af07 100644 --- a/src/MauiReactor/CarouselView.cs +++ b/src/MauiReactor/CarouselView.cs @@ -12,19 +12,19 @@ namespace MauiReactor; public partial interface ICarouselView : IItemsView { - PropertyValue? Loop { get; set; } + object? Loop { get; set; } - PropertyValue? PeekAreaInsets { get; set; } + object? PeekAreaInsets { get; set; } - PropertyValue? IsBounceEnabled { get; set; } + object? IsBounceEnabled { get; set; } - PropertyValue? IsSwipeEnabled { get; set; } + object? IsSwipeEnabled { get; set; } - PropertyValue? IsScrollAnimated { get; set; } + object? IsScrollAnimated { get; set; } - PropertyValue? CurrentItem { get; set; } + object? CurrentItem { get; set; } - PropertyValue? Position { get; set; } + object? Position { get; set; } Action? CurrentItemChangedAction { get; set; } @@ -45,19 +45,19 @@ public CarouselView(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ICarouselView.Loop { get; set; } + object? ICarouselView.Loop { get; set; } - PropertyValue? ICarouselView.PeekAreaInsets { get; set; } + object? ICarouselView.PeekAreaInsets { get; set; } - PropertyValue? ICarouselView.IsBounceEnabled { get; set; } + object? ICarouselView.IsBounceEnabled { get; set; } - PropertyValue? ICarouselView.IsSwipeEnabled { get; set; } + object? ICarouselView.IsSwipeEnabled { get; set; } - PropertyValue? ICarouselView.IsScrollAnimated { get; set; } + object? ICarouselView.IsScrollAnimated { get; set; } - PropertyValue? ICarouselView.CurrentItem { get; set; } + object? ICarouselView.CurrentItem { get; set; } - PropertyValue? ICarouselView.Position { get; set; } + object? ICarouselView.Position { get; set; } Action? ICarouselView.CurrentItemChangedAction { get; set; } @@ -174,7 +174,7 @@ public static partial class CarouselViewExtensions public static T Loop(this T carouselView, bool loop) where T : ICarouselView { - carouselView.Loop = new PropertyValue(loop); + carouselView.Loop = loop; return carouselView; } @@ -188,7 +188,7 @@ public static T Loop(this T carouselView, Func loopFunc) public static T PeekAreaInsets(this T carouselView, Microsoft.Maui.Thickness peekAreaInsets, RxThicknessAnimation? customAnimation = null) where T : ICarouselView { - carouselView.PeekAreaInsets = new PropertyValue(peekAreaInsets); + carouselView.PeekAreaInsets = peekAreaInsets; carouselView.AppendAnimatable(Microsoft.Maui.Controls.CarouselView.PeekAreaInsetsProperty, customAnimation ?? new RxSimpleThicknessAnimation(peekAreaInsets), v => carouselView.PeekAreaInsets = new PropertyValue(v.CurrentValue())); return carouselView; } @@ -203,7 +203,7 @@ public static T PeekAreaInsets(this T carouselView, Func(this T carouselView, double leftRight, double topBottom, RxThicknessAnimation? customAnimation = null) where T : ICarouselView { - carouselView.PeekAreaInsets = new PropertyValue(new Thickness(leftRight, topBottom)); + carouselView.PeekAreaInsets = new Thickness(leftRight, topBottom); carouselView.AppendAnimatable(Microsoft.Maui.Controls.CarouselView.PeekAreaInsetsProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(leftRight, topBottom)), v => carouselView.PeekAreaInsets = new PropertyValue(v.CurrentValue())); return carouselView; } @@ -211,7 +211,7 @@ public static T PeekAreaInsets(this T carouselView, double leftRight, double public static T PeekAreaInsets(this T carouselView, double uniformSize, RxThicknessAnimation? customAnimation = null) where T : ICarouselView { - carouselView.PeekAreaInsets = new PropertyValue(new Thickness(uniformSize)); + carouselView.PeekAreaInsets = new Thickness(uniformSize); carouselView.AppendAnimatable(Microsoft.Maui.Controls.CarouselView.PeekAreaInsetsProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(uniformSize)), v => carouselView.PeekAreaInsets = new PropertyValue(v.CurrentValue())); return carouselView; } @@ -219,7 +219,7 @@ public static T PeekAreaInsets(this T carouselView, double uniformSize, RxThi public static T PeekAreaInsets(this T carouselView, double left, double top, double right, double bottom, RxThicknessAnimation? customAnimation = null) where T : ICarouselView { - carouselView.PeekAreaInsets = new PropertyValue(new Thickness(left, top, right, bottom)); + carouselView.PeekAreaInsets = new Thickness(left, top, right, bottom); carouselView.AppendAnimatable(Microsoft.Maui.Controls.CarouselView.PeekAreaInsetsProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(left, top, right, bottom)), v => carouselView.PeekAreaInsets = new PropertyValue(v.CurrentValue())); return carouselView; } @@ -227,7 +227,7 @@ public static T PeekAreaInsets(this T carouselView, double left, double top, public static T IsBounceEnabled(this T carouselView, bool isBounceEnabled) where T : ICarouselView { - carouselView.IsBounceEnabled = new PropertyValue(isBounceEnabled); + carouselView.IsBounceEnabled = isBounceEnabled; return carouselView; } @@ -241,7 +241,7 @@ public static T IsBounceEnabled(this T carouselView, Func isBounceEnabl public static T IsSwipeEnabled(this T carouselView, bool isSwipeEnabled) where T : ICarouselView { - carouselView.IsSwipeEnabled = new PropertyValue(isSwipeEnabled); + carouselView.IsSwipeEnabled = isSwipeEnabled; return carouselView; } @@ -255,7 +255,7 @@ public static T IsSwipeEnabled(this T carouselView, Func isSwipeEnabled public static T IsScrollAnimated(this T carouselView, bool isScrollAnimated) where T : ICarouselView { - carouselView.IsScrollAnimated = new PropertyValue(isScrollAnimated); + carouselView.IsScrollAnimated = isScrollAnimated; return carouselView; } @@ -269,7 +269,7 @@ public static T IsScrollAnimated(this T carouselView, Func isScrollAnim public static T CurrentItem(this T carouselView, object currentItem) where T : ICarouselView { - carouselView.CurrentItem = new PropertyValue(currentItem); + carouselView.CurrentItem = currentItem; return carouselView; } @@ -283,7 +283,7 @@ public static T CurrentItem(this T carouselView, Func currentItemFunc public static T Position(this T carouselView, int position) where T : ICarouselView { - carouselView.Position = new PropertyValue(position); + carouselView.Position = position; return carouselView; } diff --git a/src/MauiReactor/Cell.cs b/src/MauiReactor/Cell.cs index d8b93437..4512e4cf 100644 --- a/src/MauiReactor/Cell.cs +++ b/src/MauiReactor/Cell.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface ICell : IElement { - PropertyValue? IsEnabled { get; set; } + object? IsEnabled { get; set; } Action? AppearingAction { get; set; } @@ -37,7 +37,7 @@ protected Cell(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ICell.IsEnabled { get; set; } + object? ICell.IsEnabled { get; set; } Action? ICell.AppearingAction { get; set; } @@ -139,7 +139,7 @@ public static partial class CellExtensions public static T IsEnabled(this T cell, bool isEnabled) where T : ICell { - cell.IsEnabled = new PropertyValue(isEnabled); + cell.IsEnabled = isEnabled; return cell; } diff --git a/src/MauiReactor/CheckBox.cs b/src/MauiReactor/CheckBox.cs index 3ad5057b..cf6e0d1c 100644 --- a/src/MauiReactor/CheckBox.cs +++ b/src/MauiReactor/CheckBox.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface ICheckBox : IView { - PropertyValue? IsChecked { get; set; } + object? IsChecked { get; set; } - PropertyValue? Color { get; set; } + object? Color { get; set; } Action? CheckedChangedAction { get; set; } @@ -31,9 +31,9 @@ public CheckBox(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ICheckBox.IsChecked { get; set; } + object? ICheckBox.IsChecked { get; set; } - PropertyValue? ICheckBox.Color { get; set; } + object? ICheckBox.Color { get; set; } Action? ICheckBox.CheckedChangedAction { get; set; } @@ -114,7 +114,7 @@ public static partial class CheckBoxExtensions public static T IsChecked(this T checkBox, bool isChecked) where T : ICheckBox { - checkBox.IsChecked = new PropertyValue(isChecked); + checkBox.IsChecked = isChecked; return checkBox; } @@ -128,7 +128,7 @@ public static T IsChecked(this T checkBox, Func isCheckedFunc) public static T Color(this T checkBox, Microsoft.Maui.Graphics.Color color) where T : ICheckBox { - checkBox.Color = new PropertyValue(color); + checkBox.Color = color; return checkBox; } diff --git a/src/MauiReactor/Compatibility/Layout.cs b/src/MauiReactor/Compatibility/Layout.cs index 1ecaff76..0b7d2c89 100644 --- a/src/MauiReactor/Compatibility/Layout.cs +++ b/src/MauiReactor/Compatibility/Layout.cs @@ -12,11 +12,11 @@ namespace MauiReactor.Compatibility; public partial interface ILayout : IView { - PropertyValue? IsClippedToBounds { get; set; } + object? IsClippedToBounds { get; set; } - PropertyValue? CascadeInputTransparent { get; set; } + object? CascadeInputTransparent { get; set; } - PropertyValue? Padding { get; set; } + object? Padding { get; set; } Action? LayoutChangedAction { get; set; } @@ -33,11 +33,11 @@ protected Layout(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ILayout.IsClippedToBounds { get; set; } + object? ILayout.IsClippedToBounds { get; set; } - PropertyValue? ILayout.CascadeInputTransparent { get; set; } + object? ILayout.CascadeInputTransparent { get; set; } - PropertyValue? ILayout.Padding { get; set; } + object? ILayout.Padding { get; set; } Action? ILayout.LayoutChangedAction { get; set; } @@ -118,7 +118,7 @@ public static partial class LayoutExtensions public static T IsClippedToBounds(this T layout, bool isClippedToBounds) where T : ILayout { - layout.IsClippedToBounds = new PropertyValue(isClippedToBounds); + layout.IsClippedToBounds = isClippedToBounds; return layout; } @@ -132,7 +132,7 @@ public static T IsClippedToBounds(this T layout, Func isClippedToBounds public static T CascadeInputTransparent(this T layout, bool cascadeInputTransparent) where T : ILayout { - layout.CascadeInputTransparent = new PropertyValue(cascadeInputTransparent); + layout.CascadeInputTransparent = cascadeInputTransparent; return layout; } @@ -146,7 +146,7 @@ public static T CascadeInputTransparent(this T layout, Func cascadeInpu public static T Padding(this T layout, Microsoft.Maui.Thickness padding, RxThicknessAnimation? customAnimation = null) where T : ILayout { - layout.Padding = new PropertyValue(padding); + layout.Padding = padding; layout.AppendAnimatable(Microsoft.Maui.Controls.Compatibility.Layout.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(padding), v => layout.Padding = new PropertyValue(v.CurrentValue())); return layout; } @@ -161,7 +161,7 @@ public static T Padding(this T layout, Func padding public static T Padding(this T layout, double leftRight, double topBottom, RxThicknessAnimation? customAnimation = null) where T : ILayout { - layout.Padding = new PropertyValue(new Thickness(leftRight, topBottom)); + layout.Padding = new Thickness(leftRight, topBottom); layout.AppendAnimatable(Microsoft.Maui.Controls.Compatibility.Layout.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(leftRight, topBottom)), v => layout.Padding = new PropertyValue(v.CurrentValue())); return layout; } @@ -169,7 +169,7 @@ public static T Padding(this T layout, double leftRight, double topBottom, Rx public static T Padding(this T layout, double uniformSize, RxThicknessAnimation? customAnimation = null) where T : ILayout { - layout.Padding = new PropertyValue(new Thickness(uniformSize)); + layout.Padding = new Thickness(uniformSize); layout.AppendAnimatable(Microsoft.Maui.Controls.Compatibility.Layout.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(uniformSize)), v => layout.Padding = new PropertyValue(v.CurrentValue())); return layout; } @@ -177,7 +177,7 @@ public static T Padding(this T layout, double uniformSize, RxThicknessAnimati public static T Padding(this T layout, double left, double top, double right, double bottom, RxThicknessAnimation? customAnimation = null) where T : ILayout { - layout.Padding = new PropertyValue(new Thickness(left, top, right, bottom)); + layout.Padding = new Thickness(left, top, right, bottom); layout.AppendAnimatable(Microsoft.Maui.Controls.Compatibility.Layout.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(left, top, right, bottom)), v => layout.Padding = new PropertyValue(v.CurrentValue())); return layout; } diff --git a/src/MauiReactor/ContentPage.cs b/src/MauiReactor/ContentPage.cs index b8ae03c9..1a656593 100644 --- a/src/MauiReactor/ContentPage.cs +++ b/src/MauiReactor/ContentPage.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface IContentPage : ITemplatedPage { - PropertyValue? HideSoftInputOnTapped { get; set; } + object? HideSoftInputOnTapped { get; set; } } public partial class ContentPage : TemplatedPage, IContentPage where T : Microsoft.Maui.Controls.ContentPage, new() @@ -25,7 +25,7 @@ public ContentPage(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IContentPage.HideSoftInputOnTapped { get; set; } + object? IContentPage.HideSoftInputOnTapped { get; set; } internal override void Reset() { @@ -68,7 +68,7 @@ public static partial class ContentPageExtensions public static T HideSoftInputOnTapped(this T contentPage, bool hideSoftInputOnTapped) where T : IContentPage { - contentPage.HideSoftInputOnTapped = new PropertyValue(hideSoftInputOnTapped); + contentPage.HideSoftInputOnTapped = hideSoftInputOnTapped; return contentPage; } diff --git a/src/MauiReactor/DatePicker.cs b/src/MauiReactor/DatePicker.cs index 26af3999..4e7437ec 100644 --- a/src/MauiReactor/DatePicker.cs +++ b/src/MauiReactor/DatePicker.cs @@ -12,25 +12,25 @@ namespace MauiReactor; public partial interface IDatePicker : IView { - PropertyValue? Format { get; set; } + object? Format { get; set; } - PropertyValue? Date { get; set; } + object? Date { get; set; } - PropertyValue? MinimumDate { get; set; } + object? MinimumDate { get; set; } - PropertyValue? MaximumDate { get; set; } + object? MaximumDate { get; set; } - PropertyValue? TextColor { get; set; } + object? TextColor { get; set; } - PropertyValue? CharacterSpacing { get; set; } + object? CharacterSpacing { get; set; } - PropertyValue? FontFamily { get; set; } + object? FontFamily { get; set; } - PropertyValue? FontSize { get; set; } + object? FontSize { get; set; } - PropertyValue? FontAttributes { get; set; } + object? FontAttributes { get; set; } - PropertyValue? FontAutoScalingEnabled { get; set; } + object? FontAutoScalingEnabled { get; set; } Action? DateSelectedAction { get; set; } @@ -47,25 +47,25 @@ public DatePicker(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IDatePicker.Format { get; set; } + object? IDatePicker.Format { get; set; } - PropertyValue? IDatePicker.Date { get; set; } + object? IDatePicker.Date { get; set; } - PropertyValue? IDatePicker.MinimumDate { get; set; } + object? IDatePicker.MinimumDate { get; set; } - PropertyValue? IDatePicker.MaximumDate { get; set; } + object? IDatePicker.MaximumDate { get; set; } - PropertyValue? IDatePicker.TextColor { get; set; } + object? IDatePicker.TextColor { get; set; } - PropertyValue? IDatePicker.CharacterSpacing { get; set; } + object? IDatePicker.CharacterSpacing { get; set; } - PropertyValue? IDatePicker.FontFamily { get; set; } + object? IDatePicker.FontFamily { get; set; } - PropertyValue? IDatePicker.FontSize { get; set; } + object? IDatePicker.FontSize { get; set; } - PropertyValue? IDatePicker.FontAttributes { get; set; } + object? IDatePicker.FontAttributes { get; set; } - PropertyValue? IDatePicker.FontAutoScalingEnabled { get; set; } + object? IDatePicker.FontAutoScalingEnabled { get; set; } Action? IDatePicker.DateSelectedAction { get; set; } @@ -172,7 +172,7 @@ public static partial class DatePickerExtensions public static T Format(this T datePicker, string format) where T : IDatePicker { - datePicker.Format = new PropertyValue(format); + datePicker.Format = format; return datePicker; } @@ -186,7 +186,7 @@ public static T Format(this T datePicker, Func formatFunc) public static T Date(this T datePicker, System.DateTime date) where T : IDatePicker { - datePicker.Date = new PropertyValue(date); + datePicker.Date = date; return datePicker; } @@ -200,7 +200,7 @@ public static T Date(this T datePicker, Func dateFunc) public static T MinimumDate(this T datePicker, System.DateTime minimumDate) where T : IDatePicker { - datePicker.MinimumDate = new PropertyValue(minimumDate); + datePicker.MinimumDate = minimumDate; return datePicker; } @@ -214,7 +214,7 @@ public static T MinimumDate(this T datePicker, Func minimumD public static T MaximumDate(this T datePicker, System.DateTime maximumDate) where T : IDatePicker { - datePicker.MaximumDate = new PropertyValue(maximumDate); + datePicker.MaximumDate = maximumDate; return datePicker; } @@ -228,7 +228,7 @@ public static T MaximumDate(this T datePicker, Func maximumD public static T TextColor(this T datePicker, Microsoft.Maui.Graphics.Color textColor) where T : IDatePicker { - datePicker.TextColor = new PropertyValue(textColor); + datePicker.TextColor = textColor; return datePicker; } @@ -242,7 +242,7 @@ public static T TextColor(this T datePicker, Func(this T datePicker, double characterSpacing, RxDoubleAnimation? customAnimation = null) where T : IDatePicker { - datePicker.CharacterSpacing = new PropertyValue(characterSpacing); + datePicker.CharacterSpacing = characterSpacing; datePicker.AppendAnimatable(Microsoft.Maui.Controls.DatePicker.CharacterSpacingProperty, customAnimation ?? new RxDoubleAnimation(characterSpacing), v => datePicker.CharacterSpacing = new PropertyValue(v.CurrentValue())); return datePicker; } @@ -257,7 +257,7 @@ public static T CharacterSpacing(this T datePicker, Func characterSpa public static T FontFamily(this T datePicker, string fontFamily) where T : IDatePicker { - datePicker.FontFamily = new PropertyValue(fontFamily); + datePicker.FontFamily = fontFamily; return datePicker; } @@ -271,7 +271,7 @@ public static T FontFamily(this T datePicker, Func fontFamilyFunc) public static T FontSize(this T datePicker, double fontSize, RxDoubleAnimation? customAnimation = null) where T : IDatePicker { - datePicker.FontSize = new PropertyValue(fontSize); + datePicker.FontSize = fontSize; datePicker.AppendAnimatable(Microsoft.Maui.Controls.DatePicker.FontSizeProperty, customAnimation ?? new RxDoubleAnimation(fontSize), v => datePicker.FontSize = new PropertyValue(v.CurrentValue())); return datePicker; } @@ -286,7 +286,7 @@ public static T FontSize(this T datePicker, Func fontSizeFunc) public static T FontAttributes(this T datePicker, Microsoft.Maui.Controls.FontAttributes fontAttributes) where T : IDatePicker { - datePicker.FontAttributes = new PropertyValue(fontAttributes); + datePicker.FontAttributes = fontAttributes; return datePicker; } @@ -300,7 +300,7 @@ public static T FontAttributes(this T datePicker, Func(this T datePicker, bool fontAutoScalingEnabled) where T : IDatePicker { - datePicker.FontAutoScalingEnabled = new PropertyValue(fontAutoScalingEnabled); + datePicker.FontAutoScalingEnabled = fontAutoScalingEnabled; return datePicker; } diff --git a/src/MauiReactor/DragGestureRecognizer.cs b/src/MauiReactor/DragGestureRecognizer.cs index 86a9b514..10b17f46 100644 --- a/src/MauiReactor/DragGestureRecognizer.cs +++ b/src/MauiReactor/DragGestureRecognizer.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface IDragGestureRecognizer : IGestureRecognizer { - PropertyValue? CanDrag { get; set; } + object? CanDrag { get; set; } Action? DropCompletedAction { get; set; } @@ -33,7 +33,7 @@ public DragGestureRecognizer(Action componentRefAction) : base(componentRefA { } - PropertyValue? IDragGestureRecognizer.CanDrag { get; set; } + object? IDragGestureRecognizer.CanDrag { get; set; } Action? IDragGestureRecognizer.DropCompletedAction { get; set; } @@ -129,7 +129,7 @@ public static partial class DragGestureRecognizerExtensions public static T CanDrag(this T dragGestureRecognizer, bool canDrag) where T : IDragGestureRecognizer { - dragGestureRecognizer.CanDrag = new PropertyValue(canDrag); + dragGestureRecognizer.CanDrag = canDrag; return dragGestureRecognizer; } diff --git a/src/MauiReactor/DropGestureRecognizer.cs b/src/MauiReactor/DropGestureRecognizer.cs index 7b1ecdde..b3d9d08b 100644 --- a/src/MauiReactor/DropGestureRecognizer.cs +++ b/src/MauiReactor/DropGestureRecognizer.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface IDropGestureRecognizer : IGestureRecognizer { - PropertyValue? AllowDrop { get; set; } + object? AllowDrop { get; set; } Action? DragLeaveAction { get; set; } @@ -37,7 +37,7 @@ public DropGestureRecognizer(Action componentRefAction) : base(componentRefA { } - PropertyValue? IDropGestureRecognizer.AllowDrop { get; set; } + object? IDropGestureRecognizer.AllowDrop { get; set; } Action? IDropGestureRecognizer.DragLeaveAction { get; set; } @@ -150,7 +150,7 @@ public static partial class DropGestureRecognizerExtensions public static T AllowDrop(this T dropGestureRecognizer, bool allowDrop) where T : IDropGestureRecognizer { - dropGestureRecognizer.AllowDrop = new PropertyValue(allowDrop); + dropGestureRecognizer.AllowDrop = allowDrop; return dropGestureRecognizer; } diff --git a/src/MauiReactor/Editor.cs b/src/MauiReactor/Editor.cs index 8e5d155b..da4a0d70 100644 --- a/src/MauiReactor/Editor.cs +++ b/src/MauiReactor/Editor.cs @@ -12,11 +12,11 @@ namespace MauiReactor; public partial interface IEditor : IInputView { - PropertyValue? AutoSize { get; set; } + object? AutoSize { get; set; } - PropertyValue? HorizontalTextAlignment { get; set; } + object? HorizontalTextAlignment { get; set; } - PropertyValue? VerticalTextAlignment { get; set; } + object? VerticalTextAlignment { get; set; } Action? CompletedAction { get; set; } @@ -33,11 +33,11 @@ public Editor(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IEditor.AutoSize { get; set; } + object? IEditor.AutoSize { get; set; } - PropertyValue? IEditor.HorizontalTextAlignment { get; set; } + object? IEditor.HorizontalTextAlignment { get; set; } - PropertyValue? IEditor.VerticalTextAlignment { get; set; } + object? IEditor.VerticalTextAlignment { get; set; } Action? IEditor.CompletedAction { get; set; } @@ -120,7 +120,7 @@ public static partial class EditorExtensions public static T AutoSize(this T editor, Microsoft.Maui.Controls.EditorAutoSizeOption autoSize) where T : IEditor { - editor.AutoSize = new PropertyValue(autoSize); + editor.AutoSize = autoSize; return editor; } @@ -134,7 +134,7 @@ public static T AutoSize(this T editor, Func(this T editor, Microsoft.Maui.TextAlignment horizontalTextAlignment) where T : IEditor { - editor.HorizontalTextAlignment = new PropertyValue(horizontalTextAlignment); + editor.HorizontalTextAlignment = horizontalTextAlignment; return editor; } @@ -148,7 +148,7 @@ public static T HorizontalTextAlignment(this T editor, Func(this T editor, Microsoft.Maui.TextAlignment verticalTextAlignment) where T : IEditor { - editor.VerticalTextAlignment = new PropertyValue(verticalTextAlignment); + editor.VerticalTextAlignment = verticalTextAlignment; return editor; } diff --git a/src/MauiReactor/Element.cs b/src/MauiReactor/Element.cs index 9ef91b01..5a982b47 100644 --- a/src/MauiReactor/Element.cs +++ b/src/MauiReactor/Element.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface IElement : IVisualNode { - PropertyValue? AutomationId { get; set; } + object? AutomationId { get; set; } - PropertyValue? ClassId { get; set; } + object? ClassId { get; set; } Action? ChildAddedAction { get; set; } @@ -59,9 +59,9 @@ protected Element(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IElement.AutomationId { get; set; } + object? IElement.AutomationId { get; set; } - PropertyValue? IElement.ClassId { get; set; } + object? IElement.ClassId { get; set; } Action? IElement.ChildAddedAction { get; set; } @@ -250,7 +250,7 @@ public static partial class ElementExtensions public static T AutomationId(this T element, string automationId) where T : IElement { - element.AutomationId = new PropertyValue(automationId); + element.AutomationId = automationId; return element; } @@ -264,7 +264,7 @@ public static T AutomationId(this T element, Func automationIdFunc) public static T ClassId(this T element, string classId) where T : IElement { - element.ClassId = new PropertyValue(classId); + element.ClassId = classId; return element; } diff --git a/src/MauiReactor/Entry.cs b/src/MauiReactor/Entry.cs index 5466841d..bbc83e8d 100644 --- a/src/MauiReactor/Entry.cs +++ b/src/MauiReactor/Entry.cs @@ -12,15 +12,15 @@ namespace MauiReactor; public partial interface IEntry : IInputView { - PropertyValue? ReturnType { get; set; } + object? ReturnType { get; set; } - PropertyValue? IsPassword { get; set; } + object? IsPassword { get; set; } - PropertyValue? HorizontalTextAlignment { get; set; } + object? HorizontalTextAlignment { get; set; } - PropertyValue? VerticalTextAlignment { get; set; } + object? VerticalTextAlignment { get; set; } - PropertyValue? ClearButtonVisibility { get; set; } + object? ClearButtonVisibility { get; set; } Action? CompletedAction { get; set; } @@ -37,15 +37,15 @@ public Entry(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IEntry.ReturnType { get; set; } + object? IEntry.ReturnType { get; set; } - PropertyValue? IEntry.IsPassword { get; set; } + object? IEntry.IsPassword { get; set; } - PropertyValue? IEntry.HorizontalTextAlignment { get; set; } + object? IEntry.HorizontalTextAlignment { get; set; } - PropertyValue? IEntry.VerticalTextAlignment { get; set; } + object? IEntry.VerticalTextAlignment { get; set; } - PropertyValue? IEntry.ClearButtonVisibility { get; set; } + object? IEntry.ClearButtonVisibility { get; set; } Action? IEntry.CompletedAction { get; set; } @@ -132,7 +132,7 @@ public static partial class EntryExtensions public static T ReturnType(this T entry, Microsoft.Maui.ReturnType returnType) where T : IEntry { - entry.ReturnType = new PropertyValue(returnType); + entry.ReturnType = returnType; return entry; } @@ -146,7 +146,7 @@ public static T ReturnType(this T entry, Func retu public static T IsPassword(this T entry, bool isPassword) where T : IEntry { - entry.IsPassword = new PropertyValue(isPassword); + entry.IsPassword = isPassword; return entry; } @@ -160,7 +160,7 @@ public static T IsPassword(this T entry, Func isPasswordFunc) public static T HorizontalTextAlignment(this T entry, Microsoft.Maui.TextAlignment horizontalTextAlignment) where T : IEntry { - entry.HorizontalTextAlignment = new PropertyValue(horizontalTextAlignment); + entry.HorizontalTextAlignment = horizontalTextAlignment; return entry; } @@ -174,7 +174,7 @@ public static T HorizontalTextAlignment(this T entry, Func(this T entry, Microsoft.Maui.TextAlignment verticalTextAlignment) where T : IEntry { - entry.VerticalTextAlignment = new PropertyValue(verticalTextAlignment); + entry.VerticalTextAlignment = verticalTextAlignment; return entry; } @@ -188,7 +188,7 @@ public static T VerticalTextAlignment(this T entry, Func(this T entry, Microsoft.Maui.ClearButtonVisibility clearButtonVisibility) where T : IEntry { - entry.ClearButtonVisibility = new PropertyValue(clearButtonVisibility); + entry.ClearButtonVisibility = clearButtonVisibility; return entry; } diff --git a/src/MauiReactor/EntryCell.cs b/src/MauiReactor/EntryCell.cs index fe60f17b..8d72e71e 100644 --- a/src/MauiReactor/EntryCell.cs +++ b/src/MauiReactor/EntryCell.cs @@ -12,19 +12,19 @@ namespace MauiReactor; public partial interface IEntryCell : ICell { - PropertyValue? Text { get; set; } + object? Text { get; set; } - PropertyValue? Label { get; set; } + object? Label { get; set; } - PropertyValue? Placeholder { get; set; } + object? Placeholder { get; set; } - PropertyValue? LabelColor { get; set; } + object? LabelColor { get; set; } - PropertyValue? Keyboard { get; set; } + object? Keyboard { get; set; } - PropertyValue? HorizontalTextAlignment { get; set; } + object? HorizontalTextAlignment { get; set; } - PropertyValue? VerticalTextAlignment { get; set; } + object? VerticalTextAlignment { get; set; } Action? CompletedAction { get; set; } @@ -41,19 +41,19 @@ public EntryCell(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IEntryCell.Text { get; set; } + object? IEntryCell.Text { get; set; } - PropertyValue? IEntryCell.Label { get; set; } + object? IEntryCell.Label { get; set; } - PropertyValue? IEntryCell.Placeholder { get; set; } + object? IEntryCell.Placeholder { get; set; } - PropertyValue? IEntryCell.LabelColor { get; set; } + object? IEntryCell.LabelColor { get; set; } - PropertyValue? IEntryCell.Keyboard { get; set; } + object? IEntryCell.Keyboard { get; set; } - PropertyValue? IEntryCell.HorizontalTextAlignment { get; set; } + object? IEntryCell.HorizontalTextAlignment { get; set; } - PropertyValue? IEntryCell.VerticalTextAlignment { get; set; } + object? IEntryCell.VerticalTextAlignment { get; set; } Action? IEntryCell.CompletedAction { get; set; } @@ -144,7 +144,7 @@ public static partial class EntryCellExtensions public static T Text(this T entryCell, string text) where T : IEntryCell { - entryCell.Text = new PropertyValue(text); + entryCell.Text = text; return entryCell; } @@ -158,7 +158,7 @@ public static T Text(this T entryCell, Func textFunc) public static T Label(this T entryCell, string label) where T : IEntryCell { - entryCell.Label = new PropertyValue(label); + entryCell.Label = label; return entryCell; } @@ -172,7 +172,7 @@ public static T Label(this T entryCell, Func labelFunc) public static T Placeholder(this T entryCell, string placeholder) where T : IEntryCell { - entryCell.Placeholder = new PropertyValue(placeholder); + entryCell.Placeholder = placeholder; return entryCell; } @@ -186,7 +186,7 @@ public static T Placeholder(this T entryCell, Func placeholderFunc) public static T LabelColor(this T entryCell, Microsoft.Maui.Graphics.Color labelColor) where T : IEntryCell { - entryCell.LabelColor = new PropertyValue(labelColor); + entryCell.LabelColor = labelColor; return entryCell; } @@ -200,7 +200,7 @@ public static T LabelColor(this T entryCell, Func(this T entryCell, Microsoft.Maui.Keyboard keyboard) where T : IEntryCell { - entryCell.Keyboard = new PropertyValue(keyboard); + entryCell.Keyboard = keyboard; return entryCell; } @@ -214,7 +214,7 @@ public static T Keyboard(this T entryCell, Func keyb public static T HorizontalTextAlignment(this T entryCell, Microsoft.Maui.TextAlignment horizontalTextAlignment) where T : IEntryCell { - entryCell.HorizontalTextAlignment = new PropertyValue(horizontalTextAlignment); + entryCell.HorizontalTextAlignment = horizontalTextAlignment; return entryCell; } @@ -228,7 +228,7 @@ public static T HorizontalTextAlignment(this T entryCell, Func(this T entryCell, Microsoft.Maui.TextAlignment verticalTextAlignment) where T : IEntryCell { - entryCell.VerticalTextAlignment = new PropertyValue(verticalTextAlignment); + entryCell.VerticalTextAlignment = verticalTextAlignment; return entryCell; } diff --git a/src/MauiReactor/FlexLayout.cs b/src/MauiReactor/FlexLayout.cs index 7e63e3ee..4adf5ff1 100644 --- a/src/MauiReactor/FlexLayout.cs +++ b/src/MauiReactor/FlexLayout.cs @@ -12,17 +12,17 @@ namespace MauiReactor; public partial interface IFlexLayout : ILayout { - PropertyValue? Direction { get; set; } + object? Direction { get; set; } - PropertyValue? JustifyContent { get; set; } + object? JustifyContent { get; set; } - PropertyValue? AlignContent { get; set; } + object? AlignContent { get; set; } - PropertyValue? AlignItems { get; set; } + object? AlignItems { get; set; } - PropertyValue? Position { get; set; } + object? Position { get; set; } - PropertyValue? Wrap { get; set; } + object? Wrap { get; set; } } public partial class FlexLayout : Layout, IFlexLayout where T : Microsoft.Maui.Controls.FlexLayout, new() @@ -35,17 +35,17 @@ public FlexLayout(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IFlexLayout.Direction { get; set; } + object? IFlexLayout.Direction { get; set; } - PropertyValue? IFlexLayout.JustifyContent { get; set; } + object? IFlexLayout.JustifyContent { get; set; } - PropertyValue? IFlexLayout.AlignContent { get; set; } + object? IFlexLayout.AlignContent { get; set; } - PropertyValue? IFlexLayout.AlignItems { get; set; } + object? IFlexLayout.AlignItems { get; set; } - PropertyValue? IFlexLayout.Position { get; set; } + object? IFlexLayout.Position { get; set; } - PropertyValue? IFlexLayout.Wrap { get; set; } + object? IFlexLayout.Wrap { get; set; } internal override void Reset() { @@ -98,7 +98,7 @@ public static partial class FlexLayoutExtensions public static T Direction(this T flexLayout, Microsoft.Maui.Layouts.FlexDirection direction) where T : IFlexLayout { - flexLayout.Direction = new PropertyValue(direction); + flexLayout.Direction = direction; return flexLayout; } @@ -112,7 +112,7 @@ public static T Direction(this T flexLayout, Func(this T flexLayout, Microsoft.Maui.Layouts.FlexJustify justifyContent) where T : IFlexLayout { - flexLayout.JustifyContent = new PropertyValue(justifyContent); + flexLayout.JustifyContent = justifyContent; return flexLayout; } @@ -126,7 +126,7 @@ public static T JustifyContent(this T flexLayout, Func(this T flexLayout, Microsoft.Maui.Layouts.FlexAlignContent alignContent) where T : IFlexLayout { - flexLayout.AlignContent = new PropertyValue(alignContent); + flexLayout.AlignContent = alignContent; return flexLayout; } @@ -140,7 +140,7 @@ public static T AlignContent(this T flexLayout, Func(this T flexLayout, Microsoft.Maui.Layouts.FlexAlignItems alignItems) where T : IFlexLayout { - flexLayout.AlignItems = new PropertyValue(alignItems); + flexLayout.AlignItems = alignItems; return flexLayout; } @@ -154,7 +154,7 @@ public static T AlignItems(this T flexLayout, Func(this T flexLayout, Microsoft.Maui.Layouts.FlexPosition position) where T : IFlexLayout { - flexLayout.Position = new PropertyValue(position); + flexLayout.Position = position; return flexLayout; } @@ -168,7 +168,7 @@ public static T Position(this T flexLayout, Func(this T flexLayout, Microsoft.Maui.Layouts.FlexWrap wrap) where T : IFlexLayout { - flexLayout.Wrap = new PropertyValue(wrap); + flexLayout.Wrap = wrap; return flexLayout; } diff --git a/src/MauiReactor/FlyoutPage.cs b/src/MauiReactor/FlyoutPage.cs index 5700e7f4..69d451d7 100644 --- a/src/MauiReactor/FlyoutPage.cs +++ b/src/MauiReactor/FlyoutPage.cs @@ -12,11 +12,11 @@ namespace MauiReactor; public partial interface IFlyoutPage : IPage { - PropertyValue? IsGestureEnabled { get; set; } + object? IsGestureEnabled { get; set; } - PropertyValue? IsPresented { get; set; } + object? IsPresented { get; set; } - PropertyValue? FlyoutLayoutBehavior { get; set; } + object? FlyoutLayoutBehavior { get; set; } Action? IsPresentedChangedAction { get; set; } @@ -33,11 +33,11 @@ public FlyoutPage(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IFlyoutPage.IsGestureEnabled { get; set; } + object? IFlyoutPage.IsGestureEnabled { get; set; } - PropertyValue? IFlyoutPage.IsPresented { get; set; } + object? IFlyoutPage.IsPresented { get; set; } - PropertyValue? IFlyoutPage.FlyoutLayoutBehavior { get; set; } + object? IFlyoutPage.FlyoutLayoutBehavior { get; set; } Action? IFlyoutPage.IsPresentedChangedAction { get; set; } @@ -120,7 +120,7 @@ public static partial class FlyoutPageExtensions public static T IsGestureEnabled(this T flyoutPage, bool isGestureEnabled) where T : IFlyoutPage { - flyoutPage.IsGestureEnabled = new PropertyValue(isGestureEnabled); + flyoutPage.IsGestureEnabled = isGestureEnabled; return flyoutPage; } @@ -134,7 +134,7 @@ public static T IsGestureEnabled(this T flyoutPage, Func isGestureEnabl public static T IsPresented(this T flyoutPage, bool isPresented) where T : IFlyoutPage { - flyoutPage.IsPresented = new PropertyValue(isPresented); + flyoutPage.IsPresented = isPresented; return flyoutPage; } @@ -148,7 +148,7 @@ public static T IsPresented(this T flyoutPage, Func isPresentedFunc) public static T FlyoutLayoutBehavior(this T flyoutPage, Microsoft.Maui.Controls.FlyoutLayoutBehavior flyoutLayoutBehavior) where T : IFlyoutPage { - flyoutPage.FlyoutLayoutBehavior = new PropertyValue(flyoutLayoutBehavior); + flyoutPage.FlyoutLayoutBehavior = flyoutLayoutBehavior; return flyoutPage; } diff --git a/src/MauiReactor/Frame.cs b/src/MauiReactor/Frame.cs index e6a658fc..e7eebf1c 100644 --- a/src/MauiReactor/Frame.cs +++ b/src/MauiReactor/Frame.cs @@ -12,11 +12,11 @@ namespace MauiReactor; public partial interface IFrame : IContentView { - PropertyValue? BorderColor { get; set; } + object? BorderColor { get; set; } - PropertyValue? HasShadow { get; set; } + object? HasShadow { get; set; } - PropertyValue? CornerRadius { get; set; } + object? CornerRadius { get; set; } } public partial class Frame : ContentView, IFrame where T : Microsoft.Maui.Controls.Frame, new() @@ -29,11 +29,11 @@ public Frame(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IFrame.BorderColor { get; set; } + object? IFrame.BorderColor { get; set; } - PropertyValue? IFrame.HasShadow { get; set; } + object? IFrame.HasShadow { get; set; } - PropertyValue? IFrame.CornerRadius { get; set; } + object? IFrame.CornerRadius { get; set; } internal override void Reset() { @@ -80,7 +80,7 @@ public static partial class FrameExtensions public static T BorderColor(this T frame, Microsoft.Maui.Graphics.Color borderColor) where T : IFrame { - frame.BorderColor = new PropertyValue(borderColor); + frame.BorderColor = borderColor; return frame; } @@ -94,7 +94,7 @@ public static T BorderColor(this T frame, Func public static T HasShadow(this T frame, bool hasShadow) where T : IFrame { - frame.HasShadow = new PropertyValue(hasShadow); + frame.HasShadow = hasShadow; return frame; } @@ -108,7 +108,7 @@ public static T HasShadow(this T frame, Func hasShadowFunc) public static T CornerRadius(this T frame, float cornerRadius) where T : IFrame { - frame.CornerRadius = new PropertyValue(cornerRadius); + frame.CornerRadius = cornerRadius; return frame; } diff --git a/src/MauiReactor/GraphicsView.cs b/src/MauiReactor/GraphicsView.cs index ea008b8b..9fdb515a 100644 --- a/src/MauiReactor/GraphicsView.cs +++ b/src/MauiReactor/GraphicsView.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface IGraphicsView : IView { - PropertyValue? Drawable { get; set; } + object? Drawable { get; set; } Action? StartHoverInteractionAction { get; set; } @@ -53,7 +53,7 @@ public GraphicsView(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IGraphicsView.Drawable { get; set; } + object? IGraphicsView.Drawable { get; set; } Action? IGraphicsView.StartHoverInteractionAction { get; set; } @@ -234,7 +234,7 @@ public static partial class GraphicsViewExtensions public static T Drawable(this T graphicsView, Microsoft.Maui.Graphics.IDrawable drawable) where T : IGraphicsView { - graphicsView.Drawable = new PropertyValue(drawable); + graphicsView.Drawable = drawable; return graphicsView; } diff --git a/src/MauiReactor/Grid.cs b/src/MauiReactor/Grid.cs index 0a9185c8..a4ed6f80 100644 --- a/src/MauiReactor/Grid.cs +++ b/src/MauiReactor/Grid.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface IGrid : ILayout { - PropertyValue? RowSpacing { get; set; } + object? RowSpacing { get; set; } - PropertyValue? ColumnSpacing { get; set; } + object? ColumnSpacing { get; set; } } public partial class Grid : Layout, IGrid where T : Microsoft.Maui.Controls.Grid, new() @@ -27,9 +27,9 @@ public Grid(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IGrid.RowSpacing { get; set; } + object? IGrid.RowSpacing { get; set; } - PropertyValue? IGrid.ColumnSpacing { get; set; } + object? IGrid.ColumnSpacing { get; set; } internal override void Reset() { @@ -84,7 +84,7 @@ public static partial class GridExtensions public static T RowSpacing(this T grid, double rowSpacing, RxDoubleAnimation? customAnimation = null) where T : IGrid { - grid.RowSpacing = new PropertyValue(rowSpacing); + grid.RowSpacing = rowSpacing; grid.AppendAnimatable(Microsoft.Maui.Controls.Grid.RowSpacingProperty, customAnimation ?? new RxDoubleAnimation(rowSpacing), v => grid.RowSpacing = new PropertyValue(v.CurrentValue())); return grid; } @@ -99,7 +99,7 @@ public static T RowSpacing(this T grid, Func rowSpacingFunc) public static T ColumnSpacing(this T grid, double columnSpacing, RxDoubleAnimation? customAnimation = null) where T : IGrid { - grid.ColumnSpacing = new PropertyValue(columnSpacing); + grid.ColumnSpacing = columnSpacing; grid.AppendAnimatable(Microsoft.Maui.Controls.Grid.ColumnSpacingProperty, customAnimation ?? new RxDoubleAnimation(columnSpacing), v => grid.ColumnSpacing = new PropertyValue(v.CurrentValue())); return grid; } diff --git a/src/MauiReactor/GridItemsLayout.cs b/src/MauiReactor/GridItemsLayout.cs index ff832e46..2a1208b4 100644 --- a/src/MauiReactor/GridItemsLayout.cs +++ b/src/MauiReactor/GridItemsLayout.cs @@ -12,11 +12,11 @@ namespace MauiReactor; public partial interface IGridItemsLayout : IItemsLayout { - PropertyValue? Span { get; set; } + object? Span { get; set; } - PropertyValue? VerticalItemSpacing { get; set; } + object? VerticalItemSpacing { get; set; } - PropertyValue? HorizontalItemSpacing { get; set; } + object? HorizontalItemSpacing { get; set; } } public abstract partial class GridItemsLayout : ItemsLayout, IGridItemsLayout where T : Microsoft.Maui.Controls.GridItemsLayout, new() @@ -29,11 +29,11 @@ protected GridItemsLayout(Action componentRefAction) : base(componentRefActi { } - PropertyValue? IGridItemsLayout.Span { get; set; } + object? IGridItemsLayout.Span { get; set; } - PropertyValue? IGridItemsLayout.VerticalItemSpacing { get; set; } + object? IGridItemsLayout.VerticalItemSpacing { get; set; } - PropertyValue? IGridItemsLayout.HorizontalItemSpacing { get; set; } + object? IGridItemsLayout.HorizontalItemSpacing { get; set; } internal override void Reset() { @@ -79,7 +79,7 @@ public static partial class GridItemsLayoutExtensions public static T Span(this T gridItemsLayout, int span) where T : IGridItemsLayout { - gridItemsLayout.Span = new PropertyValue(span); + gridItemsLayout.Span = span; return gridItemsLayout; } @@ -93,7 +93,7 @@ public static T Span(this T gridItemsLayout, Func spanFunc) public static T VerticalItemSpacing(this T gridItemsLayout, double verticalItemSpacing, RxDoubleAnimation? customAnimation = null) where T : IGridItemsLayout { - gridItemsLayout.VerticalItemSpacing = new PropertyValue(verticalItemSpacing); + gridItemsLayout.VerticalItemSpacing = verticalItemSpacing; gridItemsLayout.AppendAnimatable(Microsoft.Maui.Controls.GridItemsLayout.VerticalItemSpacingProperty, customAnimation ?? new RxDoubleAnimation(verticalItemSpacing), v => gridItemsLayout.VerticalItemSpacing = new PropertyValue(v.CurrentValue())); return gridItemsLayout; } @@ -108,7 +108,7 @@ public static T VerticalItemSpacing(this T gridItemsLayout, Func vert public static T HorizontalItemSpacing(this T gridItemsLayout, double horizontalItemSpacing, RxDoubleAnimation? customAnimation = null) where T : IGridItemsLayout { - gridItemsLayout.HorizontalItemSpacing = new PropertyValue(horizontalItemSpacing); + gridItemsLayout.HorizontalItemSpacing = horizontalItemSpacing; gridItemsLayout.AppendAnimatable(Microsoft.Maui.Controls.GridItemsLayout.HorizontalItemSpacingProperty, customAnimation ?? new RxDoubleAnimation(horizontalItemSpacing), v => gridItemsLayout.HorizontalItemSpacing = new PropertyValue(v.CurrentValue())); return gridItemsLayout; } diff --git a/src/MauiReactor/GroupableItemsView.cs b/src/MauiReactor/GroupableItemsView.cs index aee105b5..8cf6937d 100644 --- a/src/MauiReactor/GroupableItemsView.cs +++ b/src/MauiReactor/GroupableItemsView.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface IGroupableItemsView : ISelectableItemsView { - PropertyValue? IsGrouped { get; set; } + object? IsGrouped { get; set; } } public partial class GroupableItemsView : SelectableItemsView, IGroupableItemsView where T : Microsoft.Maui.Controls.GroupableItemsView, new() @@ -25,7 +25,7 @@ public GroupableItemsView(Action componentRefAction) : base(componentRefActi { } - PropertyValue? IGroupableItemsView.IsGrouped { get; set; } + object? IGroupableItemsView.IsGrouped { get; set; } internal override void Reset() { @@ -68,7 +68,7 @@ public static partial class GroupableItemsViewExtensions public static T IsGrouped(this T groupableItemsView, bool isGrouped) where T : IGroupableItemsView { - groupableItemsView.IsGrouped = new PropertyValue(isGrouped); + groupableItemsView.IsGrouped = isGrouped; return groupableItemsView; } diff --git a/src/MauiReactor/Image.cs b/src/MauiReactor/Image.cs index 0d2e0b89..15a91a75 100644 --- a/src/MauiReactor/Image.cs +++ b/src/MauiReactor/Image.cs @@ -12,13 +12,13 @@ namespace MauiReactor; public partial interface IImage : IView { - PropertyValue? Source { get; set; } + object? Source { get; set; } - PropertyValue? Aspect { get; set; } + object? Aspect { get; set; } - PropertyValue? IsOpaque { get; set; } + object? IsOpaque { get; set; } - PropertyValue? IsAnimationPlaying { get; set; } + object? IsAnimationPlaying { get; set; } } public partial class Image : View, IImage where T : Microsoft.Maui.Controls.Image, new() @@ -31,13 +31,13 @@ public Image(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IImage.Source { get; set; } + object? IImage.Source { get; set; } - PropertyValue? IImage.Aspect { get; set; } + object? IImage.Aspect { get; set; } - PropertyValue? IImage.IsOpaque { get; set; } + object? IImage.IsOpaque { get; set; } - PropertyValue? IImage.IsAnimationPlaying { get; set; } + object? IImage.IsAnimationPlaying { get; set; } internal override void Reset() { @@ -86,7 +86,7 @@ public static partial class ImageExtensions public static T Source(this T image, Microsoft.Maui.Controls.ImageSource source) where T : IImage { - image.Source = new PropertyValue(source); + image.Source = source; return image; } @@ -100,7 +100,7 @@ public static T Source(this T image, Func(this T image, string file) where T : IImage { - image.Source = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromFile(file)); + image.Source = Microsoft.Maui.Controls.ImageSource.FromFile(file); return image; } @@ -114,35 +114,40 @@ public static T Source(this T image, Func action) public static T Source(this T image, string resourceName, Assembly sourceAssembly) where T : IImage { - image.Source = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)); + image.Source = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly); return image; } public static T Source(this T image, Uri imageUri) where T : IImage { - image.Source = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri)); + image.Source = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri); return image; } public static T Source(this T image, Uri imageUri, bool cachingEnabled, TimeSpan cacheValidity) where T : IImage { - image.Source = new PropertyValue(new UriImageSource { Uri = imageUri, CachingEnabled = cachingEnabled, CacheValidity = cacheValidity }); + image.Source = new UriImageSource + { + Uri = imageUri, + CachingEnabled = cachingEnabled, + CacheValidity = cacheValidity + }; return image; } public static T Source(this T image, Func imageStream) where T : IImage { - image.Source = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream)); + image.Source = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream); return image; } public static T Aspect(this T image, Microsoft.Maui.Aspect aspect) where T : IImage { - image.Aspect = new PropertyValue(aspect); + image.Aspect = aspect; return image; } @@ -156,7 +161,7 @@ public static T Aspect(this T image, Func aspectFunc) public static T IsOpaque(this T image, bool isOpaque) where T : IImage { - image.IsOpaque = new PropertyValue(isOpaque); + image.IsOpaque = isOpaque; return image; } @@ -170,7 +175,7 @@ public static T IsOpaque(this T image, Func isOpaqueFunc) public static T IsAnimationPlaying(this T image, bool isAnimationPlaying) where T : IImage { - image.IsAnimationPlaying = new PropertyValue(isAnimationPlaying); + image.IsAnimationPlaying = isAnimationPlaying; return image; } diff --git a/src/MauiReactor/ImageButton.cs b/src/MauiReactor/ImageButton.cs index 095da26f..e046a54e 100644 --- a/src/MauiReactor/ImageButton.cs +++ b/src/MauiReactor/ImageButton.cs @@ -12,19 +12,19 @@ namespace MauiReactor; public partial interface IImageButton : IView { - PropertyValue? CornerRadius { get; set; } + object? CornerRadius { get; set; } - PropertyValue? BorderWidth { get; set; } + object? BorderWidth { get; set; } - PropertyValue? BorderColor { get; set; } + object? BorderColor { get; set; } - PropertyValue? Source { get; set; } + object? Source { get; set; } - PropertyValue? Aspect { get; set; } + object? Aspect { get; set; } - PropertyValue? IsOpaque { get; set; } + object? IsOpaque { get; set; } - PropertyValue? Padding { get; set; } + object? Padding { get; set; } Action? ClickedAction { get; set; } @@ -49,19 +49,19 @@ public ImageButton(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IImageButton.CornerRadius { get; set; } + object? IImageButton.CornerRadius { get; set; } - PropertyValue? IImageButton.BorderWidth { get; set; } + object? IImageButton.BorderWidth { get; set; } - PropertyValue? IImageButton.BorderColor { get; set; } + object? IImageButton.BorderColor { get; set; } - PropertyValue? IImageButton.Source { get; set; } + object? IImageButton.Source { get; set; } - PropertyValue? IImageButton.Aspect { get; set; } + object? IImageButton.Aspect { get; set; } - PropertyValue? IImageButton.IsOpaque { get; set; } + object? IImageButton.IsOpaque { get; set; } - PropertyValue? IImageButton.Padding { get; set; } + object? IImageButton.Padding { get; set; } Action? IImageButton.ClickedAction { get; set; } @@ -196,7 +196,7 @@ public static partial class ImageButtonExtensions public static T CornerRadius(this T imageButton, int cornerRadius) where T : IImageButton { - imageButton.CornerRadius = new PropertyValue(cornerRadius); + imageButton.CornerRadius = cornerRadius; return imageButton; } @@ -210,7 +210,7 @@ public static T CornerRadius(this T imageButton, Func cornerRadiusFunc) public static T BorderWidth(this T imageButton, double borderWidth, RxDoubleAnimation? customAnimation = null) where T : IImageButton { - imageButton.BorderWidth = new PropertyValue(borderWidth); + imageButton.BorderWidth = borderWidth; imageButton.AppendAnimatable(Microsoft.Maui.Controls.ImageButton.BorderWidthProperty, customAnimation ?? new RxDoubleAnimation(borderWidth), v => imageButton.BorderWidth = new PropertyValue(v.CurrentValue())); return imageButton; } @@ -225,7 +225,7 @@ public static T BorderWidth(this T imageButton, Func borderWidthFunc) public static T BorderColor(this T imageButton, Microsoft.Maui.Graphics.Color borderColor) where T : IImageButton { - imageButton.BorderColor = new PropertyValue(borderColor); + imageButton.BorderColor = borderColor; return imageButton; } @@ -239,7 +239,7 @@ public static T BorderColor(this T imageButton, Func(this T imageButton, Microsoft.Maui.Controls.ImageSource source) where T : IImageButton { - imageButton.Source = new PropertyValue(source); + imageButton.Source = source; return imageButton; } @@ -253,7 +253,7 @@ public static T Source(this T imageButton, Func(this T imageButton, string file) where T : IImageButton { - imageButton.Source = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromFile(file)); + imageButton.Source = Microsoft.Maui.Controls.ImageSource.FromFile(file); return imageButton; } @@ -267,35 +267,40 @@ public static T Source(this T imageButton, Func action) public static T Source(this T imageButton, string resourceName, Assembly sourceAssembly) where T : IImageButton { - imageButton.Source = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)); + imageButton.Source = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly); return imageButton; } public static T Source(this T imageButton, Uri imageUri) where T : IImageButton { - imageButton.Source = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri)); + imageButton.Source = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri); return imageButton; } public static T Source(this T imageButton, Uri imageUri, bool cachingEnabled, TimeSpan cacheValidity) where T : IImageButton { - imageButton.Source = new PropertyValue(new UriImageSource { Uri = imageUri, CachingEnabled = cachingEnabled, CacheValidity = cacheValidity }); + imageButton.Source = new UriImageSource + { + Uri = imageUri, + CachingEnabled = cachingEnabled, + CacheValidity = cacheValidity + }; return imageButton; } public static T Source(this T imageButton, Func imageStream) where T : IImageButton { - imageButton.Source = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream)); + imageButton.Source = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream); return imageButton; } public static T Aspect(this T imageButton, Microsoft.Maui.Aspect aspect) where T : IImageButton { - imageButton.Aspect = new PropertyValue(aspect); + imageButton.Aspect = aspect; return imageButton; } @@ -309,7 +314,7 @@ public static T Aspect(this T imageButton, Func aspect public static T IsOpaque(this T imageButton, bool isOpaque) where T : IImageButton { - imageButton.IsOpaque = new PropertyValue(isOpaque); + imageButton.IsOpaque = isOpaque; return imageButton; } @@ -323,7 +328,7 @@ public static T IsOpaque(this T imageButton, Func isOpaqueFunc) public static T Padding(this T imageButton, Microsoft.Maui.Thickness padding, RxThicknessAnimation? customAnimation = null) where T : IImageButton { - imageButton.Padding = new PropertyValue(padding); + imageButton.Padding = padding; imageButton.AppendAnimatable(Microsoft.Maui.Controls.ImageButton.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(padding), v => imageButton.Padding = new PropertyValue(v.CurrentValue())); return imageButton; } @@ -338,7 +343,7 @@ public static T Padding(this T imageButton, Func pa public static T Padding(this T imageButton, double leftRight, double topBottom, RxThicknessAnimation? customAnimation = null) where T : IImageButton { - imageButton.Padding = new PropertyValue(new Thickness(leftRight, topBottom)); + imageButton.Padding = new Thickness(leftRight, topBottom); imageButton.AppendAnimatable(Microsoft.Maui.Controls.ImageButton.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(leftRight, topBottom)), v => imageButton.Padding = new PropertyValue(v.CurrentValue())); return imageButton; } @@ -346,7 +351,7 @@ public static T Padding(this T imageButton, double leftRight, double topBotto public static T Padding(this T imageButton, double uniformSize, RxThicknessAnimation? customAnimation = null) where T : IImageButton { - imageButton.Padding = new PropertyValue(new Thickness(uniformSize)); + imageButton.Padding = new Thickness(uniformSize); imageButton.AppendAnimatable(Microsoft.Maui.Controls.ImageButton.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(uniformSize)), v => imageButton.Padding = new PropertyValue(v.CurrentValue())); return imageButton; } @@ -354,7 +359,7 @@ public static T Padding(this T imageButton, double uniformSize, RxThicknessAn public static T Padding(this T imageButton, double left, double top, double right, double bottom, RxThicknessAnimation? customAnimation = null) where T : IImageButton { - imageButton.Padding = new PropertyValue(new Thickness(left, top, right, bottom)); + imageButton.Padding = new Thickness(left, top, right, bottom); imageButton.AppendAnimatable(Microsoft.Maui.Controls.ImageButton.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(left, top, right, bottom)), v => imageButton.Padding = new PropertyValue(v.CurrentValue())); return imageButton; } diff --git a/src/MauiReactor/ImageCell.cs b/src/MauiReactor/ImageCell.cs index 5878db05..453ae332 100644 --- a/src/MauiReactor/ImageCell.cs +++ b/src/MauiReactor/ImageCell.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface IImageCell : ITextCell { - PropertyValue? ImageSource { get; set; } + object? ImageSource { get; set; } } public partial class ImageCell : TextCell, IImageCell where T : Microsoft.Maui.Controls.ImageCell, new() @@ -25,7 +25,7 @@ public ImageCell(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IImageCell.ImageSource { get; set; } + object? IImageCell.ImageSource { get; set; } internal override void Reset() { @@ -68,7 +68,7 @@ public static partial class ImageCellExtensions public static T ImageSource(this T imageCell, Microsoft.Maui.Controls.ImageSource imageSource) where T : IImageCell { - imageCell.ImageSource = new PropertyValue(imageSource); + imageCell.ImageSource = imageSource; return imageCell; } @@ -82,7 +82,7 @@ public static T ImageSource(this T imageCell, Func(this T imageCell, string file) where T : IImageCell { - imageCell.ImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromFile(file)); + imageCell.ImageSource = Microsoft.Maui.Controls.ImageSource.FromFile(file); return imageCell; } @@ -96,28 +96,33 @@ public static T ImageSource(this T imageCell, Func action) public static T ImageSource(this T imageCell, string resourceName, Assembly sourceAssembly) where T : IImageCell { - imageCell.ImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)); + imageCell.ImageSource = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly); return imageCell; } public static T ImageSource(this T imageCell, Uri imageUri) where T : IImageCell { - imageCell.ImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri)); + imageCell.ImageSource = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri); return imageCell; } public static T ImageSource(this T imageCell, Uri imageUri, bool cachingEnabled, TimeSpan cacheValidity) where T : IImageCell { - imageCell.ImageSource = new PropertyValue(new UriImageSource { Uri = imageUri, CachingEnabled = cachingEnabled, CacheValidity = cacheValidity }); + imageCell.ImageSource = new UriImageSource + { + Uri = imageUri, + CachingEnabled = cachingEnabled, + CacheValidity = cacheValidity + }; return imageCell; } public static T ImageSource(this T imageCell, Func imageStream) where T : IImageCell { - imageCell.ImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream)); + imageCell.ImageSource = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream); return imageCell; } } \ No newline at end of file diff --git a/src/MauiReactor/IndicatorView.cs b/src/MauiReactor/IndicatorView.cs index 23545d17..53fee1c5 100644 --- a/src/MauiReactor/IndicatorView.cs +++ b/src/MauiReactor/IndicatorView.cs @@ -12,21 +12,21 @@ namespace MauiReactor; public partial interface IIndicatorView : ITemplatedView { - PropertyValue? IndicatorsShape { get; set; } + object? IndicatorsShape { get; set; } - PropertyValue? Position { get; set; } + object? Position { get; set; } - PropertyValue? Count { get; set; } + object? Count { get; set; } - PropertyValue? MaximumVisible { get; set; } + object? MaximumVisible { get; set; } - PropertyValue? HideSingle { get; set; } + object? HideSingle { get; set; } - PropertyValue? IndicatorColor { get; set; } + object? IndicatorColor { get; set; } - PropertyValue? SelectedIndicatorColor { get; set; } + object? SelectedIndicatorColor { get; set; } - PropertyValue? IndicatorSize { get; set; } + object? IndicatorSize { get; set; } } public partial class IndicatorView : TemplatedView, IIndicatorView where T : Microsoft.Maui.Controls.IndicatorView, new() @@ -39,21 +39,21 @@ public IndicatorView(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IIndicatorView.IndicatorsShape { get; set; } + object? IIndicatorView.IndicatorsShape { get; set; } - PropertyValue? IIndicatorView.Position { get; set; } + object? IIndicatorView.Position { get; set; } - PropertyValue? IIndicatorView.Count { get; set; } + object? IIndicatorView.Count { get; set; } - PropertyValue? IIndicatorView.MaximumVisible { get; set; } + object? IIndicatorView.MaximumVisible { get; set; } - PropertyValue? IIndicatorView.HideSingle { get; set; } + object? IIndicatorView.HideSingle { get; set; } - PropertyValue? IIndicatorView.IndicatorColor { get; set; } + object? IIndicatorView.IndicatorColor { get; set; } - PropertyValue? IIndicatorView.SelectedIndicatorColor { get; set; } + object? IIndicatorView.SelectedIndicatorColor { get; set; } - PropertyValue? IIndicatorView.IndicatorSize { get; set; } + object? IIndicatorView.IndicatorSize { get; set; } internal override void Reset() { @@ -119,7 +119,7 @@ public static partial class IndicatorViewExtensions public static T IndicatorsShape(this T indicatorView, Microsoft.Maui.Controls.IndicatorShape indicatorsShape) where T : IIndicatorView { - indicatorView.IndicatorsShape = new PropertyValue(indicatorsShape); + indicatorView.IndicatorsShape = indicatorsShape; return indicatorView; } @@ -133,7 +133,7 @@ public static T IndicatorsShape(this T indicatorView, Func(this T indicatorView, int position) where T : IIndicatorView { - indicatorView.Position = new PropertyValue(position); + indicatorView.Position = position; return indicatorView; } @@ -147,7 +147,7 @@ public static T Position(this T indicatorView, Func positionFunc) public static T Count(this T indicatorView, int count) where T : IIndicatorView { - indicatorView.Count = new PropertyValue(count); + indicatorView.Count = count; return indicatorView; } @@ -161,7 +161,7 @@ public static T Count(this T indicatorView, Func countFunc) public static T MaximumVisible(this T indicatorView, int maximumVisible) where T : IIndicatorView { - indicatorView.MaximumVisible = new PropertyValue(maximumVisible); + indicatorView.MaximumVisible = maximumVisible; return indicatorView; } @@ -175,7 +175,7 @@ public static T MaximumVisible(this T indicatorView, Func maximumVisible public static T HideSingle(this T indicatorView, bool hideSingle) where T : IIndicatorView { - indicatorView.HideSingle = new PropertyValue(hideSingle); + indicatorView.HideSingle = hideSingle; return indicatorView; } @@ -189,7 +189,7 @@ public static T HideSingle(this T indicatorView, Func hideSingleFunc) public static T IndicatorColor(this T indicatorView, Microsoft.Maui.Graphics.Color indicatorColor) where T : IIndicatorView { - indicatorView.IndicatorColor = new PropertyValue(indicatorColor); + indicatorView.IndicatorColor = indicatorColor; return indicatorView; } @@ -203,7 +203,7 @@ public static T IndicatorColor(this T indicatorView, Func(this T indicatorView, Microsoft.Maui.Graphics.Color selectedIndicatorColor) where T : IIndicatorView { - indicatorView.SelectedIndicatorColor = new PropertyValue(selectedIndicatorColor); + indicatorView.SelectedIndicatorColor = selectedIndicatorColor; return indicatorView; } @@ -217,7 +217,7 @@ public static T SelectedIndicatorColor(this T indicatorView, Func(this T indicatorView, double indicatorSize, RxDoubleAnimation? customAnimation = null) where T : IIndicatorView { - indicatorView.IndicatorSize = new PropertyValue(indicatorSize); + indicatorView.IndicatorSize = indicatorSize; indicatorView.AppendAnimatable(Microsoft.Maui.Controls.IndicatorView.IndicatorSizeProperty, customAnimation ?? new RxDoubleAnimation(indicatorSize), v => indicatorView.IndicatorSize = new PropertyValue(v.CurrentValue())); return indicatorView; } diff --git a/src/MauiReactor/InputView.cs b/src/MauiReactor/InputView.cs index db17e3d0..d87b5c5a 100644 --- a/src/MauiReactor/InputView.cs +++ b/src/MauiReactor/InputView.cs @@ -12,39 +12,39 @@ namespace MauiReactor; public partial interface IInputView : IView { - PropertyValue? Text { get; set; } + object? Text { get; set; } - PropertyValue? Keyboard { get; set; } + object? Keyboard { get; set; } - PropertyValue? IsSpellCheckEnabled { get; set; } + object? IsSpellCheckEnabled { get; set; } - PropertyValue? IsTextPredictionEnabled { get; set; } + object? IsTextPredictionEnabled { get; set; } - PropertyValue? MaxLength { get; set; } + object? MaxLength { get; set; } - PropertyValue? IsReadOnly { get; set; } + object? IsReadOnly { get; set; } - PropertyValue? Placeholder { get; set; } + object? Placeholder { get; set; } - PropertyValue? PlaceholderColor { get; set; } + object? PlaceholderColor { get; set; } - PropertyValue? TextColor { get; set; } + object? TextColor { get; set; } - PropertyValue? CharacterSpacing { get; set; } + object? CharacterSpacing { get; set; } - PropertyValue? TextTransform { get; set; } + object? TextTransform { get; set; } - PropertyValue? CursorPosition { get; set; } + object? CursorPosition { get; set; } - PropertyValue? SelectionLength { get; set; } + object? SelectionLength { get; set; } - PropertyValue? FontFamily { get; set; } + object? FontFamily { get; set; } - PropertyValue? FontSize { get; set; } + object? FontSize { get; set; } - PropertyValue? FontAttributes { get; set; } + object? FontAttributes { get; set; } - PropertyValue? FontAutoScalingEnabled { get; set; } + object? FontAutoScalingEnabled { get; set; } Action? TextChangedAction { get; set; } @@ -61,39 +61,39 @@ protected InputView(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IInputView.Text { get; set; } + object? IInputView.Text { get; set; } - PropertyValue? IInputView.Keyboard { get; set; } + object? IInputView.Keyboard { get; set; } - PropertyValue? IInputView.IsSpellCheckEnabled { get; set; } + object? IInputView.IsSpellCheckEnabled { get; set; } - PropertyValue? IInputView.IsTextPredictionEnabled { get; set; } + object? IInputView.IsTextPredictionEnabled { get; set; } - PropertyValue? IInputView.MaxLength { get; set; } + object? IInputView.MaxLength { get; set; } - PropertyValue? IInputView.IsReadOnly { get; set; } + object? IInputView.IsReadOnly { get; set; } - PropertyValue? IInputView.Placeholder { get; set; } + object? IInputView.Placeholder { get; set; } - PropertyValue? IInputView.PlaceholderColor { get; set; } + object? IInputView.PlaceholderColor { get; set; } - PropertyValue? IInputView.TextColor { get; set; } + object? IInputView.TextColor { get; set; } - PropertyValue? IInputView.CharacterSpacing { get; set; } + object? IInputView.CharacterSpacing { get; set; } - PropertyValue? IInputView.TextTransform { get; set; } + object? IInputView.TextTransform { get; set; } - PropertyValue? IInputView.CursorPosition { get; set; } + object? IInputView.CursorPosition { get; set; } - PropertyValue? IInputView.SelectionLength { get; set; } + object? IInputView.SelectionLength { get; set; } - PropertyValue? IInputView.FontFamily { get; set; } + object? IInputView.FontFamily { get; set; } - PropertyValue? IInputView.FontSize { get; set; } + object? IInputView.FontSize { get; set; } - PropertyValue? IInputView.FontAttributes { get; set; } + object? IInputView.FontAttributes { get; set; } - PropertyValue? IInputView.FontAutoScalingEnabled { get; set; } + object? IInputView.FontAutoScalingEnabled { get; set; } Action? IInputView.TextChangedAction { get; set; } @@ -203,7 +203,7 @@ public static partial class InputViewExtensions public static T Text(this T inputView, string text) where T : IInputView { - inputView.Text = new PropertyValue(text); + inputView.Text = text; return inputView; } @@ -217,7 +217,7 @@ public static T Text(this T inputView, Func textFunc) public static T Keyboard(this T inputView, Microsoft.Maui.Keyboard keyboard) where T : IInputView { - inputView.Keyboard = new PropertyValue(keyboard); + inputView.Keyboard = keyboard; return inputView; } @@ -231,7 +231,7 @@ public static T Keyboard(this T inputView, Func keyb public static T IsSpellCheckEnabled(this T inputView, bool isSpellCheckEnabled) where T : IInputView { - inputView.IsSpellCheckEnabled = new PropertyValue(isSpellCheckEnabled); + inputView.IsSpellCheckEnabled = isSpellCheckEnabled; return inputView; } @@ -245,7 +245,7 @@ public static T IsSpellCheckEnabled(this T inputView, Func isSpellCheck public static T IsTextPredictionEnabled(this T inputView, bool isTextPredictionEnabled) where T : IInputView { - inputView.IsTextPredictionEnabled = new PropertyValue(isTextPredictionEnabled); + inputView.IsTextPredictionEnabled = isTextPredictionEnabled; return inputView; } @@ -259,7 +259,7 @@ public static T IsTextPredictionEnabled(this T inputView, Func isTextPr public static T MaxLength(this T inputView, int maxLength) where T : IInputView { - inputView.MaxLength = new PropertyValue(maxLength); + inputView.MaxLength = maxLength; return inputView; } @@ -273,7 +273,7 @@ public static T MaxLength(this T inputView, Func maxLengthFunc) public static T IsReadOnly(this T inputView, bool isReadOnly) where T : IInputView { - inputView.IsReadOnly = new PropertyValue(isReadOnly); + inputView.IsReadOnly = isReadOnly; return inputView; } @@ -287,7 +287,7 @@ public static T IsReadOnly(this T inputView, Func isReadOnlyFunc) public static T Placeholder(this T inputView, string placeholder) where T : IInputView { - inputView.Placeholder = new PropertyValue(placeholder); + inputView.Placeholder = placeholder; return inputView; } @@ -301,7 +301,7 @@ public static T Placeholder(this T inputView, Func placeholderFunc) public static T PlaceholderColor(this T inputView, Microsoft.Maui.Graphics.Color placeholderColor) where T : IInputView { - inputView.PlaceholderColor = new PropertyValue(placeholderColor); + inputView.PlaceholderColor = placeholderColor; return inputView; } @@ -315,7 +315,7 @@ public static T PlaceholderColor(this T inputView, Func(this T inputView, Microsoft.Maui.Graphics.Color textColor) where T : IInputView { - inputView.TextColor = new PropertyValue(textColor); + inputView.TextColor = textColor; return inputView; } @@ -329,7 +329,7 @@ public static T TextColor(this T inputView, Func(this T inputView, double characterSpacing, RxDoubleAnimation? customAnimation = null) where T : IInputView { - inputView.CharacterSpacing = new PropertyValue(characterSpacing); + inputView.CharacterSpacing = characterSpacing; inputView.AppendAnimatable(Microsoft.Maui.Controls.InputView.CharacterSpacingProperty, customAnimation ?? new RxDoubleAnimation(characterSpacing), v => inputView.CharacterSpacing = new PropertyValue(v.CurrentValue())); return inputView; } @@ -344,7 +344,7 @@ public static T CharacterSpacing(this T inputView, Func characterSpac public static T TextTransform(this T inputView, Microsoft.Maui.TextTransform textTransform) where T : IInputView { - inputView.TextTransform = new PropertyValue(textTransform); + inputView.TextTransform = textTransform; return inputView; } @@ -358,7 +358,7 @@ public static T TextTransform(this T inputView, Func(this T inputView, int cursorPosition) where T : IInputView { - inputView.CursorPosition = new PropertyValue(cursorPosition); + inputView.CursorPosition = cursorPosition; return inputView; } @@ -372,7 +372,7 @@ public static T CursorPosition(this T inputView, Func cursorPositionFunc public static T SelectionLength(this T inputView, int selectionLength) where T : IInputView { - inputView.SelectionLength = new PropertyValue(selectionLength); + inputView.SelectionLength = selectionLength; return inputView; } @@ -386,7 +386,7 @@ public static T SelectionLength(this T inputView, Func selectionLengthFu public static T FontFamily(this T inputView, string fontFamily) where T : IInputView { - inputView.FontFamily = new PropertyValue(fontFamily); + inputView.FontFamily = fontFamily; return inputView; } @@ -400,7 +400,7 @@ public static T FontFamily(this T inputView, Func fontFamilyFunc) public static T FontSize(this T inputView, double fontSize, RxDoubleAnimation? customAnimation = null) where T : IInputView { - inputView.FontSize = new PropertyValue(fontSize); + inputView.FontSize = fontSize; inputView.AppendAnimatable(Microsoft.Maui.Controls.InputView.FontSizeProperty, customAnimation ?? new RxDoubleAnimation(fontSize), v => inputView.FontSize = new PropertyValue(v.CurrentValue())); return inputView; } @@ -415,7 +415,7 @@ public static T FontSize(this T inputView, Func fontSizeFunc) public static T FontAttributes(this T inputView, Microsoft.Maui.Controls.FontAttributes fontAttributes) where T : IInputView { - inputView.FontAttributes = new PropertyValue(fontAttributes); + inputView.FontAttributes = fontAttributes; return inputView; } @@ -429,7 +429,7 @@ public static T FontAttributes(this T inputView, Func(this T inputView, bool fontAutoScalingEnabled) where T : IInputView { - inputView.FontAutoScalingEnabled = new PropertyValue(fontAutoScalingEnabled); + inputView.FontAutoScalingEnabled = fontAutoScalingEnabled; return inputView; } diff --git a/src/MauiReactor/ItemsLayout.cs b/src/MauiReactor/ItemsLayout.cs index 26ce17ae..a6128a4b 100644 --- a/src/MauiReactor/ItemsLayout.cs +++ b/src/MauiReactor/ItemsLayout.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface IItemsLayout : IVisualNode { - PropertyValue? SnapPointsAlignment { get; set; } + object? SnapPointsAlignment { get; set; } - PropertyValue? SnapPointsType { get; set; } + object? SnapPointsType { get; set; } } public abstract partial class ItemsLayout : VisualNode, IItemsLayout where T : Microsoft.Maui.Controls.ItemsLayout, new() @@ -27,9 +27,9 @@ protected ItemsLayout(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IItemsLayout.SnapPointsAlignment { get; set; } + object? IItemsLayout.SnapPointsAlignment { get; set; } - PropertyValue? IItemsLayout.SnapPointsType { get; set; } + object? IItemsLayout.SnapPointsType { get; set; } internal override void Reset() { @@ -63,7 +63,7 @@ public static partial class ItemsLayoutExtensions public static T SnapPointsAlignment(this T itemsLayout, Microsoft.Maui.Controls.SnapPointsAlignment snapPointsAlignment) where T : IItemsLayout { - itemsLayout.SnapPointsAlignment = new PropertyValue(snapPointsAlignment); + itemsLayout.SnapPointsAlignment = snapPointsAlignment; return itemsLayout; } @@ -77,7 +77,7 @@ public static T SnapPointsAlignment(this T itemsLayout, Func(this T itemsLayout, Microsoft.Maui.Controls.SnapPointsType snapPointsType) where T : IItemsLayout { - itemsLayout.SnapPointsType = new PropertyValue(snapPointsType); + itemsLayout.SnapPointsType = snapPointsType; return itemsLayout; } diff --git a/src/MauiReactor/ItemsView.cs b/src/MauiReactor/ItemsView.cs index 8a83bdc6..93048d2b 100644 --- a/src/MauiReactor/ItemsView.cs +++ b/src/MauiReactor/ItemsView.cs @@ -12,13 +12,13 @@ namespace MauiReactor; public partial interface IItemsView : IView { - PropertyValue? HorizontalScrollBarVisibility { get; set; } + object? HorizontalScrollBarVisibility { get; set; } - PropertyValue? VerticalScrollBarVisibility { get; set; } + object? VerticalScrollBarVisibility { get; set; } - PropertyValue? RemainingItemsThreshold { get; set; } + object? RemainingItemsThreshold { get; set; } - PropertyValue? ItemsUpdatingScrollMode { get; set; } + object? ItemsUpdatingScrollMode { get; set; } Action? ScrollToRequestedAction { get; set; } @@ -43,13 +43,13 @@ protected ItemsView(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IItemsView.HorizontalScrollBarVisibility { get; set; } + object? IItemsView.HorizontalScrollBarVisibility { get; set; } - PropertyValue? IItemsView.VerticalScrollBarVisibility { get; set; } + object? IItemsView.VerticalScrollBarVisibility { get; set; } - PropertyValue? IItemsView.RemainingItemsThreshold { get; set; } + object? IItemsView.RemainingItemsThreshold { get; set; } - PropertyValue? IItemsView.ItemsUpdatingScrollMode { get; set; } + object? IItemsView.ItemsUpdatingScrollMode { get; set; } Action? IItemsView.ScrollToRequestedAction { get; set; } @@ -157,7 +157,7 @@ public static partial class ItemsViewExtensions public static T HorizontalScrollBarVisibility(this T itemsView, Microsoft.Maui.ScrollBarVisibility horizontalScrollBarVisibility) where T : IItemsView { - itemsView.HorizontalScrollBarVisibility = new PropertyValue(horizontalScrollBarVisibility); + itemsView.HorizontalScrollBarVisibility = horizontalScrollBarVisibility; return itemsView; } @@ -171,7 +171,7 @@ public static T HorizontalScrollBarVisibility(this T itemsView, Func(this T itemsView, Microsoft.Maui.ScrollBarVisibility verticalScrollBarVisibility) where T : IItemsView { - itemsView.VerticalScrollBarVisibility = new PropertyValue(verticalScrollBarVisibility); + itemsView.VerticalScrollBarVisibility = verticalScrollBarVisibility; return itemsView; } @@ -185,7 +185,7 @@ public static T VerticalScrollBarVisibility(this T itemsView, Func(this T itemsView, int remainingItemsThreshold) where T : IItemsView { - itemsView.RemainingItemsThreshold = new PropertyValue(remainingItemsThreshold); + itemsView.RemainingItemsThreshold = remainingItemsThreshold; return itemsView; } @@ -199,7 +199,7 @@ public static T RemainingItemsThreshold(this T itemsView, Func remaining public static T ItemsUpdatingScrollMode(this T itemsView, Microsoft.Maui.Controls.ItemsUpdatingScrollMode itemsUpdatingScrollMode) where T : IItemsView { - itemsView.ItemsUpdatingScrollMode = new PropertyValue(itemsUpdatingScrollMode); + itemsView.ItemsUpdatingScrollMode = itemsUpdatingScrollMode; return itemsView; } diff --git a/src/MauiReactor/Label.cs b/src/MauiReactor/Label.cs index 8aa10bd6..6e8542d7 100644 --- a/src/MauiReactor/Label.cs +++ b/src/MauiReactor/Label.cs @@ -12,39 +12,39 @@ namespace MauiReactor; public partial interface ILabel : IView { - PropertyValue? HorizontalTextAlignment { get; set; } + object? HorizontalTextAlignment { get; set; } - PropertyValue? VerticalTextAlignment { get; set; } + object? VerticalTextAlignment { get; set; } - PropertyValue? TextColor { get; set; } + object? TextColor { get; set; } - PropertyValue? CharacterSpacing { get; set; } + object? CharacterSpacing { get; set; } - PropertyValue? Text { get; set; } + object? Text { get; set; } - PropertyValue? FontFamily { get; set; } + object? FontFamily { get; set; } - PropertyValue? FontSize { get; set; } + object? FontSize { get; set; } - PropertyValue? FontAttributes { get; set; } + object? FontAttributes { get; set; } - PropertyValue? FontAutoScalingEnabled { get; set; } + object? FontAutoScalingEnabled { get; set; } - PropertyValue? TextTransform { get; set; } + object? TextTransform { get; set; } - PropertyValue? TextDecorations { get; set; } + object? TextDecorations { get; set; } - PropertyValue? FormattedText { get; set; } + object? FormattedText { get; set; } - PropertyValue? LineBreakMode { get; set; } + object? LineBreakMode { get; set; } - PropertyValue? LineHeight { get; set; } + object? LineHeight { get; set; } - PropertyValue? MaxLines { get; set; } + object? MaxLines { get; set; } - PropertyValue? Padding { get; set; } + object? Padding { get; set; } - PropertyValue? TextType { get; set; } + object? TextType { get; set; } } public partial class Label : View, ILabel where T : Microsoft.Maui.Controls.Label, new() @@ -57,39 +57,39 @@ public Label(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ILabel.HorizontalTextAlignment { get; set; } + object? ILabel.HorizontalTextAlignment { get; set; } - PropertyValue? ILabel.VerticalTextAlignment { get; set; } + object? ILabel.VerticalTextAlignment { get; set; } - PropertyValue? ILabel.TextColor { get; set; } + object? ILabel.TextColor { get; set; } - PropertyValue? ILabel.CharacterSpacing { get; set; } + object? ILabel.CharacterSpacing { get; set; } - PropertyValue? ILabel.Text { get; set; } + object? ILabel.Text { get; set; } - PropertyValue? ILabel.FontFamily { get; set; } + object? ILabel.FontFamily { get; set; } - PropertyValue? ILabel.FontSize { get; set; } + object? ILabel.FontSize { get; set; } - PropertyValue? ILabel.FontAttributes { get; set; } + object? ILabel.FontAttributes { get; set; } - PropertyValue? ILabel.FontAutoScalingEnabled { get; set; } + object? ILabel.FontAutoScalingEnabled { get; set; } - PropertyValue? ILabel.TextTransform { get; set; } + object? ILabel.TextTransform { get; set; } - PropertyValue? ILabel.TextDecorations { get; set; } + object? ILabel.TextDecorations { get; set; } - PropertyValue? ILabel.FormattedText { get; set; } + object? ILabel.FormattedText { get; set; } - PropertyValue? ILabel.LineBreakMode { get; set; } + object? ILabel.LineBreakMode { get; set; } - PropertyValue? ILabel.LineHeight { get; set; } + object? ILabel.LineHeight { get; set; } - PropertyValue? ILabel.MaxLines { get; set; } + object? ILabel.MaxLines { get; set; } - PropertyValue? ILabel.Padding { get; set; } + object? ILabel.Padding { get; set; } - PropertyValue? ILabel.TextType { get; set; } + object? ILabel.TextType { get; set; } internal override void Reset() { @@ -176,7 +176,7 @@ public static partial class LabelExtensions public static T HorizontalTextAlignment(this T label, Microsoft.Maui.TextAlignment horizontalTextAlignment) where T : ILabel { - label.HorizontalTextAlignment = new PropertyValue(horizontalTextAlignment); + label.HorizontalTextAlignment = horizontalTextAlignment; return label; } @@ -190,7 +190,7 @@ public static T HorizontalTextAlignment(this T label, Func(this T label, Microsoft.Maui.TextAlignment verticalTextAlignment) where T : ILabel { - label.VerticalTextAlignment = new PropertyValue(verticalTextAlignment); + label.VerticalTextAlignment = verticalTextAlignment; return label; } @@ -204,7 +204,7 @@ public static T VerticalTextAlignment(this T label, Func(this T label, Microsoft.Maui.Graphics.Color textColor) where T : ILabel { - label.TextColor = new PropertyValue(textColor); + label.TextColor = textColor; return label; } @@ -218,7 +218,7 @@ public static T TextColor(this T label, Func t public static T CharacterSpacing(this T label, double characterSpacing, RxDoubleAnimation? customAnimation = null) where T : ILabel { - label.CharacterSpacing = new PropertyValue(characterSpacing); + label.CharacterSpacing = characterSpacing; label.AppendAnimatable(Microsoft.Maui.Controls.Label.CharacterSpacingProperty, customAnimation ?? new RxDoubleAnimation(characterSpacing), v => label.CharacterSpacing = new PropertyValue(v.CurrentValue())); return label; } @@ -233,7 +233,7 @@ public static T CharacterSpacing(this T label, Func characterSpacingF public static T Text(this T label, string text) where T : ILabel { - label.Text = new PropertyValue(text); + label.Text = text; return label; } @@ -247,7 +247,7 @@ public static T Text(this T label, Func textFunc) public static T FontFamily(this T label, string fontFamily) where T : ILabel { - label.FontFamily = new PropertyValue(fontFamily); + label.FontFamily = fontFamily; return label; } @@ -261,7 +261,7 @@ public static T FontFamily(this T label, Func fontFamilyFunc) public static T FontSize(this T label, double fontSize, RxDoubleAnimation? customAnimation = null) where T : ILabel { - label.FontSize = new PropertyValue(fontSize); + label.FontSize = fontSize; label.AppendAnimatable(Microsoft.Maui.Controls.Label.FontSizeProperty, customAnimation ?? new RxDoubleAnimation(fontSize), v => label.FontSize = new PropertyValue(v.CurrentValue())); return label; } @@ -276,7 +276,7 @@ public static T FontSize(this T label, Func fontSizeFunc) public static T FontAttributes(this T label, Microsoft.Maui.Controls.FontAttributes fontAttributes) where T : ILabel { - label.FontAttributes = new PropertyValue(fontAttributes); + label.FontAttributes = fontAttributes; return label; } @@ -290,7 +290,7 @@ public static T FontAttributes(this T label, Func(this T label, bool fontAutoScalingEnabled) where T : ILabel { - label.FontAutoScalingEnabled = new PropertyValue(fontAutoScalingEnabled); + label.FontAutoScalingEnabled = fontAutoScalingEnabled; return label; } @@ -304,7 +304,7 @@ public static T FontAutoScalingEnabled(this T label, Func fontAutoScali public static T TextTransform(this T label, Microsoft.Maui.TextTransform textTransform) where T : ILabel { - label.TextTransform = new PropertyValue(textTransform); + label.TextTransform = textTransform; return label; } @@ -318,7 +318,7 @@ public static T TextTransform(this T label, Func(this T label, Microsoft.Maui.TextDecorations textDecorations) where T : ILabel { - label.TextDecorations = new PropertyValue(textDecorations); + label.TextDecorations = textDecorations; return label; } @@ -332,7 +332,7 @@ public static T TextDecorations(this T label, Func(this T label, Microsoft.Maui.Controls.FormattedString formattedText) where T : ILabel { - label.FormattedText = new PropertyValue(formattedText); + label.FormattedText = formattedText; return label; } @@ -346,7 +346,7 @@ public static T FormattedText(this T label, Func(this T label, Microsoft.Maui.LineBreakMode lineBreakMode) where T : ILabel { - label.LineBreakMode = new PropertyValue(lineBreakMode); + label.LineBreakMode = lineBreakMode; return label; } @@ -360,7 +360,7 @@ public static T LineBreakMode(this T label, Func(this T label, double lineHeight, RxDoubleAnimation? customAnimation = null) where T : ILabel { - label.LineHeight = new PropertyValue(lineHeight); + label.LineHeight = lineHeight; label.AppendAnimatable(Microsoft.Maui.Controls.Label.LineHeightProperty, customAnimation ?? new RxDoubleAnimation(lineHeight), v => label.LineHeight = new PropertyValue(v.CurrentValue())); return label; } @@ -375,7 +375,7 @@ public static T LineHeight(this T label, Func lineHeightFunc) public static T MaxLines(this T label, int maxLines) where T : ILabel { - label.MaxLines = new PropertyValue(maxLines); + label.MaxLines = maxLines; return label; } @@ -389,7 +389,7 @@ public static T MaxLines(this T label, Func maxLinesFunc) public static T Padding(this T label, Microsoft.Maui.Thickness padding, RxThicknessAnimation? customAnimation = null) where T : ILabel { - label.Padding = new PropertyValue(padding); + label.Padding = padding; label.AppendAnimatable(Microsoft.Maui.Controls.Label.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(padding), v => label.Padding = new PropertyValue(v.CurrentValue())); return label; } @@ -404,7 +404,7 @@ public static T Padding(this T label, Func paddingF public static T Padding(this T label, double leftRight, double topBottom, RxThicknessAnimation? customAnimation = null) where T : ILabel { - label.Padding = new PropertyValue(new Thickness(leftRight, topBottom)); + label.Padding = new Thickness(leftRight, topBottom); label.AppendAnimatable(Microsoft.Maui.Controls.Label.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(leftRight, topBottom)), v => label.Padding = new PropertyValue(v.CurrentValue())); return label; } @@ -412,7 +412,7 @@ public static T Padding(this T label, double leftRight, double topBottom, RxT public static T Padding(this T label, double uniformSize, RxThicknessAnimation? customAnimation = null) where T : ILabel { - label.Padding = new PropertyValue(new Thickness(uniformSize)); + label.Padding = new Thickness(uniformSize); label.AppendAnimatable(Microsoft.Maui.Controls.Label.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(uniformSize)), v => label.Padding = new PropertyValue(v.CurrentValue())); return label; } @@ -420,7 +420,7 @@ public static T Padding(this T label, double uniformSize, RxThicknessAnimatio public static T Padding(this T label, double left, double top, double right, double bottom, RxThicknessAnimation? customAnimation = null) where T : ILabel { - label.Padding = new PropertyValue(new Thickness(left, top, right, bottom)); + label.Padding = new Thickness(left, top, right, bottom); label.AppendAnimatable(Microsoft.Maui.Controls.Label.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(left, top, right, bottom)), v => label.Padding = new PropertyValue(v.CurrentValue())); return label; } @@ -428,7 +428,7 @@ public static T Padding(this T label, double left, double top, double right, public static T TextType(this T label, Microsoft.Maui.TextType textType) where T : ILabel { - label.TextType = new PropertyValue(textType); + label.TextType = textType; return label; } diff --git a/src/MauiReactor/Layout.cs b/src/MauiReactor/Layout.cs index ecb6ed3b..b899f632 100644 --- a/src/MauiReactor/Layout.cs +++ b/src/MauiReactor/Layout.cs @@ -12,11 +12,11 @@ namespace MauiReactor; public partial interface ILayout : IView { - PropertyValue? IsClippedToBounds { get; set; } + object? IsClippedToBounds { get; set; } - PropertyValue? Padding { get; set; } + object? Padding { get; set; } - PropertyValue? CascadeInputTransparent { get; set; } + object? CascadeInputTransparent { get; set; } } public abstract partial class Layout : View, ILayout where T : Microsoft.Maui.Controls.Layout, new() @@ -29,11 +29,11 @@ protected Layout(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ILayout.IsClippedToBounds { get; set; } + object? ILayout.IsClippedToBounds { get; set; } - PropertyValue? ILayout.Padding { get; set; } + object? ILayout.Padding { get; set; } - PropertyValue? ILayout.CascadeInputTransparent { get; set; } + object? ILayout.CascadeInputTransparent { get; set; } internal override void Reset() { @@ -78,7 +78,7 @@ public static partial class LayoutExtensions public static T IsClippedToBounds(this T layout, bool isClippedToBounds) where T : ILayout { - layout.IsClippedToBounds = new PropertyValue(isClippedToBounds); + layout.IsClippedToBounds = isClippedToBounds; return layout; } @@ -92,7 +92,7 @@ public static T IsClippedToBounds(this T layout, Func isClippedToBounds public static T Padding(this T layout, Microsoft.Maui.Thickness padding, RxThicknessAnimation? customAnimation = null) where T : ILayout { - layout.Padding = new PropertyValue(padding); + layout.Padding = padding; layout.AppendAnimatable(Microsoft.Maui.Controls.Layout.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(padding), v => layout.Padding = new PropertyValue(v.CurrentValue())); return layout; } @@ -107,7 +107,7 @@ public static T Padding(this T layout, Func padding public static T Padding(this T layout, double leftRight, double topBottom, RxThicknessAnimation? customAnimation = null) where T : ILayout { - layout.Padding = new PropertyValue(new Thickness(leftRight, topBottom)); + layout.Padding = new Thickness(leftRight, topBottom); layout.AppendAnimatable(Microsoft.Maui.Controls.Layout.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(leftRight, topBottom)), v => layout.Padding = new PropertyValue(v.CurrentValue())); return layout; } @@ -115,7 +115,7 @@ public static T Padding(this T layout, double leftRight, double topBottom, Rx public static T Padding(this T layout, double uniformSize, RxThicknessAnimation? customAnimation = null) where T : ILayout { - layout.Padding = new PropertyValue(new Thickness(uniformSize)); + layout.Padding = new Thickness(uniformSize); layout.AppendAnimatable(Microsoft.Maui.Controls.Layout.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(uniformSize)), v => layout.Padding = new PropertyValue(v.CurrentValue())); return layout; } @@ -123,7 +123,7 @@ public static T Padding(this T layout, double uniformSize, RxThicknessAnimati public static T Padding(this T layout, double left, double top, double right, double bottom, RxThicknessAnimation? customAnimation = null) where T : ILayout { - layout.Padding = new PropertyValue(new Thickness(left, top, right, bottom)); + layout.Padding = new Thickness(left, top, right, bottom); layout.AppendAnimatable(Microsoft.Maui.Controls.Layout.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(left, top, right, bottom)), v => layout.Padding = new PropertyValue(v.CurrentValue())); return layout; } @@ -131,7 +131,7 @@ public static T Padding(this T layout, double left, double top, double right, public static T CascadeInputTransparent(this T layout, bool cascadeInputTransparent) where T : ILayout { - layout.CascadeInputTransparent = new PropertyValue(cascadeInputTransparent); + layout.CascadeInputTransparent = cascadeInputTransparent; return layout; } diff --git a/src/MauiReactor/LinearItemsLayout.cs b/src/MauiReactor/LinearItemsLayout.cs index eba4f089..f1ab6035 100644 --- a/src/MauiReactor/LinearItemsLayout.cs +++ b/src/MauiReactor/LinearItemsLayout.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface ILinearItemsLayout : IItemsLayout { - PropertyValue? ItemSpacing { get; set; } + object? ItemSpacing { get; set; } } public abstract partial class LinearItemsLayout : ItemsLayout, ILinearItemsLayout where T : Microsoft.Maui.Controls.LinearItemsLayout, new() @@ -25,7 +25,7 @@ protected LinearItemsLayout(Action componentRefAction) : base(componentRefAc { } - PropertyValue? ILinearItemsLayout.ItemSpacing { get; set; } + object? ILinearItemsLayout.ItemSpacing { get; set; } internal override void Reset() { @@ -66,7 +66,7 @@ public static partial class LinearItemsLayoutExtensions public static T ItemSpacing(this T linearItemsLayout, double itemSpacing, RxDoubleAnimation? customAnimation = null) where T : ILinearItemsLayout { - linearItemsLayout.ItemSpacing = new PropertyValue(itemSpacing); + linearItemsLayout.ItemSpacing = itemSpacing; linearItemsLayout.AppendAnimatable(Microsoft.Maui.Controls.LinearItemsLayout.ItemSpacingProperty, customAnimation ?? new RxDoubleAnimation(itemSpacing), v => linearItemsLayout.ItemSpacing = new PropertyValue(v.CurrentValue())); return linearItemsLayout; } diff --git a/src/MauiReactor/ListView.cs b/src/MauiReactor/ListView.cs index c66d2b5c..067c0a1b 100644 --- a/src/MauiReactor/ListView.cs +++ b/src/MauiReactor/ListView.cs @@ -12,29 +12,29 @@ namespace MauiReactor; public partial interface IListView : IGenericItemsView { - PropertyValue? IsPullToRefreshEnabled { get; set; } + object? IsPullToRefreshEnabled { get; set; } - PropertyValue? IsRefreshing { get; set; } + object? IsRefreshing { get; set; } - PropertyValue? SelectedItem { get; set; } + object? SelectedItem { get; set; } - PropertyValue? SelectionMode { get; set; } + object? SelectionMode { get; set; } - PropertyValue? HasUnevenRows { get; set; } + object? HasUnevenRows { get; set; } - PropertyValue? RowHeight { get; set; } + object? RowHeight { get; set; } - PropertyValue? IsGroupingEnabled { get; set; } + object? IsGroupingEnabled { get; set; } - PropertyValue? SeparatorVisibility { get; set; } + object? SeparatorVisibility { get; set; } - PropertyValue? SeparatorColor { get; set; } + object? SeparatorColor { get; set; } - PropertyValue? RefreshControlColor { get; set; } + object? RefreshControlColor { get; set; } - PropertyValue? HorizontalScrollBarVisibility { get; set; } + object? HorizontalScrollBarVisibility { get; set; } - PropertyValue? VerticalScrollBarVisibility { get; set; } + object? VerticalScrollBarVisibility { get; set; } Action? ItemAppearingAction { get; set; } @@ -71,29 +71,29 @@ public ListView(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IListView.IsPullToRefreshEnabled { get; set; } + object? IListView.IsPullToRefreshEnabled { get; set; } - PropertyValue? IListView.IsRefreshing { get; set; } + object? IListView.IsRefreshing { get; set; } - PropertyValue? IListView.SelectedItem { get; set; } + object? IListView.SelectedItem { get; set; } - PropertyValue? IListView.SelectionMode { get; set; } + object? IListView.SelectionMode { get; set; } - PropertyValue? IListView.HasUnevenRows { get; set; } + object? IListView.HasUnevenRows { get; set; } - PropertyValue? IListView.RowHeight { get; set; } + object? IListView.RowHeight { get; set; } - PropertyValue? IListView.IsGroupingEnabled { get; set; } + object? IListView.IsGroupingEnabled { get; set; } - PropertyValue? IListView.SeparatorVisibility { get; set; } + object? IListView.SeparatorVisibility { get; set; } - PropertyValue? IListView.SeparatorColor { get; set; } + object? IListView.SeparatorColor { get; set; } - PropertyValue? IListView.RefreshControlColor { get; set; } + object? IListView.RefreshControlColor { get; set; } - PropertyValue? IListView.HorizontalScrollBarVisibility { get; set; } + object? IListView.HorizontalScrollBarVisibility { get; set; } - PropertyValue? IListView.VerticalScrollBarVisibility { get; set; } + object? IListView.VerticalScrollBarVisibility { get; set; } Action? IListView.ItemAppearingAction { get; set; } @@ -279,7 +279,7 @@ public static partial class ListViewExtensions public static T IsPullToRefreshEnabled(this T listView, bool isPullToRefreshEnabled) where T : IListView { - listView.IsPullToRefreshEnabled = new PropertyValue(isPullToRefreshEnabled); + listView.IsPullToRefreshEnabled = isPullToRefreshEnabled; return listView; } @@ -293,7 +293,7 @@ public static T IsPullToRefreshEnabled(this T listView, Func isPullToRe public static T IsRefreshing(this T listView, bool isRefreshing) where T : IListView { - listView.IsRefreshing = new PropertyValue(isRefreshing); + listView.IsRefreshing = isRefreshing; return listView; } @@ -307,7 +307,7 @@ public static T IsRefreshing(this T listView, Func isRefreshingFunc) public static T SelectedItem(this T listView, object selectedItem) where T : IListView { - listView.SelectedItem = new PropertyValue(selectedItem); + listView.SelectedItem = selectedItem; return listView; } @@ -321,7 +321,7 @@ public static T SelectedItem(this T listView, Func selectedItemFunc) public static T SelectionMode(this T listView, Microsoft.Maui.Controls.ListViewSelectionMode selectionMode) where T : IListView { - listView.SelectionMode = new PropertyValue(selectionMode); + listView.SelectionMode = selectionMode; return listView; } @@ -335,7 +335,7 @@ public static T SelectionMode(this T listView, Func(this T listView, bool hasUnevenRows) where T : IListView { - listView.HasUnevenRows = new PropertyValue(hasUnevenRows); + listView.HasUnevenRows = hasUnevenRows; return listView; } @@ -349,7 +349,7 @@ public static T HasUnevenRows(this T listView, Func hasUnevenRowsFunc) public static T RowHeight(this T listView, int rowHeight) where T : IListView { - listView.RowHeight = new PropertyValue(rowHeight); + listView.RowHeight = rowHeight; return listView; } @@ -363,7 +363,7 @@ public static T RowHeight(this T listView, Func rowHeightFunc) public static T IsGroupingEnabled(this T listView, bool isGroupingEnabled) where T : IListView { - listView.IsGroupingEnabled = new PropertyValue(isGroupingEnabled); + listView.IsGroupingEnabled = isGroupingEnabled; return listView; } @@ -377,7 +377,7 @@ public static T IsGroupingEnabled(this T listView, Func isGroupingEnabl public static T SeparatorVisibility(this T listView, Microsoft.Maui.Controls.SeparatorVisibility separatorVisibility) where T : IListView { - listView.SeparatorVisibility = new PropertyValue(separatorVisibility); + listView.SeparatorVisibility = separatorVisibility; return listView; } @@ -391,7 +391,7 @@ public static T SeparatorVisibility(this T listView, Func(this T listView, Microsoft.Maui.Graphics.Color separatorColor) where T : IListView { - listView.SeparatorColor = new PropertyValue(separatorColor); + listView.SeparatorColor = separatorColor; return listView; } @@ -405,7 +405,7 @@ public static T SeparatorColor(this T listView, Func(this T listView, Microsoft.Maui.Graphics.Color refreshControlColor) where T : IListView { - listView.RefreshControlColor = new PropertyValue(refreshControlColor); + listView.RefreshControlColor = refreshControlColor; return listView; } @@ -419,7 +419,7 @@ public static T RefreshControlColor(this T listView, Func(this T listView, Microsoft.Maui.ScrollBarVisibility horizontalScrollBarVisibility) where T : IListView { - listView.HorizontalScrollBarVisibility = new PropertyValue(horizontalScrollBarVisibility); + listView.HorizontalScrollBarVisibility = horizontalScrollBarVisibility; return listView; } @@ -433,7 +433,7 @@ public static T HorizontalScrollBarVisibility(this T listView, Func(this T listView, Microsoft.Maui.ScrollBarVisibility verticalScrollBarVisibility) where T : IListView { - listView.VerticalScrollBarVisibility = new PropertyValue(verticalScrollBarVisibility); + listView.VerticalScrollBarVisibility = verticalScrollBarVisibility; return listView; } diff --git a/src/MauiReactor/MenuBarItem.cs b/src/MauiReactor/MenuBarItem.cs index a99e1f16..7e5f7a9a 100644 --- a/src/MauiReactor/MenuBarItem.cs +++ b/src/MauiReactor/MenuBarItem.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface IMenuBarItem : IBaseMenuItem { - PropertyValue? Text { get; set; } + object? Text { get; set; } - PropertyValue? IsEnabled { get; set; } + object? IsEnabled { get; set; } } public partial class MenuBarItem : BaseMenuItem, IMenuBarItem where T : Microsoft.Maui.Controls.MenuBarItem, new() @@ -27,9 +27,9 @@ public MenuBarItem(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IMenuBarItem.Text { get; set; } + object? IMenuBarItem.Text { get; set; } - PropertyValue? IMenuBarItem.IsEnabled { get; set; } + object? IMenuBarItem.IsEnabled { get; set; } internal override void Reset() { @@ -74,7 +74,7 @@ public static partial class MenuBarItemExtensions public static T Text(this T menuBarItem, string text) where T : IMenuBarItem { - menuBarItem.Text = new PropertyValue(text); + menuBarItem.Text = text; return menuBarItem; } @@ -88,7 +88,7 @@ public static T Text(this T menuBarItem, Func textFunc) public static T IsEnabled(this T menuBarItem, bool isEnabled) where T : IMenuBarItem { - menuBarItem.IsEnabled = new PropertyValue(isEnabled); + menuBarItem.IsEnabled = isEnabled; return menuBarItem; } diff --git a/src/MauiReactor/MenuItem.cs b/src/MauiReactor/MenuItem.cs index 2be7adef..fd1617c9 100644 --- a/src/MauiReactor/MenuItem.cs +++ b/src/MauiReactor/MenuItem.cs @@ -12,11 +12,11 @@ namespace MauiReactor; public partial interface IMenuItem : IBaseMenuItem { - PropertyValue? IsDestructive { get; set; } + object? IsDestructive { get; set; } - PropertyValue? IconImageSource { get; set; } + object? IconImageSource { get; set; } - PropertyValue? Text { get; set; } + object? Text { get; set; } Action? ClickedAction { get; set; } @@ -33,11 +33,11 @@ public MenuItem(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IMenuItem.IsDestructive { get; set; } + object? IMenuItem.IsDestructive { get; set; } - PropertyValue? IMenuItem.IconImageSource { get; set; } + object? IMenuItem.IconImageSource { get; set; } - PropertyValue? IMenuItem.Text { get; set; } + object? IMenuItem.Text { get; set; } Action? IMenuItem.ClickedAction { get; set; } @@ -120,7 +120,7 @@ public static partial class MenuItemExtensions public static T IsDestructive(this T menuItem, bool isDestructive) where T : IMenuItem { - menuItem.IsDestructive = new PropertyValue(isDestructive); + menuItem.IsDestructive = isDestructive; return menuItem; } @@ -134,7 +134,7 @@ public static T IsDestructive(this T menuItem, Func isDestructiveFunc) public static T IconImageSource(this T menuItem, Microsoft.Maui.Controls.ImageSource iconImageSource) where T : IMenuItem { - menuItem.IconImageSource = new PropertyValue(iconImageSource); + menuItem.IconImageSource = iconImageSource; return menuItem; } @@ -148,7 +148,7 @@ public static T IconImageSource(this T menuItem, Func(this T menuItem, string file) where T : IMenuItem { - menuItem.IconImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromFile(file)); + menuItem.IconImageSource = Microsoft.Maui.Controls.ImageSource.FromFile(file); return menuItem; } @@ -162,35 +162,40 @@ public static T IconImageSource(this T menuItem, Func action) public static T IconImageSource(this T menuItem, string resourceName, Assembly sourceAssembly) where T : IMenuItem { - menuItem.IconImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)); + menuItem.IconImageSource = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly); return menuItem; } public static T IconImageSource(this T menuItem, Uri imageUri) where T : IMenuItem { - menuItem.IconImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri)); + menuItem.IconImageSource = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri); return menuItem; } public static T IconImageSource(this T menuItem, Uri imageUri, bool cachingEnabled, TimeSpan cacheValidity) where T : IMenuItem { - menuItem.IconImageSource = new PropertyValue(new UriImageSource { Uri = imageUri, CachingEnabled = cachingEnabled, CacheValidity = cacheValidity }); + menuItem.IconImageSource = new UriImageSource + { + Uri = imageUri, + CachingEnabled = cachingEnabled, + CacheValidity = cacheValidity + }; return menuItem; } public static T IconImageSource(this T menuItem, Func imageStream) where T : IMenuItem { - menuItem.IconImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream)); + menuItem.IconImageSource = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream); return menuItem; } public static T Text(this T menuItem, string text) where T : IMenuItem { - menuItem.Text = new PropertyValue(text); + menuItem.Text = text; return menuItem; } diff --git a/src/MauiReactor/MultiPage`1.cs b/src/MauiReactor/MultiPage`1.cs index c008167f..b5e68328 100644 --- a/src/MauiReactor/MultiPage`1.cs +++ b/src/MauiReactor/MultiPage`1.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface IGenericMultiPage : IPage { - PropertyValue? SelectedItem { get; set; } + object? SelectedItem { get; set; } Action? CurrentPageChangedAction { get; set; } @@ -34,7 +34,7 @@ public MultiPage(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IGenericMultiPage.SelectedItem { get; set; } + object? IGenericMultiPage.SelectedItem { get; set; } Action? IGenericMultiPage.CurrentPageChangedAction { get; set; } @@ -119,7 +119,7 @@ public static partial class MultiPageExtensions public static T SelectedItem(this T multiPage, object selectedItem) where T : IGenericMultiPage { - multiPage.SelectedItem = new PropertyValue(selectedItem); + multiPage.SelectedItem = selectedItem; return multiPage; } diff --git a/src/MauiReactor/NavigableElement.cs b/src/MauiReactor/NavigableElement.cs index ab41c479..33dc9a12 100644 --- a/src/MauiReactor/NavigableElement.cs +++ b/src/MauiReactor/NavigableElement.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface INavigableElement : IElement { - PropertyValue? Style { get; set; } + object? Style { get; set; } } public abstract partial class NavigableElement : Element, INavigableElement where T : Microsoft.Maui.Controls.NavigableElement, new() @@ -25,7 +25,7 @@ protected NavigableElement(Action componentRefAction) : base(componentRefAct { } - PropertyValue? INavigableElement.Style { get; set; } + object? INavigableElement.Style { get; set; } internal override void Reset() { @@ -57,7 +57,7 @@ public static partial class NavigableElementExtensions public static T Style(this T navigableElement, Microsoft.Maui.Controls.Style style) where T : INavigableElement { - navigableElement.Style = new PropertyValue(style); + navigableElement.Style = style; return navigableElement; } diff --git a/src/MauiReactor/NavigationPage.cs b/src/MauiReactor/NavigationPage.cs index 2f45cc11..33d12de3 100644 --- a/src/MauiReactor/NavigationPage.cs +++ b/src/MauiReactor/NavigationPage.cs @@ -12,11 +12,11 @@ namespace MauiReactor; public partial interface INavigationPage : IPage { - PropertyValue? BarBackgroundColor { get; set; } + object? BarBackgroundColor { get; set; } - PropertyValue? BarBackground { get; set; } + object? BarBackground { get; set; } - PropertyValue? BarTextColor { get; set; } + object? BarTextColor { get; set; } Action? PoppedAction { get; set; } @@ -41,11 +41,11 @@ public NavigationPage(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? INavigationPage.BarBackgroundColor { get; set; } + object? INavigationPage.BarBackgroundColor { get; set; } - PropertyValue? INavigationPage.BarBackground { get; set; } + object? INavigationPage.BarBackground { get; set; } - PropertyValue? INavigationPage.BarTextColor { get; set; } + object? INavigationPage.BarTextColor { get; set; } Action? INavigationPage.PoppedAction { get; set; } @@ -162,7 +162,7 @@ public static partial class NavigationPageExtensions public static T BarBackgroundColor(this T navigationPage, Microsoft.Maui.Graphics.Color barBackgroundColor) where T : INavigationPage { - navigationPage.BarBackgroundColor = new PropertyValue(barBackgroundColor); + navigationPage.BarBackgroundColor = barBackgroundColor; return navigationPage; } @@ -176,7 +176,7 @@ public static T BarBackgroundColor(this T navigationPage, Func(this T navigationPage, Microsoft.Maui.Controls.Brush barBackground) where T : INavigationPage { - navigationPage.BarBackground = new PropertyValue(barBackground); + navigationPage.BarBackground = barBackground; return navigationPage; } @@ -190,7 +190,7 @@ public static T BarBackground(this T navigationPage, Func(this T navigationPage, Microsoft.Maui.Graphics.Color barTextColor) where T : INavigationPage { - navigationPage.BarTextColor = new PropertyValue(barTextColor); + navigationPage.BarTextColor = barTextColor; return navigationPage; } diff --git a/src/MauiReactor/Page.cs b/src/MauiReactor/Page.cs index e375d7c1..2b34ae8b 100644 --- a/src/MauiReactor/Page.cs +++ b/src/MauiReactor/Page.cs @@ -12,15 +12,15 @@ namespace MauiReactor; public partial interface IPage : IVisualElement { - PropertyValue? BackgroundImageSource { get; set; } + object? BackgroundImageSource { get; set; } - PropertyValue? IsBusy { get; set; } + object? IsBusy { get; set; } - PropertyValue? Padding { get; set; } + object? Padding { get; set; } - PropertyValue? Title { get; set; } + object? Title { get; set; } - PropertyValue? IconImageSource { get; set; } + object? IconImageSource { get; set; } Action? LayoutChangedAction { get; set; } @@ -57,15 +57,15 @@ public Page(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IPage.BackgroundImageSource { get; set; } + object? IPage.BackgroundImageSource { get; set; } - PropertyValue? IPage.IsBusy { get; set; } + object? IPage.IsBusy { get; set; } - PropertyValue? IPage.Padding { get; set; } + object? IPage.Padding { get; set; } - PropertyValue? IPage.Title { get; set; } + object? IPage.Title { get; set; } - PropertyValue? IPage.IconImageSource { get; set; } + object? IPage.IconImageSource { get; set; } Action? IPage.LayoutChangedAction { get; set; } @@ -246,7 +246,7 @@ public static partial class PageExtensions public static T BackgroundImageSource(this T page, Microsoft.Maui.Controls.ImageSource backgroundImageSource) where T : IPage { - page.BackgroundImageSource = new PropertyValue(backgroundImageSource); + page.BackgroundImageSource = backgroundImageSource; return page; } @@ -260,7 +260,7 @@ public static T BackgroundImageSource(this T page, Func(this T page, string file) where T : IPage { - page.BackgroundImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromFile(file)); + page.BackgroundImageSource = Microsoft.Maui.Controls.ImageSource.FromFile(file); return page; } @@ -274,35 +274,40 @@ public static T BackgroundImageSource(this T page, Func action) public static T BackgroundImageSource(this T page, string resourceName, Assembly sourceAssembly) where T : IPage { - page.BackgroundImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)); + page.BackgroundImageSource = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly); return page; } public static T BackgroundImageSource(this T page, Uri imageUri) where T : IPage { - page.BackgroundImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri)); + page.BackgroundImageSource = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri); return page; } public static T BackgroundImageSource(this T page, Uri imageUri, bool cachingEnabled, TimeSpan cacheValidity) where T : IPage { - page.BackgroundImageSource = new PropertyValue(new UriImageSource { Uri = imageUri, CachingEnabled = cachingEnabled, CacheValidity = cacheValidity }); + page.BackgroundImageSource = new UriImageSource + { + Uri = imageUri, + CachingEnabled = cachingEnabled, + CacheValidity = cacheValidity + }; return page; } public static T BackgroundImageSource(this T page, Func imageStream) where T : IPage { - page.BackgroundImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream)); + page.BackgroundImageSource = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream); return page; } public static T IsBusy(this T page, bool isBusy) where T : IPage { - page.IsBusy = new PropertyValue(isBusy); + page.IsBusy = isBusy; return page; } @@ -316,7 +321,7 @@ public static T IsBusy(this T page, Func isBusyFunc) public static T Padding(this T page, Microsoft.Maui.Thickness padding, RxThicknessAnimation? customAnimation = null) where T : IPage { - page.Padding = new PropertyValue(padding); + page.Padding = padding; page.AppendAnimatable(Microsoft.Maui.Controls.Page.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(padding), v => page.Padding = new PropertyValue(v.CurrentValue())); return page; } @@ -331,7 +336,7 @@ public static T Padding(this T page, Func paddingFu public static T Padding(this T page, double leftRight, double topBottom, RxThicknessAnimation? customAnimation = null) where T : IPage { - page.Padding = new PropertyValue(new Thickness(leftRight, topBottom)); + page.Padding = new Thickness(leftRight, topBottom); page.AppendAnimatable(Microsoft.Maui.Controls.Page.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(leftRight, topBottom)), v => page.Padding = new PropertyValue(v.CurrentValue())); return page; } @@ -339,7 +344,7 @@ public static T Padding(this T page, double leftRight, double topBottom, RxTh public static T Padding(this T page, double uniformSize, RxThicknessAnimation? customAnimation = null) where T : IPage { - page.Padding = new PropertyValue(new Thickness(uniformSize)); + page.Padding = new Thickness(uniformSize); page.AppendAnimatable(Microsoft.Maui.Controls.Page.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(uniformSize)), v => page.Padding = new PropertyValue(v.CurrentValue())); return page; } @@ -347,7 +352,7 @@ public static T Padding(this T page, double uniformSize, RxThicknessAnimation public static T Padding(this T page, double left, double top, double right, double bottom, RxThicknessAnimation? customAnimation = null) where T : IPage { - page.Padding = new PropertyValue(new Thickness(left, top, right, bottom)); + page.Padding = new Thickness(left, top, right, bottom); page.AppendAnimatable(Microsoft.Maui.Controls.Page.PaddingProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(left, top, right, bottom)), v => page.Padding = new PropertyValue(v.CurrentValue())); return page; } @@ -355,7 +360,7 @@ public static T Padding(this T page, double left, double top, double right, d public static T Title(this T page, string title) where T : IPage { - page.Title = new PropertyValue(title); + page.Title = title; return page; } @@ -369,7 +374,7 @@ public static T Title(this T page, Func titleFunc) public static T IconImageSource(this T page, Microsoft.Maui.Controls.ImageSource iconImageSource) where T : IPage { - page.IconImageSource = new PropertyValue(iconImageSource); + page.IconImageSource = iconImageSource; return page; } @@ -383,7 +388,7 @@ public static T IconImageSource(this T page, Func(this T page, string file) where T : IPage { - page.IconImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromFile(file)); + page.IconImageSource = Microsoft.Maui.Controls.ImageSource.FromFile(file); return page; } @@ -397,28 +402,33 @@ public static T IconImageSource(this T page, Func action) public static T IconImageSource(this T page, string resourceName, Assembly sourceAssembly) where T : IPage { - page.IconImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)); + page.IconImageSource = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly); return page; } public static T IconImageSource(this T page, Uri imageUri) where T : IPage { - page.IconImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri)); + page.IconImageSource = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri); return page; } public static T IconImageSource(this T page, Uri imageUri, bool cachingEnabled, TimeSpan cacheValidity) where T : IPage { - page.IconImageSource = new PropertyValue(new UriImageSource { Uri = imageUri, CachingEnabled = cachingEnabled, CacheValidity = cacheValidity }); + page.IconImageSource = new UriImageSource + { + Uri = imageUri, + CachingEnabled = cachingEnabled, + CacheValidity = cacheValidity + }; return page; } public static T IconImageSource(this T page, Func imageStream) where T : IPage { - page.IconImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream)); + page.IconImageSource = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream); return page; } diff --git a/src/MauiReactor/PanGestureRecognizer.cs b/src/MauiReactor/PanGestureRecognizer.cs index 9b3b5b67..4d4319c5 100644 --- a/src/MauiReactor/PanGestureRecognizer.cs +++ b/src/MauiReactor/PanGestureRecognizer.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface IPanGestureRecognizer : IGestureRecognizer { - PropertyValue? TouchPoints { get; set; } + object? TouchPoints { get; set; } Action? PanUpdatedAction { get; set; } @@ -29,7 +29,7 @@ public PanGestureRecognizer(Action componentRefAction) : base(componentRefAc { } - PropertyValue? IPanGestureRecognizer.TouchPoints { get; set; } + object? IPanGestureRecognizer.TouchPoints { get; set; } Action? IPanGestureRecognizer.PanUpdatedAction { get; set; } @@ -108,7 +108,7 @@ public static partial class PanGestureRecognizerExtensions public static T TouchPoints(this T panGestureRecognizer, int touchPoints) where T : IPanGestureRecognizer { - panGestureRecognizer.TouchPoints = new PropertyValue(touchPoints); + panGestureRecognizer.TouchPoints = touchPoints; return panGestureRecognizer; } diff --git a/src/MauiReactor/Picker.cs b/src/MauiReactor/Picker.cs index fa0a4489..7ff81b62 100644 --- a/src/MauiReactor/Picker.cs +++ b/src/MauiReactor/Picker.cs @@ -12,27 +12,27 @@ namespace MauiReactor; public partial interface IPicker : IView { - PropertyValue? TextColor { get; set; } + object? TextColor { get; set; } - PropertyValue? CharacterSpacing { get; set; } + object? CharacterSpacing { get; set; } - PropertyValue? Title { get; set; } + object? Title { get; set; } - PropertyValue? TitleColor { get; set; } + object? TitleColor { get; set; } - PropertyValue? SelectedIndex { get; set; } + object? SelectedIndex { get; set; } - PropertyValue? FontFamily { get; set; } + object? FontFamily { get; set; } - PropertyValue? FontSize { get; set; } + object? FontSize { get; set; } - PropertyValue? FontAttributes { get; set; } + object? FontAttributes { get; set; } - PropertyValue? FontAutoScalingEnabled { get; set; } + object? FontAutoScalingEnabled { get; set; } - PropertyValue? HorizontalTextAlignment { get; set; } + object? HorizontalTextAlignment { get; set; } - PropertyValue? VerticalTextAlignment { get; set; } + object? VerticalTextAlignment { get; set; } Action? SelectedIndexChangedAction { get; set; } @@ -49,27 +49,27 @@ public Picker(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IPicker.TextColor { get; set; } + object? IPicker.TextColor { get; set; } - PropertyValue? IPicker.CharacterSpacing { get; set; } + object? IPicker.CharacterSpacing { get; set; } - PropertyValue? IPicker.Title { get; set; } + object? IPicker.Title { get; set; } - PropertyValue? IPicker.TitleColor { get; set; } + object? IPicker.TitleColor { get; set; } - PropertyValue? IPicker.SelectedIndex { get; set; } + object? IPicker.SelectedIndex { get; set; } - PropertyValue? IPicker.FontFamily { get; set; } + object? IPicker.FontFamily { get; set; } - PropertyValue? IPicker.FontSize { get; set; } + object? IPicker.FontSize { get; set; } - PropertyValue? IPicker.FontAttributes { get; set; } + object? IPicker.FontAttributes { get; set; } - PropertyValue? IPicker.FontAutoScalingEnabled { get; set; } + object? IPicker.FontAutoScalingEnabled { get; set; } - PropertyValue? IPicker.HorizontalTextAlignment { get; set; } + object? IPicker.HorizontalTextAlignment { get; set; } - PropertyValue? IPicker.VerticalTextAlignment { get; set; } + object? IPicker.VerticalTextAlignment { get; set; } Action? IPicker.SelectedIndexChangedAction { get; set; } @@ -178,7 +178,7 @@ public static partial class PickerExtensions public static T TextColor(this T picker, Microsoft.Maui.Graphics.Color textColor) where T : IPicker { - picker.TextColor = new PropertyValue(textColor); + picker.TextColor = textColor; return picker; } @@ -192,7 +192,7 @@ public static T TextColor(this T picker, Func public static T CharacterSpacing(this T picker, double characterSpacing, RxDoubleAnimation? customAnimation = null) where T : IPicker { - picker.CharacterSpacing = new PropertyValue(characterSpacing); + picker.CharacterSpacing = characterSpacing; picker.AppendAnimatable(Microsoft.Maui.Controls.Picker.CharacterSpacingProperty, customAnimation ?? new RxDoubleAnimation(characterSpacing), v => picker.CharacterSpacing = new PropertyValue(v.CurrentValue())); return picker; } @@ -207,7 +207,7 @@ public static T CharacterSpacing(this T picker, Func characterSpacing public static T Title(this T picker, string title) where T : IPicker { - picker.Title = new PropertyValue(title); + picker.Title = title; return picker; } @@ -221,7 +221,7 @@ public static T Title(this T picker, Func titleFunc) public static T TitleColor(this T picker, Microsoft.Maui.Graphics.Color titleColor) where T : IPicker { - picker.TitleColor = new PropertyValue(titleColor); + picker.TitleColor = titleColor; return picker; } @@ -235,7 +235,7 @@ public static T TitleColor(this T picker, Func public static T SelectedIndex(this T picker, int selectedIndex) where T : IPicker { - picker.SelectedIndex = new PropertyValue(selectedIndex); + picker.SelectedIndex = selectedIndex; return picker; } @@ -249,7 +249,7 @@ public static T SelectedIndex(this T picker, Func selectedIndexFunc) public static T FontFamily(this T picker, string fontFamily) where T : IPicker { - picker.FontFamily = new PropertyValue(fontFamily); + picker.FontFamily = fontFamily; return picker; } @@ -263,7 +263,7 @@ public static T FontFamily(this T picker, Func fontFamilyFunc) public static T FontSize(this T picker, double fontSize, RxDoubleAnimation? customAnimation = null) where T : IPicker { - picker.FontSize = new PropertyValue(fontSize); + picker.FontSize = fontSize; picker.AppendAnimatable(Microsoft.Maui.Controls.Picker.FontSizeProperty, customAnimation ?? new RxDoubleAnimation(fontSize), v => picker.FontSize = new PropertyValue(v.CurrentValue())); return picker; } @@ -278,7 +278,7 @@ public static T FontSize(this T picker, Func fontSizeFunc) public static T FontAttributes(this T picker, Microsoft.Maui.Controls.FontAttributes fontAttributes) where T : IPicker { - picker.FontAttributes = new PropertyValue(fontAttributes); + picker.FontAttributes = fontAttributes; return picker; } @@ -292,7 +292,7 @@ public static T FontAttributes(this T picker, Func(this T picker, bool fontAutoScalingEnabled) where T : IPicker { - picker.FontAutoScalingEnabled = new PropertyValue(fontAutoScalingEnabled); + picker.FontAutoScalingEnabled = fontAutoScalingEnabled; return picker; } @@ -306,7 +306,7 @@ public static T FontAutoScalingEnabled(this T picker, Func fontAutoScal public static T HorizontalTextAlignment(this T picker, Microsoft.Maui.TextAlignment horizontalTextAlignment) where T : IPicker { - picker.HorizontalTextAlignment = new PropertyValue(horizontalTextAlignment); + picker.HorizontalTextAlignment = horizontalTextAlignment; return picker; } @@ -320,7 +320,7 @@ public static T HorizontalTextAlignment(this T picker, Func(this T picker, Microsoft.Maui.TextAlignment verticalTextAlignment) where T : IPicker { - picker.VerticalTextAlignment = new PropertyValue(verticalTextAlignment); + picker.VerticalTextAlignment = verticalTextAlignment; return picker; } diff --git a/src/MauiReactor/ProgressBar.cs b/src/MauiReactor/ProgressBar.cs index 0e722cf1..67eeb51d 100644 --- a/src/MauiReactor/ProgressBar.cs +++ b/src/MauiReactor/ProgressBar.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface IProgressBar : IView { - PropertyValue? ProgressColor { get; set; } + object? ProgressColor { get; set; } - PropertyValue? Progress { get; set; } + object? Progress { get; set; } } public partial class ProgressBar : View, IProgressBar where T : Microsoft.Maui.Controls.ProgressBar, new() @@ -27,9 +27,9 @@ public ProgressBar(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IProgressBar.ProgressColor { get; set; } + object? IProgressBar.ProgressColor { get; set; } - PropertyValue? IProgressBar.Progress { get; set; } + object? IProgressBar.Progress { get; set; } internal override void Reset() { @@ -83,7 +83,7 @@ public static partial class ProgressBarExtensions public static T ProgressColor(this T progressBar, Microsoft.Maui.Graphics.Color progressColor) where T : IProgressBar { - progressBar.ProgressColor = new PropertyValue(progressColor); + progressBar.ProgressColor = progressColor; return progressBar; } @@ -97,7 +97,7 @@ public static T ProgressColor(this T progressBar, Func(this T progressBar, double progress, RxDoubleAnimation? customAnimation = null) where T : IProgressBar { - progressBar.Progress = new PropertyValue(progress); + progressBar.Progress = progress; progressBar.AppendAnimatable(Microsoft.Maui.Controls.ProgressBar.ProgressProperty, customAnimation ?? new RxDoubleAnimation(progress), v => progressBar.Progress = new PropertyValue(v.CurrentValue())); return progressBar; } diff --git a/src/MauiReactor/PropertyValue.cs b/src/MauiReactor/PropertyValue.cs index 8606b04d..72969882 100644 --- a/src/MauiReactor/PropertyValue.cs +++ b/src/MauiReactor/PropertyValue.cs @@ -15,10 +15,6 @@ public interface IPropertyValue public class PropertyValue : IPropertyValue { - //private PropertyValue() - //{ - // SetDefault = true; - //} public PropertyValue(T value) { Value = value; @@ -31,8 +27,6 @@ public PropertyValue(Func valueAction) Value = valueAction(); } - //public static IPropertyValue Default { get; } = new PropertyValue(); - public T? Value { get; } public Func? ValueFunc { get; } diff --git a/src/MauiReactor/RadioButton.cs b/src/MauiReactor/RadioButton.cs index 431c0660..ecbde6cd 100644 --- a/src/MauiReactor/RadioButton.cs +++ b/src/MauiReactor/RadioButton.cs @@ -12,31 +12,31 @@ namespace MauiReactor; public partial interface IRadioButton : ITemplatedView { - PropertyValue? Value { get; set; } + object? Value { get; set; } - PropertyValue? IsChecked { get; set; } + object? IsChecked { get; set; } - PropertyValue? GroupName { get; set; } + object? GroupName { get; set; } - PropertyValue? TextColor { get; set; } + object? TextColor { get; set; } - PropertyValue? CharacterSpacing { get; set; } + object? CharacterSpacing { get; set; } - PropertyValue? TextTransform { get; set; } + object? TextTransform { get; set; } - PropertyValue? FontAttributes { get; set; } + object? FontAttributes { get; set; } - PropertyValue? FontFamily { get; set; } + object? FontFamily { get; set; } - PropertyValue? FontSize { get; set; } + object? FontSize { get; set; } - PropertyValue? FontAutoScalingEnabled { get; set; } + object? FontAutoScalingEnabled { get; set; } - PropertyValue? BorderColor { get; set; } + object? BorderColor { get; set; } - PropertyValue? CornerRadius { get; set; } + object? CornerRadius { get; set; } - PropertyValue? BorderWidth { get; set; } + object? BorderWidth { get; set; } Action? CheckedChangedAction { get; set; } @@ -53,31 +53,31 @@ public RadioButton(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IRadioButton.Value { get; set; } + object? IRadioButton.Value { get; set; } - PropertyValue? IRadioButton.IsChecked { get; set; } + object? IRadioButton.IsChecked { get; set; } - PropertyValue? IRadioButton.GroupName { get; set; } + object? IRadioButton.GroupName { get; set; } - PropertyValue? IRadioButton.TextColor { get; set; } + object? IRadioButton.TextColor { get; set; } - PropertyValue? IRadioButton.CharacterSpacing { get; set; } + object? IRadioButton.CharacterSpacing { get; set; } - PropertyValue? IRadioButton.TextTransform { get; set; } + object? IRadioButton.TextTransform { get; set; } - PropertyValue? IRadioButton.FontAttributes { get; set; } + object? IRadioButton.FontAttributes { get; set; } - PropertyValue? IRadioButton.FontFamily { get; set; } + object? IRadioButton.FontFamily { get; set; } - PropertyValue? IRadioButton.FontSize { get; set; } + object? IRadioButton.FontSize { get; set; } - PropertyValue? IRadioButton.FontAutoScalingEnabled { get; set; } + object? IRadioButton.FontAutoScalingEnabled { get; set; } - PropertyValue? IRadioButton.BorderColor { get; set; } + object? IRadioButton.BorderColor { get; set; } - PropertyValue? IRadioButton.CornerRadius { get; set; } + object? IRadioButton.CornerRadius { get; set; } - PropertyValue? IRadioButton.BorderWidth { get; set; } + object? IRadioButton.BorderWidth { get; set; } Action? IRadioButton.CheckedChangedAction { get; set; } @@ -191,7 +191,7 @@ public static partial class RadioButtonExtensions public static T Value(this T radioButton, object value) where T : IRadioButton { - radioButton.Value = new PropertyValue(value); + radioButton.Value = value; return radioButton; } @@ -205,7 +205,7 @@ public static T Value(this T radioButton, Func valueFunc) public static T IsChecked(this T radioButton, bool isChecked) where T : IRadioButton { - radioButton.IsChecked = new PropertyValue(isChecked); + radioButton.IsChecked = isChecked; return radioButton; } @@ -219,7 +219,7 @@ public static T IsChecked(this T radioButton, Func isCheckedFunc) public static T GroupName(this T radioButton, string groupName) where T : IRadioButton { - radioButton.GroupName = new PropertyValue(groupName); + radioButton.GroupName = groupName; return radioButton; } @@ -233,7 +233,7 @@ public static T GroupName(this T radioButton, Func groupNameFunc) public static T TextColor(this T radioButton, Microsoft.Maui.Graphics.Color textColor) where T : IRadioButton { - radioButton.TextColor = new PropertyValue(textColor); + radioButton.TextColor = textColor; return radioButton; } @@ -247,7 +247,7 @@ public static T TextColor(this T radioButton, Func(this T radioButton, double characterSpacing, RxDoubleAnimation? customAnimation = null) where T : IRadioButton { - radioButton.CharacterSpacing = new PropertyValue(characterSpacing); + radioButton.CharacterSpacing = characterSpacing; radioButton.AppendAnimatable(Microsoft.Maui.Controls.RadioButton.CharacterSpacingProperty, customAnimation ?? new RxDoubleAnimation(characterSpacing), v => radioButton.CharacterSpacing = new PropertyValue(v.CurrentValue())); return radioButton; } @@ -262,7 +262,7 @@ public static T CharacterSpacing(this T radioButton, Func characterSp public static T TextTransform(this T radioButton, Microsoft.Maui.TextTransform textTransform) where T : IRadioButton { - radioButton.TextTransform = new PropertyValue(textTransform); + radioButton.TextTransform = textTransform; return radioButton; } @@ -276,7 +276,7 @@ public static T TextTransform(this T radioButton, Func(this T radioButton, Microsoft.Maui.Controls.FontAttributes fontAttributes) where T : IRadioButton { - radioButton.FontAttributes = new PropertyValue(fontAttributes); + radioButton.FontAttributes = fontAttributes; return radioButton; } @@ -290,7 +290,7 @@ public static T FontAttributes(this T radioButton, Func(this T radioButton, string fontFamily) where T : IRadioButton { - radioButton.FontFamily = new PropertyValue(fontFamily); + radioButton.FontFamily = fontFamily; return radioButton; } @@ -304,7 +304,7 @@ public static T FontFamily(this T radioButton, Func fontFamilyFunc) public static T FontSize(this T radioButton, double fontSize, RxDoubleAnimation? customAnimation = null) where T : IRadioButton { - radioButton.FontSize = new PropertyValue(fontSize); + radioButton.FontSize = fontSize; radioButton.AppendAnimatable(Microsoft.Maui.Controls.RadioButton.FontSizeProperty, customAnimation ?? new RxDoubleAnimation(fontSize), v => radioButton.FontSize = new PropertyValue(v.CurrentValue())); return radioButton; } @@ -319,7 +319,7 @@ public static T FontSize(this T radioButton, Func fontSizeFunc) public static T FontAutoScalingEnabled(this T radioButton, bool fontAutoScalingEnabled) where T : IRadioButton { - radioButton.FontAutoScalingEnabled = new PropertyValue(fontAutoScalingEnabled); + radioButton.FontAutoScalingEnabled = fontAutoScalingEnabled; return radioButton; } @@ -333,7 +333,7 @@ public static T FontAutoScalingEnabled(this T radioButton, Func fontAut public static T BorderColor(this T radioButton, Microsoft.Maui.Graphics.Color borderColor) where T : IRadioButton { - radioButton.BorderColor = new PropertyValue(borderColor); + radioButton.BorderColor = borderColor; return radioButton; } @@ -347,7 +347,7 @@ public static T BorderColor(this T radioButton, Func(this T radioButton, int cornerRadius) where T : IRadioButton { - radioButton.CornerRadius = new PropertyValue(cornerRadius); + radioButton.CornerRadius = cornerRadius; return radioButton; } @@ -361,7 +361,7 @@ public static T CornerRadius(this T radioButton, Func cornerRadiusFunc) public static T BorderWidth(this T radioButton, double borderWidth, RxDoubleAnimation? customAnimation = null) where T : IRadioButton { - radioButton.BorderWidth = new PropertyValue(borderWidth); + radioButton.BorderWidth = borderWidth; radioButton.AppendAnimatable(Microsoft.Maui.Controls.RadioButton.BorderWidthProperty, customAnimation ?? new RxDoubleAnimation(borderWidth), v => radioButton.BorderWidth = new PropertyValue(v.CurrentValue())); return radioButton; } diff --git a/src/MauiReactor/RefreshView.cs b/src/MauiReactor/RefreshView.cs index 6fd4af0a..9df351bb 100644 --- a/src/MauiReactor/RefreshView.cs +++ b/src/MauiReactor/RefreshView.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface IRefreshView : IContentView { - PropertyValue? IsRefreshing { get; set; } + object? IsRefreshing { get; set; } - PropertyValue? RefreshColor { get; set; } + object? RefreshColor { get; set; } Action? RefreshingAction { get; set; } @@ -31,9 +31,9 @@ public RefreshView(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IRefreshView.IsRefreshing { get; set; } + object? IRefreshView.IsRefreshing { get; set; } - PropertyValue? IRefreshView.RefreshColor { get; set; } + object? IRefreshView.RefreshColor { get; set; } Action? IRefreshView.RefreshingAction { get; set; } @@ -114,7 +114,7 @@ public static partial class RefreshViewExtensions public static T IsRefreshing(this T refreshView, bool isRefreshing) where T : IRefreshView { - refreshView.IsRefreshing = new PropertyValue(isRefreshing); + refreshView.IsRefreshing = isRefreshing; return refreshView; } @@ -128,7 +128,7 @@ public static T IsRefreshing(this T refreshView, Func isRefreshingFunc) public static T RefreshColor(this T refreshView, Microsoft.Maui.Graphics.Color refreshColor) where T : IRefreshView { - refreshView.RefreshColor = new PropertyValue(refreshColor); + refreshView.RefreshColor = refreshColor; return refreshView; } diff --git a/src/MauiReactor/ReorderableItemsView.cs b/src/MauiReactor/ReorderableItemsView.cs index d2c5d4d4..8ed56dc1 100644 --- a/src/MauiReactor/ReorderableItemsView.cs +++ b/src/MauiReactor/ReorderableItemsView.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface IReorderableItemsView : IGroupableItemsView { - PropertyValue? CanMixGroups { get; set; } + object? CanMixGroups { get; set; } - PropertyValue? CanReorderItems { get; set; } + object? CanReorderItems { get; set; } Action? ReorderCompletedAction { get; set; } @@ -31,9 +31,9 @@ public ReorderableItemsView(Action componentRefAction) : base(componentRefAc { } - PropertyValue? IReorderableItemsView.CanMixGroups { get; set; } + object? IReorderableItemsView.CanMixGroups { get; set; } - PropertyValue? IReorderableItemsView.CanReorderItems { get; set; } + object? IReorderableItemsView.CanReorderItems { get; set; } Action? IReorderableItemsView.ReorderCompletedAction { get; set; } @@ -114,7 +114,7 @@ public static partial class ReorderableItemsViewExtensions public static T CanMixGroups(this T reorderableItemsView, bool canMixGroups) where T : IReorderableItemsView { - reorderableItemsView.CanMixGroups = new PropertyValue(canMixGroups); + reorderableItemsView.CanMixGroups = canMixGroups; return reorderableItemsView; } @@ -128,7 +128,7 @@ public static T CanMixGroups(this T reorderableItemsView, Func canMixGr public static T CanReorderItems(this T reorderableItemsView, bool canReorderItems) where T : IReorderableItemsView { - reorderableItemsView.CanReorderItems = new PropertyValue(canReorderItems); + reorderableItemsView.CanReorderItems = canReorderItems; return reorderableItemsView; } diff --git a/src/MauiReactor/ScrollView.cs b/src/MauiReactor/ScrollView.cs index f652efe9..1a886f9d 100644 --- a/src/MauiReactor/ScrollView.cs +++ b/src/MauiReactor/ScrollView.cs @@ -12,11 +12,11 @@ namespace MauiReactor; public partial interface IScrollView : Compatibility.ILayout { - PropertyValue? Orientation { get; set; } + object? Orientation { get; set; } - PropertyValue? HorizontalScrollBarVisibility { get; set; } + object? HorizontalScrollBarVisibility { get; set; } - PropertyValue? VerticalScrollBarVisibility { get; set; } + object? VerticalScrollBarVisibility { get; set; } Action? ScrolledAction { get; set; } @@ -33,11 +33,11 @@ public ScrollView(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IScrollView.Orientation { get; set; } + object? IScrollView.Orientation { get; set; } - PropertyValue? IScrollView.HorizontalScrollBarVisibility { get; set; } + object? IScrollView.HorizontalScrollBarVisibility { get; set; } - PropertyValue? IScrollView.VerticalScrollBarVisibility { get; set; } + object? IScrollView.VerticalScrollBarVisibility { get; set; } Action? IScrollView.ScrolledAction { get; set; } @@ -120,7 +120,7 @@ public static partial class ScrollViewExtensions public static T Orientation(this T scrollView, Microsoft.Maui.ScrollOrientation orientation) where T : IScrollView { - scrollView.Orientation = new PropertyValue(orientation); + scrollView.Orientation = orientation; return scrollView; } @@ -134,7 +134,7 @@ public static T Orientation(this T scrollView, Func(this T scrollView, Microsoft.Maui.ScrollBarVisibility horizontalScrollBarVisibility) where T : IScrollView { - scrollView.HorizontalScrollBarVisibility = new PropertyValue(horizontalScrollBarVisibility); + scrollView.HorizontalScrollBarVisibility = horizontalScrollBarVisibility; return scrollView; } @@ -148,7 +148,7 @@ public static T HorizontalScrollBarVisibility(this T scrollView, Func(this T scrollView, Microsoft.Maui.ScrollBarVisibility verticalScrollBarVisibility) where T : IScrollView { - scrollView.VerticalScrollBarVisibility = new PropertyValue(verticalScrollBarVisibility); + scrollView.VerticalScrollBarVisibility = verticalScrollBarVisibility; return scrollView; } diff --git a/src/MauiReactor/SearchBar.cs b/src/MauiReactor/SearchBar.cs index db094194..93166278 100644 --- a/src/MauiReactor/SearchBar.cs +++ b/src/MauiReactor/SearchBar.cs @@ -12,11 +12,11 @@ namespace MauiReactor; public partial interface ISearchBar : IInputView { - PropertyValue? CancelButtonColor { get; set; } + object? CancelButtonColor { get; set; } - PropertyValue? HorizontalTextAlignment { get; set; } + object? HorizontalTextAlignment { get; set; } - PropertyValue? VerticalTextAlignment { get; set; } + object? VerticalTextAlignment { get; set; } Action? SearchButtonPressedAction { get; set; } @@ -33,11 +33,11 @@ public SearchBar(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ISearchBar.CancelButtonColor { get; set; } + object? ISearchBar.CancelButtonColor { get; set; } - PropertyValue? ISearchBar.HorizontalTextAlignment { get; set; } + object? ISearchBar.HorizontalTextAlignment { get; set; } - PropertyValue? ISearchBar.VerticalTextAlignment { get; set; } + object? ISearchBar.VerticalTextAlignment { get; set; } Action? ISearchBar.SearchButtonPressedAction { get; set; } @@ -120,7 +120,7 @@ public static partial class SearchBarExtensions public static T CancelButtonColor(this T searchBar, Microsoft.Maui.Graphics.Color cancelButtonColor) where T : ISearchBar { - searchBar.CancelButtonColor = new PropertyValue(cancelButtonColor); + searchBar.CancelButtonColor = cancelButtonColor; return searchBar; } @@ -134,7 +134,7 @@ public static T CancelButtonColor(this T searchBar, Func(this T searchBar, Microsoft.Maui.TextAlignment horizontalTextAlignment) where T : ISearchBar { - searchBar.HorizontalTextAlignment = new PropertyValue(horizontalTextAlignment); + searchBar.HorizontalTextAlignment = horizontalTextAlignment; return searchBar; } @@ -148,7 +148,7 @@ public static T HorizontalTextAlignment(this T searchBar, Func(this T searchBar, Microsoft.Maui.TextAlignment verticalTextAlignment) where T : ISearchBar { - searchBar.VerticalTextAlignment = new PropertyValue(verticalTextAlignment); + searchBar.VerticalTextAlignment = verticalTextAlignment; return searchBar; } diff --git a/src/MauiReactor/SelectableItemsView.cs b/src/MauiReactor/SelectableItemsView.cs index c1dc370c..9a7f31ab 100644 --- a/src/MauiReactor/SelectableItemsView.cs +++ b/src/MauiReactor/SelectableItemsView.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface ISelectableItemsView : IStructuredItemsView { - PropertyValue? SelectionMode { get; set; } + object? SelectionMode { get; set; } - PropertyValue? SelectedItem { get; set; } + object? SelectedItem { get; set; } Action? SelectionChangedAction { get; set; } @@ -31,9 +31,9 @@ public SelectableItemsView(Action componentRefAction) : base(componentRefAct { } - PropertyValue? ISelectableItemsView.SelectionMode { get; set; } + object? ISelectableItemsView.SelectionMode { get; set; } - PropertyValue? ISelectableItemsView.SelectedItem { get; set; } + object? ISelectableItemsView.SelectedItem { get; set; } Action? ISelectableItemsView.SelectionChangedAction { get; set; } @@ -114,7 +114,7 @@ public static partial class SelectableItemsViewExtensions public static T SelectionMode(this T selectableItemsView, Microsoft.Maui.Controls.SelectionMode selectionMode) where T : ISelectableItemsView { - selectableItemsView.SelectionMode = new PropertyValue(selectionMode); + selectableItemsView.SelectionMode = selectionMode; return selectableItemsView; } @@ -128,7 +128,7 @@ public static T SelectionMode(this T selectableItemsView, Func(this T selectableItemsView, object selectedItem) where T : ISelectableItemsView { - selectableItemsView.SelectedItem = new PropertyValue(selectedItem); + selectableItemsView.SelectedItem = selectedItem; return selectableItemsView; } diff --git a/src/MauiReactor/Shadow.cs b/src/MauiReactor/Shadow.cs index 133cacc1..e2ce86bc 100644 --- a/src/MauiReactor/Shadow.cs +++ b/src/MauiReactor/Shadow.cs @@ -12,13 +12,13 @@ namespace MauiReactor; public partial interface IShadow : IElement { - PropertyValue? Radius { get; set; } + object? Radius { get; set; } - PropertyValue? Opacity { get; set; } + object? Opacity { get; set; } - PropertyValue? Brush { get; set; } + object? Brush { get; set; } - PropertyValue? Offset { get; set; } + object? Offset { get; set; } } public partial class Shadow : Element, IShadow where T : Microsoft.Maui.Controls.Shadow, new() @@ -31,13 +31,13 @@ public Shadow(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IShadow.Radius { get; set; } + object? IShadow.Radius { get; set; } - PropertyValue? IShadow.Opacity { get; set; } + object? IShadow.Opacity { get; set; } - PropertyValue? IShadow.Brush { get; set; } + object? IShadow.Brush { get; set; } - PropertyValue? IShadow.Offset { get; set; } + object? IShadow.Offset { get; set; } internal override void Reset() { @@ -95,7 +95,7 @@ public static partial class ShadowExtensions public static T Radius(this T shadow, float radius) where T : IShadow { - shadow.Radius = new PropertyValue(radius); + shadow.Radius = radius; return shadow; } @@ -109,7 +109,7 @@ public static T Radius(this T shadow, Func radiusFunc) public static T Opacity(this T shadow, float opacity) where T : IShadow { - shadow.Opacity = new PropertyValue(opacity); + shadow.Opacity = opacity; return shadow; } @@ -123,7 +123,7 @@ public static T Opacity(this T shadow, Func opacityFunc) public static T Brush(this T shadow, Microsoft.Maui.Controls.Brush brush) where T : IShadow { - shadow.Brush = new PropertyValue(brush); + shadow.Brush = brush; return shadow; } @@ -137,7 +137,7 @@ public static T Brush(this T shadow, Func brus public static T Offset(this T shadow, Microsoft.Maui.Graphics.Point offset, RxPointAnimation? customAnimation = null) where T : IShadow { - shadow.Offset = new PropertyValue(offset); + shadow.Offset = offset; shadow.AppendAnimatable(Microsoft.Maui.Controls.Shadow.OffsetProperty, customAnimation ?? new RxSimplePointAnimation(offset), v => shadow.Offset = new PropertyValue(v.CurrentValue())); return shadow; } @@ -152,7 +152,7 @@ public static T Offset(this T shadow, Func off public static T Offset(this T shadow, double x, double y) where T : IShadow { - shadow.Offset = new PropertyValue(new Microsoft.Maui.Graphics.Point(x, y)); + shadow.Offset = new Microsoft.Maui.Graphics.Point(x, y); return shadow; } } \ No newline at end of file diff --git a/src/MauiReactor/Shapes/EllipseGeometry.cs b/src/MauiReactor/Shapes/EllipseGeometry.cs index dc230b5f..805d9908 100644 --- a/src/MauiReactor/Shapes/EllipseGeometry.cs +++ b/src/MauiReactor/Shapes/EllipseGeometry.cs @@ -12,11 +12,11 @@ namespace MauiReactor.Shapes; public partial interface IEllipseGeometry : Shapes.IGeometry { - PropertyValue? Center { get; set; } + object? Center { get; set; } - PropertyValue? RadiusX { get; set; } + object? RadiusX { get; set; } - PropertyValue? RadiusY { get; set; } + object? RadiusY { get; set; } } public partial class EllipseGeometry : Shapes.Geometry, IEllipseGeometry where T : Microsoft.Maui.Controls.Shapes.EllipseGeometry, new() @@ -29,11 +29,11 @@ public EllipseGeometry(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IEllipseGeometry.Center { get; set; } + object? IEllipseGeometry.Center { get; set; } - PropertyValue? IEllipseGeometry.RadiusX { get; set; } + object? IEllipseGeometry.RadiusX { get; set; } - PropertyValue? IEllipseGeometry.RadiusY { get; set; } + object? IEllipseGeometry.RadiusY { get; set; } internal override void Reset() { @@ -91,7 +91,7 @@ public static partial class EllipseGeometryExtensions public static T Center(this T ellipseGeometry, Microsoft.Maui.Graphics.Point center, RxPointAnimation? customAnimation = null) where T : IEllipseGeometry { - ellipseGeometry.Center = new PropertyValue(center); + ellipseGeometry.Center = center; ellipseGeometry.AppendAnimatable(Microsoft.Maui.Controls.Shapes.EllipseGeometry.CenterProperty, customAnimation ?? new RxSimplePointAnimation(center), v => ellipseGeometry.Center = new PropertyValue(v.CurrentValue())); return ellipseGeometry; } @@ -106,14 +106,14 @@ public static T Center(this T ellipseGeometry, Func(this T ellipseGeometry, double x, double y) where T : IEllipseGeometry { - ellipseGeometry.Center = new PropertyValue(new Microsoft.Maui.Graphics.Point(x, y)); + ellipseGeometry.Center = new Microsoft.Maui.Graphics.Point(x, y); return ellipseGeometry; } public static T RadiusX(this T ellipseGeometry, double radiusX, RxDoubleAnimation? customAnimation = null) where T : IEllipseGeometry { - ellipseGeometry.RadiusX = new PropertyValue(radiusX); + ellipseGeometry.RadiusX = radiusX; ellipseGeometry.AppendAnimatable(Microsoft.Maui.Controls.Shapes.EllipseGeometry.RadiusXProperty, customAnimation ?? new RxDoubleAnimation(radiusX), v => ellipseGeometry.RadiusX = new PropertyValue(v.CurrentValue())); return ellipseGeometry; } @@ -128,7 +128,7 @@ public static T RadiusX(this T ellipseGeometry, Func radiusXFunc) public static T RadiusY(this T ellipseGeometry, double radiusY, RxDoubleAnimation? customAnimation = null) where T : IEllipseGeometry { - ellipseGeometry.RadiusY = new PropertyValue(radiusY); + ellipseGeometry.RadiusY = radiusY; ellipseGeometry.AppendAnimatable(Microsoft.Maui.Controls.Shapes.EllipseGeometry.RadiusYProperty, customAnimation ?? new RxDoubleAnimation(radiusY), v => ellipseGeometry.RadiusY = new PropertyValue(v.CurrentValue())); return ellipseGeometry; } diff --git a/src/MauiReactor/Shapes/GeometryGroup.cs b/src/MauiReactor/Shapes/GeometryGroup.cs index d8287734..99400fe6 100644 --- a/src/MauiReactor/Shapes/GeometryGroup.cs +++ b/src/MauiReactor/Shapes/GeometryGroup.cs @@ -12,9 +12,9 @@ namespace MauiReactor.Shapes; public partial interface IGeometryGroup : Shapes.IGeometry { - PropertyValue? Children { get; set; } + object? Children { get; set; } - PropertyValue? FillRule { get; set; } + object? FillRule { get; set; } Action? InvalidateGeometryRequestedAction { get; set; } @@ -31,9 +31,9 @@ public GeometryGroup(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IGeometryGroup.Children { get; set; } + object? IGeometryGroup.Children { get; set; } - PropertyValue? IGeometryGroup.FillRule { get; set; } + object? IGeometryGroup.FillRule { get; set; } Action? IGeometryGroup.InvalidateGeometryRequestedAction { get; set; } @@ -114,7 +114,7 @@ public static partial class GeometryGroupExtensions public static T Children(this T geometryGroup, Microsoft.Maui.Controls.Shapes.GeometryCollection children) where T : IGeometryGroup { - geometryGroup.Children = new PropertyValue(children); + geometryGroup.Children = children; return geometryGroup; } @@ -128,7 +128,7 @@ public static T Children(this T geometryGroup, Func(this T geometryGroup, Microsoft.Maui.Controls.Shapes.FillRule fillRule) where T : IGeometryGroup { - geometryGroup.FillRule = new PropertyValue(fillRule); + geometryGroup.FillRule = fillRule; return geometryGroup; } diff --git a/src/MauiReactor/Shapes/Line.cs b/src/MauiReactor/Shapes/Line.cs index 85ee1099..a7ddac0f 100644 --- a/src/MauiReactor/Shapes/Line.cs +++ b/src/MauiReactor/Shapes/Line.cs @@ -12,13 +12,13 @@ namespace MauiReactor.Shapes; public partial interface ILine : Shapes.IShape { - PropertyValue? X1 { get; set; } + object? X1 { get; set; } - PropertyValue? Y1 { get; set; } + object? Y1 { get; set; } - PropertyValue? X2 { get; set; } + object? X2 { get; set; } - PropertyValue? Y2 { get; set; } + object? Y2 { get; set; } } public sealed partial class Line : Shapes.Shape, ILine @@ -31,13 +31,13 @@ public Line(Action componentRefAction) : b { } - PropertyValue? ILine.X1 { get; set; } + object? ILine.X1 { get; set; } - PropertyValue? ILine.Y1 { get; set; } + object? ILine.Y1 { get; set; } - PropertyValue? ILine.X2 { get; set; } + object? ILine.X2 { get; set; } - PropertyValue? ILine.Y2 { get; set; } + object? ILine.Y2 { get; set; } internal override void Reset() { @@ -87,7 +87,7 @@ public static partial class LineExtensions public static T X1(this T line, double x1, RxDoubleAnimation? customAnimation = null) where T : ILine { - line.X1 = new PropertyValue(x1); + line.X1 = x1; line.AppendAnimatable(Microsoft.Maui.Controls.Shapes.Line.X1Property, customAnimation ?? new RxDoubleAnimation(x1), v => line.X1 = new PropertyValue(v.CurrentValue())); return line; } @@ -102,7 +102,7 @@ public static T X1(this T line, Func x1Func) public static T Y1(this T line, double y1, RxDoubleAnimation? customAnimation = null) where T : ILine { - line.Y1 = new PropertyValue(y1); + line.Y1 = y1; line.AppendAnimatable(Microsoft.Maui.Controls.Shapes.Line.Y1Property, customAnimation ?? new RxDoubleAnimation(y1), v => line.Y1 = new PropertyValue(v.CurrentValue())); return line; } @@ -117,7 +117,7 @@ public static T Y1(this T line, Func y1Func) public static T X2(this T line, double x2, RxDoubleAnimation? customAnimation = null) where T : ILine { - line.X2 = new PropertyValue(x2); + line.X2 = x2; line.AppendAnimatable(Microsoft.Maui.Controls.Shapes.Line.X2Property, customAnimation ?? new RxDoubleAnimation(x2), v => line.X2 = new PropertyValue(v.CurrentValue())); return line; } @@ -132,7 +132,7 @@ public static T X2(this T line, Func x2Func) public static T Y2(this T line, double y2, RxDoubleAnimation? customAnimation = null) where T : ILine { - line.Y2 = new PropertyValue(y2); + line.Y2 = y2; line.AppendAnimatable(Microsoft.Maui.Controls.Shapes.Line.Y2Property, customAnimation ?? new RxDoubleAnimation(y2), v => line.Y2 = new PropertyValue(v.CurrentValue())); return line; } diff --git a/src/MauiReactor/Shapes/LineGeometry.cs b/src/MauiReactor/Shapes/LineGeometry.cs index 6ea00210..cb3c9f36 100644 --- a/src/MauiReactor/Shapes/LineGeometry.cs +++ b/src/MauiReactor/Shapes/LineGeometry.cs @@ -12,9 +12,9 @@ namespace MauiReactor.Shapes; public partial interface ILineGeometry : Shapes.IGeometry { - PropertyValue? StartPoint { get; set; } + object? StartPoint { get; set; } - PropertyValue? EndPoint { get; set; } + object? EndPoint { get; set; } } public partial class LineGeometry : Shapes.Geometry, ILineGeometry where T : Microsoft.Maui.Controls.Shapes.LineGeometry, new() @@ -27,9 +27,9 @@ public LineGeometry(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ILineGeometry.StartPoint { get; set; } + object? ILineGeometry.StartPoint { get; set; } - PropertyValue? ILineGeometry.EndPoint { get; set; } + object? ILineGeometry.EndPoint { get; set; } internal override void Reset() { @@ -84,7 +84,7 @@ public static partial class LineGeometryExtensions public static T StartPoint(this T lineGeometry, Microsoft.Maui.Graphics.Point startPoint, RxPointAnimation? customAnimation = null) where T : ILineGeometry { - lineGeometry.StartPoint = new PropertyValue(startPoint); + lineGeometry.StartPoint = startPoint; lineGeometry.AppendAnimatable(Microsoft.Maui.Controls.Shapes.LineGeometry.StartPointProperty, customAnimation ?? new RxSimplePointAnimation(startPoint), v => lineGeometry.StartPoint = new PropertyValue(v.CurrentValue())); return lineGeometry; } @@ -99,14 +99,14 @@ public static T StartPoint(this T lineGeometry, Func(this T lineGeometry, double x, double y) where T : ILineGeometry { - lineGeometry.StartPoint = new PropertyValue(new Microsoft.Maui.Graphics.Point(x, y)); + lineGeometry.StartPoint = new Microsoft.Maui.Graphics.Point(x, y); return lineGeometry; } public static T EndPoint(this T lineGeometry, Microsoft.Maui.Graphics.Point endPoint, RxPointAnimation? customAnimation = null) where T : ILineGeometry { - lineGeometry.EndPoint = new PropertyValue(endPoint); + lineGeometry.EndPoint = endPoint; lineGeometry.AppendAnimatable(Microsoft.Maui.Controls.Shapes.LineGeometry.EndPointProperty, customAnimation ?? new RxSimplePointAnimation(endPoint), v => lineGeometry.EndPoint = new PropertyValue(v.CurrentValue())); return lineGeometry; } @@ -121,7 +121,7 @@ public static T EndPoint(this T lineGeometry, Func(this T lineGeometry, double x, double y) where T : ILineGeometry { - lineGeometry.EndPoint = new PropertyValue(new Microsoft.Maui.Graphics.Point(x, y)); + lineGeometry.EndPoint = new Microsoft.Maui.Graphics.Point(x, y); return lineGeometry; } } \ No newline at end of file diff --git a/src/MauiReactor/Shapes/Path.cs b/src/MauiReactor/Shapes/Path.cs index 63f252c1..8e76916e 100644 --- a/src/MauiReactor/Shapes/Path.cs +++ b/src/MauiReactor/Shapes/Path.cs @@ -12,7 +12,7 @@ namespace MauiReactor.Shapes; public partial interface IPath : Shapes.IShape { - PropertyValue? RenderTransform { get; set; } + object? RenderTransform { get; set; } } public sealed partial class Path : Shapes.Shape, IPath @@ -25,7 +25,7 @@ public Path(Action componentRefAction) : b { } - PropertyValue? IPath.RenderTransform { get; set; } + object? IPath.RenderTransform { get; set; } internal override void Reset() { @@ -57,7 +57,7 @@ public static partial class PathExtensions public static T RenderTransform(this T path, Microsoft.Maui.Controls.Shapes.Transform renderTransform) where T : IPath { - path.RenderTransform = new PropertyValue(renderTransform); + path.RenderTransform = renderTransform; return path; } diff --git a/src/MauiReactor/Shapes/PathGeometry.cs b/src/MauiReactor/Shapes/PathGeometry.cs index 2ed2fd29..3fa454bf 100644 --- a/src/MauiReactor/Shapes/PathGeometry.cs +++ b/src/MauiReactor/Shapes/PathGeometry.cs @@ -12,9 +12,9 @@ namespace MauiReactor.Shapes; public partial interface IPathGeometry : Shapes.IGeometry { - PropertyValue? Figures { get; set; } + object? Figures { get; set; } - PropertyValue? FillRule { get; set; } + object? FillRule { get; set; } } public sealed partial class PathGeometry : Shapes.Geometry, IPathGeometry @@ -27,9 +27,9 @@ public PathGeometry(Action compone { } - PropertyValue? IPathGeometry.Figures { get; set; } + object? IPathGeometry.Figures { get; set; } - PropertyValue? IPathGeometry.FillRule { get; set; } + object? IPathGeometry.FillRule { get; set; } internal override void Reset() { @@ -63,7 +63,7 @@ public static partial class PathGeometryExtensions public static T Figures(this T pathGeometry, Microsoft.Maui.Controls.Shapes.PathFigureCollection figures) where T : IPathGeometry { - pathGeometry.Figures = new PropertyValue(figures); + pathGeometry.Figures = figures; return pathGeometry; } @@ -77,7 +77,7 @@ public static T Figures(this T pathGeometry, Func(this T pathGeometry, Microsoft.Maui.Controls.Shapes.FillRule fillRule) where T : IPathGeometry { - pathGeometry.FillRule = new PropertyValue(fillRule); + pathGeometry.FillRule = fillRule; return pathGeometry; } diff --git a/src/MauiReactor/Shapes/Polygon.cs b/src/MauiReactor/Shapes/Polygon.cs index a88fe7df..fec02e3b 100644 --- a/src/MauiReactor/Shapes/Polygon.cs +++ b/src/MauiReactor/Shapes/Polygon.cs @@ -12,9 +12,9 @@ namespace MauiReactor.Shapes; public partial interface IPolygon : Shapes.IShape { - PropertyValue? Points { get; set; } + object? Points { get; set; } - PropertyValue? FillRule { get; set; } + object? FillRule { get; set; } } public sealed partial class Polygon : Shapes.Shape, IPolygon @@ -27,9 +27,9 @@ public Polygon(Action componentRefActio { } - PropertyValue? IPolygon.Points { get; set; } + object? IPolygon.Points { get; set; } - PropertyValue? IPolygon.FillRule { get; set; } + object? IPolygon.FillRule { get; set; } internal override void Reset() { @@ -63,7 +63,7 @@ public static partial class PolygonExtensions public static T Points(this T polygon, Microsoft.Maui.Controls.PointCollection points) where T : IPolygon { - polygon.Points = new PropertyValue(points); + polygon.Points = points; return polygon; } @@ -77,7 +77,7 @@ public static T Points(this T polygon, Func(this T polygon, Microsoft.Maui.Controls.Shapes.FillRule fillRule) where T : IPolygon { - polygon.FillRule = new PropertyValue(fillRule); + polygon.FillRule = fillRule; return polygon; } diff --git a/src/MauiReactor/Shapes/Polyline.cs b/src/MauiReactor/Shapes/Polyline.cs index 2d46d7ec..0a06ed56 100644 --- a/src/MauiReactor/Shapes/Polyline.cs +++ b/src/MauiReactor/Shapes/Polyline.cs @@ -12,9 +12,9 @@ namespace MauiReactor.Shapes; public partial interface IPolyline : Shapes.IShape { - PropertyValue? Points { get; set; } + object? Points { get; set; } - PropertyValue? FillRule { get; set; } + object? FillRule { get; set; } } public sealed partial class Polyline : Shapes.Shape, IPolyline @@ -27,9 +27,9 @@ public Polyline(Action componentRefAct { } - PropertyValue? IPolyline.Points { get; set; } + object? IPolyline.Points { get; set; } - PropertyValue? IPolyline.FillRule { get; set; } + object? IPolyline.FillRule { get; set; } internal override void Reset() { @@ -63,7 +63,7 @@ public static partial class PolylineExtensions public static T Points(this T polyline, Microsoft.Maui.Controls.PointCollection points) where T : IPolyline { - polyline.Points = new PropertyValue(points); + polyline.Points = points; return polyline; } @@ -77,7 +77,7 @@ public static T Points(this T polyline, Func(this T polyline, Microsoft.Maui.Controls.Shapes.FillRule fillRule) where T : IPolyline { - polyline.FillRule = new PropertyValue(fillRule); + polyline.FillRule = fillRule; return polyline; } diff --git a/src/MauiReactor/Shapes/Rectangle.cs b/src/MauiReactor/Shapes/Rectangle.cs index 50050594..69bf9f03 100644 --- a/src/MauiReactor/Shapes/Rectangle.cs +++ b/src/MauiReactor/Shapes/Rectangle.cs @@ -12,9 +12,9 @@ namespace MauiReactor.Shapes; public partial interface IRectangle : Shapes.IShape { - PropertyValue? RadiusX { get; set; } + object? RadiusX { get; set; } - PropertyValue? RadiusY { get; set; } + object? RadiusY { get; set; } } public sealed partial class Rectangle : Shapes.Shape, IRectangle @@ -27,9 +27,9 @@ public Rectangle(Action componentRefA { } - PropertyValue? IRectangle.RadiusX { get; set; } + object? IRectangle.RadiusX { get; set; } - PropertyValue? IRectangle.RadiusY { get; set; } + object? IRectangle.RadiusY { get; set; } internal override void Reset() { @@ -73,7 +73,7 @@ public static partial class RectangleExtensions public static T RadiusX(this T rectangle, double radiusX, RxDoubleAnimation? customAnimation = null) where T : IRectangle { - rectangle.RadiusX = new PropertyValue(radiusX); + rectangle.RadiusX = radiusX; rectangle.AppendAnimatable(Microsoft.Maui.Controls.Shapes.Rectangle.RadiusXProperty, customAnimation ?? new RxDoubleAnimation(radiusX), v => rectangle.RadiusX = new PropertyValue(v.CurrentValue())); return rectangle; } @@ -88,7 +88,7 @@ public static T RadiusX(this T rectangle, Func radiusXFunc) public static T RadiusY(this T rectangle, double radiusY, RxDoubleAnimation? customAnimation = null) where T : IRectangle { - rectangle.RadiusY = new PropertyValue(radiusY); + rectangle.RadiusY = radiusY; rectangle.AppendAnimatable(Microsoft.Maui.Controls.Shapes.Rectangle.RadiusYProperty, customAnimation ?? new RxDoubleAnimation(radiusY), v => rectangle.RadiusY = new PropertyValue(v.CurrentValue())); return rectangle; } diff --git a/src/MauiReactor/Shapes/RectangleGeometry.cs b/src/MauiReactor/Shapes/RectangleGeometry.cs index fc0e7c97..abf475df 100644 --- a/src/MauiReactor/Shapes/RectangleGeometry.cs +++ b/src/MauiReactor/Shapes/RectangleGeometry.cs @@ -12,7 +12,7 @@ namespace MauiReactor.Shapes; public partial interface IRectangleGeometry : Shapes.IGeometry { - PropertyValue? Rect { get; set; } + object? Rect { get; set; } } public partial class RectangleGeometry : Shapes.Geometry, IRectangleGeometry where T : Microsoft.Maui.Controls.Shapes.RectangleGeometry, new() @@ -25,7 +25,7 @@ public RectangleGeometry(Action componentRefAction) : base(componentRefActio { } - PropertyValue? IRectangleGeometry.Rect { get; set; } + object? IRectangleGeometry.Rect { get; set; } internal override void Reset() { @@ -77,7 +77,7 @@ public static partial class RectangleGeometryExtensions public static T Rect(this T rectangleGeometry, Microsoft.Maui.Graphics.Rect rect, RxRectAnimation? customAnimation = null) where T : IRectangleGeometry { - rectangleGeometry.Rect = new PropertyValue(rect); + rectangleGeometry.Rect = rect; rectangleGeometry.AppendAnimatable(Microsoft.Maui.Controls.Shapes.RectangleGeometry.RectProperty, customAnimation ?? new RxSimpleRectAnimation(rect), v => rectangleGeometry.Rect = new PropertyValue(v.CurrentValue())); return rectangleGeometry; } diff --git a/src/MauiReactor/Shapes/RoundRectangle.cs b/src/MauiReactor/Shapes/RoundRectangle.cs index c743f157..a1450496 100644 --- a/src/MauiReactor/Shapes/RoundRectangle.cs +++ b/src/MauiReactor/Shapes/RoundRectangle.cs @@ -12,7 +12,7 @@ namespace MauiReactor.Shapes; public partial interface IRoundRectangle : Shapes.IShape { - PropertyValue? CornerRadius { get; set; } + object? CornerRadius { get; set; } } public sealed partial class RoundRectangle : Shapes.Shape, IRoundRectangle @@ -25,7 +25,7 @@ public RoundRectangle(Action com { } - PropertyValue? IRoundRectangle.CornerRadius { get; set; } + object? IRoundRectangle.CornerRadius { get; set; } internal override void Reset() { @@ -66,7 +66,7 @@ public static partial class RoundRectangleExtensions public static T CornerRadius(this T roundRectangle, Microsoft.Maui.CornerRadius cornerRadius, RxCornerRadiusAnimation? customAnimation = null) where T : IRoundRectangle { - roundRectangle.CornerRadius = new PropertyValue(cornerRadius); + roundRectangle.CornerRadius = cornerRadius; roundRectangle.AppendAnimatable(Microsoft.Maui.Controls.Shapes.RoundRectangle.CornerRadiusProperty, customAnimation ?? new RxSimpleCornerRadiusAnimation(cornerRadius), v => roundRectangle.CornerRadius = new PropertyValue(v.CurrentValue())); return roundRectangle; } @@ -81,7 +81,7 @@ public static T CornerRadius(this T roundRectangle, Func(this T roundRectangle, double uniformRadius, RxCornerRadiusAnimation? customAnimation = null) where T : IRoundRectangle { - roundRectangle.CornerRadius = new PropertyValue(new CornerRadius(uniformRadius)); + roundRectangle.CornerRadius = new CornerRadius(uniformRadius); roundRectangle.AppendAnimatable(Microsoft.Maui.Controls.Shapes.RoundRectangle.CornerRadiusProperty, customAnimation ?? new RxSimpleCornerRadiusAnimation(new CornerRadius(uniformRadius)), v => roundRectangle.CornerRadius = new PropertyValue(v.CurrentValue())); return roundRectangle; } @@ -89,7 +89,7 @@ public static T CornerRadius(this T roundRectangle, double uniformRadius, RxC public static T CornerRadius(this T roundRectangle, double topLeft, double topRight, double bottomLeft, double bottomRight, RxCornerRadiusAnimation? customAnimation = null) where T : IRoundRectangle { - roundRectangle.CornerRadius = new PropertyValue(new CornerRadius(topLeft, topRight, bottomLeft, bottomRight)); + roundRectangle.CornerRadius = new CornerRadius(topLeft, topRight, bottomLeft, bottomRight); roundRectangle.AppendAnimatable(Microsoft.Maui.Controls.Shapes.RoundRectangle.CornerRadiusProperty, customAnimation ?? new RxSimpleCornerRadiusAnimation(new CornerRadius(topLeft, topRight, bottomLeft, bottomRight)), v => roundRectangle.CornerRadius = new PropertyValue(v.CurrentValue())); return roundRectangle; } diff --git a/src/MauiReactor/Shapes/RoundRectangleGeometry.cs b/src/MauiReactor/Shapes/RoundRectangleGeometry.cs index 931fb242..d349c660 100644 --- a/src/MauiReactor/Shapes/RoundRectangleGeometry.cs +++ b/src/MauiReactor/Shapes/RoundRectangleGeometry.cs @@ -12,9 +12,9 @@ namespace MauiReactor.Shapes; public partial interface IRoundRectangleGeometry : Shapes.IGeometryGroup { - PropertyValue? Rect { get; set; } + object? Rect { get; set; } - PropertyValue? CornerRadius { get; set; } + object? CornerRadius { get; set; } } public partial class RoundRectangleGeometry : Shapes.GeometryGroup, IRoundRectangleGeometry where T : Microsoft.Maui.Controls.Shapes.RoundRectangleGeometry, new() @@ -27,9 +27,9 @@ public RoundRectangleGeometry(Action componentRefAction) : base(componentRef { } - PropertyValue? IRoundRectangleGeometry.Rect { get; set; } + object? IRoundRectangleGeometry.Rect { get; set; } - PropertyValue? IRoundRectangleGeometry.CornerRadius { get; set; } + object? IRoundRectangleGeometry.CornerRadius { get; set; } internal override void Reset() { @@ -84,7 +84,7 @@ public static partial class RoundRectangleGeometryExtensions public static T Rect(this T roundRectangleGeometry, Microsoft.Maui.Graphics.Rect rect, RxRectAnimation? customAnimation = null) where T : IRoundRectangleGeometry { - roundRectangleGeometry.Rect = new PropertyValue(rect); + roundRectangleGeometry.Rect = rect; roundRectangleGeometry.AppendAnimatable(Microsoft.Maui.Controls.Shapes.RoundRectangleGeometry.RectProperty, customAnimation ?? new RxSimpleRectAnimation(rect), v => roundRectangleGeometry.Rect = new PropertyValue(v.CurrentValue())); return roundRectangleGeometry; } @@ -99,7 +99,7 @@ public static T Rect(this T roundRectangleGeometry, Func(this T roundRectangleGeometry, Microsoft.Maui.CornerRadius cornerRadius, RxCornerRadiusAnimation? customAnimation = null) where T : IRoundRectangleGeometry { - roundRectangleGeometry.CornerRadius = new PropertyValue(cornerRadius); + roundRectangleGeometry.CornerRadius = cornerRadius; roundRectangleGeometry.AppendAnimatable(Microsoft.Maui.Controls.Shapes.RoundRectangleGeometry.CornerRadiusProperty, customAnimation ?? new RxSimpleCornerRadiusAnimation(cornerRadius), v => roundRectangleGeometry.CornerRadius = new PropertyValue(v.CurrentValue())); return roundRectangleGeometry; } @@ -114,7 +114,7 @@ public static T CornerRadius(this T roundRectangleGeometry, Func(this T roundRectangleGeometry, double uniformRadius, RxCornerRadiusAnimation? customAnimation = null) where T : IRoundRectangleGeometry { - roundRectangleGeometry.CornerRadius = new PropertyValue(new CornerRadius(uniformRadius)); + roundRectangleGeometry.CornerRadius = new CornerRadius(uniformRadius); roundRectangleGeometry.AppendAnimatable(Microsoft.Maui.Controls.Shapes.RoundRectangleGeometry.CornerRadiusProperty, customAnimation ?? new RxSimpleCornerRadiusAnimation(new CornerRadius(uniformRadius)), v => roundRectangleGeometry.CornerRadius = new PropertyValue(v.CurrentValue())); return roundRectangleGeometry; } @@ -122,7 +122,7 @@ public static T CornerRadius(this T roundRectangleGeometry, double uniformRad public static T CornerRadius(this T roundRectangleGeometry, double topLeft, double topRight, double bottomLeft, double bottomRight, RxCornerRadiusAnimation? customAnimation = null) where T : IRoundRectangleGeometry { - roundRectangleGeometry.CornerRadius = new PropertyValue(new CornerRadius(topLeft, topRight, bottomLeft, bottomRight)); + roundRectangleGeometry.CornerRadius = new CornerRadius(topLeft, topRight, bottomLeft, bottomRight); roundRectangleGeometry.AppendAnimatable(Microsoft.Maui.Controls.Shapes.RoundRectangleGeometry.CornerRadiusProperty, customAnimation ?? new RxSimpleCornerRadiusAnimation(new CornerRadius(topLeft, topRight, bottomLeft, bottomRight)), v => roundRectangleGeometry.CornerRadius = new PropertyValue(v.CurrentValue())); return roundRectangleGeometry; } diff --git a/src/MauiReactor/Shapes/Shape.cs b/src/MauiReactor/Shapes/Shape.cs index bcde8ebe..0a45edfd 100644 --- a/src/MauiReactor/Shapes/Shape.cs +++ b/src/MauiReactor/Shapes/Shape.cs @@ -12,23 +12,23 @@ namespace MauiReactor.Shapes; public partial interface IShape : IView { - PropertyValue? Fill { get; set; } + object? Fill { get; set; } - PropertyValue? Stroke { get; set; } + object? Stroke { get; set; } - PropertyValue? StrokeThickness { get; set; } + object? StrokeThickness { get; set; } - PropertyValue? StrokeDashArray { get; set; } + object? StrokeDashArray { get; set; } - PropertyValue? StrokeDashOffset { get; set; } + object? StrokeDashOffset { get; set; } - PropertyValue? StrokeLineCap { get; set; } + object? StrokeLineCap { get; set; } - PropertyValue? StrokeLineJoin { get; set; } + object? StrokeLineJoin { get; set; } - PropertyValue? StrokeMiterLimit { get; set; } + object? StrokeMiterLimit { get; set; } - PropertyValue? Aspect { get; set; } + object? Aspect { get; set; } } public abstract partial class Shape : View, IShape where T : Microsoft.Maui.Controls.Shapes.Shape, new() @@ -41,23 +41,23 @@ protected Shape(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IShape.Fill { get; set; } + object? IShape.Fill { get; set; } - PropertyValue? IShape.Stroke { get; set; } + object? IShape.Stroke { get; set; } - PropertyValue? IShape.StrokeThickness { get; set; } + object? IShape.StrokeThickness { get; set; } - PropertyValue? IShape.StrokeDashArray { get; set; } + object? IShape.StrokeDashArray { get; set; } - PropertyValue? IShape.StrokeDashOffset { get; set; } + object? IShape.StrokeDashOffset { get; set; } - PropertyValue? IShape.StrokeLineCap { get; set; } + object? IShape.StrokeLineCap { get; set; } - PropertyValue? IShape.StrokeLineJoin { get; set; } + object? IShape.StrokeLineJoin { get; set; } - PropertyValue? IShape.StrokeMiterLimit { get; set; } + object? IShape.StrokeMiterLimit { get; set; } - PropertyValue? IShape.Aspect { get; set; } + object? IShape.Aspect { get; set; } internal override void Reset() { @@ -116,7 +116,7 @@ public static partial class ShapeExtensions public static T Fill(this T shape, Microsoft.Maui.Controls.Brush fill) where T : IShape { - shape.Fill = new PropertyValue(fill); + shape.Fill = fill; return shape; } @@ -130,7 +130,7 @@ public static T Fill(this T shape, Func fillFu public static T Stroke(this T shape, Microsoft.Maui.Controls.Brush stroke) where T : IShape { - shape.Stroke = new PropertyValue(stroke); + shape.Stroke = stroke; return shape; } @@ -144,7 +144,7 @@ public static T Stroke(this T shape, Func stro public static T StrokeThickness(this T shape, double strokeThickness, RxDoubleAnimation? customAnimation = null) where T : IShape { - shape.StrokeThickness = new PropertyValue(strokeThickness); + shape.StrokeThickness = strokeThickness; shape.AppendAnimatable(Microsoft.Maui.Controls.Shapes.Shape.StrokeThicknessProperty, customAnimation ?? new RxDoubleAnimation(strokeThickness), v => shape.StrokeThickness = new PropertyValue(v.CurrentValue())); return shape; } @@ -159,7 +159,7 @@ public static T StrokeThickness(this T shape, Func strokeThicknessFun public static T StrokeDashArray(this T shape, Microsoft.Maui.Controls.DoubleCollection strokeDashArray) where T : IShape { - shape.StrokeDashArray = new PropertyValue(strokeDashArray); + shape.StrokeDashArray = strokeDashArray; return shape; } @@ -173,7 +173,7 @@ public static T StrokeDashArray(this T shape, Func(this T shape, double strokeDashOffset, RxDoubleAnimation? customAnimation = null) where T : IShape { - shape.StrokeDashOffset = new PropertyValue(strokeDashOffset); + shape.StrokeDashOffset = strokeDashOffset; shape.AppendAnimatable(Microsoft.Maui.Controls.Shapes.Shape.StrokeDashOffsetProperty, customAnimation ?? new RxDoubleAnimation(strokeDashOffset), v => shape.StrokeDashOffset = new PropertyValue(v.CurrentValue())); return shape; } @@ -188,7 +188,7 @@ public static T StrokeDashOffset(this T shape, Func strokeDashOffsetF public static T StrokeLineCap(this T shape, Microsoft.Maui.Controls.Shapes.PenLineCap strokeLineCap) where T : IShape { - shape.StrokeLineCap = new PropertyValue(strokeLineCap); + shape.StrokeLineCap = strokeLineCap; return shape; } @@ -202,7 +202,7 @@ public static T StrokeLineCap(this T shape, Func(this T shape, Microsoft.Maui.Controls.Shapes.PenLineJoin strokeLineJoin) where T : IShape { - shape.StrokeLineJoin = new PropertyValue(strokeLineJoin); + shape.StrokeLineJoin = strokeLineJoin; return shape; } @@ -216,7 +216,7 @@ public static T StrokeLineJoin(this T shape, Func(this T shape, double strokeMiterLimit, RxDoubleAnimation? customAnimation = null) where T : IShape { - shape.StrokeMiterLimit = new PropertyValue(strokeMiterLimit); + shape.StrokeMiterLimit = strokeMiterLimit; shape.AppendAnimatable(Microsoft.Maui.Controls.Shapes.Shape.StrokeMiterLimitProperty, customAnimation ?? new RxDoubleAnimation(strokeMiterLimit), v => shape.StrokeMiterLimit = new PropertyValue(v.CurrentValue())); return shape; } @@ -231,7 +231,7 @@ public static T StrokeMiterLimit(this T shape, Func strokeMiterLimitF public static T Aspect(this T shape, Microsoft.Maui.Controls.Stretch aspect) where T : IShape { - shape.Aspect = new PropertyValue(aspect); + shape.Aspect = aspect; return shape; } diff --git a/src/MauiReactor/Shell.cs b/src/MauiReactor/Shell.cs index 58021227..6ce52e4f 100644 --- a/src/MauiReactor/Shell.cs +++ b/src/MauiReactor/Shell.cs @@ -12,29 +12,29 @@ namespace MauiReactor; public partial interface IShell : IPage { - PropertyValue? FlyoutBehavior { get; set; } + object? FlyoutBehavior { get; set; } - PropertyValue? FlyoutBackdrop { get; set; } + object? FlyoutBackdrop { get; set; } - PropertyValue? FlyoutWidth { get; set; } + object? FlyoutWidth { get; set; } - PropertyValue? FlyoutHeight { get; set; } + object? FlyoutHeight { get; set; } - PropertyValue? FlyoutBackgroundImage { get; set; } + object? FlyoutBackgroundImage { get; set; } - PropertyValue? FlyoutBackgroundImageAspect { get; set; } + object? FlyoutBackgroundImageAspect { get; set; } - PropertyValue? FlyoutBackgroundColor { get; set; } + object? FlyoutBackgroundColor { get; set; } - PropertyValue? FlyoutBackground { get; set; } + object? FlyoutBackground { get; set; } - PropertyValue? FlyoutHeaderBehavior { get; set; } + object? FlyoutHeaderBehavior { get; set; } - PropertyValue? FlyoutIsPresented { get; set; } + object? FlyoutIsPresented { get; set; } - PropertyValue? FlyoutIcon { get; set; } + object? FlyoutIcon { get; set; } - PropertyValue? FlyoutVerticalScrollMode { get; set; } + object? FlyoutVerticalScrollMode { get; set; } Action? NavigatedAction { get; set; } @@ -55,29 +55,29 @@ public Shell(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IShell.FlyoutBehavior { get; set; } + object? IShell.FlyoutBehavior { get; set; } - PropertyValue? IShell.FlyoutBackdrop { get; set; } + object? IShell.FlyoutBackdrop { get; set; } - PropertyValue? IShell.FlyoutWidth { get; set; } + object? IShell.FlyoutWidth { get; set; } - PropertyValue? IShell.FlyoutHeight { get; set; } + object? IShell.FlyoutHeight { get; set; } - PropertyValue? IShell.FlyoutBackgroundImage { get; set; } + object? IShell.FlyoutBackgroundImage { get; set; } - PropertyValue? IShell.FlyoutBackgroundImageAspect { get; set; } + object? IShell.FlyoutBackgroundImageAspect { get; set; } - PropertyValue? IShell.FlyoutBackgroundColor { get; set; } + object? IShell.FlyoutBackgroundColor { get; set; } - PropertyValue? IShell.FlyoutBackground { get; set; } + object? IShell.FlyoutBackground { get; set; } - PropertyValue? IShell.FlyoutHeaderBehavior { get; set; } + object? IShell.FlyoutHeaderBehavior { get; set; } - PropertyValue? IShell.FlyoutIsPresented { get; set; } + object? IShell.FlyoutIsPresented { get; set; } - PropertyValue? IShell.FlyoutIcon { get; set; } + object? IShell.FlyoutIcon { get; set; } - PropertyValue? IShell.FlyoutVerticalScrollMode { get; set; } + object? IShell.FlyoutVerticalScrollMode { get; set; } Action? IShell.NavigatedAction { get; set; } @@ -205,7 +205,7 @@ public static partial class ShellExtensions public static T FlyoutBehavior(this T shell, Microsoft.Maui.FlyoutBehavior flyoutBehavior) where T : IShell { - shell.FlyoutBehavior = new PropertyValue(flyoutBehavior); + shell.FlyoutBehavior = flyoutBehavior; return shell; } @@ -219,7 +219,7 @@ public static T FlyoutBehavior(this T shell, Func(this T shell, Microsoft.Maui.Controls.Brush flyoutBackdrop) where T : IShell { - shell.FlyoutBackdrop = new PropertyValue(flyoutBackdrop); + shell.FlyoutBackdrop = flyoutBackdrop; return shell; } @@ -233,7 +233,7 @@ public static T FlyoutBackdrop(this T shell, Func(this T shell, double flyoutWidth, RxDoubleAnimation? customAnimation = null) where T : IShell { - shell.FlyoutWidth = new PropertyValue(flyoutWidth); + shell.FlyoutWidth = flyoutWidth; shell.AppendAnimatable(Microsoft.Maui.Controls.Shell.FlyoutWidthProperty, customAnimation ?? new RxDoubleAnimation(flyoutWidth), v => shell.FlyoutWidth = new PropertyValue(v.CurrentValue())); return shell; } @@ -248,7 +248,7 @@ public static T FlyoutWidth(this T shell, Func flyoutWidthFunc) public static T FlyoutHeight(this T shell, double flyoutHeight, RxDoubleAnimation? customAnimation = null) where T : IShell { - shell.FlyoutHeight = new PropertyValue(flyoutHeight); + shell.FlyoutHeight = flyoutHeight; shell.AppendAnimatable(Microsoft.Maui.Controls.Shell.FlyoutHeightProperty, customAnimation ?? new RxDoubleAnimation(flyoutHeight), v => shell.FlyoutHeight = new PropertyValue(v.CurrentValue())); return shell; } @@ -263,7 +263,7 @@ public static T FlyoutHeight(this T shell, Func flyoutHeightFunc) public static T FlyoutBackgroundImage(this T shell, Microsoft.Maui.Controls.ImageSource flyoutBackgroundImage) where T : IShell { - shell.FlyoutBackgroundImage = new PropertyValue(flyoutBackgroundImage); + shell.FlyoutBackgroundImage = flyoutBackgroundImage; return shell; } @@ -277,7 +277,7 @@ public static T FlyoutBackgroundImage(this T shell, Func(this T shell, string file) where T : IShell { - shell.FlyoutBackgroundImage = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromFile(file)); + shell.FlyoutBackgroundImage = Microsoft.Maui.Controls.ImageSource.FromFile(file); return shell; } @@ -291,35 +291,40 @@ public static T FlyoutBackgroundImage(this T shell, Func action) public static T FlyoutBackgroundImage(this T shell, string resourceName, Assembly sourceAssembly) where T : IShell { - shell.FlyoutBackgroundImage = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)); + shell.FlyoutBackgroundImage = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly); return shell; } public static T FlyoutBackgroundImage(this T shell, Uri imageUri) where T : IShell { - shell.FlyoutBackgroundImage = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri)); + shell.FlyoutBackgroundImage = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri); return shell; } public static T FlyoutBackgroundImage(this T shell, Uri imageUri, bool cachingEnabled, TimeSpan cacheValidity) where T : IShell { - shell.FlyoutBackgroundImage = new PropertyValue(new UriImageSource { Uri = imageUri, CachingEnabled = cachingEnabled, CacheValidity = cacheValidity }); + shell.FlyoutBackgroundImage = new UriImageSource + { + Uri = imageUri, + CachingEnabled = cachingEnabled, + CacheValidity = cacheValidity + }; return shell; } public static T FlyoutBackgroundImage(this T shell, Func imageStream) where T : IShell { - shell.FlyoutBackgroundImage = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream)); + shell.FlyoutBackgroundImage = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream); return shell; } public static T FlyoutBackgroundImageAspect(this T shell, Microsoft.Maui.Aspect flyoutBackgroundImageAspect) where T : IShell { - shell.FlyoutBackgroundImageAspect = new PropertyValue(flyoutBackgroundImageAspect); + shell.FlyoutBackgroundImageAspect = flyoutBackgroundImageAspect; return shell; } @@ -333,7 +338,7 @@ public static T FlyoutBackgroundImageAspect(this T shell, Func(this T shell, Microsoft.Maui.Graphics.Color flyoutBackgroundColor) where T : IShell { - shell.FlyoutBackgroundColor = new PropertyValue(flyoutBackgroundColor); + shell.FlyoutBackgroundColor = flyoutBackgroundColor; return shell; } @@ -347,7 +352,7 @@ public static T FlyoutBackgroundColor(this T shell, Func(this T shell, Microsoft.Maui.Controls.Brush flyoutBackground) where T : IShell { - shell.FlyoutBackground = new PropertyValue(flyoutBackground); + shell.FlyoutBackground = flyoutBackground; return shell; } @@ -361,7 +366,7 @@ public static T FlyoutBackground(this T shell, Func(this T shell, Microsoft.Maui.Controls.FlyoutHeaderBehavior flyoutHeaderBehavior) where T : IShell { - shell.FlyoutHeaderBehavior = new PropertyValue(flyoutHeaderBehavior); + shell.FlyoutHeaderBehavior = flyoutHeaderBehavior; return shell; } @@ -375,7 +380,7 @@ public static T FlyoutHeaderBehavior(this T shell, Func(this T shell, bool flyoutIsPresented) where T : IShell { - shell.FlyoutIsPresented = new PropertyValue(flyoutIsPresented); + shell.FlyoutIsPresented = flyoutIsPresented; return shell; } @@ -389,7 +394,7 @@ public static T FlyoutIsPresented(this T shell, Func flyoutIsPresentedF public static T FlyoutIcon(this T shell, Microsoft.Maui.Controls.ImageSource flyoutIcon) where T : IShell { - shell.FlyoutIcon = new PropertyValue(flyoutIcon); + shell.FlyoutIcon = flyoutIcon; return shell; } @@ -403,7 +408,7 @@ public static T FlyoutIcon(this T shell, Func(this T shell, string file) where T : IShell { - shell.FlyoutIcon = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromFile(file)); + shell.FlyoutIcon = Microsoft.Maui.Controls.ImageSource.FromFile(file); return shell; } @@ -417,35 +422,40 @@ public static T FlyoutIcon(this T shell, Func action) public static T FlyoutIcon(this T shell, string resourceName, Assembly sourceAssembly) where T : IShell { - shell.FlyoutIcon = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)); + shell.FlyoutIcon = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly); return shell; } public static T FlyoutIcon(this T shell, Uri imageUri) where T : IShell { - shell.FlyoutIcon = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri)); + shell.FlyoutIcon = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri); return shell; } public static T FlyoutIcon(this T shell, Uri imageUri, bool cachingEnabled, TimeSpan cacheValidity) where T : IShell { - shell.FlyoutIcon = new PropertyValue(new UriImageSource { Uri = imageUri, CachingEnabled = cachingEnabled, CacheValidity = cacheValidity }); + shell.FlyoutIcon = new UriImageSource + { + Uri = imageUri, + CachingEnabled = cachingEnabled, + CacheValidity = cacheValidity + }; return shell; } public static T FlyoutIcon(this T shell, Func imageStream) where T : IShell { - shell.FlyoutIcon = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream)); + shell.FlyoutIcon = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream); return shell; } public static T FlyoutVerticalScrollMode(this T shell, Microsoft.Maui.Controls.ScrollMode flyoutVerticalScrollMode) where T : IShell { - shell.FlyoutVerticalScrollMode = new PropertyValue(flyoutVerticalScrollMode); + shell.FlyoutVerticalScrollMode = flyoutVerticalScrollMode; return shell; } diff --git a/src/MauiReactor/ShellGroupItem.cs b/src/MauiReactor/ShellGroupItem.cs index 0899c043..de72fe31 100644 --- a/src/MauiReactor/ShellGroupItem.cs +++ b/src/MauiReactor/ShellGroupItem.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface IShellGroupItem : IBaseShellItem { - PropertyValue? FlyoutDisplayOptions { get; set; } + object? FlyoutDisplayOptions { get; set; } } public partial class ShellGroupItem : BaseShellItem, IShellGroupItem where T : Microsoft.Maui.Controls.ShellGroupItem, new() @@ -25,7 +25,7 @@ public ShellGroupItem(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IShellGroupItem.FlyoutDisplayOptions { get; set; } + object? IShellGroupItem.FlyoutDisplayOptions { get; set; } internal override void Reset() { @@ -68,7 +68,7 @@ public static partial class ShellGroupItemExtensions public static T FlyoutDisplayOptions(this T shellGroupItem, Microsoft.Maui.Controls.FlyoutDisplayOptions flyoutDisplayOptions) where T : IShellGroupItem { - shellGroupItem.FlyoutDisplayOptions = new PropertyValue(flyoutDisplayOptions); + shellGroupItem.FlyoutDisplayOptions = flyoutDisplayOptions; return shellGroupItem; } diff --git a/src/MauiReactor/Slider.cs b/src/MauiReactor/Slider.cs index ecc2d48c..9d1008cf 100644 --- a/src/MauiReactor/Slider.cs +++ b/src/MauiReactor/Slider.cs @@ -12,19 +12,19 @@ namespace MauiReactor; public partial interface ISlider : IView { - PropertyValue? Minimum { get; set; } + object? Minimum { get; set; } - PropertyValue? Maximum { get; set; } + object? Maximum { get; set; } - PropertyValue? Value { get; set; } + object? Value { get; set; } - PropertyValue? MinimumTrackColor { get; set; } + object? MinimumTrackColor { get; set; } - PropertyValue? MaximumTrackColor { get; set; } + object? MaximumTrackColor { get; set; } - PropertyValue? ThumbColor { get; set; } + object? ThumbColor { get; set; } - PropertyValue? ThumbImageSource { get; set; } + object? ThumbImageSource { get; set; } Action? ValueChangedAction { get; set; } @@ -49,19 +49,19 @@ public Slider(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ISlider.Minimum { get; set; } + object? ISlider.Minimum { get; set; } - PropertyValue? ISlider.Maximum { get; set; } + object? ISlider.Maximum { get; set; } - PropertyValue? ISlider.Value { get; set; } + object? ISlider.Value { get; set; } - PropertyValue? ISlider.MinimumTrackColor { get; set; } + object? ISlider.MinimumTrackColor { get; set; } - PropertyValue? ISlider.MaximumTrackColor { get; set; } + object? ISlider.MaximumTrackColor { get; set; } - PropertyValue? ISlider.ThumbColor { get; set; } + object? ISlider.ThumbColor { get; set; } - PropertyValue? ISlider.ThumbImageSource { get; set; } + object? ISlider.ThumbImageSource { get; set; } Action? ISlider.ValueChangedAction { get; set; } @@ -197,7 +197,7 @@ public static partial class SliderExtensions public static T Minimum(this T slider, double minimum, RxDoubleAnimation? customAnimation = null) where T : ISlider { - slider.Minimum = new PropertyValue(minimum); + slider.Minimum = minimum; slider.AppendAnimatable(Microsoft.Maui.Controls.Slider.MinimumProperty, customAnimation ?? new RxDoubleAnimation(minimum), v => slider.Minimum = new PropertyValue(v.CurrentValue())); return slider; } @@ -212,7 +212,7 @@ public static T Minimum(this T slider, Func minimumFunc) public static T Maximum(this T slider, double maximum, RxDoubleAnimation? customAnimation = null) where T : ISlider { - slider.Maximum = new PropertyValue(maximum); + slider.Maximum = maximum; slider.AppendAnimatable(Microsoft.Maui.Controls.Slider.MaximumProperty, customAnimation ?? new RxDoubleAnimation(maximum), v => slider.Maximum = new PropertyValue(v.CurrentValue())); return slider; } @@ -227,7 +227,7 @@ public static T Maximum(this T slider, Func maximumFunc) public static T Value(this T slider, double value, RxDoubleAnimation? customAnimation = null) where T : ISlider { - slider.Value = new PropertyValue(value); + slider.Value = value; slider.AppendAnimatable(Microsoft.Maui.Controls.Slider.ValueProperty, customAnimation ?? new RxDoubleAnimation(value), v => slider.Value = new PropertyValue(v.CurrentValue())); return slider; } @@ -242,7 +242,7 @@ public static T Value(this T slider, Func valueFunc) public static T MinimumTrackColor(this T slider, Microsoft.Maui.Graphics.Color minimumTrackColor) where T : ISlider { - slider.MinimumTrackColor = new PropertyValue(minimumTrackColor); + slider.MinimumTrackColor = minimumTrackColor; return slider; } @@ -256,7 +256,7 @@ public static T MinimumTrackColor(this T slider, Func(this T slider, Microsoft.Maui.Graphics.Color maximumTrackColor) where T : ISlider { - slider.MaximumTrackColor = new PropertyValue(maximumTrackColor); + slider.MaximumTrackColor = maximumTrackColor; return slider; } @@ -270,7 +270,7 @@ public static T MaximumTrackColor(this T slider, Func(this T slider, Microsoft.Maui.Graphics.Color thumbColor) where T : ISlider { - slider.ThumbColor = new PropertyValue(thumbColor); + slider.ThumbColor = thumbColor; return slider; } @@ -284,7 +284,7 @@ public static T ThumbColor(this T slider, Func public static T ThumbImageSource(this T slider, Microsoft.Maui.Controls.ImageSource thumbImageSource) where T : ISlider { - slider.ThumbImageSource = new PropertyValue(thumbImageSource); + slider.ThumbImageSource = thumbImageSource; return slider; } @@ -298,7 +298,7 @@ public static T ThumbImageSource(this T slider, Func(this T slider, string file) where T : ISlider { - slider.ThumbImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromFile(file)); + slider.ThumbImageSource = Microsoft.Maui.Controls.ImageSource.FromFile(file); return slider; } @@ -312,28 +312,33 @@ public static T ThumbImageSource(this T slider, Func action) public static T ThumbImageSource(this T slider, string resourceName, Assembly sourceAssembly) where T : ISlider { - slider.ThumbImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly)); + slider.ThumbImageSource = Microsoft.Maui.Controls.ImageSource.FromResource(resourceName, sourceAssembly); return slider; } public static T ThumbImageSource(this T slider, Uri imageUri) where T : ISlider { - slider.ThumbImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromUri(imageUri)); + slider.ThumbImageSource = Microsoft.Maui.Controls.ImageSource.FromUri(imageUri); return slider; } public static T ThumbImageSource(this T slider, Uri imageUri, bool cachingEnabled, TimeSpan cacheValidity) where T : ISlider { - slider.ThumbImageSource = new PropertyValue(new UriImageSource { Uri = imageUri, CachingEnabled = cachingEnabled, CacheValidity = cacheValidity }); + slider.ThumbImageSource = new UriImageSource + { + Uri = imageUri, + CachingEnabled = cachingEnabled, + CacheValidity = cacheValidity + }; return slider; } public static T ThumbImageSource(this T slider, Func imageStream) where T : ISlider { - slider.ThumbImageSource = new PropertyValue(Microsoft.Maui.Controls.ImageSource.FromStream(imageStream)); + slider.ThumbImageSource = Microsoft.Maui.Controls.ImageSource.FromStream(imageStream); return slider; } diff --git a/src/MauiReactor/StackBase.cs b/src/MauiReactor/StackBase.cs index 6125d125..34865e70 100644 --- a/src/MauiReactor/StackBase.cs +++ b/src/MauiReactor/StackBase.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface IStackBase : ILayout { - PropertyValue? Spacing { get; set; } + object? Spacing { get; set; } } public abstract partial class StackBase : Layout, IStackBase where T : Microsoft.Maui.Controls.StackBase, new() @@ -25,7 +25,7 @@ protected StackBase(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IStackBase.Spacing { get; set; } + object? IStackBase.Spacing { get; set; } internal override void Reset() { @@ -66,7 +66,7 @@ public static partial class StackBaseExtensions public static T Spacing(this T stackBase, double spacing, RxDoubleAnimation? customAnimation = null) where T : IStackBase { - stackBase.Spacing = new PropertyValue(spacing); + stackBase.Spacing = spacing; stackBase.AppendAnimatable(Microsoft.Maui.Controls.StackBase.SpacingProperty, customAnimation ?? new RxDoubleAnimation(spacing), v => stackBase.Spacing = new PropertyValue(v.CurrentValue())); return stackBase; } diff --git a/src/MauiReactor/StackLayout.cs b/src/MauiReactor/StackLayout.cs index 76908e3a..ad7184f4 100644 --- a/src/MauiReactor/StackLayout.cs +++ b/src/MauiReactor/StackLayout.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface IStackLayout : IStackBase { - PropertyValue? Orientation { get; set; } + object? Orientation { get; set; } } public partial class StackLayout : StackBase, IStackLayout where T : Microsoft.Maui.Controls.StackLayout, new() @@ -25,7 +25,7 @@ public StackLayout(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IStackLayout.Orientation { get; set; } + object? IStackLayout.Orientation { get; set; } internal override void Reset() { @@ -68,7 +68,7 @@ public static partial class StackLayoutExtensions public static T Orientation(this T stackLayout, Microsoft.Maui.Controls.StackOrientation orientation) where T : IStackLayout { - stackLayout.Orientation = new PropertyValue(orientation); + stackLayout.Orientation = orientation; return stackLayout; } diff --git a/src/MauiReactor/Stepper.cs b/src/MauiReactor/Stepper.cs index 81be2234..0340596c 100644 --- a/src/MauiReactor/Stepper.cs +++ b/src/MauiReactor/Stepper.cs @@ -12,13 +12,13 @@ namespace MauiReactor; public partial interface IStepper : IView { - PropertyValue? Maximum { get; set; } + object? Maximum { get; set; } - PropertyValue? Minimum { get; set; } + object? Minimum { get; set; } - PropertyValue? Value { get; set; } + object? Value { get; set; } - PropertyValue? Increment { get; set; } + object? Increment { get; set; } Action? ValueChangedAction { get; set; } @@ -35,13 +35,13 @@ public Stepper(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IStepper.Maximum { get; set; } + object? IStepper.Maximum { get; set; } - PropertyValue? IStepper.Minimum { get; set; } + object? IStepper.Minimum { get; set; } - PropertyValue? IStepper.Value { get; set; } + object? IStepper.Value { get; set; } - PropertyValue? IStepper.Increment { get; set; } + object? IStepper.Increment { get; set; } Action? IStepper.ValueChangedAction { get; set; } @@ -138,7 +138,7 @@ public static partial class StepperExtensions public static T Maximum(this T stepper, double maximum, RxDoubleAnimation? customAnimation = null) where T : IStepper { - stepper.Maximum = new PropertyValue(maximum); + stepper.Maximum = maximum; stepper.AppendAnimatable(Microsoft.Maui.Controls.Stepper.MaximumProperty, customAnimation ?? new RxDoubleAnimation(maximum), v => stepper.Maximum = new PropertyValue(v.CurrentValue())); return stepper; } @@ -153,7 +153,7 @@ public static T Maximum(this T stepper, Func maximumFunc) public static T Minimum(this T stepper, double minimum, RxDoubleAnimation? customAnimation = null) where T : IStepper { - stepper.Minimum = new PropertyValue(minimum); + stepper.Minimum = minimum; stepper.AppendAnimatable(Microsoft.Maui.Controls.Stepper.MinimumProperty, customAnimation ?? new RxDoubleAnimation(minimum), v => stepper.Minimum = new PropertyValue(v.CurrentValue())); return stepper; } @@ -168,7 +168,7 @@ public static T Minimum(this T stepper, Func minimumFunc) public static T Value(this T stepper, double value, RxDoubleAnimation? customAnimation = null) where T : IStepper { - stepper.Value = new PropertyValue(value); + stepper.Value = value; stepper.AppendAnimatable(Microsoft.Maui.Controls.Stepper.ValueProperty, customAnimation ?? new RxDoubleAnimation(value), v => stepper.Value = new PropertyValue(v.CurrentValue())); return stepper; } @@ -183,7 +183,7 @@ public static T Value(this T stepper, Func valueFunc) public static T Increment(this T stepper, double increment, RxDoubleAnimation? customAnimation = null) where T : IStepper { - stepper.Increment = new PropertyValue(increment); + stepper.Increment = increment; stepper.AppendAnimatable(Microsoft.Maui.Controls.Stepper.IncrementProperty, customAnimation ?? new RxDoubleAnimation(increment), v => stepper.Increment = new PropertyValue(v.CurrentValue())); return stepper; } diff --git a/src/MauiReactor/StructuredItemsView.cs b/src/MauiReactor/StructuredItemsView.cs index ad940b5c..802c9dc8 100644 --- a/src/MauiReactor/StructuredItemsView.cs +++ b/src/MauiReactor/StructuredItemsView.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface IStructuredItemsView : IItemsView { - PropertyValue? ItemSizingStrategy { get; set; } + object? ItemSizingStrategy { get; set; } } public partial class StructuredItemsView : ItemsView, IStructuredItemsView where T : Microsoft.Maui.Controls.StructuredItemsView, new() @@ -25,7 +25,7 @@ public StructuredItemsView(Action componentRefAction) : base(componentRefAct { } - PropertyValue? IStructuredItemsView.ItemSizingStrategy { get; set; } + object? IStructuredItemsView.ItemSizingStrategy { get; set; } internal override void Reset() { @@ -68,7 +68,7 @@ public static partial class StructuredItemsViewExtensions public static T ItemSizingStrategy(this T structuredItemsView, Microsoft.Maui.Controls.ItemSizingStrategy itemSizingStrategy) where T : IStructuredItemsView { - structuredItemsView.ItemSizingStrategy = new PropertyValue(itemSizingStrategy); + structuredItemsView.ItemSizingStrategy = itemSizingStrategy; return structuredItemsView; } diff --git a/src/MauiReactor/SwipeGestureRecognizer.cs b/src/MauiReactor/SwipeGestureRecognizer.cs index c061fdea..03a858aa 100644 --- a/src/MauiReactor/SwipeGestureRecognizer.cs +++ b/src/MauiReactor/SwipeGestureRecognizer.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface ISwipeGestureRecognizer : IGestureRecognizer { - PropertyValue? Direction { get; set; } + object? Direction { get; set; } - PropertyValue? Threshold { get; set; } + object? Threshold { get; set; } Action? SwipedAction { get; set; } @@ -31,9 +31,9 @@ public SwipeGestureRecognizer(Action? ISwipeGestureRecognizer.Direction { get; set; } + object? ISwipeGestureRecognizer.Direction { get; set; } - PropertyValue? ISwipeGestureRecognizer.Threshold { get; set; } + object? ISwipeGestureRecognizer.Threshold { get; set; } Action? ISwipeGestureRecognizer.SwipedAction { get; set; } @@ -103,7 +103,7 @@ public static partial class SwipeGestureRecognizerExtensions public static T Direction(this T swipeGestureRecognizer, Microsoft.Maui.SwipeDirection direction) where T : ISwipeGestureRecognizer { - swipeGestureRecognizer.Direction = new PropertyValue(direction); + swipeGestureRecognizer.Direction = direction; return swipeGestureRecognizer; } @@ -117,7 +117,7 @@ public static T Direction(this T swipeGestureRecognizer, Func(this T swipeGestureRecognizer, uint threshold) where T : ISwipeGestureRecognizer { - swipeGestureRecognizer.Threshold = new PropertyValue(threshold); + swipeGestureRecognizer.Threshold = threshold; return swipeGestureRecognizer; } diff --git a/src/MauiReactor/SwipeItem.cs b/src/MauiReactor/SwipeItem.cs index 2315c78e..28a5bae3 100644 --- a/src/MauiReactor/SwipeItem.cs +++ b/src/MauiReactor/SwipeItem.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface ISwipeItem : IMenuItem { - PropertyValue? BackgroundColor { get; set; } + object? BackgroundColor { get; set; } - PropertyValue? IsVisible { get; set; } + object? IsVisible { get; set; } Action? InvokedAction { get; set; } @@ -31,9 +31,9 @@ public SwipeItem(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ISwipeItem.BackgroundColor { get; set; } + object? ISwipeItem.BackgroundColor { get; set; } - PropertyValue? ISwipeItem.IsVisible { get; set; } + object? ISwipeItem.IsVisible { get; set; } Action? ISwipeItem.InvokedAction { get; set; } @@ -114,7 +114,7 @@ public static partial class SwipeItemExtensions public static T BackgroundColor(this T swipeItem, Microsoft.Maui.Graphics.Color backgroundColor) where T : ISwipeItem { - swipeItem.BackgroundColor = new PropertyValue(backgroundColor); + swipeItem.BackgroundColor = backgroundColor; return swipeItem; } @@ -128,7 +128,7 @@ public static T BackgroundColor(this T swipeItem, Func(this T swipeItem, bool isVisible) where T : ISwipeItem { - swipeItem.IsVisible = new PropertyValue(isVisible); + swipeItem.IsVisible = isVisible; return swipeItem; } diff --git a/src/MauiReactor/SwipeItems.cs b/src/MauiReactor/SwipeItems.cs index c3719dbc..f82b144c 100644 --- a/src/MauiReactor/SwipeItems.cs +++ b/src/MauiReactor/SwipeItems.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface ISwipeItems : IElement { - PropertyValue? Mode { get; set; } + object? Mode { get; set; } - PropertyValue? SwipeBehaviorOnInvoked { get; set; } + object? SwipeBehaviorOnInvoked { get; set; } Action? CollectionChangedAction { get; set; } @@ -31,9 +31,9 @@ public SwipeItems(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ISwipeItems.Mode { get; set; } + object? ISwipeItems.Mode { get; set; } - PropertyValue? ISwipeItems.SwipeBehaviorOnInvoked { get; set; } + object? ISwipeItems.SwipeBehaviorOnInvoked { get; set; } Action? ISwipeItems.CollectionChangedAction { get; set; } @@ -114,7 +114,7 @@ public static partial class SwipeItemsExtensions public static T Mode(this T swipeItems, Microsoft.Maui.SwipeMode mode) where T : ISwipeItems { - swipeItems.Mode = new PropertyValue(mode); + swipeItems.Mode = mode; return swipeItems; } @@ -128,7 +128,7 @@ public static T Mode(this T swipeItems, Func modeFu public static T SwipeBehaviorOnInvoked(this T swipeItems, Microsoft.Maui.SwipeBehaviorOnInvoked swipeBehaviorOnInvoked) where T : ISwipeItems { - swipeItems.SwipeBehaviorOnInvoked = new PropertyValue(swipeBehaviorOnInvoked); + swipeItems.SwipeBehaviorOnInvoked = swipeBehaviorOnInvoked; return swipeItems; } diff --git a/src/MauiReactor/SwipeView.cs b/src/MauiReactor/SwipeView.cs index 5be1a63a..d0d968c4 100644 --- a/src/MauiReactor/SwipeView.cs +++ b/src/MauiReactor/SwipeView.cs @@ -12,7 +12,7 @@ namespace MauiReactor; public partial interface ISwipeView : IContentView { - PropertyValue? Threshold { get; set; } + object? Threshold { get; set; } Action? SwipeStartedAction { get; set; } @@ -37,7 +37,7 @@ public SwipeView(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ISwipeView.Threshold { get; set; } + object? ISwipeView.Threshold { get; set; } Action? ISwipeView.SwipeStartedAction { get; set; } @@ -159,7 +159,7 @@ public static partial class SwipeViewExtensions public static T Threshold(this T swipeView, double threshold, RxDoubleAnimation? customAnimation = null) where T : ISwipeView { - swipeView.Threshold = new PropertyValue(threshold); + swipeView.Threshold = threshold; swipeView.AppendAnimatable(Microsoft.Maui.Controls.SwipeView.ThresholdProperty, customAnimation ?? new RxDoubleAnimation(threshold), v => swipeView.Threshold = new PropertyValue(v.CurrentValue())); return swipeView; } diff --git a/src/MauiReactor/Switch.cs b/src/MauiReactor/Switch.cs index 893f042d..ef25e859 100644 --- a/src/MauiReactor/Switch.cs +++ b/src/MauiReactor/Switch.cs @@ -12,11 +12,11 @@ namespace MauiReactor; public partial interface ISwitch : IView { - PropertyValue? IsToggled { get; set; } + object? IsToggled { get; set; } - PropertyValue? OnColor { get; set; } + object? OnColor { get; set; } - PropertyValue? ThumbColor { get; set; } + object? ThumbColor { get; set; } Action? ToggledAction { get; set; } @@ -33,11 +33,11 @@ public Switch(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ISwitch.IsToggled { get; set; } + object? ISwitch.IsToggled { get; set; } - PropertyValue? ISwitch.OnColor { get; set; } + object? ISwitch.OnColor { get; set; } - PropertyValue? ISwitch.ThumbColor { get; set; } + object? ISwitch.ThumbColor { get; set; } Action? ISwitch.ToggledAction { get; set; } @@ -120,7 +120,7 @@ public static partial class SwitchExtensions public static T IsToggled(this T @switch, bool isToggled) where T : ISwitch { - @switch.IsToggled = new PropertyValue(isToggled); + @switch.IsToggled = isToggled; return @switch; } @@ -134,7 +134,7 @@ public static T IsToggled(this T @switch, Func isToggledFunc) public static T OnColor(this T @switch, Microsoft.Maui.Graphics.Color onColor) where T : ISwitch { - @switch.OnColor = new PropertyValue(onColor); + @switch.OnColor = onColor; return @switch; } @@ -148,7 +148,7 @@ public static T OnColor(this T @switch, Func o public static T ThumbColor(this T @switch, Microsoft.Maui.Graphics.Color thumbColor) where T : ISwitch { - @switch.ThumbColor = new PropertyValue(thumbColor); + @switch.ThumbColor = thumbColor; return @switch; } diff --git a/src/MauiReactor/SwitchCell.cs b/src/MauiReactor/SwitchCell.cs index 6363dedd..f67ccdac 100644 --- a/src/MauiReactor/SwitchCell.cs +++ b/src/MauiReactor/SwitchCell.cs @@ -12,11 +12,11 @@ namespace MauiReactor; public partial interface ISwitchCell : ICell { - PropertyValue? On { get; set; } + object? On { get; set; } - PropertyValue? Text { get; set; } + object? Text { get; set; } - PropertyValue? OnColor { get; set; } + object? OnColor { get; set; } Action? OnChangedAction { get; set; } @@ -33,11 +33,11 @@ public SwitchCell(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ISwitchCell.On { get; set; } + object? ISwitchCell.On { get; set; } - PropertyValue? ISwitchCell.Text { get; set; } + object? ISwitchCell.Text { get; set; } - PropertyValue? ISwitchCell.OnColor { get; set; } + object? ISwitchCell.OnColor { get; set; } Action? ISwitchCell.OnChangedAction { get; set; } @@ -120,7 +120,7 @@ public static partial class SwitchCellExtensions public static T On(this T switchCell, bool on) where T : ISwitchCell { - switchCell.On = new PropertyValue(on); + switchCell.On = on; return switchCell; } @@ -134,7 +134,7 @@ public static T On(this T switchCell, Func onFunc) public static T Text(this T switchCell, string text) where T : ISwitchCell { - switchCell.Text = new PropertyValue(text); + switchCell.Text = text; return switchCell; } @@ -148,7 +148,7 @@ public static T Text(this T switchCell, Func textFunc) public static T OnColor(this T switchCell, Microsoft.Maui.Graphics.Color onColor) where T : ISwitchCell { - switchCell.OnColor = new PropertyValue(onColor); + switchCell.OnColor = onColor; return switchCell; } diff --git a/src/MauiReactor/TabbedPage.cs b/src/MauiReactor/TabbedPage.cs index e7034ee3..e5bfc6e5 100644 --- a/src/MauiReactor/TabbedPage.cs +++ b/src/MauiReactor/TabbedPage.cs @@ -12,15 +12,15 @@ namespace MauiReactor; public partial interface ITabbedPage : IGenericMultiPage { - PropertyValue? BarBackgroundColor { get; set; } + object? BarBackgroundColor { get; set; } - PropertyValue? BarBackground { get; set; } + object? BarBackground { get; set; } - PropertyValue? BarTextColor { get; set; } + object? BarTextColor { get; set; } - PropertyValue? UnselectedTabColor { get; set; } + object? UnselectedTabColor { get; set; } - PropertyValue? SelectedTabColor { get; set; } + object? SelectedTabColor { get; set; } } public abstract partial class TabbedPage : MultiPage, ITabbedPage where T : Microsoft.Maui.Controls.TabbedPage, new() @@ -33,15 +33,15 @@ public TabbedPage(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ITabbedPage.BarBackgroundColor { get; set; } + object? ITabbedPage.BarBackgroundColor { get; set; } - PropertyValue? ITabbedPage.BarBackground { get; set; } + object? ITabbedPage.BarBackground { get; set; } - PropertyValue? ITabbedPage.BarTextColor { get; set; } + object? ITabbedPage.BarTextColor { get; set; } - PropertyValue? ITabbedPage.UnselectedTabColor { get; set; } + object? ITabbedPage.UnselectedTabColor { get; set; } - PropertyValue? ITabbedPage.SelectedTabColor { get; set; } + object? ITabbedPage.SelectedTabColor { get; set; } internal override void Reset() { @@ -92,7 +92,7 @@ public static partial class TabbedPageExtensions public static T BarBackgroundColor(this T tabbedPage, Microsoft.Maui.Graphics.Color barBackgroundColor) where T : ITabbedPage { - tabbedPage.BarBackgroundColor = new PropertyValue(barBackgroundColor); + tabbedPage.BarBackgroundColor = barBackgroundColor; return tabbedPage; } @@ -106,7 +106,7 @@ public static T BarBackgroundColor(this T tabbedPage, Func(this T tabbedPage, Microsoft.Maui.Controls.Brush barBackground) where T : ITabbedPage { - tabbedPage.BarBackground = new PropertyValue(barBackground); + tabbedPage.BarBackground = barBackground; return tabbedPage; } @@ -120,7 +120,7 @@ public static T BarBackground(this T tabbedPage, Func(this T tabbedPage, Microsoft.Maui.Graphics.Color barTextColor) where T : ITabbedPage { - tabbedPage.BarTextColor = new PropertyValue(barTextColor); + tabbedPage.BarTextColor = barTextColor; return tabbedPage; } @@ -134,7 +134,7 @@ public static T BarTextColor(this T tabbedPage, Func(this T tabbedPage, Microsoft.Maui.Graphics.Color unselectedTabColor) where T : ITabbedPage { - tabbedPage.UnselectedTabColor = new PropertyValue(unselectedTabColor); + tabbedPage.UnselectedTabColor = unselectedTabColor; return tabbedPage; } @@ -148,7 +148,7 @@ public static T UnselectedTabColor(this T tabbedPage, Func(this T tabbedPage, Microsoft.Maui.Graphics.Color selectedTabColor) where T : ITabbedPage { - tabbedPage.SelectedTabColor = new PropertyValue(selectedTabColor); + tabbedPage.SelectedTabColor = selectedTabColor; return tabbedPage; } diff --git a/src/MauiReactor/TableView.cs b/src/MauiReactor/TableView.cs index dca0ca0f..3f279a07 100644 --- a/src/MauiReactor/TableView.cs +++ b/src/MauiReactor/TableView.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface ITableView : IView { - PropertyValue? RowHeight { get; set; } + object? RowHeight { get; set; } - PropertyValue? HasUnevenRows { get; set; } + object? HasUnevenRows { get; set; } } public partial class TableView : View, ITableView where T : Microsoft.Maui.Controls.TableView, new() @@ -27,9 +27,9 @@ public TableView(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ITableView.RowHeight { get; set; } + object? ITableView.RowHeight { get; set; } - PropertyValue? ITableView.HasUnevenRows { get; set; } + object? ITableView.HasUnevenRows { get; set; } internal override void Reset() { @@ -74,7 +74,7 @@ public static partial class TableViewExtensions public static T RowHeight(this T tableView, int rowHeight) where T : ITableView { - tableView.RowHeight = new PropertyValue(rowHeight); + tableView.RowHeight = rowHeight; return tableView; } @@ -88,7 +88,7 @@ public static T RowHeight(this T tableView, Func rowHeightFunc) public static T HasUnevenRows(this T tableView, bool hasUnevenRows) where T : ITableView { - tableView.HasUnevenRows = new PropertyValue(hasUnevenRows); + tableView.HasUnevenRows = hasUnevenRows; return tableView; } diff --git a/src/MauiReactor/TapGestureRecognizer.cs b/src/MauiReactor/TapGestureRecognizer.cs index 43249407..ed33567b 100644 --- a/src/MauiReactor/TapGestureRecognizer.cs +++ b/src/MauiReactor/TapGestureRecognizer.cs @@ -12,9 +12,9 @@ namespace MauiReactor; public partial interface ITapGestureRecognizer : IGestureRecognizer { - PropertyValue? NumberOfTapsRequired { get; set; } + object? NumberOfTapsRequired { get; set; } - PropertyValue? Buttons { get; set; } + object? Buttons { get; set; } Action? TappedAction { get; set; } @@ -31,9 +31,9 @@ public TapGestureRecognizer(Action? ITapGestureRecognizer.NumberOfTapsRequired { get; set; } + object? ITapGestureRecognizer.NumberOfTapsRequired { get; set; } - PropertyValue? ITapGestureRecognizer.Buttons { get; set; } + object? ITapGestureRecognizer.Buttons { get; set; } Action? ITapGestureRecognizer.TappedAction { get; set; } @@ -103,7 +103,7 @@ public static partial class TapGestureRecognizerExtensions public static T NumberOfTapsRequired(this T tapGestureRecognizer, int numberOfTapsRequired) where T : ITapGestureRecognizer { - tapGestureRecognizer.NumberOfTapsRequired = new PropertyValue(numberOfTapsRequired); + tapGestureRecognizer.NumberOfTapsRequired = numberOfTapsRequired; return tapGestureRecognizer; } @@ -117,7 +117,7 @@ public static T NumberOfTapsRequired(this T tapGestureRecognizer, Func n public static T Buttons(this T tapGestureRecognizer, Microsoft.Maui.Controls.ButtonsMask buttons) where T : ITapGestureRecognizer { - tapGestureRecognizer.Buttons = new PropertyValue(buttons); + tapGestureRecognizer.Buttons = buttons; return tapGestureRecognizer; } diff --git a/src/MauiReactor/TextCell.cs b/src/MauiReactor/TextCell.cs index db4cb936..5fef2350 100644 --- a/src/MauiReactor/TextCell.cs +++ b/src/MauiReactor/TextCell.cs @@ -12,13 +12,13 @@ namespace MauiReactor; public partial interface ITextCell : ICell { - PropertyValue? Text { get; set; } + object? Text { get; set; } - PropertyValue? Detail { get; set; } + object? Detail { get; set; } - PropertyValue? TextColor { get; set; } + object? TextColor { get; set; } - PropertyValue? DetailColor { get; set; } + object? DetailColor { get; set; } } public partial class TextCell : Cell, ITextCell where T : Microsoft.Maui.Controls.TextCell, new() @@ -31,13 +31,13 @@ public TextCell(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? ITextCell.Text { get; set; } + object? ITextCell.Text { get; set; } - PropertyValue? ITextCell.Detail { get; set; } + object? ITextCell.Detail { get; set; } - PropertyValue? ITextCell.TextColor { get; set; } + object? ITextCell.TextColor { get; set; } - PropertyValue? ITextCell.DetailColor { get; set; } + object? ITextCell.DetailColor { get; set; } internal override void Reset() { @@ -86,7 +86,7 @@ public static partial class TextCellExtensions public static T Text(this T textCell, string text) where T : ITextCell { - textCell.Text = new PropertyValue(text); + textCell.Text = text; return textCell; } @@ -100,7 +100,7 @@ public static T Text(this T textCell, Func textFunc) public static T Detail(this T textCell, string detail) where T : ITextCell { - textCell.Detail = new PropertyValue(detail); + textCell.Detail = detail; return textCell; } @@ -114,7 +114,7 @@ public static T Detail(this T textCell, Func detailFunc) public static T TextColor(this T textCell, Microsoft.Maui.Graphics.Color textColor) where T : ITextCell { - textCell.TextColor = new PropertyValue(textColor); + textCell.TextColor = textColor; return textCell; } @@ -128,7 +128,7 @@ public static T TextColor(this T textCell, Func(this T textCell, Microsoft.Maui.Graphics.Color detailColor) where T : ITextCell { - textCell.DetailColor = new PropertyValue(detailColor); + textCell.DetailColor = detailColor; return textCell; } diff --git a/src/MauiReactor/View.cs b/src/MauiReactor/View.cs index 527c64f0..cac0f8de 100644 --- a/src/MauiReactor/View.cs +++ b/src/MauiReactor/View.cs @@ -12,11 +12,11 @@ namespace MauiReactor; public partial interface IView : IVisualElement { - PropertyValue? VerticalOptions { get; set; } + object? VerticalOptions { get; set; } - PropertyValue? HorizontalOptions { get; set; } + object? HorizontalOptions { get; set; } - PropertyValue? Margin { get; set; } + object? Margin { get; set; } } public abstract partial class View : VisualElement, IView where T : Microsoft.Maui.Controls.View, new() @@ -29,11 +29,11 @@ protected View(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IView.VerticalOptions { get; set; } + object? IView.VerticalOptions { get; set; } - PropertyValue? IView.HorizontalOptions { get; set; } + object? IView.HorizontalOptions { get; set; } - PropertyValue? IView.Margin { get; set; } + object? IView.Margin { get; set; } internal override void Reset() { @@ -78,7 +78,7 @@ public static partial class ViewExtensions public static T VerticalOptions(this T view, Microsoft.Maui.Controls.LayoutOptions verticalOptions) where T : IView { - view.VerticalOptions = new PropertyValue(verticalOptions); + view.VerticalOptions = verticalOptions; return view; } @@ -92,7 +92,7 @@ public static T VerticalOptions(this T view, Func(this T view, Microsoft.Maui.Controls.LayoutOptions horizontalOptions) where T : IView { - view.HorizontalOptions = new PropertyValue(horizontalOptions); + view.HorizontalOptions = horizontalOptions; return view; } @@ -106,7 +106,7 @@ public static T HorizontalOptions(this T view, Func(this T view, Microsoft.Maui.Thickness margin, RxThicknessAnimation? customAnimation = null) where T : IView { - view.Margin = new PropertyValue(margin); + view.Margin = margin; view.AppendAnimatable(Microsoft.Maui.Controls.View.MarginProperty, customAnimation ?? new RxSimpleThicknessAnimation(margin), v => view.Margin = new PropertyValue(v.CurrentValue())); return view; } @@ -121,7 +121,7 @@ public static T Margin(this T view, Func marginFunc public static T Margin(this T view, double leftRight, double topBottom, RxThicknessAnimation? customAnimation = null) where T : IView { - view.Margin = new PropertyValue(new Thickness(leftRight, topBottom)); + view.Margin = new Thickness(leftRight, topBottom); view.AppendAnimatable(Microsoft.Maui.Controls.View.MarginProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(leftRight, topBottom)), v => view.Margin = new PropertyValue(v.CurrentValue())); return view; } @@ -129,7 +129,7 @@ public static T Margin(this T view, double leftRight, double topBottom, RxThi public static T Margin(this T view, double uniformSize, RxThicknessAnimation? customAnimation = null) where T : IView { - view.Margin = new PropertyValue(new Thickness(uniformSize)); + view.Margin = new Thickness(uniformSize); view.AppendAnimatable(Microsoft.Maui.Controls.View.MarginProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(uniformSize)), v => view.Margin = new PropertyValue(v.CurrentValue())); return view; } @@ -137,7 +137,7 @@ public static T Margin(this T view, double uniformSize, RxThicknessAnimation? public static T Margin(this T view, double left, double top, double right, double bottom, RxThicknessAnimation? customAnimation = null) where T : IView { - view.Margin = new PropertyValue(new Thickness(left, top, right, bottom)); + view.Margin = new Thickness(left, top, right, bottom); view.AppendAnimatable(Microsoft.Maui.Controls.View.MarginProperty, customAnimation ?? new RxSimpleThicknessAnimation(new Thickness(left, top, right, bottom)), v => view.Margin = new PropertyValue(v.CurrentValue())); return view; } diff --git a/src/MauiReactor/VisualElement.cs b/src/MauiReactor/VisualElement.cs index 13e05a38..537d939e 100644 --- a/src/MauiReactor/VisualElement.cs +++ b/src/MauiReactor/VisualElement.cs @@ -12,55 +12,55 @@ namespace MauiReactor; public partial interface IVisualElement : INavigableElement { - PropertyValue? InputTransparent { get; set; } + object? InputTransparent { get; set; } - PropertyValue? IsEnabled { get; set; } + object? IsEnabled { get; set; } - PropertyValue? AnchorX { get; set; } + object? AnchorX { get; set; } - PropertyValue? AnchorY { get; set; } + object? AnchorY { get; set; } - PropertyValue? TranslationX { get; set; } + object? TranslationX { get; set; } - PropertyValue? TranslationY { get; set; } + object? TranslationY { get; set; } - PropertyValue? Rotation { get; set; } + object? Rotation { get; set; } - PropertyValue? RotationX { get; set; } + object? RotationX { get; set; } - PropertyValue? RotationY { get; set; } + object? RotationY { get; set; } - PropertyValue? Scale { get; set; } + object? Scale { get; set; } - PropertyValue? ScaleX { get; set; } + object? ScaleX { get; set; } - PropertyValue? ScaleY { get; set; } + object? ScaleY { get; set; } - PropertyValue? Visual { get; set; } + object? Visual { get; set; } - PropertyValue? IsVisible { get; set; } + object? IsVisible { get; set; } - PropertyValue? Opacity { get; set; } + object? Opacity { get; set; } - PropertyValue? BackgroundColor { get; set; } + object? BackgroundColor { get; set; } - PropertyValue? Background { get; set; } + object? Background { get; set; } - PropertyValue? WidthRequest { get; set; } + object? WidthRequest { get; set; } - PropertyValue? HeightRequest { get; set; } + object? HeightRequest { get; set; } - PropertyValue? MinimumWidthRequest { get; set; } + object? MinimumWidthRequest { get; set; } - PropertyValue? MinimumHeightRequest { get; set; } + object? MinimumHeightRequest { get; set; } - PropertyValue? MaximumWidthRequest { get; set; } + object? MaximumWidthRequest { get; set; } - PropertyValue? MaximumHeightRequest { get; set; } + object? MaximumHeightRequest { get; set; } - PropertyValue? FlowDirection { get; set; } + object? FlowDirection { get; set; } - PropertyValue? ZIndex { get; set; } + object? ZIndex { get; set; } Action? ChildrenReorderedAction { get; set; } @@ -101,55 +101,55 @@ protected VisualElement(Action componentRefAction) : base(componentRefAction { } - PropertyValue? IVisualElement.InputTransparent { get; set; } + object? IVisualElement.InputTransparent { get; set; } - PropertyValue? IVisualElement.IsEnabled { get; set; } + object? IVisualElement.IsEnabled { get; set; } - PropertyValue? IVisualElement.AnchorX { get; set; } + object? IVisualElement.AnchorX { get; set; } - PropertyValue? IVisualElement.AnchorY { get; set; } + object? IVisualElement.AnchorY { get; set; } - PropertyValue? IVisualElement.TranslationX { get; set; } + object? IVisualElement.TranslationX { get; set; } - PropertyValue? IVisualElement.TranslationY { get; set; } + object? IVisualElement.TranslationY { get; set; } - PropertyValue? IVisualElement.Rotation { get; set; } + object? IVisualElement.Rotation { get; set; } - PropertyValue? IVisualElement.RotationX { get; set; } + object? IVisualElement.RotationX { get; set; } - PropertyValue? IVisualElement.RotationY { get; set; } + object? IVisualElement.RotationY { get; set; } - PropertyValue? IVisualElement.Scale { get; set; } + object? IVisualElement.Scale { get; set; } - PropertyValue? IVisualElement.ScaleX { get; set; } + object? IVisualElement.ScaleX { get; set; } - PropertyValue? IVisualElement.ScaleY { get; set; } + object? IVisualElement.ScaleY { get; set; } - PropertyValue? IVisualElement.Visual { get; set; } + object? IVisualElement.Visual { get; set; } - PropertyValue? IVisualElement.IsVisible { get; set; } + object? IVisualElement.IsVisible { get; set; } - PropertyValue? IVisualElement.Opacity { get; set; } + object? IVisualElement.Opacity { get; set; } - PropertyValue? IVisualElement.BackgroundColor { get; set; } + object? IVisualElement.BackgroundColor { get; set; } - PropertyValue? IVisualElement.Background { get; set; } + object? IVisualElement.Background { get; set; } - PropertyValue? IVisualElement.WidthRequest { get; set; } + object? IVisualElement.WidthRequest { get; set; } - PropertyValue? IVisualElement.HeightRequest { get; set; } + object? IVisualElement.HeightRequest { get; set; } - PropertyValue? IVisualElement.MinimumWidthRequest { get; set; } + object? IVisualElement.MinimumWidthRequest { get; set; } - PropertyValue? IVisualElement.MinimumHeightRequest { get; set; } + object? IVisualElement.MinimumHeightRequest { get; set; } - PropertyValue? IVisualElement.MaximumWidthRequest { get; set; } + object? IVisualElement.MaximumWidthRequest { get; set; } - PropertyValue? IVisualElement.MaximumHeightRequest { get; set; } + object? IVisualElement.MaximumHeightRequest { get; set; } - PropertyValue? IVisualElement.FlowDirection { get; set; } + object? IVisualElement.FlowDirection { get; set; } - PropertyValue? IVisualElement.ZIndex { get; set; } + object? IVisualElement.ZIndex { get; set; } Action? IVisualElement.ChildrenReorderedAction { get; set; } @@ -392,7 +392,7 @@ public static partial class VisualElementExtensions public static T InputTransparent(this T visualElement, bool inputTransparent) where T : IVisualElement { - visualElement.InputTransparent = new PropertyValue(inputTransparent); + visualElement.InputTransparent = inputTransparent; return visualElement; } @@ -406,7 +406,7 @@ public static T InputTransparent(this T visualElement, Func inputTransp public static T IsEnabled(this T visualElement, bool isEnabled) where T : IVisualElement { - visualElement.IsEnabled = new PropertyValue(isEnabled); + visualElement.IsEnabled = isEnabled; return visualElement; } @@ -420,7 +420,7 @@ public static T IsEnabled(this T visualElement, Func isEnabledFunc) public static T AnchorX(this T visualElement, double anchorX, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.AnchorX = new PropertyValue(anchorX); + visualElement.AnchorX = anchorX; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.AnchorXProperty, customAnimation ?? new RxDoubleAnimation(anchorX), v => visualElement.AnchorX = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -435,7 +435,7 @@ public static T AnchorX(this T visualElement, Func anchorXFunc) public static T AnchorY(this T visualElement, double anchorY, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.AnchorY = new PropertyValue(anchorY); + visualElement.AnchorY = anchorY; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.AnchorYProperty, customAnimation ?? new RxDoubleAnimation(anchorY), v => visualElement.AnchorY = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -450,7 +450,7 @@ public static T AnchorY(this T visualElement, Func anchorYFunc) public static T TranslationX(this T visualElement, double translationX, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.TranslationX = new PropertyValue(translationX); + visualElement.TranslationX = translationX; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.TranslationXProperty, customAnimation ?? new RxDoubleAnimation(translationX), v => visualElement.TranslationX = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -465,7 +465,7 @@ public static T TranslationX(this T visualElement, Func translationXF public static T TranslationY(this T visualElement, double translationY, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.TranslationY = new PropertyValue(translationY); + visualElement.TranslationY = translationY; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.TranslationYProperty, customAnimation ?? new RxDoubleAnimation(translationY), v => visualElement.TranslationY = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -480,7 +480,7 @@ public static T TranslationY(this T visualElement, Func translationYF public static T Rotation(this T visualElement, double rotation, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.Rotation = new PropertyValue(rotation); + visualElement.Rotation = rotation; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.RotationProperty, customAnimation ?? new RxDoubleAnimation(rotation), v => visualElement.Rotation = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -495,7 +495,7 @@ public static T Rotation(this T visualElement, Func rotationFunc) public static T RotationX(this T visualElement, double rotationX, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.RotationX = new PropertyValue(rotationX); + visualElement.RotationX = rotationX; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.RotationXProperty, customAnimation ?? new RxDoubleAnimation(rotationX), v => visualElement.RotationX = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -510,7 +510,7 @@ public static T RotationX(this T visualElement, Func rotationXFunc) public static T RotationY(this T visualElement, double rotationY, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.RotationY = new PropertyValue(rotationY); + visualElement.RotationY = rotationY; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.RotationYProperty, customAnimation ?? new RxDoubleAnimation(rotationY), v => visualElement.RotationY = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -525,7 +525,7 @@ public static T RotationY(this T visualElement, Func rotationYFunc) public static T Scale(this T visualElement, double scale, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.Scale = new PropertyValue(scale); + visualElement.Scale = scale; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.ScaleProperty, customAnimation ?? new RxDoubleAnimation(scale), v => visualElement.Scale = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -540,7 +540,7 @@ public static T Scale(this T visualElement, Func scaleFunc) public static T ScaleX(this T visualElement, double scaleX, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.ScaleX = new PropertyValue(scaleX); + visualElement.ScaleX = scaleX; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.ScaleXProperty, customAnimation ?? new RxDoubleAnimation(scaleX), v => visualElement.ScaleX = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -555,7 +555,7 @@ public static T ScaleX(this T visualElement, Func scaleXFunc) public static T ScaleY(this T visualElement, double scaleY, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.ScaleY = new PropertyValue(scaleY); + visualElement.ScaleY = scaleY; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.ScaleYProperty, customAnimation ?? new RxDoubleAnimation(scaleY), v => visualElement.ScaleY = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -570,7 +570,7 @@ public static T ScaleY(this T visualElement, Func scaleYFunc) public static T Visual(this T visualElement, Microsoft.Maui.Controls.IVisual visual) where T : IVisualElement { - visualElement.Visual = new PropertyValue(visual); + visualElement.Visual = visual; return visualElement; } @@ -584,7 +584,7 @@ public static T Visual(this T visualElement, Func(this T visualElement, bool isVisible) where T : IVisualElement { - visualElement.IsVisible = new PropertyValue(isVisible); + visualElement.IsVisible = isVisible; return visualElement; } @@ -598,7 +598,7 @@ public static T IsVisible(this T visualElement, Func isVisibleFunc) public static T Opacity(this T visualElement, double opacity, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.Opacity = new PropertyValue(opacity); + visualElement.Opacity = opacity; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.OpacityProperty, customAnimation ?? new RxDoubleAnimation(opacity), v => visualElement.Opacity = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -613,7 +613,7 @@ public static T Opacity(this T visualElement, Func opacityFunc) public static T BackgroundColor(this T visualElement, Microsoft.Maui.Graphics.Color backgroundColor) where T : IVisualElement { - visualElement.BackgroundColor = new PropertyValue(backgroundColor); + visualElement.BackgroundColor = backgroundColor; return visualElement; } @@ -627,7 +627,7 @@ public static T BackgroundColor(this T visualElement, Func(this T visualElement, Microsoft.Maui.Controls.Brush background) where T : IVisualElement { - visualElement.Background = new PropertyValue(background); + visualElement.Background = background; return visualElement; } @@ -641,7 +641,7 @@ public static T Background(this T visualElement, Func(this T visualElement, double widthRequest, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.WidthRequest = new PropertyValue(widthRequest); + visualElement.WidthRequest = widthRequest; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.WidthRequestProperty, customAnimation ?? new RxDoubleAnimation(widthRequest), v => visualElement.WidthRequest = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -656,7 +656,7 @@ public static T WidthRequest(this T visualElement, Func widthRequestF public static T HeightRequest(this T visualElement, double heightRequest, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.HeightRequest = new PropertyValue(heightRequest); + visualElement.HeightRequest = heightRequest; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.HeightRequestProperty, customAnimation ?? new RxDoubleAnimation(heightRequest), v => visualElement.HeightRequest = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -671,7 +671,7 @@ public static T HeightRequest(this T visualElement, Func heightReques public static T MinimumWidthRequest(this T visualElement, double minimumWidthRequest, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.MinimumWidthRequest = new PropertyValue(minimumWidthRequest); + visualElement.MinimumWidthRequest = minimumWidthRequest; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.MinimumWidthRequestProperty, customAnimation ?? new RxDoubleAnimation(minimumWidthRequest), v => visualElement.MinimumWidthRequest = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -686,7 +686,7 @@ public static T MinimumWidthRequest(this T visualElement, Func minimu public static T MinimumHeightRequest(this T visualElement, double minimumHeightRequest, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.MinimumHeightRequest = new PropertyValue(minimumHeightRequest); + visualElement.MinimumHeightRequest = minimumHeightRequest; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.MinimumHeightRequestProperty, customAnimation ?? new RxDoubleAnimation(minimumHeightRequest), v => visualElement.MinimumHeightRequest = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -701,7 +701,7 @@ public static T MinimumHeightRequest(this T visualElement, Func minim public static T MaximumWidthRequest(this T visualElement, double maximumWidthRequest, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.MaximumWidthRequest = new PropertyValue(maximumWidthRequest); + visualElement.MaximumWidthRequest = maximumWidthRequest; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.MaximumWidthRequestProperty, customAnimation ?? new RxDoubleAnimation(maximumWidthRequest), v => visualElement.MaximumWidthRequest = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -716,7 +716,7 @@ public static T MaximumWidthRequest(this T visualElement, Func maximu public static T MaximumHeightRequest(this T visualElement, double maximumHeightRequest, RxDoubleAnimation? customAnimation = null) where T : IVisualElement { - visualElement.MaximumHeightRequest = new PropertyValue(maximumHeightRequest); + visualElement.MaximumHeightRequest = maximumHeightRequest; visualElement.AppendAnimatable(Microsoft.Maui.Controls.VisualElement.MaximumHeightRequestProperty, customAnimation ?? new RxDoubleAnimation(maximumHeightRequest), v => visualElement.MaximumHeightRequest = new PropertyValue(v.CurrentValue())); return visualElement; } @@ -731,7 +731,7 @@ public static T MaximumHeightRequest(this T visualElement, Func maxim public static T FlowDirection(this T visualElement, Microsoft.Maui.FlowDirection flowDirection) where T : IVisualElement { - visualElement.FlowDirection = new PropertyValue(flowDirection); + visualElement.FlowDirection = flowDirection; return visualElement; } @@ -745,7 +745,7 @@ public static T FlowDirection(this T visualElement, Func(this T visualElement, int zIndex) where T : IVisualElement { - visualElement.ZIndex = new PropertyValue(zIndex); + visualElement.ZIndex = zIndex; return visualElement; } diff --git a/src/MauiReactor/VisualNode.cs b/src/MauiReactor/VisualNode.cs index cf8e3ee0..423964ca 100644 --- a/src/MauiReactor/VisualNode.cs +++ b/src/MauiReactor/VisualNode.cs @@ -422,6 +422,24 @@ protected internal virtual void OnLayoutCycleRequested() return ((IVisualNode?)Parent)?.GetContainerComponent(); } + protected void SetPropertyValue(BindableObject dependencyObject, BindableProperty property, object? propertyValueAsObject) + { + if (propertyValueAsObject != null) + { + if (propertyValueAsObject is IPropertyValue propertyValue) + { + SetPropertyValue(dependencyObject, property, propertyValue); + } + else + { + dependencyObject.SetPropertyValue(property, propertyValueAsObject); + } + } + else + { + dependencyObject.ResetValue(property); + } + } protected void SetPropertyValue(BindableObject dependencyObject, BindableProperty property, IPropertyValue? propertyValue) { @@ -866,9 +884,9 @@ protected override void OnAnimate() base.OnAnimate(); } - protected void AnimateProperty(BindableProperty property, IPropertyValue? propertyValue) + protected void AnimateProperty(BindableProperty property, object? propertyValueAsObject) { - if (propertyValue == null) + if (propertyValueAsObject == null) { return; } @@ -876,7 +894,11 @@ protected void AnimateProperty(BindableProperty property, IPropertyValue? proper if (_animatables.TryGetValue(property, out var animatableProperty) && animatableProperty.IsEnabled == true) { - var newValue = propertyValue.GetValue(); + var newValue = propertyValueAsObject; + if (propertyValueAsObject is IPropertyValue propertyValue) + { + newValue = propertyValue.GetValue(); + } Validate.EnsureNotNull(NativeControl); @@ -886,11 +908,6 @@ protected void AnimateProperty(BindableProperty property, IPropertyValue? proper { NativeControl.SetValue(property, newValue); } - - //if (SetPropertyValue(NativeControl, property, newValue)) - //{ - // System.Diagnostics.Debug.WriteLine($"[{NativeControl.GetType().Name}] Animate property {property.PropertyName} to {newValue}"); - //} } } diff --git a/src/MauiReactor/WebView.cs b/src/MauiReactor/WebView.cs index 09d6626d..5119b0b9 100644 --- a/src/MauiReactor/WebView.cs +++ b/src/MauiReactor/WebView.cs @@ -12,11 +12,11 @@ namespace MauiReactor; public partial interface IWebView : IView { - PropertyValue? Source { get; set; } + object? Source { get; set; } - PropertyValue? UserAgent { get; set; } + object? UserAgent { get; set; } - PropertyValue? Cookies { get; set; } + object? Cookies { get; set; } Action? NavigatedAction { get; set; } @@ -37,11 +37,11 @@ public WebView(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IWebView.Source { get; set; } + object? IWebView.Source { get; set; } - PropertyValue? IWebView.UserAgent { get; set; } + object? IWebView.UserAgent { get; set; } - PropertyValue? IWebView.Cookies { get; set; } + object? IWebView.Cookies { get; set; } Action? IWebView.NavigatedAction { get; set; } @@ -141,7 +141,7 @@ public static partial class WebViewExtensions public static T Source(this T webView, Microsoft.Maui.Controls.WebViewSource source) where T : IWebView { - webView.Source = new PropertyValue(source); + webView.Source = source; return webView; } @@ -155,7 +155,7 @@ public static T Source(this T webView, Func(this T webView, string userAgent) where T : IWebView { - webView.UserAgent = new PropertyValue(userAgent); + webView.UserAgent = userAgent; return webView; } @@ -169,7 +169,7 @@ public static T UserAgent(this T webView, Func userAgentFunc) public static T Cookies(this T webView, System.Net.CookieContainer cookies) where T : IWebView { - webView.Cookies = new PropertyValue(cookies); + webView.Cookies = cookies; return webView; } diff --git a/src/MauiReactor/Window.cs b/src/MauiReactor/Window.cs index ff1e4c75..f110420c 100644 --- a/src/MauiReactor/Window.cs +++ b/src/MauiReactor/Window.cs @@ -12,25 +12,25 @@ namespace MauiReactor; public partial interface IWindow : INavigableElement { - PropertyValue? Title { get; set; } + object? Title { get; set; } - PropertyValue? FlowDirection { get; set; } + object? FlowDirection { get; set; } - PropertyValue? X { get; set; } + object? X { get; set; } - PropertyValue? Y { get; set; } + object? Y { get; set; } - PropertyValue? Width { get; set; } + object? Width { get; set; } - PropertyValue? Height { get; set; } + object? Height { get; set; } - PropertyValue? MaximumWidth { get; set; } + object? MaximumWidth { get; set; } - PropertyValue? MaximumHeight { get; set; } + object? MaximumHeight { get; set; } - PropertyValue? MinimumWidth { get; set; } + object? MinimumWidth { get; set; } - PropertyValue? MinimumHeight { get; set; } + object? MinimumHeight { get; set; } Action? SizeChangedAction { get; set; } @@ -99,25 +99,25 @@ public Window(Action componentRefAction) : base(componentRefAction) { } - PropertyValue? IWindow.Title { get; set; } + object? IWindow.Title { get; set; } - PropertyValue? IWindow.FlowDirection { get; set; } + object? IWindow.FlowDirection { get; set; } - PropertyValue? IWindow.X { get; set; } + object? IWindow.X { get; set; } - PropertyValue? IWindow.Y { get; set; } + object? IWindow.Y { get; set; } - PropertyValue? IWindow.Width { get; set; } + object? IWindow.Width { get; set; } - PropertyValue? IWindow.Height { get; set; } + object? IWindow.Height { get; set; } - PropertyValue? IWindow.MaximumWidth { get; set; } + object? IWindow.MaximumWidth { get; set; } - PropertyValue? IWindow.MaximumHeight { get; set; } + object? IWindow.MaximumHeight { get; set; } - PropertyValue? IWindow.MinimumWidth { get; set; } + object? IWindow.MinimumWidth { get; set; } - PropertyValue? IWindow.MinimumHeight { get; set; } + object? IWindow.MinimumHeight { get; set; } Action? IWindow.SizeChangedAction { get; set; } @@ -451,7 +451,7 @@ public static partial class WindowExtensions public static T Title(this T window, string title) where T : IWindow { - window.Title = new PropertyValue(title); + window.Title = title; return window; } @@ -465,7 +465,7 @@ public static T Title(this T window, Func titleFunc) public static T FlowDirection(this T window, Microsoft.Maui.FlowDirection flowDirection) where T : IWindow { - window.FlowDirection = new PropertyValue(flowDirection); + window.FlowDirection = flowDirection; return window; } @@ -479,7 +479,7 @@ public static T FlowDirection(this T window, Func(this T window, double x, RxDoubleAnimation? customAnimation = null) where T : IWindow { - window.X = new PropertyValue(x); + window.X = x; window.AppendAnimatable(Microsoft.Maui.Controls.Window.XProperty, customAnimation ?? new RxDoubleAnimation(x), v => window.X = new PropertyValue(v.CurrentValue())); return window; } @@ -494,7 +494,7 @@ public static T X(this T window, Func xFunc) public static T Y(this T window, double y, RxDoubleAnimation? customAnimation = null) where T : IWindow { - window.Y = new PropertyValue(y); + window.Y = y; window.AppendAnimatable(Microsoft.Maui.Controls.Window.YProperty, customAnimation ?? new RxDoubleAnimation(y), v => window.Y = new PropertyValue(v.CurrentValue())); return window; } @@ -509,7 +509,7 @@ public static T Y(this T window, Func yFunc) public static T Width(this T window, double width, RxDoubleAnimation? customAnimation = null) where T : IWindow { - window.Width = new PropertyValue(width); + window.Width = width; window.AppendAnimatable(Microsoft.Maui.Controls.Window.WidthProperty, customAnimation ?? new RxDoubleAnimation(width), v => window.Width = new PropertyValue(v.CurrentValue())); return window; } @@ -524,7 +524,7 @@ public static T Width(this T window, Func widthFunc) public static T Height(this T window, double height, RxDoubleAnimation? customAnimation = null) where T : IWindow { - window.Height = new PropertyValue(height); + window.Height = height; window.AppendAnimatable(Microsoft.Maui.Controls.Window.HeightProperty, customAnimation ?? new RxDoubleAnimation(height), v => window.Height = new PropertyValue(v.CurrentValue())); return window; } @@ -539,7 +539,7 @@ public static T Height(this T window, Func heightFunc) public static T MaximumWidth(this T window, double maximumWidth, RxDoubleAnimation? customAnimation = null) where T : IWindow { - window.MaximumWidth = new PropertyValue(maximumWidth); + window.MaximumWidth = maximumWidth; window.AppendAnimatable(Microsoft.Maui.Controls.Window.MaximumWidthProperty, customAnimation ?? new RxDoubleAnimation(maximumWidth), v => window.MaximumWidth = new PropertyValue(v.CurrentValue())); return window; } @@ -554,7 +554,7 @@ public static T MaximumWidth(this T window, Func maximumWidthFunc) public static T MaximumHeight(this T window, double maximumHeight, RxDoubleAnimation? customAnimation = null) where T : IWindow { - window.MaximumHeight = new PropertyValue(maximumHeight); + window.MaximumHeight = maximumHeight; window.AppendAnimatable(Microsoft.Maui.Controls.Window.MaximumHeightProperty, customAnimation ?? new RxDoubleAnimation(maximumHeight), v => window.MaximumHeight = new PropertyValue(v.CurrentValue())); return window; } @@ -569,7 +569,7 @@ public static T MaximumHeight(this T window, Func maximumHeightFunc) public static T MinimumWidth(this T window, double minimumWidth, RxDoubleAnimation? customAnimation = null) where T : IWindow { - window.MinimumWidth = new PropertyValue(minimumWidth); + window.MinimumWidth = minimumWidth; window.AppendAnimatable(Microsoft.Maui.Controls.Window.MinimumWidthProperty, customAnimation ?? new RxDoubleAnimation(minimumWidth), v => window.MinimumWidth = new PropertyValue(v.CurrentValue())); return window; } @@ -584,7 +584,7 @@ public static T MinimumWidth(this T window, Func minimumWidthFunc) public static T MinimumHeight(this T window, double minimumHeight, RxDoubleAnimation? customAnimation = null) where T : IWindow { - window.MinimumHeight = new PropertyValue(minimumHeight); + window.MinimumHeight = minimumHeight; window.AppendAnimatable(Microsoft.Maui.Controls.Window.MinimumHeightProperty, customAnimation ?? new RxDoubleAnimation(minimumHeight), v => window.MinimumHeight = new PropertyValue(v.CurrentValue())); return window; }