From f22af9ecff80c016d17c976400f19e0baf2d1973 Mon Sep 17 00:00:00 2001 From: SergejDK Date: Sun, 3 Mar 2019 23:58:20 +0100 Subject: [PATCH 01/18] first part of update --- Packages.targets | 6 +- paket.dependencies | 18 +- paket.lock | 24 +- src/Fabulous.Cli/fscd.fs | 1 + src/Fabulous.Core/Xamarin.Forms.Core.fs | 1168 ++++++++++++++++- .../blank/.template.config/template.json | 2 +- tests/Fabulous.Cli.Tests/Tests.fs | 2 +- tests/Generator.Tests/ResolverTests.fs | 1 + tools/Generator/Xamarin.Forms.Core.json | 226 ++++ 9 files changed, 1379 insertions(+), 69 deletions(-) diff --git a/Packages.targets b/Packages.targets index a0fc5bf82..b3ff169e5 100644 --- a/Packages.targets +++ b/Packages.targets @@ -2,9 +2,9 @@ - - - + + + diff --git a/paket.dependencies b/paket.dependencies index 0abfb9144..9d59a26af 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -11,8 +11,8 @@ group neutral github fsprojects/FSharp.Compiler.PortaCode:master tests/PortaCodeTests.fs nuget FSharp.Core 4.5.2 - nuget Xamarin.Forms 3.4.0.1009999 - nuget Xamarin.Forms.Maps 3.4.0.1009999 + nuget Xamarin.Forms 3.5.0.129452 + nuget Xamarin.Forms.Maps 3.5.0.129452 nuget SkiaSharp nuget SkiaSharp.Views.Forms nuget OxyPlot.Core 2.0.0-unstable0956 # version matching last updated version of OxyPlot.Xamarin.Forms @@ -25,7 +25,7 @@ group androidapp framework: monoandroid71 source https://api.nuget.org/v3/index.json nuget FSharp.Core 4.5.2 - nuget Xamarin.Forms 3.4.0.1009999 + nuget Xamarin.Forms 3.5.0.129452 nuget Xamarin.Android.FSharp.ResourceProvider 1.0.0.25 nuget Xamarin.Android.Arch.Core.Common 1.0.0.1 nuget Xamarin.Android.Arch.Core.Runtime 1.0.0.1 @@ -56,7 +56,7 @@ group iosapp framework: monotouch source https://api.nuget.org/v3/index.json nuget FSharp.Core 4.5.2 - nuget Xamarin.Forms 3.4.0.1009999 + nuget Xamarin.Forms 3.5.0.129452 nuget Newtonsoft.Json 11.0.2 nuget FSharp.Data 3.0.0 @@ -64,7 +64,7 @@ group macosapp framework: xamarinmac20 source https://api.nuget.org/v3/index.json nuget FSharp.Core 4.5.2 - nuget Xamarin.Forms 3.4.0.1009999 + nuget Xamarin.Forms 3.5.0.129452 nuget Newtonsoft.Json 11.0.2 nuget FSharp.Data 3.0.0 @@ -72,16 +72,16 @@ group wpfapp framework: net472 source https://api.nuget.org/v3/index.json nuget FSharp.Core 4.5.2 - nuget Xamarin.Forms 3.4.0.1009999 + nuget Xamarin.Forms 3.5.0.129452 nuget Newtonsoft.Json 11.0.2 - nuget Xamarin.Forms.Platform.WPF 3.4.0.1009999 + nuget Xamarin.Forms.Platform.WPF 3.5.0.129452 nuget FSharp.Data 3.0.0 group gtkapp framework: net471 source https://api.nuget.org/v3/index.json nuget FSharp.Core 4.5.2 - nuget Xamarin.Forms 3.4.0.1009999 + nuget Xamarin.Forms 3.5.0.129452 nuget Newtonsoft.Json 11.0.2 - nuget Xamarin.Forms.Platform.GTK 3.4.0.1009999 + nuget Xamarin.Forms.Platform.GTK 3.5.0.129452 nuget FSharp.Data 3.0.0 \ No newline at end of file diff --git a/paket.lock b/paket.lock index ab1a9d897..4c453c735 100644 --- a/paket.lock +++ b/paket.lock @@ -251,7 +251,7 @@ NUGET Xamarin.Android.Support.v7.Palette (27.0.2.1) Xamarin.Android.Support.v7.RecyclerView (27.0.2.1) Xamarin.Android.Support.Vector.Drawable (27.0.2.1) - Xamarin.Forms (3.4.0.1009999) + Xamarin.Forms (3.5.0.129452) GROUP gtkapp RESTRICTION: == net471 @@ -261,9 +261,9 @@ NUGET FSharp.Data (3.0) FSharp.Core (>= 4.0.0.1) Newtonsoft.Json (11.0.2) - Xamarin.Forms (3.4.0.1009999) - Xamarin.Forms.Platform.GTK (3.4.0.1009999) - Xamarin.Forms (>= 3.4.0.1009999) + Xamarin.Forms (3.5.0.129452) + Xamarin.Forms.Platform.GTK (3.5.0.129452) + Xamarin.Forms (>= 3.5.0.129452) GROUP iosapp RESTRICTION: == monotouch @@ -400,7 +400,7 @@ NUGET System.Xml.ReaderWriter (4.3.1) System.Xml.XDocument (4.3) System.Xml.XmlDocument (4.3) - Xamarin.Forms (3.4.0.1009999) + Xamarin.Forms (3.5.0.129452) GROUP macosapp RESTRICTION: == xamarinmac @@ -537,7 +537,7 @@ NUGET System.Xml.ReaderWriter (4.3.1) System.Xml.XDocument (4.3) System.Xml.XmlDocument (4.3) - Xamarin.Forms (3.4.0.1009999) + Xamarin.Forms (3.5.0.129452) GROUP neutral RESTRICTION: == netstandard2.0 @@ -550,9 +550,9 @@ NUGET SkiaSharp.Views.Forms (1.68) SkiaSharp (>= 1.68) Xamarin.Forms (>= 3.3.0.912540) - Xamarin.Forms (3.4.0.1009999) - Xamarin.Forms.Maps (3.4.0.1009999) - Xamarin.Forms (>= 3.4.0.1009999) + Xamarin.Forms (3.5.0.129452) + Xamarin.Forms.Maps (3.5.0.129452) + Xamarin.Forms (>= 3.5.0.129452) remote: https://www.myget.org/F/oxyplot OxyPlot.Xamarin.Forms (1.1.0-unstable0013) OxyPlot.Core (>= 2.0.0-unstable0956) @@ -576,8 +576,8 @@ NUGET OpenTK (3.0.1) OpenTK.GLControl (3.0.1) OpenTK (>= 3.0.1) - Xamarin.Forms (3.4.0.1009999) - Xamarin.Forms.Platform.WPF (3.4.0.1009999) + Xamarin.Forms (3.5.0.129452) + Xamarin.Forms.Platform.WPF (3.5.0.129452) OpenTK (>= 2.0) OpenTK.GLControl (>= 1.1.2349.61993) - Xamarin.Forms (>= 3.4.0.1009999) + Xamarin.Forms (>= 3.5.0.129452) diff --git a/src/Fabulous.Cli/fscd.fs b/src/Fabulous.Cli/fscd.fs index 9f4a364db..51c9b52dd 100644 --- a/src/Fabulous.Cli/fscd.fs +++ b/src/Fabulous.Cli/fscd.fs @@ -33,6 +33,7 @@ module MockForms = member __.GetAssemblies() = [| |] // raise (NotImplementedException()) member __.GetUserStoreForApplication() = raise (NotImplementedException()) member __.QuitApplication() = raise (NotImplementedException()) + member __.GetNativeSize(view, widthConstraint, heightConstraint) = raise (NotImplementedException()) type MockDeserializer() = interface IDeserializer with diff --git a/src/Fabulous.Core/Xamarin.Forms.Core.fs b/src/Fabulous.Core/Xamarin.Forms.Core.fs index 828e96e04..07ce6734c 100644 --- a/src/Fabulous.Core/Xamarin.Forms.Core.fs +++ b/src/Fabulous.Core/Xamarin.Forms.Core.fs @@ -69,6 +69,7 @@ module ViewAttributes = let VerticalScrollBarVisibilityAttribKey : AttributeKey<_> = AttributeKey<_>("VerticalScrollBarVisibility") let ScrollToAttribKey : AttributeKey<_> = AttributeKey<_>("ScrollTo") let ScrolledAttribKey : AttributeKey<_> = AttributeKey<_>("Scrolled") + let LayoutAreaOverrideAttribKey : AttributeKey<_> = AttributeKey<_>("LayoutAreaOverride") let CancelButtonColorAttribKey : AttributeKey<_> = AttributeKey<_>("CancelButtonColor") let FontFamilyAttribKey : AttributeKey<_> = AttributeKey<_>("FontFamily") let FontAttributesAttribKey : AttributeKey<_> = AttributeKey<_>("FontAttributes") @@ -155,9 +156,9 @@ module ViewAttributes = let EditorCompletedAttribKey : AttributeKey<_> = AttributeKey<_>("EditorCompleted") let TextChangedAttribKey : AttributeKey<_> = AttributeKey<_>("TextChanged") let AutoSizeAttribKey : AttributeKey<_> = AttributeKey<_>("AutoSize") + let IsTextPredictionEnabledAttribKey : AttributeKey<_> = AttributeKey<_>("IsTextPredictionEnabled") let IsPasswordAttribKey : AttributeKey<_> = AttributeKey<_>("IsPassword") let EntryCompletedAttribKey : AttributeKey<_> = AttributeKey<_>("EntryCompleted") - let IsTextPredictionEnabledAttribKey : AttributeKey<_> = AttributeKey<_>("IsTextPredictionEnabled") let ReturnTypeAttribKey : AttributeKey<_> = AttributeKey<_>("ReturnType") let ReturnCommandAttribKey : AttributeKey<_> = AttributeKey<_>("ReturnCommand") let CursorPositionAttribKey : AttributeKey<_> = AttributeKey<_>("CursorPosition") @@ -236,6 +237,7 @@ module ViewAttributes = let ListView_ItemTappedAttribKey : AttributeKey<_> = AttributeKey<_>("ListView_ItemTapped") let ListView_RefreshingAttribKey : AttributeKey<_> = AttributeKey<_>("ListView_Refreshing") let SelectionModeAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionMode") + let RefreshControlColorAttribKey : AttributeKey<_> = AttributeKey<_>("RefreshControlColor") let ListViewGrouped_ItemsSourceAttribKey : AttributeKey<_> = AttributeKey<_>("ListViewGrouped_ItemsSource") let ListViewGrouped_ShowJumpListAttribKey : AttributeKey<_> = AttributeKey<_>("ListViewGrouped_ShowJumpList") let ListViewGrouped_SelectedItemAttribKey : AttributeKey<_> = AttributeKey<_>("ListViewGrouped_SelectedItem") @@ -246,6 +248,28 @@ module ViewAttributes = let ListViewGrouped_ItemSelectedAttribKey : AttributeKey<_> = AttributeKey<_>("ListViewGrouped_ItemSelected") let ListViewGrouped_ItemTappedAttribKey : AttributeKey<_> = AttributeKey<_>("ListViewGrouped_ItemTapped") let RefreshingAttribKey : AttributeKey<_> = AttributeKey<_>("Refreshing") + let TextOverrideAttribKey : AttributeKey<_> = AttributeKey<_>("TextOverride") + let IconOverrideAttribKey : AttributeKey<_> = AttributeKey<_>("IconOverride") + let RouteAttribKey : AttributeKey<_> = AttributeKey<_>("Route") + let FlyoutIconAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutIcon") + let SpanAttribKey : AttributeKey<_> = AttributeKey<_>("Span") + let ClearIconAttribKey : AttributeKey<_> = AttributeKey<_>("ClearIcon") + let ClearIconHelpTextAttribKey : AttributeKey<_> = AttributeKey<_>("ClearIconHelpText") + let ClearIconNameAttribKey : AttributeKey<_> = AttributeKey<_>("ClearIconName") + let ClearPlaceholderCommandAttribKey : AttributeKey<_> = AttributeKey<_>("ClearPlaceholderCommand") + let ClearPlaceholderCommandParameterAttribKey : AttributeKey<_> = AttributeKey<_>("ClearPlaceholderCommandParameter") + let ClearPlaceholderEnabledAttribKey : AttributeKey<_> = AttributeKey<_>("ClearPlaceholderEnabled") + let ClearPlaceholderHelpTextAttribKey : AttributeKey<_> = AttributeKey<_>("ClearPlaceholderHelpText") + let ClearPlaceholderIconAttribKey : AttributeKey<_> = AttributeKey<_>("ClearPlaceholderIcon") + let ClearPlaceholderNameAttribKey : AttributeKey<_> = AttributeKey<_>("ClearPlaceholderName") + let DisplayMemberNameAttribKey : AttributeKey<_> = AttributeKey<_>("DisplayMemberName") + let IsSearchEnabledAttribKey : AttributeKey<_> = AttributeKey<_>("IsSearchEnabled") + let QueryAttribKey : AttributeKey<_> = AttributeKey<_>("Query") + let QueryIconAttribKey : AttributeKey<_> = AttributeKey<_>("QueryIcon") + let QueryIconHelpTextAttribKey : AttributeKey<_> = AttributeKey<_>("QueryIconHelpText") + let QueryIconNameAttribKey : AttributeKey<_> = AttributeKey<_>("QueryIconName") + let SearchBoxVisibilityAttribKey : AttributeKey<_> = AttributeKey<_>("SearchBoxVisibility") + let ShowsResultsAttribKey : AttributeKey<_> = AttributeKey<_>("ShowsResults") type ViewProto() = static member val ProtoElement : ViewElement option = None with get, set @@ -306,6 +330,10 @@ type ViewProto() = static member val ProtoViewCell : ViewElement option = None with get, set static member val ProtoListView : ViewElement option = None with get, set static member val ProtoListViewGrouped : ViewElement option = None with get, set + static member val ProtoBackButtonBehavior : ViewElement option = None with get, set + static member val ProtoBaseShellItem : ViewElement option = None with get, set + static member val ProtoGridItemsLayout : ViewElement option = None with get, set + static member val ProtoSearchHandler : ViewElement option = None with get, set type ViewBuilders() = /// Builds the attributes for a Element in the view @@ -2319,6 +2347,7 @@ type ViewBuilders() = ?verticalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, ?scrollTo: float * float * Fabulous.DynamicViews.AnimationKind, ?scrolled: Xamarin.Forms.ScrolledEventArgs -> unit, + ?layoutAreaOverride: Xamarin.Forms.Rectangle, ?isClippedToBounds: bool, ?padding: obj, ?horizontalOptions: Xamarin.Forms.LayoutOptions, @@ -2368,6 +2397,7 @@ type ViewBuilders() = let attribCount = match verticalScrollBarVisibility with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match scrollTo with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match scrolled with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match layoutAreaOverride with Some _ -> attribCount + 1 | None -> attribCount let attribBuilder = ViewBuilders.BuildLayout(attribCount, ?isClippedToBounds=isClippedToBounds, ?padding=padding, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match content with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ContentAttribKey, (v)) @@ -2376,6 +2406,7 @@ type ViewBuilders() = match verticalScrollBarVisibility with None -> () | Some v -> attribBuilder.Add(ViewAttributes.VerticalScrollBarVisibilityAttribKey, (v)) match scrollTo with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ScrollToAttribKey, (v)) match scrolled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ScrolledAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) + match layoutAreaOverride with None -> () | Some v -> attribBuilder.Add(ViewAttributes.LayoutAreaOverrideAttribKey, (v)) attribBuilder static member val CreateFuncScrollView : (unit -> Xamarin.Forms.ScrollView) = (fun () -> ViewBuilders.CreateScrollView()) with get, set @@ -2402,6 +2433,8 @@ type ViewBuilders() = let mutable currScrollToOpt = ValueNone let mutable prevScrolledOpt = ValueNone let mutable currScrolledOpt = ValueNone + let mutable prevLayoutAreaOverrideOpt = ValueNone + let mutable currLayoutAreaOverrideOpt = ValueNone for kvp in curr.AttributesKeyed do if kvp.Key = ViewAttributes.ContentAttribKey.KeyValue then currContentOpt <- ValueSome (kvp.Value :?> ViewElement) @@ -2415,6 +2448,8 @@ type ViewBuilders() = currScrollToOpt <- ValueSome (kvp.Value :?> float * float * Fabulous.DynamicViews.AnimationKind) if kvp.Key = ViewAttributes.ScrolledAttribKey.KeyValue then currScrolledOpt <- ValueSome (kvp.Value :?> System.EventHandler) + if kvp.Key = ViewAttributes.LayoutAreaOverrideAttribKey.KeyValue then + currLayoutAreaOverrideOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Rectangle) match prevOpt with | ValueNone -> () | ValueSome prev -> @@ -2431,6 +2466,8 @@ type ViewBuilders() = prevScrollToOpt <- ValueSome (kvp.Value :?> float * float * Fabulous.DynamicViews.AnimationKind) if kvp.Key = ViewAttributes.ScrolledAttribKey.KeyValue then prevScrolledOpt <- ValueSome (kvp.Value :?> System.EventHandler) + if kvp.Key = ViewAttributes.LayoutAreaOverrideAttribKey.KeyValue then + prevLayoutAreaOverrideOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Rectangle) match prevContentOpt, currContentOpt with // For structured objects, dependsOn on reference equality | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () @@ -2463,6 +2500,11 @@ type ViewBuilders() = | ValueNone, ValueSome currValue -> target.Scrolled.AddHandler(currValue) | ValueSome prevValue, ValueNone -> target.Scrolled.RemoveHandler(prevValue) | ValueNone, ValueNone -> () + match prevLayoutAreaOverrideOpt, currLayoutAreaOverrideOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.LayoutAreaOverride <- currValue + | ValueSome _, ValueNone -> target.LayoutAreaOverride <- Xamarin.Forms.Rectangle.Zero + | ValueNone, ValueNone -> () static member inline ConstructScrollView(?content: ViewElement, ?orientation: Xamarin.Forms.ScrollOrientation, @@ -2470,6 +2512,7 @@ type ViewBuilders() = ?verticalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, ?scrollTo: float * float * Fabulous.DynamicViews.AnimationKind, ?scrolled: Xamarin.Forms.ScrolledEventArgs -> unit, + ?layoutAreaOverride: Xamarin.Forms.Rectangle, ?isClippedToBounds: bool, ?padding: obj, ?horizontalOptions: Xamarin.Forms.LayoutOptions, @@ -2520,6 +2563,7 @@ type ViewBuilders() = ?verticalScrollBarVisibility=verticalScrollBarVisibility, ?scrollTo=scrollTo, ?scrolled=scrolled, + ?layoutAreaOverride=layoutAreaOverride, ?isClippedToBounds=isClippedToBounds, ?padding=padding, ?horizontalOptions=horizontalOptions, @@ -3953,6 +3997,7 @@ type ViewBuilders() = ?on: bool, ?text: string, ?onChanged: Xamarin.Forms.ToggledEventArgs -> unit, + ?onColor: Xamarin.Forms.Color, ?height: double, ?isEnabled: bool, ?classId: string, @@ -3964,11 +4009,13 @@ type ViewBuilders() = let attribCount = match on with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match text with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match onChanged with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match onColor with Some _ -> attribCount + 1 | None -> attribCount let attribBuilder = ViewBuilders.BuildCell(attribCount, ?height=height, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match on with None -> () | Some v -> attribBuilder.Add(ViewAttributes.OnAttribKey, (v)) match text with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextAttribKey, (v)) match onChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.OnChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) + match onColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.OnColorAttribKey, (v)) attribBuilder static member val CreateFuncSwitchCell : (unit -> Xamarin.Forms.SwitchCell) = (fun () -> ViewBuilders.CreateSwitchCell()) with get, set @@ -3989,6 +4036,8 @@ type ViewBuilders() = let mutable currTextOpt = ValueNone let mutable prevOnChangedOpt = ValueNone let mutable currOnChangedOpt = ValueNone + let mutable prevOnColorOpt = ValueNone + let mutable currOnColorOpt = ValueNone for kvp in curr.AttributesKeyed do if kvp.Key = ViewAttributes.OnAttribKey.KeyValue then currOnOpt <- ValueSome (kvp.Value :?> bool) @@ -3996,6 +4045,8 @@ type ViewBuilders() = currTextOpt <- ValueSome (kvp.Value :?> string) if kvp.Key = ViewAttributes.OnChangedAttribKey.KeyValue then currOnChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) + if kvp.Key = ViewAttributes.OnColorAttribKey.KeyValue then + currOnColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) match prevOpt with | ValueNone -> () | ValueSome prev -> @@ -4006,6 +4057,8 @@ type ViewBuilders() = prevTextOpt <- ValueSome (kvp.Value :?> string) if kvp.Key = ViewAttributes.OnChangedAttribKey.KeyValue then prevOnChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) + if kvp.Key = ViewAttributes.OnColorAttribKey.KeyValue then + prevOnColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) match prevOnOpt, currOnOpt with | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () | _, ValueSome currValue -> target.On <- currValue @@ -4022,10 +4075,16 @@ type ViewBuilders() = | ValueNone, ValueSome currValue -> target.OnChanged.AddHandler(currValue) | ValueSome prevValue, ValueNone -> target.OnChanged.RemoveHandler(prevValue) | ValueNone, ValueNone -> () + match prevOnColorOpt, currOnColorOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.OnColor <- currValue + | ValueSome _, ValueNone -> target.OnColor <- Xamarin.Forms.Color.Default + | ValueNone, ValueNone -> () static member inline ConstructSwitchCell(?on: bool, ?text: string, ?onChanged: Xamarin.Forms.ToggledEventArgs -> unit, + ?onColor: Xamarin.Forms.Color, ?height: double, ?isEnabled: bool, ?classId: string, @@ -4038,6 +4097,7 @@ type ViewBuilders() = ?on=on, ?text=text, ?onChanged=onChanged, + ?onColor=onColor, ?height=height, ?isEnabled=isEnabled, ?classId=classId, @@ -7023,6 +7083,7 @@ type ViewBuilders() = ?autoSize: Xamarin.Forms.EditorAutoSizeOption, ?placeholder: string, ?placeholderColor: Xamarin.Forms.Color, + ?isTextPredictionEnabled: bool, ?keyboard: Xamarin.Forms.Keyboard, ?horizontalOptions: Xamarin.Forms.LayoutOptions, ?verticalOptions: Xamarin.Forms.LayoutOptions, @@ -7075,6 +7136,7 @@ type ViewBuilders() = let attribCount = match autoSize with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match placeholder with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match placeholderColor with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match isTextPredictionEnabled with Some _ -> attribCount + 1 | None -> attribCount let attribBuilder = ViewBuilders.BuildInputView(attribCount, ?keyboard=keyboard, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match text with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextAttribKey, (v)) @@ -7087,6 +7149,7 @@ type ViewBuilders() = match autoSize with None -> () | Some v -> attribBuilder.Add(ViewAttributes.AutoSizeAttribKey, (v)) match placeholder with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PlaceholderAttribKey, (v)) match placeholderColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PlaceholderColorAttribKey, (v)) + match isTextPredictionEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsTextPredictionEnabledAttribKey, (v)) attribBuilder static member val CreateFuncEditor : (unit -> Xamarin.Forms.Editor) = (fun () -> ViewBuilders.CreateEditor()) with get, set @@ -7121,6 +7184,8 @@ type ViewBuilders() = let mutable currPlaceholderOpt = ValueNone let mutable prevPlaceholderColorOpt = ValueNone let mutable currPlaceholderColorOpt = ValueNone + let mutable prevIsTextPredictionEnabledOpt = ValueNone + let mutable currIsTextPredictionEnabledOpt = ValueNone for kvp in curr.AttributesKeyed do if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then currTextOpt <- ValueSome (kvp.Value :?> string) @@ -7142,6 +7207,8 @@ type ViewBuilders() = currPlaceholderOpt <- ValueSome (kvp.Value :?> string) if kvp.Key = ViewAttributes.PlaceholderColorAttribKey.KeyValue then currPlaceholderColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) + if kvp.Key = ViewAttributes.IsTextPredictionEnabledAttribKey.KeyValue then + currIsTextPredictionEnabledOpt <- ValueSome (kvp.Value :?> bool) match prevOpt with | ValueNone -> () | ValueSome prev -> @@ -7166,6 +7233,8 @@ type ViewBuilders() = prevPlaceholderOpt <- ValueSome (kvp.Value :?> string) if kvp.Key = ViewAttributes.PlaceholderColorAttribKey.KeyValue then prevPlaceholderColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) + if kvp.Key = ViewAttributes.IsTextPredictionEnabledAttribKey.KeyValue then + prevIsTextPredictionEnabledOpt <- ValueSome (kvp.Value :?> bool) match prevTextOpt, currTextOpt with | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () | _, ValueSome currValue -> target.Text <- currValue @@ -7218,6 +7287,11 @@ type ViewBuilders() = | _, ValueSome currValue -> target.PlaceholderColor <- currValue | ValueSome _, ValueNone -> target.PlaceholderColor <- Xamarin.Forms.Color.Default | ValueNone, ValueNone -> () + match prevIsTextPredictionEnabledOpt, currIsTextPredictionEnabledOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.IsTextPredictionEnabled <- currValue + | ValueSome _, ValueNone -> target.IsTextPredictionEnabled <- false + | ValueNone, ValueNone -> () static member inline ConstructEditor(?text: string, ?fontSize: obj, @@ -7229,6 +7303,7 @@ type ViewBuilders() = ?autoSize: Xamarin.Forms.EditorAutoSizeOption, ?placeholder: string, ?placeholderColor: Xamarin.Forms.Color, + ?isTextPredictionEnabled: bool, ?keyboard: Xamarin.Forms.Keyboard, ?horizontalOptions: Xamarin.Forms.LayoutOptions, ?verticalOptions: Xamarin.Forms.LayoutOptions, @@ -7282,6 +7357,7 @@ type ViewBuilders() = ?autoSize=autoSize, ?placeholder=placeholder, ?placeholderColor=placeholderColor, + ?isTextPredictionEnabled=isTextPredictionEnabled, ?keyboard=keyboard, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, @@ -11204,6 +11280,9 @@ type ViewBuilders() = ?itemTapped: int -> unit, ?refreshing: unit -> unit, ?selectionMode: Xamarin.Forms.ListViewSelectionMode, + ?horizontalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, + ?verticalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, + ?refreshControlColor: Xamarin.Forms.Color, ?horizontalOptions: Xamarin.Forms.LayoutOptions, ?verticalOptions: Xamarin.Forms.LayoutOptions, ?margin: obj, @@ -11264,6 +11343,9 @@ type ViewBuilders() = let attribCount = match itemTapped with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match refreshing with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match selectionMode with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match horizontalScrollBarVisibility with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match verticalScrollBarVisibility with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match refreshControlColor with Some _ -> attribCount + 1 | None -> attribCount let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListViewItemsAttribKey, (v)) @@ -11285,6 +11367,9 @@ type ViewBuilders() = match itemTapped with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListView_ItemTappedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindListViewItem sender args.Item).Value))(v)) match refreshing with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListView_RefreshingAttribKey, (fun f -> System.EventHandler(fun sender args -> f ()))(v)) match selectionMode with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionModeAttribKey, (v)) + match horizontalScrollBarVisibility with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HorizontalScrollBarVisibilityAttribKey, (v)) + match verticalScrollBarVisibility with None -> () | Some v -> attribBuilder.Add(ViewAttributes.VerticalScrollBarVisibilityAttribKey, (v)) + match refreshControlColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RefreshControlColorAttribKey, (v)) attribBuilder static member val CreateFuncListView : (unit -> Xamarin.Forms.ListView) = (fun () -> ViewBuilders.CreateListView()) with get, set @@ -11337,6 +11422,12 @@ type ViewBuilders() = let mutable currListView_RefreshingOpt = ValueNone let mutable prevSelectionModeOpt = ValueNone let mutable currSelectionModeOpt = ValueNone + let mutable prevHorizontalScrollBarVisibilityOpt = ValueNone + let mutable currHorizontalScrollBarVisibilityOpt = ValueNone + let mutable prevVerticalScrollBarVisibilityOpt = ValueNone + let mutable currVerticalScrollBarVisibilityOpt = ValueNone + let mutable prevRefreshControlColorOpt = ValueNone + let mutable currRefreshControlColorOpt = ValueNone for kvp in curr.AttributesKeyed do if kvp.Key = ViewAttributes.ListViewItemsAttribKey.KeyValue then currListViewItemsOpt <- ValueSome (kvp.Value :?> seq) @@ -11376,6 +11467,12 @@ type ViewBuilders() = currListView_RefreshingOpt <- ValueSome (kvp.Value :?> System.EventHandler) if kvp.Key = ViewAttributes.SelectionModeAttribKey.KeyValue then currSelectionModeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ListViewSelectionMode) + if kvp.Key = ViewAttributes.HorizontalScrollBarVisibilityAttribKey.KeyValue then + currHorizontalScrollBarVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ScrollBarVisibility) + if kvp.Key = ViewAttributes.VerticalScrollBarVisibilityAttribKey.KeyValue then + currVerticalScrollBarVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ScrollBarVisibility) + if kvp.Key = ViewAttributes.RefreshControlColorAttribKey.KeyValue then + currRefreshControlColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) match prevOpt with | ValueNone -> () | ValueSome prev -> @@ -11418,6 +11515,12 @@ type ViewBuilders() = prevListView_RefreshingOpt <- ValueSome (kvp.Value :?> System.EventHandler) if kvp.Key = ViewAttributes.SelectionModeAttribKey.KeyValue then prevSelectionModeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ListViewSelectionMode) + if kvp.Key = ViewAttributes.HorizontalScrollBarVisibilityAttribKey.KeyValue then + prevHorizontalScrollBarVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ScrollBarVisibility) + if kvp.Key = ViewAttributes.VerticalScrollBarVisibilityAttribKey.KeyValue then + prevVerticalScrollBarVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ScrollBarVisibility) + if kvp.Key = ViewAttributes.RefreshControlColorAttribKey.KeyValue then + prevRefreshControlColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) updateListViewItems prevListViewItemsOpt currListViewItemsOpt target match prevFooterOpt, currFooterOpt with | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () @@ -11514,6 +11617,21 @@ type ViewBuilders() = | _, ValueSome currValue -> target.SelectionMode <- currValue | ValueSome _, ValueNone -> target.SelectionMode <- Xamarin.Forms.ListViewSelectionMode.Single | ValueNone, ValueNone -> () + match prevHorizontalScrollBarVisibilityOpt, currHorizontalScrollBarVisibilityOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.HorizontalScrollBarVisibility <- currValue + | ValueSome _, ValueNone -> target.HorizontalScrollBarVisibility <- Xamarin.Forms.ScrollBarVisibility.Default + | ValueNone, ValueNone -> () + match prevVerticalScrollBarVisibilityOpt, currVerticalScrollBarVisibilityOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.VerticalScrollBarVisibility <- currValue + | ValueSome _, ValueNone -> target.VerticalScrollBarVisibility <- Xamarin.Forms.ScrollBarVisibility.Default + | ValueNone, ValueNone -> () + match prevRefreshControlColorOpt, currRefreshControlColorOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.RefreshControlColor <- currValue + | ValueSome _, ValueNone -> target.RefreshControlColor <- Xamarin.Forms.Color.Default + | ValueNone, ValueNone -> () static member inline ConstructListView(?items: seq, ?footer: System.Object, @@ -11534,6 +11652,9 @@ type ViewBuilders() = ?itemTapped: int -> unit, ?refreshing: unit -> unit, ?selectionMode: Xamarin.Forms.ListViewSelectionMode, + ?horizontalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, + ?verticalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, + ?refreshControlColor: Xamarin.Forms.Color, ?horizontalOptions: Xamarin.Forms.LayoutOptions, ?verticalOptions: Xamarin.Forms.LayoutOptions, ?margin: obj, @@ -11595,6 +11716,9 @@ type ViewBuilders() = ?itemTapped=itemTapped, ?refreshing=refreshing, ?selectionMode=selectionMode, + ?horizontalScrollBarVisibility=horizontalScrollBarVisibility, + ?verticalScrollBarVisibility=verticalScrollBarVisibility, + ?refreshControlColor=refreshControlColor, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, @@ -12073,6 +12197,628 @@ type ViewBuilders() = ViewElement.Create(ViewBuilders.CreateFuncListViewGrouped, ViewBuilders.UpdateFuncListViewGrouped, attribBuilder) + /// Builds the attributes for a BackButtonBehavior in the view + static member inline BuildBackButtonBehavior(attribCount: int, + ?textOverride: string, + ?command: unit -> unit, + ?commandParameter: System.Object, + ?iconOverride: string, + ?isEnabled: bool) = + + let attribCount = match textOverride with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match command with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match commandParameter with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match iconOverride with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match isEnabled with Some _ -> attribCount + 1 | None -> attribCount + + let attribBuilder = new AttributesBuilder(attribCount) + match textOverride with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextOverrideAttribKey, (v)) + match command with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CommandAttribKey, makeCommand(v)) + match commandParameter with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CommandParameterAttribKey, (v)) + match iconOverride with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IconOverrideAttribKey, (v)) + match isEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsEnabledAttribKey, (v)) + attribBuilder + + static member val CreateFuncBackButtonBehavior : (unit -> Xamarin.Forms.BackButtonBehavior) = (fun () -> ViewBuilders.CreateBackButtonBehavior()) with get, set + + static member CreateBackButtonBehavior () : Xamarin.Forms.BackButtonBehavior = + upcast (new Xamarin.Forms.BackButtonBehavior()) + + static member val UpdateFuncBackButtonBehavior = + (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.BackButtonBehavior) -> ViewBuilders.UpdateBackButtonBehavior (prevOpt, curr, target)) + + static member UpdateBackButtonBehavior (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.BackButtonBehavior) = + let mutable prevTextOverrideOpt = ValueNone + let mutable currTextOverrideOpt = ValueNone + let mutable prevCommandOpt = ValueNone + let mutable currCommandOpt = ValueNone + let mutable prevCommandParameterOpt = ValueNone + let mutable currCommandParameterOpt = ValueNone + let mutable prevIconOverrideOpt = ValueNone + let mutable currIconOverrideOpt = ValueNone + let mutable prevIsEnabledOpt = ValueNone + let mutable currIsEnabledOpt = ValueNone + for kvp in curr.AttributesKeyed do + if kvp.Key = ViewAttributes.TextOverrideAttribKey.KeyValue then + currTextOverrideOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then + currCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) + if kvp.Key = ViewAttributes.CommandParameterAttribKey.KeyValue then + currCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.IconOverrideAttribKey.KeyValue then + currIconOverrideOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.IsEnabledAttribKey.KeyValue then + currIsEnabledOpt <- ValueSome (kvp.Value :?> bool) + match prevOpt with + | ValueNone -> () + | ValueSome prev -> + for kvp in prev.AttributesKeyed do + if kvp.Key = ViewAttributes.TextOverrideAttribKey.KeyValue then + prevTextOverrideOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then + prevCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) + if kvp.Key = ViewAttributes.CommandParameterAttribKey.KeyValue then + prevCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.IconOverrideAttribKey.KeyValue then + prevIconOverrideOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.IsEnabledAttribKey.KeyValue then + prevIsEnabledOpt <- ValueSome (kvp.Value :?> bool) + match prevTextOverrideOpt, currTextOverrideOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.TextOverride <- currValue + | ValueSome _, ValueNone -> target.TextOverride <- null + | ValueNone, ValueNone -> () + match prevCommandOpt, currCommandOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.Command <- currValue + | ValueSome _, ValueNone -> target.Command <- null + | ValueNone, ValueNone -> () + match prevCommandParameterOpt, currCommandParameterOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.CommandParameter <- currValue + | ValueSome _, ValueNone -> target.CommandParameter <- null + | ValueNone, ValueNone -> () + match prevIconOverrideOpt, currIconOverrideOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.IconOverride <- makeFileImageSource currValue + | ValueSome _, ValueNone -> target.IconOverride <- null + | ValueNone, ValueNone -> () + match prevIsEnabledOpt, currIsEnabledOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.IsEnabled <- currValue + | ValueSome _, ValueNone -> target.IsEnabled <- true + | ValueNone, ValueNone -> () + + static member inline ConstructBackButtonBehavior(?textOverride: string, + ?command: unit -> unit, + ?commandParameter: System.Object, + ?iconOverride: string, + ?isEnabled: bool) = + + let attribBuilder = ViewBuilders.BuildBackButtonBehavior(0, + ?textOverride=textOverride, + ?command=command, + ?commandParameter=commandParameter, + ?iconOverride=iconOverride, + ?isEnabled=isEnabled) + + ViewElement.Create(ViewBuilders.CreateFuncBackButtonBehavior, ViewBuilders.UpdateFuncBackButtonBehavior, attribBuilder) + + /// Builds the attributes for a BaseShellItem in the view + static member inline BuildBaseShellItem(attribCount: int, + ?title: string, + ?route: string, + ?icon: string, + ?flyoutIcon: string, + ?isEnabled: bool, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: obj -> unit, + ?ref: ViewRef) = + + let attribCount = match title with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match route with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match icon with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match flyoutIcon with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match isEnabled with Some _ -> attribCount + 1 | None -> attribCount + + let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + match title with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TitleAttribKey, (v)) + match route with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RouteAttribKey, (v)) + match icon with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IconAttribKey, (v)) + match flyoutIcon with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutIconAttribKey, (v)) + match isEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsEnabledAttribKey, (v)) + attribBuilder + + static member val CreateFuncBaseShellItem : (unit -> Xamarin.Forms.BaseShellItem) = (fun () -> ViewBuilders.CreateBaseShellItem()) with get, set + + static member CreateBaseShellItem () : Xamarin.Forms.BaseShellItem = + upcast (new Xamarin.Forms.BaseShellItem()) + + static member val UpdateFuncBaseShellItem = + (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.BaseShellItem) -> ViewBuilders.UpdateBaseShellItem (prevOpt, curr, target)) + + static member UpdateBaseShellItem (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.BaseShellItem) = + // update the inherited Element element + let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value + baseElement.UpdateInherited (prevOpt, curr, target) + let mutable prevTitleOpt = ValueNone + let mutable currTitleOpt = ValueNone + let mutable prevRouteOpt = ValueNone + let mutable currRouteOpt = ValueNone + let mutable prevIconOpt = ValueNone + let mutable currIconOpt = ValueNone + let mutable prevFlyoutIconOpt = ValueNone + let mutable currFlyoutIconOpt = ValueNone + let mutable prevIsEnabledOpt = ValueNone + let mutable currIsEnabledOpt = ValueNone + for kvp in curr.AttributesKeyed do + if kvp.Key = ViewAttributes.TitleAttribKey.KeyValue then + currTitleOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.RouteAttribKey.KeyValue then + currRouteOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.IconAttribKey.KeyValue then + currIconOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.FlyoutIconAttribKey.KeyValue then + currFlyoutIconOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.IsEnabledAttribKey.KeyValue then + currIsEnabledOpt <- ValueSome (kvp.Value :?> bool) + match prevOpt with + | ValueNone -> () + | ValueSome prev -> + for kvp in prev.AttributesKeyed do + if kvp.Key = ViewAttributes.TitleAttribKey.KeyValue then + prevTitleOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.RouteAttribKey.KeyValue then + prevRouteOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.IconAttribKey.KeyValue then + prevIconOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.FlyoutIconAttribKey.KeyValue then + prevFlyoutIconOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.IsEnabledAttribKey.KeyValue then + prevIsEnabledOpt <- ValueSome (kvp.Value :?> bool) + match prevTitleOpt, currTitleOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.Title <- currValue + | ValueSome _, ValueNone -> target.Title <- null + | ValueNone, ValueNone -> () + match prevRouteOpt, currRouteOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.Route <- currValue + | ValueSome _, ValueNone -> target.Route <- null + | ValueNone, ValueNone -> () + match prevIconOpt, currIconOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.Icon <- makeFileImageSource currValue + | ValueSome _, ValueNone -> target.Icon <- null + | ValueNone, ValueNone -> () + match prevFlyoutIconOpt, currFlyoutIconOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.FlyoutIcon <- makeFileImageSource currValue + | ValueSome _, ValueNone -> target.FlyoutIcon <- null + | ValueNone, ValueNone -> () + match prevIsEnabledOpt, currIsEnabledOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.IsEnabled <- currValue + | ValueSome _, ValueNone -> target.IsEnabled <- true + | ValueNone, ValueNone -> () + + static member inline ConstructBaseShellItem(?title: string, + ?route: string, + ?icon: string, + ?flyoutIcon: string, + ?isEnabled: bool, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.BaseShellItem -> unit), + ?ref: ViewRef) = + + let attribBuilder = ViewBuilders.BuildBaseShellItem(0, + ?title=title, + ?route=route, + ?icon=icon, + ?flyoutIcon=flyoutIcon, + ?isEnabled=isEnabled, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), + ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) + + ViewElement.Create(ViewBuilders.CreateFuncBaseShellItem, ViewBuilders.UpdateFuncBaseShellItem, attribBuilder) + + /// Builds the attributes for a GridItemsLayout in the view + static member inline BuildGridItemsLayout(attribCount: int, + ?span: int) = + + let attribCount = match span with Some _ -> attribCount + 1 | None -> attribCount + + let attribBuilder = new AttributesBuilder(attribCount) + match span with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SpanAttribKey, (v)) + attribBuilder + + static member val CreateFuncGridItemsLayout : (unit -> Xamarin.Forms.GridItemsLayout) = (fun () -> ViewBuilders.CreateGridItemsLayout()) with get, set + + static member CreateGridItemsLayout () : Xamarin.Forms.GridItemsLayout = + failwith "can't create Xamarin.Forms.GridItemsLayout" + + static member val UpdateFuncGridItemsLayout = + (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.GridItemsLayout) -> ViewBuilders.UpdateGridItemsLayout (prevOpt, curr, target)) + + static member UpdateGridItemsLayout (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.GridItemsLayout) = + let mutable prevSpanOpt = ValueNone + let mutable currSpanOpt = ValueNone + for kvp in curr.AttributesKeyed do + if kvp.Key = ViewAttributes.SpanAttribKey.KeyValue then + currSpanOpt <- ValueSome (kvp.Value :?> int) + match prevOpt with + | ValueNone -> () + | ValueSome prev -> + for kvp in prev.AttributesKeyed do + if kvp.Key = ViewAttributes.SpanAttribKey.KeyValue then + prevSpanOpt <- ValueSome (kvp.Value :?> int) + match prevSpanOpt, currSpanOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.Span <- currValue + | ValueSome _, ValueNone -> target.Span <- 0 + | ValueNone, ValueNone -> () + + static member inline ConstructGridItemsLayout(?span: int) = + + let attribBuilder = ViewBuilders.BuildGridItemsLayout(0, + ?span=span) + + ViewElement.Create(ViewBuilders.CreateFuncGridItemsLayout, ViewBuilders.UpdateFuncGridItemsLayout, attribBuilder) + + /// Builds the attributes for a SearchHandler in the view + static member inline BuildSearchHandler(attribCount: int, + ?clearIcon: string, + ?clearIconHelpText: string, + ?clearIconName: string, + ?clearPlaceholderCommand: unit -> unit, + ?clearPlaceholderCommandParameter: System.Object, + ?clearPlaceholderEnabled: bool, + ?clearPlaceholderHelpText: string, + ?clearPlaceholderIcon: string, + ?clearPlaceholderName: string, + ?command: unit -> unit, + ?commandParameter: System.Object, + ?displayMemberName: string, + ?isSearchEnabled: bool, + ?placeholder: string, + ?query: string, + ?queryIcon: string, + ?queryIconHelpText: string, + ?queryIconName: string, + ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, + ?showsResults: bool) = + + let attribCount = match clearIcon with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match clearIconHelpText with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match clearIconName with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match clearPlaceholderCommand with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match clearPlaceholderCommandParameter with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match clearPlaceholderEnabled with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match clearPlaceholderHelpText with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match clearPlaceholderIcon with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match clearPlaceholderName with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match command with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match commandParameter with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match displayMemberName with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match isSearchEnabled with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match placeholder with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match query with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match queryIcon with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match queryIconHelpText with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match queryIconName with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match searchBoxVisibility with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match showsResults with Some _ -> attribCount + 1 | None -> attribCount + + let attribBuilder = new AttributesBuilder(attribCount) + match clearIcon with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearIconAttribKey, (v)) + match clearIconHelpText with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearIconHelpTextAttribKey, (v)) + match clearIconName with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearIconNameAttribKey, (v)) + match clearPlaceholderCommand with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearPlaceholderCommandAttribKey, makeCommand(v)) + match clearPlaceholderCommandParameter with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearPlaceholderCommandParameterAttribKey, (v)) + match clearPlaceholderEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearPlaceholderEnabledAttribKey, (v)) + match clearPlaceholderHelpText with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearPlaceholderHelpTextAttribKey, (v)) + match clearPlaceholderIcon with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearPlaceholderIconAttribKey, (v)) + match clearPlaceholderName with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearPlaceholderNameAttribKey, (v)) + match command with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CommandAttribKey, makeCommand(v)) + match commandParameter with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CommandParameterAttribKey, (v)) + match displayMemberName with None -> () | Some v -> attribBuilder.Add(ViewAttributes.DisplayMemberNameAttribKey, (v)) + match isSearchEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsSearchEnabledAttribKey, (v)) + match placeholder with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PlaceholderAttribKey, (v)) + match query with None -> () | Some v -> attribBuilder.Add(ViewAttributes.QueryAttribKey, (v)) + match queryIcon with None -> () | Some v -> attribBuilder.Add(ViewAttributes.QueryIconAttribKey, (v)) + match queryIconHelpText with None -> () | Some v -> attribBuilder.Add(ViewAttributes.QueryIconHelpTextAttribKey, (v)) + match queryIconName with None -> () | Some v -> attribBuilder.Add(ViewAttributes.QueryIconNameAttribKey, (v)) + match searchBoxVisibility with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SearchBoxVisibilityAttribKey, (v)) + match showsResults with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ShowsResultsAttribKey, (v)) + attribBuilder + + static member val CreateFuncSearchHandler : (unit -> Xamarin.Forms.SearchHandler) = (fun () -> ViewBuilders.CreateSearchHandler()) with get, set + + static member CreateSearchHandler () : Xamarin.Forms.SearchHandler = + upcast (new Xamarin.Forms.SearchHandler()) + + static member val UpdateFuncSearchHandler = + (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.SearchHandler) -> ViewBuilders.UpdateSearchHandler (prevOpt, curr, target)) + + static member UpdateSearchHandler (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.SearchHandler) = + let mutable prevClearIconOpt = ValueNone + let mutable currClearIconOpt = ValueNone + let mutable prevClearIconHelpTextOpt = ValueNone + let mutable currClearIconHelpTextOpt = ValueNone + let mutable prevClearIconNameOpt = ValueNone + let mutable currClearIconNameOpt = ValueNone + let mutable prevClearPlaceholderCommandOpt = ValueNone + let mutable currClearPlaceholderCommandOpt = ValueNone + let mutable prevClearPlaceholderCommandParameterOpt = ValueNone + let mutable currClearPlaceholderCommandParameterOpt = ValueNone + let mutable prevClearPlaceholderEnabledOpt = ValueNone + let mutable currClearPlaceholderEnabledOpt = ValueNone + let mutable prevClearPlaceholderHelpTextOpt = ValueNone + let mutable currClearPlaceholderHelpTextOpt = ValueNone + let mutable prevClearPlaceholderIconOpt = ValueNone + let mutable currClearPlaceholderIconOpt = ValueNone + let mutable prevClearPlaceholderNameOpt = ValueNone + let mutable currClearPlaceholderNameOpt = ValueNone + let mutable prevCommandOpt = ValueNone + let mutable currCommandOpt = ValueNone + let mutable prevCommandParameterOpt = ValueNone + let mutable currCommandParameterOpt = ValueNone + let mutable prevDisplayMemberNameOpt = ValueNone + let mutable currDisplayMemberNameOpt = ValueNone + let mutable prevIsSearchEnabledOpt = ValueNone + let mutable currIsSearchEnabledOpt = ValueNone + let mutable prevPlaceholderOpt = ValueNone + let mutable currPlaceholderOpt = ValueNone + let mutable prevQueryOpt = ValueNone + let mutable currQueryOpt = ValueNone + let mutable prevQueryIconOpt = ValueNone + let mutable currQueryIconOpt = ValueNone + let mutable prevQueryIconHelpTextOpt = ValueNone + let mutable currQueryIconHelpTextOpt = ValueNone + let mutable prevQueryIconNameOpt = ValueNone + let mutable currQueryIconNameOpt = ValueNone + let mutable prevSearchBoxVisibilityOpt = ValueNone + let mutable currSearchBoxVisibilityOpt = ValueNone + let mutable prevShowsResultsOpt = ValueNone + let mutable currShowsResultsOpt = ValueNone + for kvp in curr.AttributesKeyed do + if kvp.Key = ViewAttributes.ClearIconAttribKey.KeyValue then + currClearIconOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.ClearIconHelpTextAttribKey.KeyValue then + currClearIconHelpTextOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.ClearIconNameAttribKey.KeyValue then + currClearIconNameOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.ClearPlaceholderCommandAttribKey.KeyValue then + currClearPlaceholderCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) + if kvp.Key = ViewAttributes.ClearPlaceholderCommandParameterAttribKey.KeyValue then + currClearPlaceholderCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.ClearPlaceholderEnabledAttribKey.KeyValue then + currClearPlaceholderEnabledOpt <- ValueSome (kvp.Value :?> bool) + if kvp.Key = ViewAttributes.ClearPlaceholderHelpTextAttribKey.KeyValue then + currClearPlaceholderHelpTextOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.ClearPlaceholderIconAttribKey.KeyValue then + currClearPlaceholderIconOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.ClearPlaceholderNameAttribKey.KeyValue then + currClearPlaceholderNameOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then + currCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) + if kvp.Key = ViewAttributes.CommandParameterAttribKey.KeyValue then + currCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.DisplayMemberNameAttribKey.KeyValue then + currDisplayMemberNameOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.IsSearchEnabledAttribKey.KeyValue then + currIsSearchEnabledOpt <- ValueSome (kvp.Value :?> bool) + if kvp.Key = ViewAttributes.PlaceholderAttribKey.KeyValue then + currPlaceholderOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.QueryAttribKey.KeyValue then + currQueryOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.QueryIconAttribKey.KeyValue then + currQueryIconOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.QueryIconHelpTextAttribKey.KeyValue then + currQueryIconHelpTextOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.QueryIconNameAttribKey.KeyValue then + currQueryIconNameOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.SearchBoxVisibilityAttribKey.KeyValue then + currSearchBoxVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SearchBoxVisiblity) + if kvp.Key = ViewAttributes.ShowsResultsAttribKey.KeyValue then + currShowsResultsOpt <- ValueSome (kvp.Value :?> bool) + match prevOpt with + | ValueNone -> () + | ValueSome prev -> + for kvp in prev.AttributesKeyed do + if kvp.Key = ViewAttributes.ClearIconAttribKey.KeyValue then + prevClearIconOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.ClearIconHelpTextAttribKey.KeyValue then + prevClearIconHelpTextOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.ClearIconNameAttribKey.KeyValue then + prevClearIconNameOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.ClearPlaceholderCommandAttribKey.KeyValue then + prevClearPlaceholderCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) + if kvp.Key = ViewAttributes.ClearPlaceholderCommandParameterAttribKey.KeyValue then + prevClearPlaceholderCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.ClearPlaceholderEnabledAttribKey.KeyValue then + prevClearPlaceholderEnabledOpt <- ValueSome (kvp.Value :?> bool) + if kvp.Key = ViewAttributes.ClearPlaceholderHelpTextAttribKey.KeyValue then + prevClearPlaceholderHelpTextOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.ClearPlaceholderIconAttribKey.KeyValue then + prevClearPlaceholderIconOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.ClearPlaceholderNameAttribKey.KeyValue then + prevClearPlaceholderNameOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then + prevCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) + if kvp.Key = ViewAttributes.CommandParameterAttribKey.KeyValue then + prevCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.DisplayMemberNameAttribKey.KeyValue then + prevDisplayMemberNameOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.IsSearchEnabledAttribKey.KeyValue then + prevIsSearchEnabledOpt <- ValueSome (kvp.Value :?> bool) + if kvp.Key = ViewAttributes.PlaceholderAttribKey.KeyValue then + prevPlaceholderOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.QueryAttribKey.KeyValue then + prevQueryOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.QueryIconAttribKey.KeyValue then + prevQueryIconOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.QueryIconHelpTextAttribKey.KeyValue then + prevQueryIconHelpTextOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.QueryIconNameAttribKey.KeyValue then + prevQueryIconNameOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.SearchBoxVisibilityAttribKey.KeyValue then + prevSearchBoxVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SearchBoxVisiblity) + if kvp.Key = ViewAttributes.ShowsResultsAttribKey.KeyValue then + prevShowsResultsOpt <- ValueSome (kvp.Value :?> bool) + match prevClearIconOpt, currClearIconOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ClearIcon <- makeFileImageSource currValue + | ValueSome _, ValueNone -> target.ClearIcon <- null + | ValueNone, ValueNone -> () + match prevClearIconHelpTextOpt, currClearIconHelpTextOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ClearIconHelpText <- currValue + | ValueSome _, ValueNone -> target.ClearIconHelpText <- null + | ValueNone, ValueNone -> () + match prevClearIconNameOpt, currClearIconNameOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ClearIconName <- currValue + | ValueSome _, ValueNone -> target.ClearIconName <- null + | ValueNone, ValueNone -> () + match prevClearPlaceholderCommandOpt, currClearPlaceholderCommandOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ClearPlaceholderCommand <- currValue + | ValueSome _, ValueNone -> target.ClearPlaceholderCommand <- null + | ValueNone, ValueNone -> () + match prevClearPlaceholderCommandParameterOpt, currClearPlaceholderCommandParameterOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ClearPlaceholderCommandParameter <- currValue + | ValueSome _, ValueNone -> target.ClearPlaceholderCommandParameter <- null + | ValueNone, ValueNone -> () + match prevClearPlaceholderEnabledOpt, currClearPlaceholderEnabledOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ClearPlaceholderEnabled <- currValue + | ValueSome _, ValueNone -> target.ClearPlaceholderEnabled <- true + | ValueNone, ValueNone -> () + match prevClearPlaceholderHelpTextOpt, currClearPlaceholderHelpTextOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ClearPlaceholderHelpText <- currValue + | ValueSome _, ValueNone -> target.ClearPlaceholderHelpText <- null + | ValueNone, ValueNone -> () + match prevClearPlaceholderIconOpt, currClearPlaceholderIconOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ClearPlaceholderIcon <- makeFileImageSource currValue + | ValueSome _, ValueNone -> target.ClearPlaceholderIcon <- null + | ValueNone, ValueNone -> () + match prevClearPlaceholderNameOpt, currClearPlaceholderNameOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ClearPlaceholderName <- currValue + | ValueSome _, ValueNone -> target.ClearPlaceholderName <- null + | ValueNone, ValueNone -> () + match prevCommandOpt, currCommandOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.Command <- currValue + | ValueSome _, ValueNone -> target.Command <- null + | ValueNone, ValueNone -> () + match prevCommandParameterOpt, currCommandParameterOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.CommandParameter <- currValue + | ValueSome _, ValueNone -> target.CommandParameter <- null + | ValueNone, ValueNone -> () + match prevDisplayMemberNameOpt, currDisplayMemberNameOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.DisplayMemberName <- currValue + | ValueSome _, ValueNone -> target.DisplayMemberName <- null + | ValueNone, ValueNone -> () + match prevIsSearchEnabledOpt, currIsSearchEnabledOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.IsSearchEnabled <- currValue + | ValueSome _, ValueNone -> target.IsSearchEnabled <- true + | ValueNone, ValueNone -> () + match prevPlaceholderOpt, currPlaceholderOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.Placeholder <- currValue + | ValueSome _, ValueNone -> target.Placeholder <- null + | ValueNone, ValueNone -> () + match prevQueryOpt, currQueryOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.Query <- currValue + | ValueSome _, ValueNone -> target.Query <- null + | ValueNone, ValueNone -> () + match prevQueryIconOpt, currQueryIconOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.QueryIcon <- makeFileImageSource currValue + | ValueSome _, ValueNone -> target.QueryIcon <- null + | ValueNone, ValueNone -> () + match prevQueryIconHelpTextOpt, currQueryIconHelpTextOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.QueryIconHelpText <- currValue + | ValueSome _, ValueNone -> target.QueryIconHelpText <- null + | ValueNone, ValueNone -> () + match prevQueryIconNameOpt, currQueryIconNameOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.QueryIconName <- currValue + | ValueSome _, ValueNone -> target.QueryIconName <- null + | ValueNone, ValueNone -> () + match prevSearchBoxVisibilityOpt, currSearchBoxVisibilityOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.SearchBoxVisibility <- currValue + | ValueSome _, ValueNone -> target.SearchBoxVisibility <- Xamarin.Forms.SearchBoxVisiblity.Hidden + | ValueNone, ValueNone -> () + match prevShowsResultsOpt, currShowsResultsOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ShowsResults <- currValue + | ValueSome _, ValueNone -> target.ShowsResults <- true + | ValueNone, ValueNone -> () + + static member inline ConstructSearchHandler(?clearIcon: string, + ?clearIconHelpText: string, + ?clearIconName: string, + ?clearPlaceholderCommand: unit -> unit, + ?clearPlaceholderCommandParameter: System.Object, + ?clearPlaceholderEnabled: bool, + ?clearPlaceholderHelpText: string, + ?clearPlaceholderIcon: string, + ?clearPlaceholderName: string, + ?command: unit -> unit, + ?commandParameter: System.Object, + ?displayMemberName: string, + ?isSearchEnabled: bool, + ?placeholder: string, + ?query: string, + ?queryIcon: string, + ?queryIconHelpText: string, + ?queryIconName: string, + ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, + ?showsResults: bool) = + + let attribBuilder = ViewBuilders.BuildSearchHandler(0, + ?clearIcon=clearIcon, + ?clearIconHelpText=clearIconHelpText, + ?clearIconName=clearIconName, + ?clearPlaceholderCommand=clearPlaceholderCommand, + ?clearPlaceholderCommandParameter=clearPlaceholderCommandParameter, + ?clearPlaceholderEnabled=clearPlaceholderEnabled, + ?clearPlaceholderHelpText=clearPlaceholderHelpText, + ?clearPlaceholderIcon=clearPlaceholderIcon, + ?clearPlaceholderName=clearPlaceholderName, + ?command=command, + ?commandParameter=commandParameter, + ?displayMemberName=displayMemberName, + ?isSearchEnabled=isSearchEnabled, + ?placeholder=placeholder, + ?query=query, + ?queryIcon=queryIcon, + ?queryIconHelpText=queryIconHelpText, + ?queryIconName=queryIconName, + ?searchBoxVisibility=searchBoxVisibility, + ?showsResults=showsResults) + + ViewElement.Create(ViewBuilders.CreateFuncSearchHandler, ViewBuilders.UpdateFuncSearchHandler, attribBuilder) + /// Viewer that allows to read the properties of a ViewElement representing a Element type ElementViewer(element: ViewElement) = do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Element' is expected, but '%s' was provided." element.TargetType.FullName @@ -12268,6 +13014,8 @@ type ScrollViewViewer(element: ViewElement) = member this.ScrollTo = element.GetAttributeKeyed(ViewAttributes.ScrollToAttribKey) /// Get the value of the Scrolled property member this.Scrolled = element.GetAttributeKeyed(ViewAttributes.ScrolledAttribKey) + /// Get the value of the LayoutAreaOverride property + member this.LayoutAreaOverride = element.GetAttributeKeyed(ViewAttributes.LayoutAreaOverrideAttribKey) /// Viewer that allows to read the properties of a ViewElement representing a SearchBar type SearchBarViewer(element: ViewElement) = @@ -12385,6 +13133,8 @@ type SwitchCellViewer(element: ViewElement) = member this.Text = element.GetAttributeKeyed(ViewAttributes.TextAttribKey) /// Get the value of the OnChanged property member this.OnChanged = element.GetAttributeKeyed(ViewAttributes.OnChangedAttribKey) + /// Get the value of the OnColor property + member this.OnColor = element.GetAttributeKeyed(ViewAttributes.OnColorAttribKey) /// Viewer that allows to read the properties of a ViewElement representing a TableView type TableViewViewer(element: ViewElement) = @@ -12581,6 +13331,8 @@ type EditorViewer(element: ViewElement) = member this.Placeholder = element.GetAttributeKeyed(ViewAttributes.PlaceholderAttribKey) /// Get the value of the PlaceholderColor property member this.PlaceholderColor = element.GetAttributeKeyed(ViewAttributes.PlaceholderColorAttribKey) + /// Get the value of the IsTextPredictionEnabled property + member this.IsTextPredictionEnabled = element.GetAttributeKeyed(ViewAttributes.IsTextPredictionEnabledAttribKey) /// Viewer that allows to read the properties of a ViewElement representing a Entry type EntryViewer(element: ViewElement) = @@ -12927,6 +13679,12 @@ type ListViewViewer(element: ViewElement) = member this.Refreshing = element.GetAttributeKeyed(ViewAttributes.ListView_RefreshingAttribKey) /// Get the value of the SelectionMode property member this.SelectionMode = element.GetAttributeKeyed(ViewAttributes.SelectionModeAttribKey) + /// Get the value of the HorizontalScrollBarVisibility property + member this.HorizontalScrollBarVisibility = element.GetAttributeKeyed(ViewAttributes.HorizontalScrollBarVisibilityAttribKey) + /// Get the value of the VerticalScrollBarVisibility property + member this.VerticalScrollBarVisibility = element.GetAttributeKeyed(ViewAttributes.VerticalScrollBarVisibilityAttribKey) + /// Get the value of the RefreshControlColor property + member this.RefreshControlColor = element.GetAttributeKeyed(ViewAttributes.RefreshControlColorAttribKey) /// Viewer that allows to read the properties of a ViewElement representing a ListViewGrouped type ListViewGroupedViewer(element: ViewElement) = @@ -12969,6 +13727,85 @@ type ListViewGroupedViewer(element: ViewElement) = /// Get the value of the SelectionMode property member this.SelectionMode = element.GetAttributeKeyed(ViewAttributes.SelectionModeAttribKey) +/// Viewer that allows to read the properties of a ViewElement representing a BackButtonBehavior +type BackButtonBehaviorViewer(element: ViewElement) = + do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.BackButtonBehavior' is expected, but '%s' was provided." element.TargetType.FullName + /// Get the value of the TextOverride property + member this.TextOverride = element.GetAttributeKeyed(ViewAttributes.TextOverrideAttribKey) + /// Get the value of the Command property + member this.Command = element.GetAttributeKeyed(ViewAttributes.CommandAttribKey) + /// Get the value of the CommandParameter property + member this.CommandParameter = element.GetAttributeKeyed(ViewAttributes.CommandParameterAttribKey) + /// Get the value of the IconOverride property + member this.IconOverride = element.GetAttributeKeyed(ViewAttributes.IconOverrideAttribKey) + /// Get the value of the IsEnabled property + member this.IsEnabled = element.GetAttributeKeyed(ViewAttributes.IsEnabledAttribKey) + +/// Viewer that allows to read the properties of a ViewElement representing a BaseShellItem +type BaseShellItemViewer(element: ViewElement) = + inherit ElementViewer(element) + do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.BaseShellItem' is expected, but '%s' was provided." element.TargetType.FullName + /// Get the value of the Title property + member this.Title = element.GetAttributeKeyed(ViewAttributes.TitleAttribKey) + /// Get the value of the Route property + member this.Route = element.GetAttributeKeyed(ViewAttributes.RouteAttribKey) + /// Get the value of the Icon property + member this.Icon = element.GetAttributeKeyed(ViewAttributes.IconAttribKey) + /// Get the value of the FlyoutIcon property + member this.FlyoutIcon = element.GetAttributeKeyed(ViewAttributes.FlyoutIconAttribKey) + /// Get the value of the IsEnabled property + member this.IsEnabled = element.GetAttributeKeyed(ViewAttributes.IsEnabledAttribKey) + +/// Viewer that allows to read the properties of a ViewElement representing a GridItemsLayout +type GridItemsLayoutViewer(element: ViewElement) = + do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.GridItemsLayout' is expected, but '%s' was provided." element.TargetType.FullName + /// Get the value of the Span property + member this.Span = element.GetAttributeKeyed(ViewAttributes.SpanAttribKey) + +/// Viewer that allows to read the properties of a ViewElement representing a SearchHandler +type SearchHandlerViewer(element: ViewElement) = + do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.SearchHandler' is expected, but '%s' was provided." element.TargetType.FullName + /// Get the value of the ClearIcon property + member this.ClearIcon = element.GetAttributeKeyed(ViewAttributes.ClearIconAttribKey) + /// Get the value of the ClearIconHelpText property + member this.ClearIconHelpText = element.GetAttributeKeyed(ViewAttributes.ClearIconHelpTextAttribKey) + /// Get the value of the ClearIconName property + member this.ClearIconName = element.GetAttributeKeyed(ViewAttributes.ClearIconNameAttribKey) + /// Get the value of the ClearPlaceholderCommand property + member this.ClearPlaceholderCommand = element.GetAttributeKeyed(ViewAttributes.ClearPlaceholderCommandAttribKey) + /// Get the value of the ClearPlaceholderCommandParameter property + member this.ClearPlaceholderCommandParameter = element.GetAttributeKeyed(ViewAttributes.ClearPlaceholderCommandParameterAttribKey) + /// Get the value of the ClearPlaceholderEnabled property + member this.ClearPlaceholderEnabled = element.GetAttributeKeyed(ViewAttributes.ClearPlaceholderEnabledAttribKey) + /// Get the value of the ClearPlaceholderHelpText property + member this.ClearPlaceholderHelpText = element.GetAttributeKeyed(ViewAttributes.ClearPlaceholderHelpTextAttribKey) + /// Get the value of the ClearPlaceholderIcon property + member this.ClearPlaceholderIcon = element.GetAttributeKeyed(ViewAttributes.ClearPlaceholderIconAttribKey) + /// Get the value of the ClearPlaceholderName property + member this.ClearPlaceholderName = element.GetAttributeKeyed(ViewAttributes.ClearPlaceholderNameAttribKey) + /// Get the value of the Command property + member this.Command = element.GetAttributeKeyed(ViewAttributes.CommandAttribKey) + /// Get the value of the CommandParameter property + member this.CommandParameter = element.GetAttributeKeyed(ViewAttributes.CommandParameterAttribKey) + /// Get the value of the DisplayMemberName property + member this.DisplayMemberName = element.GetAttributeKeyed(ViewAttributes.DisplayMemberNameAttribKey) + /// Get the value of the IsSearchEnabled property + member this.IsSearchEnabled = element.GetAttributeKeyed(ViewAttributes.IsSearchEnabledAttribKey) + /// Get the value of the Placeholder property + member this.Placeholder = element.GetAttributeKeyed(ViewAttributes.PlaceholderAttribKey) + /// Get the value of the Query property + member this.Query = element.GetAttributeKeyed(ViewAttributes.QueryAttribKey) + /// Get the value of the QueryIcon property + member this.QueryIcon = element.GetAttributeKeyed(ViewAttributes.QueryIconAttribKey) + /// Get the value of the QueryIconHelpText property + member this.QueryIconHelpText = element.GetAttributeKeyed(ViewAttributes.QueryIconHelpTextAttribKey) + /// Get the value of the QueryIconName property + member this.QueryIconName = element.GetAttributeKeyed(ViewAttributes.QueryIconNameAttribKey) + /// Get the value of the SearchBoxVisibility property + member this.SearchBoxVisibility = element.GetAttributeKeyed(ViewAttributes.SearchBoxVisibilityAttribKey) + /// Get the value of the ShowsResults property + member this.ShowsResults = element.GetAttributeKeyed(ViewAttributes.ShowsResultsAttribKey) + type View() = /// Describes a Element in the view static member inline Element(?classId: string, @@ -13590,6 +14427,7 @@ type View() = ?verticalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, ?scrollTo: float * float * Fabulous.DynamicViews.AnimationKind, ?scrolled: Xamarin.Forms.ScrolledEventArgs -> unit, + ?layoutAreaOverride: Xamarin.Forms.Rectangle, ?isClippedToBounds: bool, ?padding: obj, ?horizontalOptions: Xamarin.Forms.LayoutOptions, @@ -13639,6 +14477,7 @@ type View() = ?verticalScrollBarVisibility=verticalScrollBarVisibility, ?scrollTo=scrollTo, ?scrolled=scrolled, + ?layoutAreaOverride=layoutAreaOverride, ?isClippedToBounds=isClippedToBounds, ?padding=padding, ?horizontalOptions=horizontalOptions, @@ -14190,6 +15029,7 @@ type View() = static member inline SwitchCell(?on: bool, ?text: string, ?onChanged: Xamarin.Forms.ToggledEventArgs -> unit, + ?onColor: Xamarin.Forms.Color, ?height: double, ?isEnabled: bool, ?classId: string, @@ -14201,6 +15041,7 @@ type View() = ViewBuilders.ConstructSwitchCell(?on=on, ?text=text, ?onChanged=onChanged, + ?onColor=onColor, ?height=height, ?isEnabled=isEnabled, ?classId=classId, @@ -15433,6 +16274,7 @@ type View() = ?autoSize: Xamarin.Forms.EditorAutoSizeOption, ?placeholder: string, ?placeholderColor: Xamarin.Forms.Color, + ?isTextPredictionEnabled: bool, ?keyboard: Xamarin.Forms.Keyboard, ?horizontalOptions: Xamarin.Forms.LayoutOptions, ?verticalOptions: Xamarin.Forms.LayoutOptions, @@ -15485,6 +16327,7 @@ type View() = ?autoSize=autoSize, ?placeholder=placeholder, ?placeholderColor=placeholderColor, + ?isTextPredictionEnabled=isTextPredictionEnabled, ?keyboard=keyboard, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, @@ -16870,6 +17713,9 @@ type View() = ?itemTapped: int -> unit, ?refreshing: unit -> unit, ?selectionMode: Xamarin.Forms.ListViewSelectionMode, + ?horizontalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, + ?verticalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, + ?refreshControlColor: Xamarin.Forms.Color, ?horizontalOptions: Xamarin.Forms.LayoutOptions, ?verticalOptions: Xamarin.Forms.LayoutOptions, ?margin: obj, @@ -16930,6 +17776,9 @@ type View() = ?itemTapped=itemTapped, ?refreshing=refreshing, ?selectionMode=selectionMode, + ?horizontalScrollBarVisibility=horizontalScrollBarVisibility, + ?verticalScrollBarVisibility=verticalScrollBarVisibility, + ?refreshControlColor=refreshControlColor, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, @@ -17090,6 +17939,90 @@ type View() = ?created=created, ?ref=ref) + /// Describes a BackButtonBehavior in the view + static member inline BackButtonBehavior(?textOverride: string, + ?command: unit -> unit, + ?commandParameter: System.Object, + ?iconOverride: string, + ?isEnabled: bool) = + + ViewBuilders.ConstructBackButtonBehavior(?textOverride=textOverride, + ?command=command, + ?commandParameter=commandParameter, + ?iconOverride=iconOverride, + ?isEnabled=isEnabled) + + /// Describes a BaseShellItem in the view + static member inline BaseShellItem(?title: string, + ?route: string, + ?icon: string, + ?flyoutIcon: string, + ?isEnabled: bool, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.BaseShellItem -> unit), + ?ref: ViewRef) = + + ViewBuilders.ConstructBaseShellItem(?title=title, + ?route=route, + ?icon=icon, + ?flyoutIcon=flyoutIcon, + ?isEnabled=isEnabled, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=created, + ?ref=ref) + + /// Describes a GridItemsLayout in the view + static member inline GridItemsLayout(?span: int) = + + ViewBuilders.ConstructGridItemsLayout(?span=span) + + /// Describes a SearchHandler in the view + static member inline SearchHandler(?clearIcon: string, + ?clearIconHelpText: string, + ?clearIconName: string, + ?clearPlaceholderCommand: unit -> unit, + ?clearPlaceholderCommandParameter: System.Object, + ?clearPlaceholderEnabled: bool, + ?clearPlaceholderHelpText: string, + ?clearPlaceholderIcon: string, + ?clearPlaceholderName: string, + ?command: unit -> unit, + ?commandParameter: System.Object, + ?displayMemberName: string, + ?isSearchEnabled: bool, + ?placeholder: string, + ?query: string, + ?queryIcon: string, + ?queryIconHelpText: string, + ?queryIconName: string, + ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, + ?showsResults: bool) = + + ViewBuilders.ConstructSearchHandler(?clearIcon=clearIcon, + ?clearIconHelpText=clearIconHelpText, + ?clearIconName=clearIconName, + ?clearPlaceholderCommand=clearPlaceholderCommand, + ?clearPlaceholderCommandParameter=clearPlaceholderCommandParameter, + ?clearPlaceholderEnabled=clearPlaceholderEnabled, + ?clearPlaceholderHelpText=clearPlaceholderHelpText, + ?clearPlaceholderIcon=clearPlaceholderIcon, + ?clearPlaceholderName=clearPlaceholderName, + ?command=command, + ?commandParameter=commandParameter, + ?displayMemberName=displayMemberName, + ?isSearchEnabled=isSearchEnabled, + ?placeholder=placeholder, + ?query=query, + ?queryIcon=queryIcon, + ?queryIconHelpText=queryIconHelpText, + ?queryIconName=queryIconName, + ?searchBoxVisibility=searchBoxVisibility, + ?showsResults=showsResults) + [] module ViewElementExtensions = @@ -17279,6 +18212,9 @@ module ViewElementExtensions = /// Adjusts the Scrolled property in the visual element member x.Scrolled(value: Xamarin.Forms.ScrolledEventArgs -> unit) = x.WithAttribute(ViewAttributes.ScrolledAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) + /// Adjusts the LayoutAreaOverride property in the visual element + member x.LayoutAreaOverride(value: Xamarin.Forms.Rectangle) = x.WithAttribute(ViewAttributes.LayoutAreaOverrideAttribKey, (value)) + /// Adjusts the CancelButtonColor property in the visual element member x.CancelButtonColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.CancelButtonColorAttribKey, (value)) @@ -17537,15 +18473,15 @@ module ViewElementExtensions = /// Adjusts the AutoSize property in the visual element member x.AutoSize(value: Xamarin.Forms.EditorAutoSizeOption) = x.WithAttribute(ViewAttributes.AutoSizeAttribKey, (value)) + /// Adjusts the IsTextPredictionEnabled property in the visual element + member x.IsTextPredictionEnabled(value: bool) = x.WithAttribute(ViewAttributes.IsTextPredictionEnabledAttribKey, (value)) + /// Adjusts the IsPassword property in the visual element member x.IsPassword(value: bool) = x.WithAttribute(ViewAttributes.IsPasswordAttribKey, (value)) /// Adjusts the EntryCompleted property in the visual element member x.EntryCompleted(value: string -> unit) = x.WithAttribute(ViewAttributes.EntryCompletedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (sender :?> Xamarin.Forms.Entry).Text))(value)) - /// Adjusts the IsTextPredictionEnabled property in the visual element - member x.IsTextPredictionEnabled(value: bool) = x.WithAttribute(ViewAttributes.IsTextPredictionEnabledAttribKey, (value)) - /// Adjusts the ReturnType property in the visual element member x.ReturnType(value: Xamarin.Forms.ReturnType) = x.WithAttribute(ViewAttributes.ReturnTypeAttribKey, (value)) @@ -17780,6 +18716,9 @@ module ViewElementExtensions = /// Adjusts the SelectionMode property in the visual element member x.SelectionMode(value: Xamarin.Forms.ListViewSelectionMode) = x.WithAttribute(ViewAttributes.SelectionModeAttribKey, (value)) + /// Adjusts the RefreshControlColor property in the visual element + member x.RefreshControlColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.RefreshControlColorAttribKey, (value)) + /// Adjusts the ListViewGrouped_ItemsSource property in the visual element member x.ListViewGrouped_ItemsSource(value: (string * ViewElement * ViewElement list) list) = x.WithAttribute(ViewAttributes.ListViewGrouped_ItemsSourceAttribKey, (fun es -> es |> Array.ofList |> Array.map (fun (g, e, l) -> (g, e, Array.ofList l)))(value)) @@ -17810,6 +18749,72 @@ module ViewElementExtensions = /// Adjusts the Refreshing property in the visual element member x.Refreshing(value: unit -> unit) = x.WithAttribute(ViewAttributes.RefreshingAttribKey, (fun f -> System.EventHandler(fun sender args -> f ()))(value)) + /// Adjusts the TextOverride property in the visual element + member x.TextOverride(value: string) = x.WithAttribute(ViewAttributes.TextOverrideAttribKey, (value)) + + /// Adjusts the IconOverride property in the visual element + member x.IconOverride(value: string) = x.WithAttribute(ViewAttributes.IconOverrideAttribKey, (value)) + + /// Adjusts the Route property in the visual element + member x.Route(value: string) = x.WithAttribute(ViewAttributes.RouteAttribKey, (value)) + + /// Adjusts the FlyoutIcon property in the visual element + member x.FlyoutIcon(value: string) = x.WithAttribute(ViewAttributes.FlyoutIconAttribKey, (value)) + + /// Adjusts the Span property in the visual element + member x.Span(value: int) = x.WithAttribute(ViewAttributes.SpanAttribKey, (value)) + + /// Adjusts the ClearIcon property in the visual element + member x.ClearIcon(value: string) = x.WithAttribute(ViewAttributes.ClearIconAttribKey, (value)) + + /// Adjusts the ClearIconHelpText property in the visual element + member x.ClearIconHelpText(value: string) = x.WithAttribute(ViewAttributes.ClearIconHelpTextAttribKey, (value)) + + /// Adjusts the ClearIconName property in the visual element + member x.ClearIconName(value: string) = x.WithAttribute(ViewAttributes.ClearIconNameAttribKey, (value)) + + /// Adjusts the ClearPlaceholderCommand property in the visual element + member x.ClearPlaceholderCommand(value: unit -> unit) = x.WithAttribute(ViewAttributes.ClearPlaceholderCommandAttribKey, makeCommand(value)) + + /// Adjusts the ClearPlaceholderCommandParameter property in the visual element + member x.ClearPlaceholderCommandParameter(value: System.Object) = x.WithAttribute(ViewAttributes.ClearPlaceholderCommandParameterAttribKey, (value)) + + /// Adjusts the ClearPlaceholderEnabled property in the visual element + member x.ClearPlaceholderEnabled(value: bool) = x.WithAttribute(ViewAttributes.ClearPlaceholderEnabledAttribKey, (value)) + + /// Adjusts the ClearPlaceholderHelpText property in the visual element + member x.ClearPlaceholderHelpText(value: string) = x.WithAttribute(ViewAttributes.ClearPlaceholderHelpTextAttribKey, (value)) + + /// Adjusts the ClearPlaceholderIcon property in the visual element + member x.ClearPlaceholderIcon(value: string) = x.WithAttribute(ViewAttributes.ClearPlaceholderIconAttribKey, (value)) + + /// Adjusts the ClearPlaceholderName property in the visual element + member x.ClearPlaceholderName(value: string) = x.WithAttribute(ViewAttributes.ClearPlaceholderNameAttribKey, (value)) + + /// Adjusts the DisplayMemberName property in the visual element + member x.DisplayMemberName(value: string) = x.WithAttribute(ViewAttributes.DisplayMemberNameAttribKey, (value)) + + /// Adjusts the IsSearchEnabled property in the visual element + member x.IsSearchEnabled(value: bool) = x.WithAttribute(ViewAttributes.IsSearchEnabledAttribKey, (value)) + + /// Adjusts the Query property in the visual element + member x.Query(value: string) = x.WithAttribute(ViewAttributes.QueryAttribKey, (value)) + + /// Adjusts the QueryIcon property in the visual element + member x.QueryIcon(value: string) = x.WithAttribute(ViewAttributes.QueryIconAttribKey, (value)) + + /// Adjusts the QueryIconHelpText property in the visual element + member x.QueryIconHelpText(value: string) = x.WithAttribute(ViewAttributes.QueryIconHelpTextAttribKey, (value)) + + /// Adjusts the QueryIconName property in the visual element + member x.QueryIconName(value: string) = x.WithAttribute(ViewAttributes.QueryIconNameAttribKey, (value)) + + /// Adjusts the SearchBoxVisibility property in the visual element + member x.SearchBoxVisibility(value: Xamarin.Forms.SearchBoxVisiblity) = x.WithAttribute(ViewAttributes.SearchBoxVisibilityAttribKey, (value)) + + /// Adjusts the ShowsResults property in the visual element + member x.ShowsResults(value: bool) = x.WithAttribute(ViewAttributes.ShowsResultsAttribKey, (value)) + member x.With(?classId: string, ?styleId: string, ?automationId: string, ?anchorX: double, ?anchorY: double, ?backgroundColor: Xamarin.Forms.Color, ?heightRequest: double, ?inputTransparent: bool, ?isEnabled: bool, ?isVisible: bool, ?minimumHeightRequest: double, ?minimumWidthRequest: double, ?opacity: double, ?rotation: double, ?rotationX: double, @@ -17822,42 +18827,47 @@ module ViewElementExtensions = ?pinchUpdated: Xamarin.Forms.PinchGestureUpdatedEventArgs -> unit, ?swipeGestureRecognizerDirection: Xamarin.Forms.SwipeDirection, ?threshold: System.UInt32, ?swiped: Xamarin.Forms.SwipedEventArgs -> unit, ?color: Xamarin.Forms.Color, ?isRunning: bool, ?boxViewCornerRadius: Xamarin.Forms.CornerRadius, ?progress: double, ?isClippedToBounds: bool, ?padding: obj, ?content: ViewElement, ?scrollOrientation: Xamarin.Forms.ScrollOrientation, ?horizontalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, ?verticalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, ?scrollTo: float * float * Fabulous.DynamicViews.AnimationKind, - ?scrolled: Xamarin.Forms.ScrolledEventArgs -> unit, ?cancelButtonColor: Xamarin.Forms.Color, ?fontFamily: string, ?fontAttributes: Xamarin.Forms.FontAttributes, ?fontSize: obj, - ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, ?placeholder: string, ?placeholderColor: Xamarin.Forms.Color, ?searchBarCommand: string -> unit, ?searchBarCanExecute: bool, - ?text: string, ?textColor: Xamarin.Forms.Color, ?searchBarTextChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?buttonCommand: unit -> unit, ?buttonCanExecute: bool, - ?borderColor: Xamarin.Forms.Color, ?borderWidth: double, ?commandParameter: System.Object, ?contentLayout: Xamarin.Forms.Button.ButtonContentLayout, ?buttonCornerRadius: int, - ?buttonImageSource: string, ?minimumMaximum: float * float, ?value: double, ?valueChanged: Xamarin.Forms.ValueChangedEventArgs -> unit, ?increment: double, - ?isToggled: bool, ?toggled: Xamarin.Forms.ToggledEventArgs -> unit, ?onColor: Xamarin.Forms.Color, ?height: double, ?on: bool, - ?onChanged: Xamarin.Forms.ToggledEventArgs -> unit, ?intent: Xamarin.Forms.TableIntent, ?hasUnevenRows: bool, ?rowHeight: int, ?tableRoot: (string * ViewElement list) list, - ?rowDefinitionHeight: obj, ?columnDefinitionWidth: obj, ?gridRowDefinitions: obj list, ?gridColumnDefinitions: obj list, ?rowSpacing: double, - ?columnSpacing: double, ?children: ViewElement list, ?gridRow: int, ?gridRowSpan: int, ?gridColumn: int, - ?gridColumnSpan: int, ?layoutBounds: Xamarin.Forms.Rectangle, ?layoutFlags: Xamarin.Forms.AbsoluteLayoutFlags, ?boundsConstraint: Xamarin.Forms.BoundsConstraint, ?heightConstraint: Xamarin.Forms.Constraint, - ?widthConstraint: Xamarin.Forms.Constraint, ?xConstraint: Xamarin.Forms.Constraint, ?yConstraint: Xamarin.Forms.Constraint, ?alignContent: Xamarin.Forms.FlexAlignContent, ?alignItems: Xamarin.Forms.FlexAlignItems, - ?flexLayoutDirection: Xamarin.Forms.FlexDirection, ?position: Xamarin.Forms.FlexPosition, ?wrap: Xamarin.Forms.FlexWrap, ?justifyContent: Xamarin.Forms.FlexJustify, ?flexAlignSelf: Xamarin.Forms.FlexAlignSelf, - ?flexOrder: int, ?flexBasis: Xamarin.Forms.FlexBasis, ?flexGrow: double, ?flexShrink: double, ?date: System.DateTime, - ?format: string, ?minimumDate: System.DateTime, ?maximumDate: System.DateTime, ?dateSelected: Xamarin.Forms.DateChangedEventArgs -> unit, ?pickerItemsSource: seq<'T>, - ?selectedIndex: int, ?title: string, ?selectedIndexChanged: (int * 'T option) -> unit, ?frameCornerRadius: double, ?hasShadow: bool, - ?imageSource: obj, ?aspect: Xamarin.Forms.Aspect, ?isOpaque: bool, ?imageButtonCommand: unit -> unit, ?imageButtonCornerRadius: int, - ?clicked: System.EventArgs -> unit, ?pressed: System.EventArgs -> unit, ?released: System.EventArgs -> unit, ?keyboard: Xamarin.Forms.Keyboard, ?editorCompleted: string -> unit, - ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?autoSize: Xamarin.Forms.EditorAutoSizeOption, ?isPassword: bool, ?entryCompleted: string -> unit, ?isTextPredictionEnabled: bool, - ?returnType: Xamarin.Forms.ReturnType, ?returnCommand: unit -> unit, ?cursorPosition: int, ?selectionLength: int, ?label: string, - ?entryCellTextChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?verticalTextAlignment: Xamarin.Forms.TextAlignment, ?formattedText: ViewElement, ?lineBreakMode: Xamarin.Forms.LineBreakMode, ?lineHeight: double, - ?maxLines: int, ?textDecorations: Xamarin.Forms.TextDecorations, ?stackOrientation: Xamarin.Forms.StackOrientation, ?spacing: double, ?foregroundColor: Xamarin.Forms.Color, - ?propertyChanged: System.ComponentModel.PropertyChangedEventArgs -> unit, ?spans: ViewElement[], ?time: System.TimeSpan, ?webSource: Xamarin.Forms.WebViewSource, ?reload: bool, - ?navigated: Xamarin.Forms.WebNavigatedEventArgs -> unit, ?navigating: Xamarin.Forms.WebNavigatingEventArgs -> unit, ?reloadRequested: System.EventArgs -> unit, ?backgroundImage: string, ?icon: string, - ?isBusy: bool, ?toolbarItems: ViewElement list, ?useSafeArea: bool, ?page_Appearing: unit -> unit, ?page_Disappearing: unit -> unit, - ?page_LayoutChanged: unit -> unit, ?carouselPage_CurrentPage: int, ?carouselPage_CurrentPageChanged: int option -> unit, ?pages: ViewElement list, ?backButtonTitle: string, - ?hasBackButton: bool, ?hasNavigationBar: bool, ?titleIcon: string, ?titleView: ViewElement, ?barBackgroundColor: Xamarin.Forms.Color, - ?barTextColor: Xamarin.Forms.Color, ?popped: Xamarin.Forms.NavigationEventArgs -> unit, ?poppedToRoot: Xamarin.Forms.NavigationEventArgs -> unit, ?pushed: Xamarin.Forms.NavigationEventArgs -> unit, ?tabbedPage_CurrentPage: int, - ?tabbedPage_CurrentPageChanged: int option -> unit, ?onSizeAllocatedCallback: (double * double) -> unit, ?master: ViewElement, ?detail: ViewElement, ?isGestureEnabled: bool, - ?isPresented: bool, ?masterBehavior: Xamarin.Forms.MasterBehavior, ?isPresentedChanged: bool -> unit, ?accelerator: string, ?textDetail: string, - ?textDetailColor: Xamarin.Forms.Color, ?textCellCommand: unit -> unit, ?textCellCanExecute: bool, ?order: Xamarin.Forms.ToolbarItemOrder, ?priority: int, - ?view: ViewElement, ?listViewItems: seq, ?footer: System.Object, ?header: System.Object, ?headerTemplate: Xamarin.Forms.DataTemplate, - ?isGroupingEnabled: bool, ?isPullToRefreshEnabled: bool, ?isRefreshing: bool, ?refreshCommand: unit -> unit, ?listView_SelectedItem: int option, - ?listView_SeparatorVisibility: Xamarin.Forms.SeparatorVisibility, ?listView_SeparatorColor: Xamarin.Forms.Color, ?listView_ItemAppearing: int -> unit, ?listView_ItemDisappearing: int -> unit, ?listView_ItemSelected: int option -> unit, - ?listView_ItemTapped: int -> unit, ?listView_Refreshing: unit -> unit, ?selectionMode: Xamarin.Forms.ListViewSelectionMode, ?listViewGrouped_ItemsSource: (string * ViewElement * ViewElement list) list, ?listViewGrouped_ShowJumpList: bool, - ?listViewGrouped_SelectedItem: (int * int) option, ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, ?separatorColor: Xamarin.Forms.Color, ?listViewGrouped_ItemAppearing: int * int option -> unit, ?listViewGrouped_ItemDisappearing: int * int option -> unit, - ?listViewGrouped_ItemSelected: (int * int) option -> unit, ?listViewGrouped_ItemTapped: int * int -> unit, ?refreshing: unit -> unit) = + ?scrolled: Xamarin.Forms.ScrolledEventArgs -> unit, ?layoutAreaOverride: Xamarin.Forms.Rectangle, ?cancelButtonColor: Xamarin.Forms.Color, ?fontFamily: string, ?fontAttributes: Xamarin.Forms.FontAttributes, + ?fontSize: obj, ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, ?placeholder: string, ?placeholderColor: Xamarin.Forms.Color, ?searchBarCommand: string -> unit, + ?searchBarCanExecute: bool, ?text: string, ?textColor: Xamarin.Forms.Color, ?searchBarTextChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?buttonCommand: unit -> unit, + ?buttonCanExecute: bool, ?borderColor: Xamarin.Forms.Color, ?borderWidth: double, ?commandParameter: System.Object, ?contentLayout: Xamarin.Forms.Button.ButtonContentLayout, + ?buttonCornerRadius: int, ?buttonImageSource: string, ?minimumMaximum: float * float, ?value: double, ?valueChanged: Xamarin.Forms.ValueChangedEventArgs -> unit, + ?increment: double, ?isToggled: bool, ?toggled: Xamarin.Forms.ToggledEventArgs -> unit, ?onColor: Xamarin.Forms.Color, ?height: double, + ?on: bool, ?onChanged: Xamarin.Forms.ToggledEventArgs -> unit, ?intent: Xamarin.Forms.TableIntent, ?hasUnevenRows: bool, ?rowHeight: int, + ?tableRoot: (string * ViewElement list) list, ?rowDefinitionHeight: obj, ?columnDefinitionWidth: obj, ?gridRowDefinitions: obj list, ?gridColumnDefinitions: obj list, + ?rowSpacing: double, ?columnSpacing: double, ?children: ViewElement list, ?gridRow: int, ?gridRowSpan: int, + ?gridColumn: int, ?gridColumnSpan: int, ?layoutBounds: Xamarin.Forms.Rectangle, ?layoutFlags: Xamarin.Forms.AbsoluteLayoutFlags, ?boundsConstraint: Xamarin.Forms.BoundsConstraint, + ?heightConstraint: Xamarin.Forms.Constraint, ?widthConstraint: Xamarin.Forms.Constraint, ?xConstraint: Xamarin.Forms.Constraint, ?yConstraint: Xamarin.Forms.Constraint, ?alignContent: Xamarin.Forms.FlexAlignContent, + ?alignItems: Xamarin.Forms.FlexAlignItems, ?flexLayoutDirection: Xamarin.Forms.FlexDirection, ?position: Xamarin.Forms.FlexPosition, ?wrap: Xamarin.Forms.FlexWrap, ?justifyContent: Xamarin.Forms.FlexJustify, + ?flexAlignSelf: Xamarin.Forms.FlexAlignSelf, ?flexOrder: int, ?flexBasis: Xamarin.Forms.FlexBasis, ?flexGrow: double, ?flexShrink: double, + ?date: System.DateTime, ?format: string, ?minimumDate: System.DateTime, ?maximumDate: System.DateTime, ?dateSelected: Xamarin.Forms.DateChangedEventArgs -> unit, + ?pickerItemsSource: seq<'T>, ?selectedIndex: int, ?title: string, ?selectedIndexChanged: (int * 'T option) -> unit, ?frameCornerRadius: double, + ?hasShadow: bool, ?imageSource: obj, ?aspect: Xamarin.Forms.Aspect, ?isOpaque: bool, ?imageButtonCommand: unit -> unit, + ?imageButtonCornerRadius: int, ?clicked: System.EventArgs -> unit, ?pressed: System.EventArgs -> unit, ?released: System.EventArgs -> unit, ?keyboard: Xamarin.Forms.Keyboard, + ?editorCompleted: string -> unit, ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?autoSize: Xamarin.Forms.EditorAutoSizeOption, ?isTextPredictionEnabled: bool, ?isPassword: bool, + ?entryCompleted: string -> unit, ?returnType: Xamarin.Forms.ReturnType, ?returnCommand: unit -> unit, ?cursorPosition: int, ?selectionLength: int, + ?label: string, ?entryCellTextChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?verticalTextAlignment: Xamarin.Forms.TextAlignment, ?formattedText: ViewElement, ?lineBreakMode: Xamarin.Forms.LineBreakMode, + ?lineHeight: double, ?maxLines: int, ?textDecorations: Xamarin.Forms.TextDecorations, ?stackOrientation: Xamarin.Forms.StackOrientation, ?spacing: double, + ?foregroundColor: Xamarin.Forms.Color, ?propertyChanged: System.ComponentModel.PropertyChangedEventArgs -> unit, ?spans: ViewElement[], ?time: System.TimeSpan, ?webSource: Xamarin.Forms.WebViewSource, + ?reload: bool, ?navigated: Xamarin.Forms.WebNavigatedEventArgs -> unit, ?navigating: Xamarin.Forms.WebNavigatingEventArgs -> unit, ?reloadRequested: System.EventArgs -> unit, ?backgroundImage: string, + ?icon: string, ?isBusy: bool, ?toolbarItems: ViewElement list, ?useSafeArea: bool, ?page_Appearing: unit -> unit, + ?page_Disappearing: unit -> unit, ?page_LayoutChanged: unit -> unit, ?carouselPage_CurrentPage: int, ?carouselPage_CurrentPageChanged: int option -> unit, ?pages: ViewElement list, + ?backButtonTitle: string, ?hasBackButton: bool, ?hasNavigationBar: bool, ?titleIcon: string, ?titleView: ViewElement, + ?barBackgroundColor: Xamarin.Forms.Color, ?barTextColor: Xamarin.Forms.Color, ?popped: Xamarin.Forms.NavigationEventArgs -> unit, ?poppedToRoot: Xamarin.Forms.NavigationEventArgs -> unit, ?pushed: Xamarin.Forms.NavigationEventArgs -> unit, + ?tabbedPage_CurrentPage: int, ?tabbedPage_CurrentPageChanged: int option -> unit, ?onSizeAllocatedCallback: (double * double) -> unit, ?master: ViewElement, ?detail: ViewElement, + ?isGestureEnabled: bool, ?isPresented: bool, ?masterBehavior: Xamarin.Forms.MasterBehavior, ?isPresentedChanged: bool -> unit, ?accelerator: string, + ?textDetail: string, ?textDetailColor: Xamarin.Forms.Color, ?textCellCommand: unit -> unit, ?textCellCanExecute: bool, ?order: Xamarin.Forms.ToolbarItemOrder, + ?priority: int, ?view: ViewElement, ?listViewItems: seq, ?footer: System.Object, ?header: System.Object, + ?headerTemplate: Xamarin.Forms.DataTemplate, ?isGroupingEnabled: bool, ?isPullToRefreshEnabled: bool, ?isRefreshing: bool, ?refreshCommand: unit -> unit, + ?listView_SelectedItem: int option, ?listView_SeparatorVisibility: Xamarin.Forms.SeparatorVisibility, ?listView_SeparatorColor: Xamarin.Forms.Color, ?listView_ItemAppearing: int -> unit, ?listView_ItemDisappearing: int -> unit, + ?listView_ItemSelected: int option -> unit, ?listView_ItemTapped: int -> unit, ?listView_Refreshing: unit -> unit, ?selectionMode: Xamarin.Forms.ListViewSelectionMode, ?refreshControlColor: Xamarin.Forms.Color, + ?listViewGrouped_ItemsSource: (string * ViewElement * ViewElement list) list, ?listViewGrouped_ShowJumpList: bool, ?listViewGrouped_SelectedItem: (int * int) option, ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, ?separatorColor: Xamarin.Forms.Color, + ?listViewGrouped_ItemAppearing: int * int option -> unit, ?listViewGrouped_ItemDisappearing: int * int option -> unit, ?listViewGrouped_ItemSelected: (int * int) option -> unit, ?listViewGrouped_ItemTapped: int * int -> unit, ?refreshing: unit -> unit, + ?textOverride: string, ?iconOverride: string, ?route: string, ?flyoutIcon: string, ?span: int, + ?clearIcon: string, ?clearIconHelpText: string, ?clearIconName: string, ?clearPlaceholderCommand: unit -> unit, ?clearPlaceholderCommandParameter: System.Object, + ?clearPlaceholderEnabled: bool, ?clearPlaceholderHelpText: string, ?clearPlaceholderIcon: string, ?clearPlaceholderName: string, ?displayMemberName: string, + ?isSearchEnabled: bool, ?query: string, ?queryIcon: string, ?queryIconHelpText: string, ?queryIconName: string, + ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool) = let x = match classId with None -> x | Some opt -> x.ClassId(opt) let x = match styleId with None -> x | Some opt -> x.StyleId(opt) let x = match automationId with None -> x | Some opt -> x.AutomationId(opt) @@ -17919,6 +18929,7 @@ module ViewElementExtensions = let x = match verticalScrollBarVisibility with None -> x | Some opt -> x.VerticalScrollBarVisibility(opt) let x = match scrollTo with None -> x | Some opt -> x.ScrollTo(opt) let x = match scrolled with None -> x | Some opt -> x.Scrolled(opt) + let x = match layoutAreaOverride with None -> x | Some opt -> x.LayoutAreaOverride(opt) let x = match cancelButtonColor with None -> x | Some opt -> x.CancelButtonColor(opt) let x = match fontFamily with None -> x | Some opt -> x.FontFamily(opt) let x = match fontAttributes with None -> x | Some opt -> x.FontAttributes(opt) @@ -18005,9 +19016,9 @@ module ViewElementExtensions = let x = match editorCompleted with None -> x | Some opt -> x.EditorCompleted(opt) let x = match textChanged with None -> x | Some opt -> x.TextChanged(opt) let x = match autoSize with None -> x | Some opt -> x.AutoSize(opt) + let x = match isTextPredictionEnabled with None -> x | Some opt -> x.IsTextPredictionEnabled(opt) let x = match isPassword with None -> x | Some opt -> x.IsPassword(opt) let x = match entryCompleted with None -> x | Some opt -> x.EntryCompleted(opt) - let x = match isTextPredictionEnabled with None -> x | Some opt -> x.IsTextPredictionEnabled(opt) let x = match returnType with None -> x | Some opt -> x.ReturnType(opt) let x = match returnCommand with None -> x | Some opt -> x.ReturnCommand(opt) let x = match cursorPosition with None -> x | Some opt -> x.CursorPosition(opt) @@ -18086,6 +19097,7 @@ module ViewElementExtensions = let x = match listView_ItemTapped with None -> x | Some opt -> x.ListView_ItemTapped(opt) let x = match listView_Refreshing with None -> x | Some opt -> x.ListView_Refreshing(opt) let x = match selectionMode with None -> x | Some opt -> x.SelectionMode(opt) + let x = match refreshControlColor with None -> x | Some opt -> x.RefreshControlColor(opt) let x = match listViewGrouped_ItemsSource with None -> x | Some opt -> x.ListViewGrouped_ItemsSource(opt) let x = match listViewGrouped_ShowJumpList with None -> x | Some opt -> x.ListViewGrouped_ShowJumpList(opt) let x = match listViewGrouped_SelectedItem with None -> x | Some opt -> x.ListViewGrouped_SelectedItem(opt) @@ -18096,6 +19108,28 @@ module ViewElementExtensions = let x = match listViewGrouped_ItemSelected with None -> x | Some opt -> x.ListViewGrouped_ItemSelected(opt) let x = match listViewGrouped_ItemTapped with None -> x | Some opt -> x.ListViewGrouped_ItemTapped(opt) let x = match refreshing with None -> x | Some opt -> x.Refreshing(opt) + let x = match textOverride with None -> x | Some opt -> x.TextOverride(opt) + let x = match iconOverride with None -> x | Some opt -> x.IconOverride(opt) + let x = match route with None -> x | Some opt -> x.Route(opt) + let x = match flyoutIcon with None -> x | Some opt -> x.FlyoutIcon(opt) + let x = match span with None -> x | Some opt -> x.Span(opt) + let x = match clearIcon with None -> x | Some opt -> x.ClearIcon(opt) + let x = match clearIconHelpText with None -> x | Some opt -> x.ClearIconHelpText(opt) + let x = match clearIconName with None -> x | Some opt -> x.ClearIconName(opt) + let x = match clearPlaceholderCommand with None -> x | Some opt -> x.ClearPlaceholderCommand(opt) + let x = match clearPlaceholderCommandParameter with None -> x | Some opt -> x.ClearPlaceholderCommandParameter(opt) + let x = match clearPlaceholderEnabled with None -> x | Some opt -> x.ClearPlaceholderEnabled(opt) + let x = match clearPlaceholderHelpText with None -> x | Some opt -> x.ClearPlaceholderHelpText(opt) + let x = match clearPlaceholderIcon with None -> x | Some opt -> x.ClearPlaceholderIcon(opt) + let x = match clearPlaceholderName with None -> x | Some opt -> x.ClearPlaceholderName(opt) + let x = match displayMemberName with None -> x | Some opt -> x.DisplayMemberName(opt) + let x = match isSearchEnabled with None -> x | Some opt -> x.IsSearchEnabled(opt) + let x = match query with None -> x | Some opt -> x.Query(opt) + let x = match queryIcon with None -> x | Some opt -> x.QueryIcon(opt) + let x = match queryIconHelpText with None -> x | Some opt -> x.QueryIconHelpText(opt) + let x = match queryIconName with None -> x | Some opt -> x.QueryIconName(opt) + let x = match searchBoxVisibility with None -> x | Some opt -> x.SearchBoxVisibility(opt) + let x = match showsResults with None -> x | Some opt -> x.ShowsResults(opt) x /// Adjusts the ClassId property in the visual element @@ -18220,6 +19254,8 @@ module ViewElementExtensions = let scrollTo (value: float * float * Fabulous.DynamicViews.AnimationKind) (x: ViewElement) = x.ScrollTo(value) /// Adjusts the Scrolled property in the visual element let scrolled (value: Xamarin.Forms.ScrolledEventArgs -> unit) (x: ViewElement) = x.Scrolled(value) + /// Adjusts the LayoutAreaOverride property in the visual element + let layoutAreaOverride (value: Xamarin.Forms.Rectangle) (x: ViewElement) = x.LayoutAreaOverride(value) /// Adjusts the CancelButtonColor property in the visual element let cancelButtonColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.CancelButtonColor(value) /// Adjusts the FontFamily property in the visual element @@ -18392,12 +19428,12 @@ module ViewElementExtensions = let textChanged (value: Xamarin.Forms.TextChangedEventArgs -> unit) (x: ViewElement) = x.TextChanged(value) /// Adjusts the AutoSize property in the visual element let autoSize (value: Xamarin.Forms.EditorAutoSizeOption) (x: ViewElement) = x.AutoSize(value) + /// Adjusts the IsTextPredictionEnabled property in the visual element + let isTextPredictionEnabled (value: bool) (x: ViewElement) = x.IsTextPredictionEnabled(value) /// Adjusts the IsPassword property in the visual element let isPassword (value: bool) (x: ViewElement) = x.IsPassword(value) /// Adjusts the EntryCompleted property in the visual element let entryCompleted (value: string -> unit) (x: ViewElement) = x.EntryCompleted(value) - /// Adjusts the IsTextPredictionEnabled property in the visual element - let isTextPredictionEnabled (value: bool) (x: ViewElement) = x.IsTextPredictionEnabled(value) /// Adjusts the ReturnType property in the visual element let returnType (value: Xamarin.Forms.ReturnType) (x: ViewElement) = x.ReturnType(value) /// Adjusts the ReturnCommand property in the visual element @@ -18554,6 +19590,8 @@ module ViewElementExtensions = let listView_Refreshing (value: unit -> unit) (x: ViewElement) = x.ListView_Refreshing(value) /// Adjusts the SelectionMode property in the visual element let selectionMode (value: Xamarin.Forms.ListViewSelectionMode) (x: ViewElement) = x.SelectionMode(value) + /// Adjusts the RefreshControlColor property in the visual element + let refreshControlColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.RefreshControlColor(value) /// Adjusts the ListViewGrouped_ItemsSource property in the visual element let listViewGrouped_ItemsSource (value: (string * ViewElement * ViewElement list) list) (x: ViewElement) = x.ListViewGrouped_ItemsSource(value) /// Adjusts the ListViewGrouped_ShowJumpList property in the visual element @@ -18574,3 +19612,47 @@ module ViewElementExtensions = let listViewGrouped_ItemTapped (value: int * int -> unit) (x: ViewElement) = x.ListViewGrouped_ItemTapped(value) /// Adjusts the Refreshing property in the visual element let refreshing (value: unit -> unit) (x: ViewElement) = x.Refreshing(value) + /// Adjusts the TextOverride property in the visual element + let textOverride (value: string) (x: ViewElement) = x.TextOverride(value) + /// Adjusts the IconOverride property in the visual element + let iconOverride (value: string) (x: ViewElement) = x.IconOverride(value) + /// Adjusts the Route property in the visual element + let route (value: string) (x: ViewElement) = x.Route(value) + /// Adjusts the FlyoutIcon property in the visual element + let flyoutIcon (value: string) (x: ViewElement) = x.FlyoutIcon(value) + /// Adjusts the Span property in the visual element + let span (value: int) (x: ViewElement) = x.Span(value) + /// Adjusts the ClearIcon property in the visual element + let clearIcon (value: string) (x: ViewElement) = x.ClearIcon(value) + /// Adjusts the ClearIconHelpText property in the visual element + let clearIconHelpText (value: string) (x: ViewElement) = x.ClearIconHelpText(value) + /// Adjusts the ClearIconName property in the visual element + let clearIconName (value: string) (x: ViewElement) = x.ClearIconName(value) + /// Adjusts the ClearPlaceholderCommand property in the visual element + let clearPlaceholderCommand (value: unit -> unit) (x: ViewElement) = x.ClearPlaceholderCommand(value) + /// Adjusts the ClearPlaceholderCommandParameter property in the visual element + let clearPlaceholderCommandParameter (value: System.Object) (x: ViewElement) = x.ClearPlaceholderCommandParameter(value) + /// Adjusts the ClearPlaceholderEnabled property in the visual element + let clearPlaceholderEnabled (value: bool) (x: ViewElement) = x.ClearPlaceholderEnabled(value) + /// Adjusts the ClearPlaceholderHelpText property in the visual element + let clearPlaceholderHelpText (value: string) (x: ViewElement) = x.ClearPlaceholderHelpText(value) + /// Adjusts the ClearPlaceholderIcon property in the visual element + let clearPlaceholderIcon (value: string) (x: ViewElement) = x.ClearPlaceholderIcon(value) + /// Adjusts the ClearPlaceholderName property in the visual element + let clearPlaceholderName (value: string) (x: ViewElement) = x.ClearPlaceholderName(value) + /// Adjusts the DisplayMemberName property in the visual element + let displayMemberName (value: string) (x: ViewElement) = x.DisplayMemberName(value) + /// Adjusts the IsSearchEnabled property in the visual element + let isSearchEnabled (value: bool) (x: ViewElement) = x.IsSearchEnabled(value) + /// Adjusts the Query property in the visual element + let query (value: string) (x: ViewElement) = x.Query(value) + /// Adjusts the QueryIcon property in the visual element + let queryIcon (value: string) (x: ViewElement) = x.QueryIcon(value) + /// Adjusts the QueryIconHelpText property in the visual element + let queryIconHelpText (value: string) (x: ViewElement) = x.QueryIconHelpText(value) + /// Adjusts the QueryIconName property in the visual element + let queryIconName (value: string) (x: ViewElement) = x.QueryIconName(value) + /// Adjusts the SearchBoxVisibility property in the visual element + let searchBoxVisibility (value: Xamarin.Forms.SearchBoxVisiblity) (x: ViewElement) = x.SearchBoxVisibility(value) + /// Adjusts the ShowsResults property in the visual element + let showsResults (value: bool) (x: ViewElement) = x.ShowsResults(value) diff --git a/templates/content/blank/.template.config/template.json b/templates/content/blank/.template.config/template.json index 12838d41f..74531f97a 100644 --- a/templates/content/blank/.template.config/template.json +++ b/templates/content/blank/.template.config/template.json @@ -149,7 +149,7 @@ "type": "parameter", "dataType": "string", "replaces": "XamarinFormsSdk", - "defaultValue": "3.4.0.1009999" + "defaultValue": "3.5.0.129452" }, "FabulousPkgsVersion": { "type": "parameter", diff --git a/tests/Fabulous.Cli.Tests/Tests.fs b/tests/Fabulous.Cli.Tests/Tests.fs index c6ceb1cfb..3e8d7283c 100644 --- a/tests/Fabulous.Cli.Tests/Tests.fs +++ b/tests/Fabulous.Cli.Tests/Tests.fs @@ -6,7 +6,7 @@ open FsUnit open FSharp.Compiler.PortaCode.Tests.Basic// for TestHelpers module Versions = - let XamarinForms = "3.4.0.1009999" + let XamarinForms = "3.5.0.129452" let NewtonsoftJson = "11.0.2" [] diff --git a/tests/Generator.Tests/ResolverTests.fs b/tests/Generator.Tests/ResolverTests.fs index d4182b597..ddbee8d13 100644 --- a/tests/Generator.Tests/ResolverTests.fs +++ b/tests/Generator.Tests/ResolverTests.fs @@ -73,6 +73,7 @@ module ``Resolvers Tests`` = [| "Xamarin.Forms.Button" "Xamarin.Forms.View" "Xamarin.Forms.VisualElement" + "Xamarin.Forms.NavigableElement" "Xamarin.Forms.Element" "Xamarin.Forms.BindableObject" "System.Object" |] diff --git a/tools/Generator/Xamarin.Forms.Core.json b/tools/Generator/Xamarin.Forms.Core.json index 907b48199..4536421b5 100644 --- a/tools/Generator/Xamarin.Forms.Core.json +++ b/tools/Generator/Xamarin.Forms.Core.json @@ -392,6 +392,10 @@ "defaultValue": "null", "inputType": "Xamarin.Forms.ScrolledEventArgs -> unit", "convToModel": "(fun f -> System.EventHandler(fun _sender args -> f args))" + }, + { + "name": "LayoutAreaOverride", + "defaultValue": "Xamarin.Forms.Rectangle.Zero" } ] }, @@ -629,6 +633,10 @@ "defaultValue": "null", "inputType": "Xamarin.Forms.ToggledEventArgs -> unit", "convToModel": "(fun f -> System.EventHandler(fun _sender args -> f args))" + }, + { + "name": "OnColor", + "defaultValue": "Xamarin.Forms.Color.Default" } ] }, @@ -1135,6 +1143,12 @@ { "name": "PlaceholderColor", "defaultValue": "Xamarin.Forms.Color.Default" + }, + { + "name": "IsTextPredictionEnabled", + "defaultValue": "false", + "inputType": "bool", + "modelType": "bool" } ] }, @@ -1905,6 +1919,18 @@ { "name": "SelectionMode", "defaultValue": "Xamarin.Forms.ListViewSelectionMode.Single" + }, + { + "name": "HorizontalScrollBarVisibility", + "defaultValue": "Xamarin.Forms.ScrollBarVisibility.Default" + }, + { + "name": "VerticalScrollBarVisibility", + "defaultValue": "Xamarin.Forms.ScrollBarVisibility.Default" + }, + { + "name": "RefreshControlColor", + "defaultValue": "Xamarin.Forms.Color.Default" } ] }, @@ -2014,6 +2040,206 @@ "defaultValue": "Xamarin.Forms.ListViewSelectionMode.Single" } ] + }, + { + "name": "Xamarin.Forms.BackButtonBehavior", + "members": [ + { + "name": "TextOverride", + "defaultValue": "null" + }, + { + "name": "Command", + "defaultValue": "null", + "inputType": "unit -> unit", + "convToModel": "makeCommand" + }, + { + "name": "CommandParameter", + "defaultValue": "null" + }, + { + "name": "IconOverride", + "inputType": "string", + "modelType": "string", + "convToValue": "makeFileImageSource", + "defaultValue": "null" + }, + { + "name": "IsEnabled", + "inputType": "bool", + "modelType": "bool", + "defaultValue": "true" + } + ] + }, + { + "name": "Xamarin.Forms.BaseShellItem", + "members": [ + { + "name": "Title", + "inputType": "string", + "modelType": "string", + "defaultValue": "null" + }, + { + "name": "Route", + "inputType": "string", + "modelType": "string", + "defaultValue": "null" + }, + { + "name": "Icon", + "inputType": "string", + "modelType": "string", + "convToValue": "makeFileImageSource", + "defaultValue": "null" + }, + { + "name": "FlyoutIcon", + "inputType": "string", + "modelType": "string", + "convToValue": "makeFileImageSource", + "defaultValue": "null" + }, + { + "name": "IsEnabled", + "inputType": "bool", + "modelType": "bool", + "defaultValue": "true" + } + ] + }, + { + "name": "Xamarin.Forms.GridItemsLayout", + "members": [ + { + "name": "Span", + "defaultValue": "0", + "modelType": "int", + "inputType": "int" + } + ] + }, + { + "name": "Xamarin.Forms.SearchHandler", + "members": [ + { + "name": "ClearIcon", + "inputType": "string", + "modelType": "string", + "convToValue": "makeFileImageSource", + "defaultValue": "null" + }, + { + "name": "ClearIconHelpText", + "defaultValue": "null", + "modelType": "string", + "inputType": "string" + }, + { + "name": "ClearIconName", + "defaultValue": "null", + "modelType": "string", + "inputType": "string" + }, + { + "name": "ClearPlaceholderCommand", + "defaultValue": "null", + "inputType": "unit -> unit", + "convToModel": "makeCommand" + }, + { + "name": "ClearPlaceholderCommandParameter", + "defaultValue": "null" + }, + { + "name": "ClearPlaceholderEnabled", + "inputType": "bool", + "modelType": "bool", + "defaultValue": "true" + }, + { + "name": "ClearPlaceholderHelpText", + "defaultValue": "null", + "modelType": "string", + "inputType": "string" + }, + { + "name": "ClearPlaceholderIcon", + "inputType": "string", + "modelType": "string", + "convToValue": "makeFileImageSource", + "defaultValue": "null" + }, + { + "name": "ClearPlaceholderName", + "defaultValue": "null", + "modelType": "string", + "inputType": "string" + }, + { + "name": "Command", + "defaultValue": "null", + "inputType": "unit -> unit", + "convToModel": "makeCommand" + }, + { + "name": "CommandParameter", + "defaultValue": "null" + }, + { + "name": "DisplayMemberName", + "defaultValue": "null", + "modelType": "string", + "inputType": "string" + }, + { + "name": "IsSearchEnabled", + "defaultValue": "true" + }, + { + "name": "Placeholder", + "defaultValue": "null", + "modelType": "string", + "inputType": "string" + }, + { + "name": "Query", + "defaultValue": "null", + "modelType": "string", + "inputType": "string" + }, + { + "name": "QueryIcon", + "inputType": "string", + "modelType": "string", + "convToValue": "makeFileImageSource", + "defaultValue": "null" + }, + { + "name": "QueryIconHelpText", + "defaultValue": "null", + "modelType": "string", + "inputType": "string" + }, + { + "name": "QueryIconName", + "defaultValue": "null", + "modelType": "string", + "inputType": "string" + }, + { + "name": "SearchBoxVisibility", + "defaultValue": "Xamarin.Forms.SearchBoxVisiblity.Hidden" + }, + { + "name": "ShowsResults", + "defaultValue": "true", + "inputType": "bool", + "modelType": "bool" + } + ] } ] } \ No newline at end of file From 5122377ca0ee3e3ce91e72826b20057ffe09d39a Mon Sep 17 00:00:00 2001 From: Sergej Dick Date: Mon, 4 Mar 2019 10:06:09 +0100 Subject: [PATCH 02/18] selectableItemsView + shellgroupitem --- src/Fabulous.Core/Xamarin.Forms.Core.fs | 494 +++++++++++++++++++++++- tools/Generator/Xamarin.Forms.Core.json | 41 ++ 2 files changed, 534 insertions(+), 1 deletion(-) diff --git a/src/Fabulous.Core/Xamarin.Forms.Core.fs b/src/Fabulous.Core/Xamarin.Forms.Core.fs index 07ce6734c..be030c6c8 100644 --- a/src/Fabulous.Core/Xamarin.Forms.Core.fs +++ b/src/Fabulous.Core/Xamarin.Forms.Core.fs @@ -270,6 +270,12 @@ module ViewAttributes = let QueryIconNameAttribKey : AttributeKey<_> = AttributeKey<_>("QueryIconName") let SearchBoxVisibilityAttribKey : AttributeKey<_> = AttributeKey<_>("SearchBoxVisibility") let ShowsResultsAttribKey : AttributeKey<_> = AttributeKey<_>("ShowsResults") + let FlyoutDisplayOptionsAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutDisplayOptions") + let SelectedItemAttribKey : AttributeKey<_> = AttributeKey<_>("SelectedItem") + let SelectionChangedCommandAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionChangedCommand") + let SelectionChangedCommandParameterAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionChangedCommandParameter") + let selectableItemsModeAttribKey : AttributeKey<_> = AttributeKey<_>("selectableItemsMode") + let SelectionChangedAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionChanged") type ViewProto() = static member val ProtoElement : ViewElement option = None with get, set @@ -334,6 +340,8 @@ type ViewProto() = static member val ProtoBaseShellItem : ViewElement option = None with get, set static member val ProtoGridItemsLayout : ViewElement option = None with get, set static member val ProtoSearchHandler : ViewElement option = None with get, set + static member val ProtoShellGroupItem : ViewElement option = None with get, set + static member val ProtoSelectableItemsView : ViewElement option = None with get, set type ViewBuilders() = /// Builds the attributes for a Element in the view @@ -12819,6 +12827,313 @@ type ViewBuilders() = ViewElement.Create(ViewBuilders.CreateFuncSearchHandler, ViewBuilders.UpdateFuncSearchHandler, attribBuilder) + /// Builds the attributes for a ShellGroupItem in the view + static member inline BuildShellGroupItem(attribCount: int, + ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, + ?title: string, + ?route: string, + ?icon: string, + ?flyoutIcon: string, + ?isEnabled: bool, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: obj -> unit, + ?ref: ViewRef) = + + let attribCount = match flyoutDisplayOptions with Some _ -> attribCount + 1 | None -> attribCount + + let attribBuilder = ViewBuilders.BuildBaseShellItem(attribCount, ?title=title, ?route=route, ?icon=icon, ?flyoutIcon=flyoutIcon, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + match flyoutDisplayOptions with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutDisplayOptionsAttribKey, (v)) + attribBuilder + + static member val CreateFuncShellGroupItem : (unit -> Xamarin.Forms.ShellGroupItem) = (fun () -> ViewBuilders.CreateShellGroupItem()) with get, set + + static member CreateShellGroupItem () : Xamarin.Forms.ShellGroupItem = + upcast (new Xamarin.Forms.ShellGroupItem()) + + static member val UpdateFuncShellGroupItem = + (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ShellGroupItem) -> ViewBuilders.UpdateShellGroupItem (prevOpt, curr, target)) + + static member UpdateShellGroupItem (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ShellGroupItem) = + // update the inherited BaseShellItem element + let baseElement = (if ViewProto.ProtoBaseShellItem.IsNone then ViewProto.ProtoBaseShellItem <- Some (ViewBuilders.ConstructBaseShellItem())); ViewProto.ProtoBaseShellItem.Value + baseElement.UpdateInherited (prevOpt, curr, target) + let mutable prevFlyoutDisplayOptionsOpt = ValueNone + let mutable currFlyoutDisplayOptionsOpt = ValueNone + for kvp in curr.AttributesKeyed do + if kvp.Key = ViewAttributes.FlyoutDisplayOptionsAttribKey.KeyValue then + currFlyoutDisplayOptionsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlyoutDisplayOptions) + match prevOpt with + | ValueNone -> () + | ValueSome prev -> + for kvp in prev.AttributesKeyed do + if kvp.Key = ViewAttributes.FlyoutDisplayOptionsAttribKey.KeyValue then + prevFlyoutDisplayOptionsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlyoutDisplayOptions) + match prevFlyoutDisplayOptionsOpt, currFlyoutDisplayOptionsOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.FlyoutDisplayOptions <- currValue + | ValueSome _, ValueNone -> target.FlyoutDisplayOptions <- Xamarin.Forms.FlyoutDisplayOptions.AsSingleItem + | ValueNone, ValueNone -> () + + static member inline ConstructShellGroupItem(?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, + ?title: string, + ?route: string, + ?icon: string, + ?flyoutIcon: string, + ?isEnabled: bool, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.ShellGroupItem -> unit), + ?ref: ViewRef) = + + let attribBuilder = ViewBuilders.BuildShellGroupItem(0, + ?flyoutDisplayOptions=flyoutDisplayOptions, + ?title=title, + ?route=route, + ?icon=icon, + ?flyoutIcon=flyoutIcon, + ?isEnabled=isEnabled, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), + ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) + + ViewElement.Create(ViewBuilders.CreateFuncShellGroupItem, ViewBuilders.UpdateFuncShellGroupItem, attribBuilder) + + /// Builds the attributes for a SelectableItemsView in the view + static member inline BuildSelectableItemsView(attribCount: int, + ?selectedItem: System.Object, + ?selectionChangedCommand: unit -> unit, + ?selectionChangedCommandParameter: System.Object, + ?selectionMode: Xamarin.Forms.SelectionMode, + ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, + ?horizontalOptions: Xamarin.Forms.LayoutOptions, + ?verticalOptions: Xamarin.Forms.LayoutOptions, + ?margin: obj, + ?gestureRecognizers: ViewElement list, + ?anchorX: double, + ?anchorY: double, + ?backgroundColor: Xamarin.Forms.Color, + ?heightRequest: double, + ?inputTransparent: bool, + ?isEnabled: bool, + ?isVisible: bool, + ?minimumHeightRequest: double, + ?minimumWidthRequest: double, + ?opacity: double, + ?rotation: double, + ?rotationX: double, + ?rotationY: double, + ?scale: double, + ?style: Xamarin.Forms.Style, + ?styleClass: obj, + ?translationX: double, + ?translationY: double, + ?widthRequest: double, + ?resources: (string * obj) list, + ?styles: Xamarin.Forms.Style list, + ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, + ?isTabStop: bool, + ?scaleX: double, + ?scaleY: double, + ?tabIndex: int, + ?childrenReordered: System.EventArgs -> unit, + ?measureInvalidated: System.EventArgs -> unit, + ?focused: Xamarin.Forms.FocusEventArgs -> unit, + ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, + ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: obj -> unit, + ?ref: ViewRef) = + + let attribCount = match selectedItem with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match selectionChangedCommand with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match selectionChangedCommandParameter with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match selectionMode with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match selectionChanged with Some _ -> attribCount + 1 | None -> attribCount + + let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + match selectedItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectedItemAttribKey, (v)) + match selectionChangedCommand with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionChangedCommandAttribKey, makeCommand(v)) + match selectionChangedCommandParameter with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionChangedCommandParameterAttribKey, (v)) + match selectionMode with None -> () | Some v -> attribBuilder.Add(ViewAttributes.selectableItemsModeAttribKey, (v)) + match selectionChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) + attribBuilder + + static member val CreateFuncSelectableItemsView : (unit -> Xamarin.Forms.SelectableItemsView) = (fun () -> ViewBuilders.CreateSelectableItemsView()) with get, set + + static member CreateSelectableItemsView () : Xamarin.Forms.SelectableItemsView = + upcast (new Xamarin.Forms.SelectableItemsView()) + + static member val UpdateFuncSelectableItemsView = + (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.SelectableItemsView) -> ViewBuilders.UpdateSelectableItemsView (prevOpt, curr, target)) + + static member UpdateSelectableItemsView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.SelectableItemsView) = + // update the inherited View element + let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value + baseElement.UpdateInherited (prevOpt, curr, target) + let mutable prevSelectedItemOpt = ValueNone + let mutable currSelectedItemOpt = ValueNone + let mutable prevSelectionChangedCommandOpt = ValueNone + let mutable currSelectionChangedCommandOpt = ValueNone + let mutable prevSelectionChangedCommandParameterOpt = ValueNone + let mutable currSelectionChangedCommandParameterOpt = ValueNone + let mutable prevselectableItemsModeOpt = ValueNone + let mutable currselectableItemsModeOpt = ValueNone + let mutable prevSelectionChangedOpt = ValueNone + let mutable currSelectionChangedOpt = ValueNone + for kvp in curr.AttributesKeyed do + if kvp.Key = ViewAttributes.SelectedItemAttribKey.KeyValue then + currSelectedItemOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.SelectionChangedCommandAttribKey.KeyValue then + currSelectionChangedCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) + if kvp.Key = ViewAttributes.SelectionChangedCommandParameterAttribKey.KeyValue then + currSelectionChangedCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.selectableItemsModeAttribKey.KeyValue then + currselectableItemsModeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SelectionMode) + if kvp.Key = ViewAttributes.SelectionChangedAttribKey.KeyValue then + currSelectionChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) + match prevOpt with + | ValueNone -> () + | ValueSome prev -> + for kvp in prev.AttributesKeyed do + if kvp.Key = ViewAttributes.SelectedItemAttribKey.KeyValue then + prevSelectedItemOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.SelectionChangedCommandAttribKey.KeyValue then + prevSelectionChangedCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) + if kvp.Key = ViewAttributes.SelectionChangedCommandParameterAttribKey.KeyValue then + prevSelectionChangedCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.selectableItemsModeAttribKey.KeyValue then + prevselectableItemsModeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SelectionMode) + if kvp.Key = ViewAttributes.SelectionChangedAttribKey.KeyValue then + prevSelectionChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) + match prevSelectedItemOpt, currSelectedItemOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.SelectedItem <- currValue + | ValueSome _, ValueNone -> target.SelectedItem <- null + | ValueNone, ValueNone -> () + match prevSelectionChangedCommandOpt, currSelectionChangedCommandOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.SelectionChangedCommand <- currValue + | ValueSome _, ValueNone -> target.SelectionChangedCommand <- null + | ValueNone, ValueNone -> () + match prevSelectionChangedCommandParameterOpt, currSelectionChangedCommandParameterOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.SelectionChangedCommandParameter <- currValue + | ValueSome _, ValueNone -> target.SelectionChangedCommandParameter <- null + | ValueNone, ValueNone -> () + match prevselectableItemsModeOpt, currselectableItemsModeOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.SelectionMode <- currValue + | ValueSome _, ValueNone -> target.SelectionMode <- Xamarin.Forms.SelectionMode.None + | ValueNone, ValueNone -> () + match prevSelectionChangedOpt, currSelectionChangedOpt with + | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () + | ValueSome prevValue, ValueSome currValue -> target.SelectionChanged.RemoveHandler(prevValue); target.SelectionChanged.AddHandler(currValue) + | ValueNone, ValueSome currValue -> target.SelectionChanged.AddHandler(currValue) + | ValueSome prevValue, ValueNone -> target.SelectionChanged.RemoveHandler(prevValue) + | ValueNone, ValueNone -> () + + static member inline ConstructSelectableItemsView(?selectedItem: System.Object, + ?selectionChangedCommand: unit -> unit, + ?selectionChangedCommandParameter: System.Object, + ?selectionMode: Xamarin.Forms.SelectionMode, + ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, + ?horizontalOptions: Xamarin.Forms.LayoutOptions, + ?verticalOptions: Xamarin.Forms.LayoutOptions, + ?margin: obj, + ?gestureRecognizers: ViewElement list, + ?anchorX: double, + ?anchorY: double, + ?backgroundColor: Xamarin.Forms.Color, + ?heightRequest: double, + ?inputTransparent: bool, + ?isEnabled: bool, + ?isVisible: bool, + ?minimumHeightRequest: double, + ?minimumWidthRequest: double, + ?opacity: double, + ?rotation: double, + ?rotationX: double, + ?rotationY: double, + ?scale: double, + ?style: Xamarin.Forms.Style, + ?styleClass: obj, + ?translationX: double, + ?translationY: double, + ?widthRequest: double, + ?resources: (string * obj) list, + ?styles: Xamarin.Forms.Style list, + ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, + ?isTabStop: bool, + ?scaleX: double, + ?scaleY: double, + ?tabIndex: int, + ?childrenReordered: System.EventArgs -> unit, + ?measureInvalidated: System.EventArgs -> unit, + ?focused: Xamarin.Forms.FocusEventArgs -> unit, + ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, + ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.SelectableItemsView -> unit), + ?ref: ViewRef) = + + let attribBuilder = ViewBuilders.BuildSelectableItemsView(0, + ?selectedItem=selectedItem, + ?selectionChangedCommand=selectionChangedCommand, + ?selectionChangedCommandParameter=selectionChangedCommandParameter, + ?selectionMode=selectionMode, + ?selectionChanged=selectionChanged, + ?horizontalOptions=horizontalOptions, + ?verticalOptions=verticalOptions, + ?margin=margin, + ?gestureRecognizers=gestureRecognizers, + ?anchorX=anchorX, + ?anchorY=anchorY, + ?backgroundColor=backgroundColor, + ?heightRequest=heightRequest, + ?inputTransparent=inputTransparent, + ?isEnabled=isEnabled, + ?isVisible=isVisible, + ?minimumHeightRequest=minimumHeightRequest, + ?minimumWidthRequest=minimumWidthRequest, + ?opacity=opacity, + ?rotation=rotation, + ?rotationX=rotationX, + ?rotationY=rotationY, + ?scale=scale, + ?style=style, + ?styleClass=styleClass, + ?translationX=translationX, + ?translationY=translationY, + ?widthRequest=widthRequest, + ?resources=resources, + ?styles=styles, + ?styleSheets=styleSheets, + ?isTabStop=isTabStop, + ?scaleX=scaleX, + ?scaleY=scaleY, + ?tabIndex=tabIndex, + ?childrenReordered=childrenReordered, + ?measureInvalidated=measureInvalidated, + ?focused=focused, + ?sizeChanged=sizeChanged, + ?unfocused=unfocused, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), + ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) + + ViewElement.Create(ViewBuilders.CreateFuncSelectableItemsView, ViewBuilders.UpdateFuncSelectableItemsView, attribBuilder) + /// Viewer that allows to read the properties of a ViewElement representing a Element type ElementViewer(element: ViewElement) = do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Element' is expected, but '%s' was provided." element.TargetType.FullName @@ -13806,6 +14121,28 @@ type SearchHandlerViewer(element: ViewElement) = /// Get the value of the ShowsResults property member this.ShowsResults = element.GetAttributeKeyed(ViewAttributes.ShowsResultsAttribKey) +/// Viewer that allows to read the properties of a ViewElement representing a ShellGroupItem +type ShellGroupItemViewer(element: ViewElement) = + inherit BaseShellItemViewer(element) + do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ShellGroupItem' is expected, but '%s' was provided." element.TargetType.FullName + /// Get the value of the FlyoutDisplayOptions property + member this.FlyoutDisplayOptions = element.GetAttributeKeyed(ViewAttributes.FlyoutDisplayOptionsAttribKey) + +/// Viewer that allows to read the properties of a ViewElement representing a SelectableItemsView +type SelectableItemsViewViewer(element: ViewElement) = + inherit ViewViewer(element) + do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.SelectableItemsView' is expected, but '%s' was provided." element.TargetType.FullName + /// Get the value of the SelectedItem property + member this.SelectedItem = element.GetAttributeKeyed(ViewAttributes.SelectedItemAttribKey) + /// Get the value of the SelectionChangedCommand property + member this.SelectionChangedCommand = element.GetAttributeKeyed(ViewAttributes.SelectionChangedCommandAttribKey) + /// Get the value of the SelectionChangedCommandParameter property + member this.SelectionChangedCommandParameter = element.GetAttributeKeyed(ViewAttributes.SelectionChangedCommandParameterAttribKey) + /// Get the value of the SelectionMode property + member this.SelectionMode = element.GetAttributeKeyed(ViewAttributes.selectableItemsModeAttribKey) + /// Get the value of the SelectionChanged property + member this.SelectionChanged = element.GetAttributeKeyed(ViewAttributes.SelectionChangedAttribKey) + type View() = /// Describes a Element in the view static member inline Element(?classId: string, @@ -18023,6 +18360,124 @@ type View() = ?searchBoxVisibility=searchBoxVisibility, ?showsResults=showsResults) + /// Describes a ShellGroupItem in the view + static member inline ShellGroupItem(?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, + ?title: string, + ?route: string, + ?icon: string, + ?flyoutIcon: string, + ?isEnabled: bool, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.ShellGroupItem -> unit), + ?ref: ViewRef) = + + ViewBuilders.ConstructShellGroupItem(?flyoutDisplayOptions=flyoutDisplayOptions, + ?title=title, + ?route=route, + ?icon=icon, + ?flyoutIcon=flyoutIcon, + ?isEnabled=isEnabled, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=created, + ?ref=ref) + + /// Describes a SelectableItemsView in the view + static member inline SelectableItemsView(?selectedItem: System.Object, + ?selectionChangedCommand: unit -> unit, + ?selectionChangedCommandParameter: System.Object, + ?selectionMode: Xamarin.Forms.SelectionMode, + ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, + ?horizontalOptions: Xamarin.Forms.LayoutOptions, + ?verticalOptions: Xamarin.Forms.LayoutOptions, + ?margin: obj, + ?gestureRecognizers: ViewElement list, + ?anchorX: double, + ?anchorY: double, + ?backgroundColor: Xamarin.Forms.Color, + ?heightRequest: double, + ?inputTransparent: bool, + ?isEnabled: bool, + ?isVisible: bool, + ?minimumHeightRequest: double, + ?minimumWidthRequest: double, + ?opacity: double, + ?rotation: double, + ?rotationX: double, + ?rotationY: double, + ?scale: double, + ?style: Xamarin.Forms.Style, + ?styleClass: obj, + ?translationX: double, + ?translationY: double, + ?widthRequest: double, + ?resources: (string * obj) list, + ?styles: Xamarin.Forms.Style list, + ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, + ?isTabStop: bool, + ?scaleX: double, + ?scaleY: double, + ?tabIndex: int, + ?childrenReordered: System.EventArgs -> unit, + ?measureInvalidated: System.EventArgs -> unit, + ?focused: Xamarin.Forms.FocusEventArgs -> unit, + ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, + ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.SelectableItemsView -> unit), + ?ref: ViewRef) = + + ViewBuilders.ConstructSelectableItemsView(?selectedItem=selectedItem, + ?selectionChangedCommand=selectionChangedCommand, + ?selectionChangedCommandParameter=selectionChangedCommandParameter, + ?selectionMode=selectionMode, + ?selectionChanged=selectionChanged, + ?horizontalOptions=horizontalOptions, + ?verticalOptions=verticalOptions, + ?margin=margin, + ?gestureRecognizers=gestureRecognizers, + ?anchorX=anchorX, + ?anchorY=anchorY, + ?backgroundColor=backgroundColor, + ?heightRequest=heightRequest, + ?inputTransparent=inputTransparent, + ?isEnabled=isEnabled, + ?isVisible=isVisible, + ?minimumHeightRequest=minimumHeightRequest, + ?minimumWidthRequest=minimumWidthRequest, + ?opacity=opacity, + ?rotation=rotation, + ?rotationX=rotationX, + ?rotationY=rotationY, + ?scale=scale, + ?style=style, + ?styleClass=styleClass, + ?translationX=translationX, + ?translationY=translationY, + ?widthRequest=widthRequest, + ?resources=resources, + ?styles=styles, + ?styleSheets=styleSheets, + ?isTabStop=isTabStop, + ?scaleX=scaleX, + ?scaleY=scaleY, + ?tabIndex=tabIndex, + ?childrenReordered=childrenReordered, + ?measureInvalidated=measureInvalidated, + ?focused=focused, + ?sizeChanged=sizeChanged, + ?unfocused=unfocused, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=created, + ?ref=ref) + [] module ViewElementExtensions = @@ -18815,6 +19270,24 @@ module ViewElementExtensions = /// Adjusts the ShowsResults property in the visual element member x.ShowsResults(value: bool) = x.WithAttribute(ViewAttributes.ShowsResultsAttribKey, (value)) + /// Adjusts the FlyoutDisplayOptions property in the visual element + member x.FlyoutDisplayOptions(value: Xamarin.Forms.FlyoutDisplayOptions) = x.WithAttribute(ViewAttributes.FlyoutDisplayOptionsAttribKey, (value)) + + /// Adjusts the SelectedItem property in the visual element + member x.SelectedItem(value: System.Object) = x.WithAttribute(ViewAttributes.SelectedItemAttribKey, (value)) + + /// Adjusts the SelectionChangedCommand property in the visual element + member x.SelectionChangedCommand(value: unit -> unit) = x.WithAttribute(ViewAttributes.SelectionChangedCommandAttribKey, makeCommand(value)) + + /// Adjusts the SelectionChangedCommandParameter property in the visual element + member x.SelectionChangedCommandParameter(value: System.Object) = x.WithAttribute(ViewAttributes.SelectionChangedCommandParameterAttribKey, (value)) + + /// Adjusts the selectableItemsMode property in the visual element + member x.selectableItemsMode(value: Xamarin.Forms.SelectionMode) = x.WithAttribute(ViewAttributes.selectableItemsModeAttribKey, (value)) + + /// Adjusts the SelectionChanged property in the visual element + member x.SelectionChanged(value: Xamarin.Forms.SelectionChangedEventArgs -> unit) = x.WithAttribute(ViewAttributes.SelectionChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) + member x.With(?classId: string, ?styleId: string, ?automationId: string, ?anchorX: double, ?anchorY: double, ?backgroundColor: Xamarin.Forms.Color, ?heightRequest: double, ?inputTransparent: bool, ?isEnabled: bool, ?isVisible: bool, ?minimumHeightRequest: double, ?minimumWidthRequest: double, ?opacity: double, ?rotation: double, ?rotationX: double, @@ -18867,7 +19340,8 @@ module ViewElementExtensions = ?clearIcon: string, ?clearIconHelpText: string, ?clearIconName: string, ?clearPlaceholderCommand: unit -> unit, ?clearPlaceholderCommandParameter: System.Object, ?clearPlaceholderEnabled: bool, ?clearPlaceholderHelpText: string, ?clearPlaceholderIcon: string, ?clearPlaceholderName: string, ?displayMemberName: string, ?isSearchEnabled: bool, ?query: string, ?queryIcon: string, ?queryIconHelpText: string, ?queryIconName: string, - ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool) = + ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?selectedItem: System.Object, ?selectionChangedCommand: unit -> unit, + ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit) = let x = match classId with None -> x | Some opt -> x.ClassId(opt) let x = match styleId with None -> x | Some opt -> x.StyleId(opt) let x = match automationId with None -> x | Some opt -> x.AutomationId(opt) @@ -19130,6 +19604,12 @@ module ViewElementExtensions = let x = match queryIconName with None -> x | Some opt -> x.QueryIconName(opt) let x = match searchBoxVisibility with None -> x | Some opt -> x.SearchBoxVisibility(opt) let x = match showsResults with None -> x | Some opt -> x.ShowsResults(opt) + let x = match flyoutDisplayOptions with None -> x | Some opt -> x.FlyoutDisplayOptions(opt) + let x = match selectedItem with None -> x | Some opt -> x.SelectedItem(opt) + let x = match selectionChangedCommand with None -> x | Some opt -> x.SelectionChangedCommand(opt) + let x = match selectionChangedCommandParameter with None -> x | Some opt -> x.SelectionChangedCommandParameter(opt) + let x = match selectableItemsMode with None -> x | Some opt -> x.selectableItemsMode(opt) + let x = match selectionChanged with None -> x | Some opt -> x.SelectionChanged(opt) x /// Adjusts the ClassId property in the visual element @@ -19656,3 +20136,15 @@ module ViewElementExtensions = let searchBoxVisibility (value: Xamarin.Forms.SearchBoxVisiblity) (x: ViewElement) = x.SearchBoxVisibility(value) /// Adjusts the ShowsResults property in the visual element let showsResults (value: bool) (x: ViewElement) = x.ShowsResults(value) + /// Adjusts the FlyoutDisplayOptions property in the visual element + let flyoutDisplayOptions (value: Xamarin.Forms.FlyoutDisplayOptions) (x: ViewElement) = x.FlyoutDisplayOptions(value) + /// Adjusts the SelectedItem property in the visual element + let selectedItem (value: System.Object) (x: ViewElement) = x.SelectedItem(value) + /// Adjusts the SelectionChangedCommand property in the visual element + let selectionChangedCommand (value: unit -> unit) (x: ViewElement) = x.SelectionChangedCommand(value) + /// Adjusts the SelectionChangedCommandParameter property in the visual element + let selectionChangedCommandParameter (value: System.Object) (x: ViewElement) = x.SelectionChangedCommandParameter(value) + /// Adjusts the selectableItemsMode property in the visual element + let selectableItemsMode (value: Xamarin.Forms.SelectionMode) (x: ViewElement) = x.selectableItemsMode(value) + /// Adjusts the SelectionChanged property in the visual element + let selectionChanged (value: Xamarin.Forms.SelectionChangedEventArgs -> unit) (x: ViewElement) = x.SelectionChanged(value) diff --git a/tools/Generator/Xamarin.Forms.Core.json b/tools/Generator/Xamarin.Forms.Core.json index 4536421b5..d79cd1578 100644 --- a/tools/Generator/Xamarin.Forms.Core.json +++ b/tools/Generator/Xamarin.Forms.Core.json @@ -2240,6 +2240,47 @@ "modelType": "bool" } ] + }, + { + "name": "Xamarin.Forms.ShellGroupItem", + "members": [ + { + "name": "FlyoutDisplayOptions", + "defaultValue": "Xamarin.Forms.FlyoutDisplayOptions.AsSingleItem" + } + ] + }, + { + "name": "Xamarin.Forms.SelectableItemsView", + "members": [ + { + "name": "SelectedItem", + "defaultValue": "null" + }, + { + "name": "SelectionChangedCommand", + "defaultValue": "null", + "inputType": "unit -> unit", + "convToModel": "makeCommand" + }, + { + "name": "SelectionChangedCommandParameter", + "defaultValue": "null" + }, + { + "name": "SelectionMode", + "uniqueName": "selectableItemsMode", + "defaultValue": "Xamarin.Forms.SelectionMode.None", + "inputType": "Xamarin.Forms.SelectionMode", + "modelType": "Xamarin.Forms.SelectionMode" + }, + { + "name": "SelectionChanged", + "defaultValue": "null", + "inputType": "Xamarin.Forms.SelectionChangedEventArgs -> unit", + "convToModel": "(fun f -> System.EventHandler(fun _sender args -> f args))" + } + ] } ] } \ No newline at end of file From 2e4f35fe739c3ee48c1a824cb6a427e17f781391 Mon Sep 17 00:00:00 2001 From: SergejDK Date: Mon, 4 Mar 2019 23:10:08 +0100 Subject: [PATCH 03/18] itemsview, shellnavigationstate --- src/Fabulous.Core/ViewConverters.fs | 7 + src/Fabulous.Core/Xamarin.Forms.Core.fs | 472 +++++++++++++++++++++++- tools/Generator/Xamarin.Forms.Core.json | 36 ++ 3 files changed, 510 insertions(+), 5 deletions(-) diff --git a/src/Fabulous.Core/ViewConverters.fs b/src/Fabulous.Core/ViewConverters.fs index 9754c52b5..fc732d12f 100644 --- a/src/Fabulous.Core/ViewConverters.fs +++ b/src/Fabulous.Core/ViewConverters.fs @@ -214,6 +214,13 @@ module Converters = f index ) + /// Converts a string or uri to a Xamarin.Forms ShellNavigation + let makeUri (v: obj) = + match v with + | :? string as path -> ShellNavigationState.op_Implicit path + | :? Uri as uri -> ShellNavigationState.op_Implicit uri + | _ -> failwithf "makeUri: invalid argument %O" v + /// Checks whether two objects are reference-equal let identical (x: 'T) (y:'T) = System.Object.ReferenceEquals(x, y) diff --git a/src/Fabulous.Core/Xamarin.Forms.Core.fs b/src/Fabulous.Core/Xamarin.Forms.Core.fs index be030c6c8..7d7e5db5a 100644 --- a/src/Fabulous.Core/Xamarin.Forms.Core.fs +++ b/src/Fabulous.Core/Xamarin.Forms.Core.fs @@ -253,6 +253,11 @@ module ViewAttributes = let RouteAttribKey : AttributeKey<_> = AttributeKey<_>("Route") let FlyoutIconAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutIcon") let SpanAttribKey : AttributeKey<_> = AttributeKey<_>("Span") + let EmptyViewAttribKey : AttributeKey<_> = AttributeKey<_>("EmptyView") + let EmptyViewTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("EmptyViewTemplate") + let ItemsLayoutAttribKey : AttributeKey<_> = AttributeKey<_>("ItemsLayout") + let ItemsSourceAttribKey : AttributeKey<_> = AttributeKey<_>("ItemsSource") + let ItemTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("ItemTemplate") let ClearIconAttribKey : AttributeKey<_> = AttributeKey<_>("ClearIcon") let ClearIconHelpTextAttribKey : AttributeKey<_> = AttributeKey<_>("ClearIconHelpText") let ClearIconNameAttribKey : AttributeKey<_> = AttributeKey<_>("ClearIconName") @@ -276,6 +281,7 @@ module ViewAttributes = let SelectionChangedCommandParameterAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionChangedCommandParameter") let selectableItemsModeAttribKey : AttributeKey<_> = AttributeKey<_>("selectableItemsMode") let SelectionChangedAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionChanged") + let LocationAttribKey : AttributeKey<_> = AttributeKey<_>("Location") type ViewProto() = static member val ProtoElement : ViewElement option = None with get, set @@ -339,9 +345,11 @@ type ViewProto() = static member val ProtoBackButtonBehavior : ViewElement option = None with get, set static member val ProtoBaseShellItem : ViewElement option = None with get, set static member val ProtoGridItemsLayout : ViewElement option = None with get, set + static member val ProtoItemsView : ViewElement option = None with get, set static member val ProtoSearchHandler : ViewElement option = None with get, set static member val ProtoShellGroupItem : ViewElement option = None with get, set static member val ProtoSelectableItemsView : ViewElement option = None with get, set + static member val ProtoShellNavigationState : ViewElement option = None with get, set type ViewBuilders() = /// Builds the attributes for a Element in the view @@ -12480,6 +12488,236 @@ type ViewBuilders() = ViewElement.Create(ViewBuilders.CreateFuncGridItemsLayout, ViewBuilders.UpdateFuncGridItemsLayout, attribBuilder) + /// Builds the attributes for a ItemsView in the view + static member inline BuildItemsView(attribCount: int, + ?emptyView: System.Object, + ?emptyViewTemplate: Xamarin.Forms.DataTemplate, + ?itemsLayout: Xamarin.Forms.IItemsLayout, + ?itemsSource: System.Collections.IEnumerable, + ?itemTemplate: Xamarin.Forms.DataTemplate, + ?horizontalOptions: Xamarin.Forms.LayoutOptions, + ?verticalOptions: Xamarin.Forms.LayoutOptions, + ?margin: obj, + ?gestureRecognizers: ViewElement list, + ?anchorX: double, + ?anchorY: double, + ?backgroundColor: Xamarin.Forms.Color, + ?heightRequest: double, + ?inputTransparent: bool, + ?isEnabled: bool, + ?isVisible: bool, + ?minimumHeightRequest: double, + ?minimumWidthRequest: double, + ?opacity: double, + ?rotation: double, + ?rotationX: double, + ?rotationY: double, + ?scale: double, + ?style: Xamarin.Forms.Style, + ?styleClass: obj, + ?translationX: double, + ?translationY: double, + ?widthRequest: double, + ?resources: (string * obj) list, + ?styles: Xamarin.Forms.Style list, + ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, + ?isTabStop: bool, + ?scaleX: double, + ?scaleY: double, + ?tabIndex: int, + ?childrenReordered: System.EventArgs -> unit, + ?measureInvalidated: System.EventArgs -> unit, + ?focused: Xamarin.Forms.FocusEventArgs -> unit, + ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, + ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: obj -> unit, + ?ref: ViewRef) = + + let attribCount = match emptyView with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match emptyViewTemplate with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match itemsLayout with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match itemsSource with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match itemTemplate with Some _ -> attribCount + 1 | None -> attribCount + + let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + match emptyView with None -> () | Some v -> attribBuilder.Add(ViewAttributes.EmptyViewAttribKey, (v)) + match emptyViewTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.EmptyViewTemplateAttribKey, (v)) + match itemsLayout with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsLayoutAttribKey, (v)) + match itemsSource with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsSourceAttribKey, (v)) + match itemTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemTemplateAttribKey, (v)) + attribBuilder + + static member val CreateFuncItemsView : (unit -> Xamarin.Forms.ItemsView) = (fun () -> ViewBuilders.CreateItemsView()) with get, set + + static member CreateItemsView () : Xamarin.Forms.ItemsView = + failwith "can't create Xamarin.Forms.ItemsView" + + static member val UpdateFuncItemsView = + (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ItemsView) -> ViewBuilders.UpdateItemsView (prevOpt, curr, target)) + + static member UpdateItemsView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ItemsView) = + // update the inherited View element + let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value + baseElement.UpdateInherited (prevOpt, curr, target) + let mutable prevEmptyViewOpt = ValueNone + let mutable currEmptyViewOpt = ValueNone + let mutable prevEmptyViewTemplateOpt = ValueNone + let mutable currEmptyViewTemplateOpt = ValueNone + let mutable prevItemsLayoutOpt = ValueNone + let mutable currItemsLayoutOpt = ValueNone + let mutable prevItemsSourceOpt = ValueNone + let mutable currItemsSourceOpt = ValueNone + let mutable prevItemTemplateOpt = ValueNone + let mutable currItemTemplateOpt = ValueNone + for kvp in curr.AttributesKeyed do + if kvp.Key = ViewAttributes.EmptyViewAttribKey.KeyValue then + currEmptyViewOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.EmptyViewTemplateAttribKey.KeyValue then + currEmptyViewTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + if kvp.Key = ViewAttributes.ItemsLayoutAttribKey.KeyValue then + currItemsLayoutOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.IItemsLayout) + if kvp.Key = ViewAttributes.ItemsSourceAttribKey.KeyValue then + currItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IEnumerable) + if kvp.Key = ViewAttributes.ItemTemplateAttribKey.KeyValue then + currItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + match prevOpt with + | ValueNone -> () + | ValueSome prev -> + for kvp in prev.AttributesKeyed do + if kvp.Key = ViewAttributes.EmptyViewAttribKey.KeyValue then + prevEmptyViewOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.EmptyViewTemplateAttribKey.KeyValue then + prevEmptyViewTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + if kvp.Key = ViewAttributes.ItemsLayoutAttribKey.KeyValue then + prevItemsLayoutOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.IItemsLayout) + if kvp.Key = ViewAttributes.ItemsSourceAttribKey.KeyValue then + prevItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IEnumerable) + if kvp.Key = ViewAttributes.ItemTemplateAttribKey.KeyValue then + prevItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + match prevEmptyViewOpt, currEmptyViewOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.EmptyView <- currValue + | ValueSome _, ValueNone -> target.EmptyView <- null + | ValueNone, ValueNone -> () + match prevEmptyViewTemplateOpt, currEmptyViewTemplateOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.EmptyViewTemplate <- currValue + | ValueSome _, ValueNone -> target.EmptyViewTemplate <- null + | ValueNone, ValueNone -> () + match prevItemsLayoutOpt, currItemsLayoutOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ItemsLayout <- currValue + | ValueSome _, ValueNone -> target.ItemsLayout <- null + | ValueNone, ValueNone -> () + match prevItemsSourceOpt, currItemsSourceOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ItemsSource <- currValue + | ValueSome _, ValueNone -> target.ItemsSource <- null + | ValueNone, ValueNone -> () + match prevItemTemplateOpt, currItemTemplateOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ItemTemplate <- currValue + | ValueSome _, ValueNone -> target.ItemTemplate <- null + | ValueNone, ValueNone -> () + + static member inline ConstructItemsView(?emptyView: System.Object, + ?emptyViewTemplate: Xamarin.Forms.DataTemplate, + ?itemsLayout: Xamarin.Forms.IItemsLayout, + ?itemsSource: System.Collections.IEnumerable, + ?itemTemplate: Xamarin.Forms.DataTemplate, + ?horizontalOptions: Xamarin.Forms.LayoutOptions, + ?verticalOptions: Xamarin.Forms.LayoutOptions, + ?margin: obj, + ?gestureRecognizers: ViewElement list, + ?anchorX: double, + ?anchorY: double, + ?backgroundColor: Xamarin.Forms.Color, + ?heightRequest: double, + ?inputTransparent: bool, + ?isEnabled: bool, + ?isVisible: bool, + ?minimumHeightRequest: double, + ?minimumWidthRequest: double, + ?opacity: double, + ?rotation: double, + ?rotationX: double, + ?rotationY: double, + ?scale: double, + ?style: Xamarin.Forms.Style, + ?styleClass: obj, + ?translationX: double, + ?translationY: double, + ?widthRequest: double, + ?resources: (string * obj) list, + ?styles: Xamarin.Forms.Style list, + ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, + ?isTabStop: bool, + ?scaleX: double, + ?scaleY: double, + ?tabIndex: int, + ?childrenReordered: System.EventArgs -> unit, + ?measureInvalidated: System.EventArgs -> unit, + ?focused: Xamarin.Forms.FocusEventArgs -> unit, + ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, + ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.ItemsView -> unit), + ?ref: ViewRef) = + + let attribBuilder = ViewBuilders.BuildItemsView(0, + ?emptyView=emptyView, + ?emptyViewTemplate=emptyViewTemplate, + ?itemsLayout=itemsLayout, + ?itemsSource=itemsSource, + ?itemTemplate=itemTemplate, + ?horizontalOptions=horizontalOptions, + ?verticalOptions=verticalOptions, + ?margin=margin, + ?gestureRecognizers=gestureRecognizers, + ?anchorX=anchorX, + ?anchorY=anchorY, + ?backgroundColor=backgroundColor, + ?heightRequest=heightRequest, + ?inputTransparent=inputTransparent, + ?isEnabled=isEnabled, + ?isVisible=isVisible, + ?minimumHeightRequest=minimumHeightRequest, + ?minimumWidthRequest=minimumWidthRequest, + ?opacity=opacity, + ?rotation=rotation, + ?rotationX=rotationX, + ?rotationY=rotationY, + ?scale=scale, + ?style=style, + ?styleClass=styleClass, + ?translationX=translationX, + ?translationY=translationY, + ?widthRequest=widthRequest, + ?resources=resources, + ?styles=styles, + ?styleSheets=styleSheets, + ?isTabStop=isTabStop, + ?scaleX=scaleX, + ?scaleY=scaleY, + ?tabIndex=tabIndex, + ?childrenReordered=childrenReordered, + ?measureInvalidated=measureInvalidated, + ?focused=focused, + ?sizeChanged=sizeChanged, + ?unfocused=unfocused, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), + ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) + + ViewElement.Create(ViewBuilders.CreateFuncItemsView, ViewBuilders.UpdateFuncItemsView, attribBuilder) + /// Builds the attributes for a SearchHandler in the view static member inline BuildSearchHandler(attribCount: int, ?clearIcon: string, @@ -12910,6 +13148,11 @@ type ViewBuilders() = ?selectionChangedCommandParameter: System.Object, ?selectionMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, + ?emptyView: System.Object, + ?emptyViewTemplate: Xamarin.Forms.DataTemplate, + ?itemsLayout: Xamarin.Forms.IItemsLayout, + ?itemsSource: System.Collections.IEnumerable, + ?itemTemplate: Xamarin.Forms.DataTemplate, ?horizontalOptions: Xamarin.Forms.LayoutOptions, ?verticalOptions: Xamarin.Forms.LayoutOptions, ?margin: obj, @@ -12957,7 +13200,7 @@ type ViewBuilders() = let attribCount = match selectionMode with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match selectionChanged with Some _ -> attribCount + 1 | None -> attribCount - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + let attribBuilder = ViewBuilders.BuildItemsView(attribCount, ?emptyView=emptyView, ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?itemTemplate=itemTemplate, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match selectedItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectedItemAttribKey, (v)) match selectionChangedCommand with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionChangedCommandAttribKey, makeCommand(v)) match selectionChangedCommandParameter with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionChangedCommandParameterAttribKey, (v)) @@ -12974,8 +13217,8 @@ type ViewBuilders() = (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.SelectableItemsView) -> ViewBuilders.UpdateSelectableItemsView (prevOpt, curr, target)) static member UpdateSelectableItemsView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.SelectableItemsView) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value + // update the inherited ItemsView element + let baseElement = (if ViewProto.ProtoItemsView.IsNone then ViewProto.ProtoItemsView <- Some (ViewBuilders.ConstructItemsView())); ViewProto.ProtoItemsView.Value baseElement.UpdateInherited (prevOpt, curr, target) let mutable prevSelectedItemOpt = ValueNone let mutable currSelectedItemOpt = ValueNone @@ -13044,6 +13287,11 @@ type ViewBuilders() = ?selectionChangedCommandParameter: System.Object, ?selectionMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, + ?emptyView: System.Object, + ?emptyViewTemplate: Xamarin.Forms.DataTemplate, + ?itemsLayout: Xamarin.Forms.IItemsLayout, + ?itemsSource: System.Collections.IEnumerable, + ?itemTemplate: Xamarin.Forms.DataTemplate, ?horizontalOptions: Xamarin.Forms.LayoutOptions, ?verticalOptions: Xamarin.Forms.LayoutOptions, ?margin: obj, @@ -13091,6 +13339,11 @@ type ViewBuilders() = ?selectionChangedCommandParameter=selectionChangedCommandParameter, ?selectionMode=selectionMode, ?selectionChanged=selectionChanged, + ?emptyView=emptyView, + ?emptyViewTemplate=emptyViewTemplate, + ?itemsLayout=itemsLayout, + ?itemsSource=itemsSource, + ?itemTemplate=itemTemplate, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, @@ -13134,6 +13387,49 @@ type ViewBuilders() = ViewElement.Create(ViewBuilders.CreateFuncSelectableItemsView, ViewBuilders.UpdateFuncSelectableItemsView, attribBuilder) + /// Builds the attributes for a ShellNavigationState in the view + static member inline BuildShellNavigationState(attribCount: int, + ?location: System.Uri) = + + let attribCount = match location with Some _ -> attribCount + 1 | None -> attribCount + + let attribBuilder = new AttributesBuilder(attribCount) + match location with None -> () | Some v -> attribBuilder.Add(ViewAttributes.LocationAttribKey, makeUri(v)) + attribBuilder + + static member val CreateFuncShellNavigationState : (unit -> Xamarin.Forms.ShellNavigationState) = (fun () -> ViewBuilders.CreateShellNavigationState()) with get, set + + static member CreateShellNavigationState () : Xamarin.Forms.ShellNavigationState = + upcast (new Xamarin.Forms.ShellNavigationState()) + + static member val UpdateFuncShellNavigationState = + (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ShellNavigationState) -> ViewBuilders.UpdateShellNavigationState (prevOpt, curr, target)) + + static member UpdateShellNavigationState (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ShellNavigationState) = + let mutable prevLocationOpt = ValueNone + let mutable currLocationOpt = ValueNone + for kvp in curr.AttributesKeyed do + if kvp.Key = ViewAttributes.LocationAttribKey.KeyValue then + currLocationOpt <- ValueSome (kvp.Value :?> System.Uri) + match prevOpt with + | ValueNone -> () + | ValueSome prev -> + for kvp in prev.AttributesKeyed do + if kvp.Key = ViewAttributes.LocationAttribKey.KeyValue then + prevLocationOpt <- ValueSome (kvp.Value :?> System.Uri) + match prevLocationOpt, currLocationOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.Location <- currValue + | ValueSome _, ValueNone -> target.Location <- null + | ValueNone, ValueNone -> () + + static member inline ConstructShellNavigationState(?location: System.Uri) = + + let attribBuilder = ViewBuilders.BuildShellNavigationState(0, + ?location=location) + + ViewElement.Create(ViewBuilders.CreateFuncShellNavigationState, ViewBuilders.UpdateFuncShellNavigationState, attribBuilder) + /// Viewer that allows to read the properties of a ViewElement representing a Element type ElementViewer(element: ViewElement) = do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Element' is expected, but '%s' was provided." element.TargetType.FullName @@ -14077,6 +14373,21 @@ type GridItemsLayoutViewer(element: ViewElement) = /// Get the value of the Span property member this.Span = element.GetAttributeKeyed(ViewAttributes.SpanAttribKey) +/// Viewer that allows to read the properties of a ViewElement representing a ItemsView +type ItemsViewViewer(element: ViewElement) = + inherit ViewViewer(element) + do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ItemsView' is expected, but '%s' was provided." element.TargetType.FullName + /// Get the value of the EmptyView property + member this.EmptyView = element.GetAttributeKeyed(ViewAttributes.EmptyViewAttribKey) + /// Get the value of the EmptyViewTemplate property + member this.EmptyViewTemplate = element.GetAttributeKeyed(ViewAttributes.EmptyViewTemplateAttribKey) + /// Get the value of the ItemsLayout property + member this.ItemsLayout = element.GetAttributeKeyed(ViewAttributes.ItemsLayoutAttribKey) + /// Get the value of the ItemsSource property + member this.ItemsSource = element.GetAttributeKeyed(ViewAttributes.ItemsSourceAttribKey) + /// Get the value of the ItemTemplate property + member this.ItemTemplate = element.GetAttributeKeyed(ViewAttributes.ItemTemplateAttribKey) + /// Viewer that allows to read the properties of a ViewElement representing a SearchHandler type SearchHandlerViewer(element: ViewElement) = do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.SearchHandler' is expected, but '%s' was provided." element.TargetType.FullName @@ -14130,7 +14441,7 @@ type ShellGroupItemViewer(element: ViewElement) = /// Viewer that allows to read the properties of a ViewElement representing a SelectableItemsView type SelectableItemsViewViewer(element: ViewElement) = - inherit ViewViewer(element) + inherit ItemsViewViewer(element) do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.SelectableItemsView' is expected, but '%s' was provided." element.TargetType.FullName /// Get the value of the SelectedItem property member this.SelectedItem = element.GetAttributeKeyed(ViewAttributes.SelectedItemAttribKey) @@ -14143,6 +14454,12 @@ type SelectableItemsViewViewer(element: ViewElement) = /// Get the value of the SelectionChanged property member this.SelectionChanged = element.GetAttributeKeyed(ViewAttributes.SelectionChangedAttribKey) +/// Viewer that allows to read the properties of a ViewElement representing a ShellNavigationState +type ShellNavigationStateViewer(element: ViewElement) = + do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ShellNavigationState' is expected, but '%s' was provided." element.TargetType.FullName + /// Get the value of the Location property + member this.Location = element.GetAttributeKeyed(ViewAttributes.LocationAttribKey) + type View() = /// Describes a Element in the view static member inline Element(?classId: string, @@ -18317,6 +18634,99 @@ type View() = ViewBuilders.ConstructGridItemsLayout(?span=span) + /// Describes a ItemsView in the view + static member inline ItemsView(?emptyView: System.Object, + ?emptyViewTemplate: Xamarin.Forms.DataTemplate, + ?itemsLayout: Xamarin.Forms.IItemsLayout, + ?itemsSource: System.Collections.IEnumerable, + ?itemTemplate: Xamarin.Forms.DataTemplate, + ?horizontalOptions: Xamarin.Forms.LayoutOptions, + ?verticalOptions: Xamarin.Forms.LayoutOptions, + ?margin: obj, + ?gestureRecognizers: ViewElement list, + ?anchorX: double, + ?anchorY: double, + ?backgroundColor: Xamarin.Forms.Color, + ?heightRequest: double, + ?inputTransparent: bool, + ?isEnabled: bool, + ?isVisible: bool, + ?minimumHeightRequest: double, + ?minimumWidthRequest: double, + ?opacity: double, + ?rotation: double, + ?rotationX: double, + ?rotationY: double, + ?scale: double, + ?style: Xamarin.Forms.Style, + ?styleClass: obj, + ?translationX: double, + ?translationY: double, + ?widthRequest: double, + ?resources: (string * obj) list, + ?styles: Xamarin.Forms.Style list, + ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, + ?isTabStop: bool, + ?scaleX: double, + ?scaleY: double, + ?tabIndex: int, + ?childrenReordered: System.EventArgs -> unit, + ?measureInvalidated: System.EventArgs -> unit, + ?focused: Xamarin.Forms.FocusEventArgs -> unit, + ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, + ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.ItemsView -> unit), + ?ref: ViewRef) = + + ViewBuilders.ConstructItemsView(?emptyView=emptyView, + ?emptyViewTemplate=emptyViewTemplate, + ?itemsLayout=itemsLayout, + ?itemsSource=itemsSource, + ?itemTemplate=itemTemplate, + ?horizontalOptions=horizontalOptions, + ?verticalOptions=verticalOptions, + ?margin=margin, + ?gestureRecognizers=gestureRecognizers, + ?anchorX=anchorX, + ?anchorY=anchorY, + ?backgroundColor=backgroundColor, + ?heightRequest=heightRequest, + ?inputTransparent=inputTransparent, + ?isEnabled=isEnabled, + ?isVisible=isVisible, + ?minimumHeightRequest=minimumHeightRequest, + ?minimumWidthRequest=minimumWidthRequest, + ?opacity=opacity, + ?rotation=rotation, + ?rotationX=rotationX, + ?rotationY=rotationY, + ?scale=scale, + ?style=style, + ?styleClass=styleClass, + ?translationX=translationX, + ?translationY=translationY, + ?widthRequest=widthRequest, + ?resources=resources, + ?styles=styles, + ?styleSheets=styleSheets, + ?isTabStop=isTabStop, + ?scaleX=scaleX, + ?scaleY=scaleY, + ?tabIndex=tabIndex, + ?childrenReordered=childrenReordered, + ?measureInvalidated=measureInvalidated, + ?focused=focused, + ?sizeChanged=sizeChanged, + ?unfocused=unfocused, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=created, + ?ref=ref) + /// Describes a SearchHandler in the view static member inline SearchHandler(?clearIcon: string, ?clearIconHelpText: string, @@ -18391,6 +18801,11 @@ type View() = ?selectionChangedCommandParameter: System.Object, ?selectionMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, + ?emptyView: System.Object, + ?emptyViewTemplate: Xamarin.Forms.DataTemplate, + ?itemsLayout: Xamarin.Forms.IItemsLayout, + ?itemsSource: System.Collections.IEnumerable, + ?itemTemplate: Xamarin.Forms.DataTemplate, ?horizontalOptions: Xamarin.Forms.LayoutOptions, ?verticalOptions: Xamarin.Forms.LayoutOptions, ?margin: obj, @@ -18437,6 +18852,11 @@ type View() = ?selectionChangedCommandParameter=selectionChangedCommandParameter, ?selectionMode=selectionMode, ?selectionChanged=selectionChanged, + ?emptyView=emptyView, + ?emptyViewTemplate=emptyViewTemplate, + ?itemsLayout=itemsLayout, + ?itemsSource=itemsSource, + ?itemTemplate=itemTemplate, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, @@ -18478,6 +18898,11 @@ type View() = ?created=created, ?ref=ref) + /// Describes a ShellNavigationState in the view + static member inline ShellNavigationState(?location: System.Uri) = + + ViewBuilders.ConstructShellNavigationState(?location=location) + [] module ViewElementExtensions = @@ -19219,6 +19644,21 @@ module ViewElementExtensions = /// Adjusts the Span property in the visual element member x.Span(value: int) = x.WithAttribute(ViewAttributes.SpanAttribKey, (value)) + /// Adjusts the EmptyView property in the visual element + member x.EmptyView(value: System.Object) = x.WithAttribute(ViewAttributes.EmptyViewAttribKey, (value)) + + /// Adjusts the EmptyViewTemplate property in the visual element + member x.EmptyViewTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.EmptyViewTemplateAttribKey, (value)) + + /// Adjusts the ItemsLayout property in the visual element + member x.ItemsLayout(value: Xamarin.Forms.IItemsLayout) = x.WithAttribute(ViewAttributes.ItemsLayoutAttribKey, (value)) + + /// Adjusts the ItemsSource property in the visual element + member x.ItemsSource(value: System.Collections.IEnumerable) = x.WithAttribute(ViewAttributes.ItemsSourceAttribKey, (value)) + + /// Adjusts the ItemTemplate property in the visual element + member x.ItemTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.ItemTemplateAttribKey, (value)) + /// Adjusts the ClearIcon property in the visual element member x.ClearIcon(value: string) = x.WithAttribute(ViewAttributes.ClearIconAttribKey, (value)) @@ -19288,6 +19728,9 @@ module ViewElementExtensions = /// Adjusts the SelectionChanged property in the visual element member x.SelectionChanged(value: Xamarin.Forms.SelectionChangedEventArgs -> unit) = x.WithAttribute(ViewAttributes.SelectionChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) + /// Adjusts the Location property in the visual element + member x.Location(value: System.Uri) = x.WithAttribute(ViewAttributes.LocationAttribKey, makeUri(value)) + member x.With(?classId: string, ?styleId: string, ?automationId: string, ?anchorX: double, ?anchorY: double, ?backgroundColor: Xamarin.Forms.Color, ?heightRequest: double, ?inputTransparent: bool, ?isEnabled: bool, ?isVisible: bool, ?minimumHeightRequest: double, ?minimumWidthRequest: double, ?opacity: double, ?rotation: double, ?rotationX: double, @@ -19337,11 +19780,12 @@ module ViewElementExtensions = ?listViewGrouped_ItemsSource: (string * ViewElement * ViewElement list) list, ?listViewGrouped_ShowJumpList: bool, ?listViewGrouped_SelectedItem: (int * int) option, ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, ?separatorColor: Xamarin.Forms.Color, ?listViewGrouped_ItemAppearing: int * int option -> unit, ?listViewGrouped_ItemDisappearing: int * int option -> unit, ?listViewGrouped_ItemSelected: (int * int) option -> unit, ?listViewGrouped_ItemTapped: int * int -> unit, ?refreshing: unit -> unit, ?textOverride: string, ?iconOverride: string, ?route: string, ?flyoutIcon: string, ?span: int, + ?emptyView: System.Object, ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, ?itemTemplate: Xamarin.Forms.DataTemplate, ?clearIcon: string, ?clearIconHelpText: string, ?clearIconName: string, ?clearPlaceholderCommand: unit -> unit, ?clearPlaceholderCommandParameter: System.Object, ?clearPlaceholderEnabled: bool, ?clearPlaceholderHelpText: string, ?clearPlaceholderIcon: string, ?clearPlaceholderName: string, ?displayMemberName: string, ?isSearchEnabled: bool, ?query: string, ?queryIcon: string, ?queryIconHelpText: string, ?queryIconName: string, ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?selectedItem: System.Object, ?selectionChangedCommand: unit -> unit, - ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit) = + ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?location: System.Uri) = let x = match classId with None -> x | Some opt -> x.ClassId(opt) let x = match styleId with None -> x | Some opt -> x.StyleId(opt) let x = match automationId with None -> x | Some opt -> x.AutomationId(opt) @@ -19587,6 +20031,11 @@ module ViewElementExtensions = let x = match route with None -> x | Some opt -> x.Route(opt) let x = match flyoutIcon with None -> x | Some opt -> x.FlyoutIcon(opt) let x = match span with None -> x | Some opt -> x.Span(opt) + let x = match emptyView with None -> x | Some opt -> x.EmptyView(opt) + let x = match emptyViewTemplate with None -> x | Some opt -> x.EmptyViewTemplate(opt) + let x = match itemsLayout with None -> x | Some opt -> x.ItemsLayout(opt) + let x = match itemsSource with None -> x | Some opt -> x.ItemsSource(opt) + let x = match itemTemplate with None -> x | Some opt -> x.ItemTemplate(opt) let x = match clearIcon with None -> x | Some opt -> x.ClearIcon(opt) let x = match clearIconHelpText with None -> x | Some opt -> x.ClearIconHelpText(opt) let x = match clearIconName with None -> x | Some opt -> x.ClearIconName(opt) @@ -19610,6 +20059,7 @@ module ViewElementExtensions = let x = match selectionChangedCommandParameter with None -> x | Some opt -> x.SelectionChangedCommandParameter(opt) let x = match selectableItemsMode with None -> x | Some opt -> x.selectableItemsMode(opt) let x = match selectionChanged with None -> x | Some opt -> x.SelectionChanged(opt) + let x = match location with None -> x | Some opt -> x.Location(opt) x /// Adjusts the ClassId property in the visual element @@ -20102,6 +20552,16 @@ module ViewElementExtensions = let flyoutIcon (value: string) (x: ViewElement) = x.FlyoutIcon(value) /// Adjusts the Span property in the visual element let span (value: int) (x: ViewElement) = x.Span(value) + /// Adjusts the EmptyView property in the visual element + let emptyView (value: System.Object) (x: ViewElement) = x.EmptyView(value) + /// Adjusts the EmptyViewTemplate property in the visual element + let emptyViewTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.EmptyViewTemplate(value) + /// Adjusts the ItemsLayout property in the visual element + let itemsLayout (value: Xamarin.Forms.IItemsLayout) (x: ViewElement) = x.ItemsLayout(value) + /// Adjusts the ItemsSource property in the visual element + let itemsSource (value: System.Collections.IEnumerable) (x: ViewElement) = x.ItemsSource(value) + /// Adjusts the ItemTemplate property in the visual element + let itemTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.ItemTemplate(value) /// Adjusts the ClearIcon property in the visual element let clearIcon (value: string) (x: ViewElement) = x.ClearIcon(value) /// Adjusts the ClearIconHelpText property in the visual element @@ -20148,3 +20608,5 @@ module ViewElementExtensions = let selectableItemsMode (value: Xamarin.Forms.SelectionMode) (x: ViewElement) = x.selectableItemsMode(value) /// Adjusts the SelectionChanged property in the visual element let selectionChanged (value: Xamarin.Forms.SelectionChangedEventArgs -> unit) (x: ViewElement) = x.SelectionChanged(value) + /// Adjusts the Location property in the visual element + let location (value: System.Uri) (x: ViewElement) = x.Location(value) diff --git a/tools/Generator/Xamarin.Forms.Core.json b/tools/Generator/Xamarin.Forms.Core.json index d79cd1578..12ec7e586 100644 --- a/tools/Generator/Xamarin.Forms.Core.json +++ b/tools/Generator/Xamarin.Forms.Core.json @@ -2121,6 +2121,31 @@ } ] }, + { + "name": "Xamarin.Forms.ItemsView", + "members": [ + { + "name": "EmptyView", + "defaultValue": "null" + }, + { + "name": "EmptyViewTemplate", + "defaultValue": "null" + }, + { + "name": "ItemsLayout", + "defaultValue": "null" + }, + { + "name": "ItemsSource", + "defaultValue": "null" + }, + { + "name": "ItemTemplate", + "defaultValue": "null" + } + ] + }, { "name": "Xamarin.Forms.SearchHandler", "members": [ @@ -2281,6 +2306,17 @@ "convToModel": "(fun f -> System.EventHandler(fun _sender args -> f args))" } ] + }, + { + "name": "Xamarin.Forms.ShellNavigationState", + "members": [ + { + "name": "Location", + "defaultValue": "null", + "inputType": "System.Uri", + "convToModel": "makeUri" + } + ] } ] } \ No newline at end of file From 570d8d0c3f4c1bc14986d13e351c418a6855367f Mon Sep 17 00:00:00 2001 From: SergejDK Date: Mon, 4 Mar 2019 23:38:29 +0100 Subject: [PATCH 04/18] shell --- src/Fabulous.Core/Xamarin.Forms.Core.fs | 612 +++++++++++++++++++++++- tools/Generator/Xamarin.Forms.Core.json | 57 +++ 2 files changed, 667 insertions(+), 2 deletions(-) diff --git a/src/Fabulous.Core/Xamarin.Forms.Core.fs b/src/Fabulous.Core/Xamarin.Forms.Core.fs index 7d7e5db5a..eb1ad1eaa 100644 --- a/src/Fabulous.Core/Xamarin.Forms.Core.fs +++ b/src/Fabulous.Core/Xamarin.Forms.Core.fs @@ -275,6 +275,17 @@ module ViewAttributes = let QueryIconNameAttribKey : AttributeKey<_> = AttributeKey<_>("QueryIconName") let SearchBoxVisibilityAttribKey : AttributeKey<_> = AttributeKey<_>("SearchBoxVisibility") let ShowsResultsAttribKey : AttributeKey<_> = AttributeKey<_>("ShowsResults") + let CurrentItemAttribKey : AttributeKey<_> = AttributeKey<_>("CurrentItem") + let FlyoutBackgroundColorAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutBackgroundColor") + let FlyoutBehaviorAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutBehavior") + let FlyoutHeaderAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutHeader") + let FlyoutHeaderBehaviorAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutHeaderBehavior") + let FlyoutHeaderTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutHeaderTemplate") + let FlyoutIsPresentedAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutIsPresented") + let GroupHeaderTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("GroupHeaderTemplate") + let MenuItemTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("MenuItemTemplate") + let RouteHostAttribKey : AttributeKey<_> = AttributeKey<_>("RouteHost") + let RouteSchemeAttribKey : AttributeKey<_> = AttributeKey<_>("RouteScheme") let FlyoutDisplayOptionsAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutDisplayOptions") let SelectedItemAttribKey : AttributeKey<_> = AttributeKey<_>("SelectedItem") let SelectionChangedCommandAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionChangedCommand") @@ -347,6 +358,7 @@ type ViewProto() = static member val ProtoGridItemsLayout : ViewElement option = None with get, set static member val ProtoItemsView : ViewElement option = None with get, set static member val ProtoSearchHandler : ViewElement option = None with get, set + static member val ProtoShell : ViewElement option = None with get, set static member val ProtoShellGroupItem : ViewElement option = None with get, set static member val ProtoSelectableItemsView : ViewElement option = None with get, set static member val ProtoShellNavigationState : ViewElement option = None with get, set @@ -13065,6 +13077,382 @@ type ViewBuilders() = ViewElement.Create(ViewBuilders.CreateFuncSearchHandler, ViewBuilders.UpdateFuncSearchHandler, attribBuilder) + /// Builds the attributes for a Shell in the view + static member inline BuildShell(attribCount: int, + ?currentItem: Xamarin.Forms.ShellItem, + ?flyoutBackgroundColor: Xamarin.Forms.Color, + ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, + ?flyoutHeader: System.Object, + ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, + ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, + ?flyoutIsPresented: bool, + ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, + ?itemTemplate: Xamarin.Forms.DataTemplate, + ?menuItemTemplate: Xamarin.Forms.DataTemplate, + ?route: string, + ?routeHost: string, + ?routeScheme: string, + ?title: string, + ?backgroundImage: string, + ?icon: string, + ?isBusy: bool, + ?padding: obj, + ?toolbarItems: ViewElement list, + ?useSafeArea: bool, + ?appearing: unit -> unit, + ?disappearing: unit -> unit, + ?layoutChanged: unit -> unit, + ?anchorX: double, + ?anchorY: double, + ?backgroundColor: Xamarin.Forms.Color, + ?heightRequest: double, + ?inputTransparent: bool, + ?isEnabled: bool, + ?isVisible: bool, + ?minimumHeightRequest: double, + ?minimumWidthRequest: double, + ?opacity: double, + ?rotation: double, + ?rotationX: double, + ?rotationY: double, + ?scale: double, + ?style: Xamarin.Forms.Style, + ?styleClass: obj, + ?translationX: double, + ?translationY: double, + ?widthRequest: double, + ?resources: (string * obj) list, + ?styles: Xamarin.Forms.Style list, + ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, + ?isTabStop: bool, + ?scaleX: double, + ?scaleY: double, + ?tabIndex: int, + ?childrenReordered: System.EventArgs -> unit, + ?measureInvalidated: System.EventArgs -> unit, + ?focused: Xamarin.Forms.FocusEventArgs -> unit, + ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, + ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: obj -> unit, + ?ref: ViewRef) = + + let attribCount = match currentItem with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match flyoutBackgroundColor with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match flyoutBehavior with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match flyoutHeader with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match flyoutHeaderBehavior with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match flyoutHeaderTemplate with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match flyoutIsPresented with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match groupHeaderTemplate with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match itemTemplate with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match menuItemTemplate with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match route with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match routeHost with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match routeScheme with Some _ -> attribCount + 1 | None -> attribCount + + let attribBuilder = ViewBuilders.BuildPage(attribCount, ?title=title, ?backgroundImage=backgroundImage, ?icon=icon, ?isBusy=isBusy, ?padding=padding, ?toolbarItems=toolbarItems, ?useSafeArea=useSafeArea, ?appearing=appearing, ?disappearing=disappearing, ?layoutChanged=layoutChanged, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + match currentItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CurrentItemAttribKey, (v)) + match flyoutBackgroundColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutBackgroundColorAttribKey, (v)) + match flyoutBehavior with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutBehaviorAttribKey, (v)) + match flyoutHeader with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutHeaderAttribKey, (v)) + match flyoutHeaderBehavior with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutHeaderBehaviorAttribKey, (v)) + match flyoutHeaderTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutHeaderTemplateAttribKey, (v)) + match flyoutIsPresented with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutIsPresentedAttribKey, (v)) + match groupHeaderTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.GroupHeaderTemplateAttribKey, (v)) + match itemTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemTemplateAttribKey, (v)) + match menuItemTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MenuItemTemplateAttribKey, (v)) + match route with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RouteAttribKey, (v)) + match routeHost with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RouteHostAttribKey, (v)) + match routeScheme with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RouteSchemeAttribKey, (v)) + attribBuilder + + static member val CreateFuncShell : (unit -> Xamarin.Forms.Shell) = (fun () -> ViewBuilders.CreateShell()) with get, set + + static member CreateShell () : Xamarin.Forms.Shell = + upcast (new Xamarin.Forms.Shell()) + + static member val UpdateFuncShell = + (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Shell) -> ViewBuilders.UpdateShell (prevOpt, curr, target)) + + static member UpdateShell (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Shell) = + // update the inherited Page element + let baseElement = (if ViewProto.ProtoPage.IsNone then ViewProto.ProtoPage <- Some (ViewBuilders.ConstructPage())); ViewProto.ProtoPage.Value + baseElement.UpdateInherited (prevOpt, curr, target) + let mutable prevCurrentItemOpt = ValueNone + let mutable currCurrentItemOpt = ValueNone + let mutable prevFlyoutBackgroundColorOpt = ValueNone + let mutable currFlyoutBackgroundColorOpt = ValueNone + let mutable prevFlyoutBehaviorOpt = ValueNone + let mutable currFlyoutBehaviorOpt = ValueNone + let mutable prevFlyoutHeaderOpt = ValueNone + let mutable currFlyoutHeaderOpt = ValueNone + let mutable prevFlyoutHeaderBehaviorOpt = ValueNone + let mutable currFlyoutHeaderBehaviorOpt = ValueNone + let mutable prevFlyoutHeaderTemplateOpt = ValueNone + let mutable currFlyoutHeaderTemplateOpt = ValueNone + let mutable prevFlyoutIsPresentedOpt = ValueNone + let mutable currFlyoutIsPresentedOpt = ValueNone + let mutable prevGroupHeaderTemplateOpt = ValueNone + let mutable currGroupHeaderTemplateOpt = ValueNone + let mutable prevItemTemplateOpt = ValueNone + let mutable currItemTemplateOpt = ValueNone + let mutable prevMenuItemTemplateOpt = ValueNone + let mutable currMenuItemTemplateOpt = ValueNone + let mutable prevRouteOpt = ValueNone + let mutable currRouteOpt = ValueNone + let mutable prevRouteHostOpt = ValueNone + let mutable currRouteHostOpt = ValueNone + let mutable prevRouteSchemeOpt = ValueNone + let mutable currRouteSchemeOpt = ValueNone + for kvp in curr.AttributesKeyed do + if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then + currCurrentItemOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ShellItem) + if kvp.Key = ViewAttributes.FlyoutBackgroundColorAttribKey.KeyValue then + currFlyoutBackgroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) + if kvp.Key = ViewAttributes.FlyoutBehaviorAttribKey.KeyValue then + currFlyoutBehaviorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlyoutBehavior) + if kvp.Key = ViewAttributes.FlyoutHeaderAttribKey.KeyValue then + currFlyoutHeaderOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.FlyoutHeaderBehaviorAttribKey.KeyValue then + currFlyoutHeaderBehaviorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlyoutHeaderBehavior) + if kvp.Key = ViewAttributes.FlyoutHeaderTemplateAttribKey.KeyValue then + currFlyoutHeaderTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + if kvp.Key = ViewAttributes.FlyoutIsPresentedAttribKey.KeyValue then + currFlyoutIsPresentedOpt <- ValueSome (kvp.Value :?> bool) + if kvp.Key = ViewAttributes.GroupHeaderTemplateAttribKey.KeyValue then + currGroupHeaderTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + if kvp.Key = ViewAttributes.ItemTemplateAttribKey.KeyValue then + currItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + if kvp.Key = ViewAttributes.MenuItemTemplateAttribKey.KeyValue then + currMenuItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + if kvp.Key = ViewAttributes.RouteAttribKey.KeyValue then + currRouteOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.RouteHostAttribKey.KeyValue then + currRouteHostOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.RouteSchemeAttribKey.KeyValue then + currRouteSchemeOpt <- ValueSome (kvp.Value :?> string) + match prevOpt with + | ValueNone -> () + | ValueSome prev -> + for kvp in prev.AttributesKeyed do + if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then + prevCurrentItemOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ShellItem) + if kvp.Key = ViewAttributes.FlyoutBackgroundColorAttribKey.KeyValue then + prevFlyoutBackgroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) + if kvp.Key = ViewAttributes.FlyoutBehaviorAttribKey.KeyValue then + prevFlyoutBehaviorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlyoutBehavior) + if kvp.Key = ViewAttributes.FlyoutHeaderAttribKey.KeyValue then + prevFlyoutHeaderOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.FlyoutHeaderBehaviorAttribKey.KeyValue then + prevFlyoutHeaderBehaviorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlyoutHeaderBehavior) + if kvp.Key = ViewAttributes.FlyoutHeaderTemplateAttribKey.KeyValue then + prevFlyoutHeaderTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + if kvp.Key = ViewAttributes.FlyoutIsPresentedAttribKey.KeyValue then + prevFlyoutIsPresentedOpt <- ValueSome (kvp.Value :?> bool) + if kvp.Key = ViewAttributes.GroupHeaderTemplateAttribKey.KeyValue then + prevGroupHeaderTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + if kvp.Key = ViewAttributes.ItemTemplateAttribKey.KeyValue then + prevItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + if kvp.Key = ViewAttributes.MenuItemTemplateAttribKey.KeyValue then + prevMenuItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + if kvp.Key = ViewAttributes.RouteAttribKey.KeyValue then + prevRouteOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.RouteHostAttribKey.KeyValue then + prevRouteHostOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.RouteSchemeAttribKey.KeyValue then + prevRouteSchemeOpt <- ValueSome (kvp.Value :?> string) + match prevCurrentItemOpt, currCurrentItemOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.CurrentItem <- currValue + | ValueSome _, ValueNone -> target.CurrentItem <- null + | ValueNone, ValueNone -> () + match prevFlyoutBackgroundColorOpt, currFlyoutBackgroundColorOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.FlyoutBackgroundColor <- currValue + | ValueSome _, ValueNone -> target.FlyoutBackgroundColor <- Xamarin.Forms.Color.Default + | ValueNone, ValueNone -> () + match prevFlyoutBehaviorOpt, currFlyoutBehaviorOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.FlyoutBehavior <- currValue + | ValueSome _, ValueNone -> target.FlyoutBehavior <- Xamarin.Forms.FlyoutBehavior.Flyout + | ValueNone, ValueNone -> () + match prevFlyoutHeaderOpt, currFlyoutHeaderOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.FlyoutHeader <- currValue + | ValueSome _, ValueNone -> target.FlyoutHeader <- null + | ValueNone, ValueNone -> () + match prevFlyoutHeaderBehaviorOpt, currFlyoutHeaderBehaviorOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.FlyoutHeaderBehavior <- currValue + | ValueSome _, ValueNone -> target.FlyoutHeaderBehavior <- Xamarin.Forms.FlyoutHeaderBehavior.Default + | ValueNone, ValueNone -> () + match prevFlyoutHeaderTemplateOpt, currFlyoutHeaderTemplateOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.FlyoutHeaderTemplate <- currValue + | ValueSome _, ValueNone -> target.FlyoutHeaderTemplate <- null + | ValueNone, ValueNone -> () + match prevFlyoutIsPresentedOpt, currFlyoutIsPresentedOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.FlyoutIsPresented <- currValue + | ValueSome _, ValueNone -> target.FlyoutIsPresented <- false + | ValueNone, ValueNone -> () + match prevGroupHeaderTemplateOpt, currGroupHeaderTemplateOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.GroupHeaderTemplate <- currValue + | ValueSome _, ValueNone -> target.GroupHeaderTemplate <- null + | ValueNone, ValueNone -> () + match prevItemTemplateOpt, currItemTemplateOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ItemTemplate <- currValue + | ValueSome _, ValueNone -> target.ItemTemplate <- null + | ValueNone, ValueNone -> () + match prevMenuItemTemplateOpt, currMenuItemTemplateOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.MenuItemTemplate <- currValue + | ValueSome _, ValueNone -> target.MenuItemTemplate <- null + | ValueNone, ValueNone -> () + match prevRouteOpt, currRouteOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.Route <- currValue + | ValueSome _, ValueNone -> target.Route <- null + | ValueNone, ValueNone -> () + match prevRouteHostOpt, currRouteHostOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.RouteHost <- currValue + | ValueSome _, ValueNone -> target.RouteHost <- null + | ValueNone, ValueNone -> () + match prevRouteSchemeOpt, currRouteSchemeOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.RouteScheme <- currValue + | ValueSome _, ValueNone -> target.RouteScheme <- null + | ValueNone, ValueNone -> () + + static member inline ConstructShell(?currentItem: Xamarin.Forms.ShellItem, + ?flyoutBackgroundColor: Xamarin.Forms.Color, + ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, + ?flyoutHeader: System.Object, + ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, + ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, + ?flyoutIsPresented: bool, + ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, + ?itemTemplate: Xamarin.Forms.DataTemplate, + ?menuItemTemplate: Xamarin.Forms.DataTemplate, + ?route: string, + ?routeHost: string, + ?routeScheme: string, + ?title: string, + ?backgroundImage: string, + ?icon: string, + ?isBusy: bool, + ?padding: obj, + ?toolbarItems: ViewElement list, + ?useSafeArea: bool, + ?appearing: unit -> unit, + ?disappearing: unit -> unit, + ?layoutChanged: unit -> unit, + ?anchorX: double, + ?anchorY: double, + ?backgroundColor: Xamarin.Forms.Color, + ?heightRequest: double, + ?inputTransparent: bool, + ?isEnabled: bool, + ?isVisible: bool, + ?minimumHeightRequest: double, + ?minimumWidthRequest: double, + ?opacity: double, + ?rotation: double, + ?rotationX: double, + ?rotationY: double, + ?scale: double, + ?style: Xamarin.Forms.Style, + ?styleClass: obj, + ?translationX: double, + ?translationY: double, + ?widthRequest: double, + ?resources: (string * obj) list, + ?styles: Xamarin.Forms.Style list, + ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, + ?isTabStop: bool, + ?scaleX: double, + ?scaleY: double, + ?tabIndex: int, + ?childrenReordered: System.EventArgs -> unit, + ?measureInvalidated: System.EventArgs -> unit, + ?focused: Xamarin.Forms.FocusEventArgs -> unit, + ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, + ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.Shell -> unit), + ?ref: ViewRef) = + + let attribBuilder = ViewBuilders.BuildShell(0, + ?currentItem=currentItem, + ?flyoutBackgroundColor=flyoutBackgroundColor, + ?flyoutBehavior=flyoutBehavior, + ?flyoutHeader=flyoutHeader, + ?flyoutHeaderBehavior=flyoutHeaderBehavior, + ?flyoutHeaderTemplate=flyoutHeaderTemplate, + ?flyoutIsPresented=flyoutIsPresented, + ?groupHeaderTemplate=groupHeaderTemplate, + ?itemTemplate=itemTemplate, + ?menuItemTemplate=menuItemTemplate, + ?route=route, + ?routeHost=routeHost, + ?routeScheme=routeScheme, + ?title=title, + ?backgroundImage=backgroundImage, + ?icon=icon, + ?isBusy=isBusy, + ?padding=padding, + ?toolbarItems=toolbarItems, + ?useSafeArea=useSafeArea, + ?appearing=appearing, + ?disappearing=disappearing, + ?layoutChanged=layoutChanged, + ?anchorX=anchorX, + ?anchorY=anchorY, + ?backgroundColor=backgroundColor, + ?heightRequest=heightRequest, + ?inputTransparent=inputTransparent, + ?isEnabled=isEnabled, + ?isVisible=isVisible, + ?minimumHeightRequest=minimumHeightRequest, + ?minimumWidthRequest=minimumWidthRequest, + ?opacity=opacity, + ?rotation=rotation, + ?rotationX=rotationX, + ?rotationY=rotationY, + ?scale=scale, + ?style=style, + ?styleClass=styleClass, + ?translationX=translationX, + ?translationY=translationY, + ?widthRequest=widthRequest, + ?resources=resources, + ?styles=styles, + ?styleSheets=styleSheets, + ?isTabStop=isTabStop, + ?scaleX=scaleX, + ?scaleY=scaleY, + ?tabIndex=tabIndex, + ?childrenReordered=childrenReordered, + ?measureInvalidated=measureInvalidated, + ?focused=focused, + ?sizeChanged=sizeChanged, + ?unfocused=unfocused, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), + ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) + + ViewElement.Create(ViewBuilders.CreateFuncShell, ViewBuilders.UpdateFuncShell, attribBuilder) + /// Builds the attributes for a ShellGroupItem in the view static member inline BuildShellGroupItem(attribCount: int, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, @@ -14432,6 +14820,37 @@ type SearchHandlerViewer(element: ViewElement) = /// Get the value of the ShowsResults property member this.ShowsResults = element.GetAttributeKeyed(ViewAttributes.ShowsResultsAttribKey) +/// Viewer that allows to read the properties of a ViewElement representing a Shell +type ShellViewer(element: ViewElement) = + inherit PageViewer(element) + do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Shell' is expected, but '%s' was provided." element.TargetType.FullName + /// Get the value of the CurrentItem property + member this.CurrentItem = element.GetAttributeKeyed(ViewAttributes.CurrentItemAttribKey) + /// Get the value of the FlyoutBackgroundColor property + member this.FlyoutBackgroundColor = element.GetAttributeKeyed(ViewAttributes.FlyoutBackgroundColorAttribKey) + /// Get the value of the FlyoutBehavior property + member this.FlyoutBehavior = element.GetAttributeKeyed(ViewAttributes.FlyoutBehaviorAttribKey) + /// Get the value of the FlyoutHeader property + member this.FlyoutHeader = element.GetAttributeKeyed(ViewAttributes.FlyoutHeaderAttribKey) + /// Get the value of the FlyoutHeaderBehavior property + member this.FlyoutHeaderBehavior = element.GetAttributeKeyed(ViewAttributes.FlyoutHeaderBehaviorAttribKey) + /// Get the value of the FlyoutHeaderTemplate property + member this.FlyoutHeaderTemplate = element.GetAttributeKeyed(ViewAttributes.FlyoutHeaderTemplateAttribKey) + /// Get the value of the FlyoutIsPresented property + member this.FlyoutIsPresented = element.GetAttributeKeyed(ViewAttributes.FlyoutIsPresentedAttribKey) + /// Get the value of the GroupHeaderTemplate property + member this.GroupHeaderTemplate = element.GetAttributeKeyed(ViewAttributes.GroupHeaderTemplateAttribKey) + /// Get the value of the ItemTemplate property + member this.ItemTemplate = element.GetAttributeKeyed(ViewAttributes.ItemTemplateAttribKey) + /// Get the value of the MenuItemTemplate property + member this.MenuItemTemplate = element.GetAttributeKeyed(ViewAttributes.MenuItemTemplateAttribKey) + /// Get the value of the Route property + member this.Route = element.GetAttributeKeyed(ViewAttributes.RouteAttribKey) + /// Get the value of the RouteHost property + member this.RouteHost = element.GetAttributeKeyed(ViewAttributes.RouteHostAttribKey) + /// Get the value of the RouteScheme property + member this.RouteScheme = element.GetAttributeKeyed(ViewAttributes.RouteSchemeAttribKey) + /// Viewer that allows to read the properties of a ViewElement representing a ShellGroupItem type ShellGroupItemViewer(element: ViewElement) = inherit BaseShellItemViewer(element) @@ -18770,6 +19189,127 @@ type View() = ?searchBoxVisibility=searchBoxVisibility, ?showsResults=showsResults) + /// Describes a Shell in the view + static member inline Shell(?currentItem: Xamarin.Forms.ShellItem, + ?flyoutBackgroundColor: Xamarin.Forms.Color, + ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, + ?flyoutHeader: System.Object, + ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, + ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, + ?flyoutIsPresented: bool, + ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, + ?itemTemplate: Xamarin.Forms.DataTemplate, + ?menuItemTemplate: Xamarin.Forms.DataTemplate, + ?route: string, + ?routeHost: string, + ?routeScheme: string, + ?title: string, + ?backgroundImage: string, + ?icon: string, + ?isBusy: bool, + ?padding: obj, + ?toolbarItems: ViewElement list, + ?useSafeArea: bool, + ?appearing: unit -> unit, + ?disappearing: unit -> unit, + ?layoutChanged: unit -> unit, + ?anchorX: double, + ?anchorY: double, + ?backgroundColor: Xamarin.Forms.Color, + ?heightRequest: double, + ?inputTransparent: bool, + ?isEnabled: bool, + ?isVisible: bool, + ?minimumHeightRequest: double, + ?minimumWidthRequest: double, + ?opacity: double, + ?rotation: double, + ?rotationX: double, + ?rotationY: double, + ?scale: double, + ?style: Xamarin.Forms.Style, + ?styleClass: obj, + ?translationX: double, + ?translationY: double, + ?widthRequest: double, + ?resources: (string * obj) list, + ?styles: Xamarin.Forms.Style list, + ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, + ?isTabStop: bool, + ?scaleX: double, + ?scaleY: double, + ?tabIndex: int, + ?childrenReordered: System.EventArgs -> unit, + ?measureInvalidated: System.EventArgs -> unit, + ?focused: Xamarin.Forms.FocusEventArgs -> unit, + ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, + ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.Shell -> unit), + ?ref: ViewRef) = + + ViewBuilders.ConstructShell(?currentItem=currentItem, + ?flyoutBackgroundColor=flyoutBackgroundColor, + ?flyoutBehavior=flyoutBehavior, + ?flyoutHeader=flyoutHeader, + ?flyoutHeaderBehavior=flyoutHeaderBehavior, + ?flyoutHeaderTemplate=flyoutHeaderTemplate, + ?flyoutIsPresented=flyoutIsPresented, + ?groupHeaderTemplate=groupHeaderTemplate, + ?itemTemplate=itemTemplate, + ?menuItemTemplate=menuItemTemplate, + ?route=route, + ?routeHost=routeHost, + ?routeScheme=routeScheme, + ?title=title, + ?backgroundImage=backgroundImage, + ?icon=icon, + ?isBusy=isBusy, + ?padding=padding, + ?toolbarItems=toolbarItems, + ?useSafeArea=useSafeArea, + ?appearing=appearing, + ?disappearing=disappearing, + ?layoutChanged=layoutChanged, + ?anchorX=anchorX, + ?anchorY=anchorY, + ?backgroundColor=backgroundColor, + ?heightRequest=heightRequest, + ?inputTransparent=inputTransparent, + ?isEnabled=isEnabled, + ?isVisible=isVisible, + ?minimumHeightRequest=minimumHeightRequest, + ?minimumWidthRequest=minimumWidthRequest, + ?opacity=opacity, + ?rotation=rotation, + ?rotationX=rotationX, + ?rotationY=rotationY, + ?scale=scale, + ?style=style, + ?styleClass=styleClass, + ?translationX=translationX, + ?translationY=translationY, + ?widthRequest=widthRequest, + ?resources=resources, + ?styles=styles, + ?styleSheets=styleSheets, + ?isTabStop=isTabStop, + ?scaleX=scaleX, + ?scaleY=scaleY, + ?tabIndex=tabIndex, + ?childrenReordered=childrenReordered, + ?measureInvalidated=measureInvalidated, + ?focused=focused, + ?sizeChanged=sizeChanged, + ?unfocused=unfocused, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=created, + ?ref=ref) + /// Describes a ShellGroupItem in the view static member inline ShellGroupItem(?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?title: string, @@ -19710,6 +20250,39 @@ module ViewElementExtensions = /// Adjusts the ShowsResults property in the visual element member x.ShowsResults(value: bool) = x.WithAttribute(ViewAttributes.ShowsResultsAttribKey, (value)) + /// Adjusts the CurrentItem property in the visual element + member x.CurrentItem(value: Xamarin.Forms.ShellItem) = x.WithAttribute(ViewAttributes.CurrentItemAttribKey, (value)) + + /// Adjusts the FlyoutBackgroundColor property in the visual element + member x.FlyoutBackgroundColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.FlyoutBackgroundColorAttribKey, (value)) + + /// Adjusts the FlyoutBehavior property in the visual element + member x.FlyoutBehavior(value: Xamarin.Forms.FlyoutBehavior) = x.WithAttribute(ViewAttributes.FlyoutBehaviorAttribKey, (value)) + + /// Adjusts the FlyoutHeader property in the visual element + member x.FlyoutHeader(value: System.Object) = x.WithAttribute(ViewAttributes.FlyoutHeaderAttribKey, (value)) + + /// Adjusts the FlyoutHeaderBehavior property in the visual element + member x.FlyoutHeaderBehavior(value: Xamarin.Forms.FlyoutHeaderBehavior) = x.WithAttribute(ViewAttributes.FlyoutHeaderBehaviorAttribKey, (value)) + + /// Adjusts the FlyoutHeaderTemplate property in the visual element + member x.FlyoutHeaderTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.FlyoutHeaderTemplateAttribKey, (value)) + + /// Adjusts the FlyoutIsPresented property in the visual element + member x.FlyoutIsPresented(value: bool) = x.WithAttribute(ViewAttributes.FlyoutIsPresentedAttribKey, (value)) + + /// Adjusts the GroupHeaderTemplate property in the visual element + member x.GroupHeaderTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.GroupHeaderTemplateAttribKey, (value)) + + /// Adjusts the MenuItemTemplate property in the visual element + member x.MenuItemTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.MenuItemTemplateAttribKey, (value)) + + /// Adjusts the RouteHost property in the visual element + member x.RouteHost(value: string) = x.WithAttribute(ViewAttributes.RouteHostAttribKey, (value)) + + /// Adjusts the RouteScheme property in the visual element + member x.RouteScheme(value: string) = x.WithAttribute(ViewAttributes.RouteSchemeAttribKey, (value)) + /// Adjusts the FlyoutDisplayOptions property in the visual element member x.FlyoutDisplayOptions(value: Xamarin.Forms.FlyoutDisplayOptions) = x.WithAttribute(ViewAttributes.FlyoutDisplayOptionsAttribKey, (value)) @@ -19784,8 +20357,10 @@ module ViewElementExtensions = ?clearIcon: string, ?clearIconHelpText: string, ?clearIconName: string, ?clearPlaceholderCommand: unit -> unit, ?clearPlaceholderCommandParameter: System.Object, ?clearPlaceholderEnabled: bool, ?clearPlaceholderHelpText: string, ?clearPlaceholderIcon: string, ?clearPlaceholderName: string, ?displayMemberName: string, ?isSearchEnabled: bool, ?query: string, ?queryIcon: string, ?queryIconHelpText: string, ?queryIconName: string, - ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?selectedItem: System.Object, ?selectionChangedCommand: unit -> unit, - ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?location: System.Uri) = + ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, ?currentItem: Xamarin.Forms.ShellItem, ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, + ?flyoutHeader: System.Object, ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, ?flyoutIsPresented: bool, ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, + ?menuItemTemplate: Xamarin.Forms.DataTemplate, ?routeHost: string, ?routeScheme: string, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?selectedItem: System.Object, + ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?location: System.Uri) = let x = match classId with None -> x | Some opt -> x.ClassId(opt) let x = match styleId with None -> x | Some opt -> x.StyleId(opt) let x = match automationId with None -> x | Some opt -> x.AutomationId(opt) @@ -20053,6 +20628,17 @@ module ViewElementExtensions = let x = match queryIconName with None -> x | Some opt -> x.QueryIconName(opt) let x = match searchBoxVisibility with None -> x | Some opt -> x.SearchBoxVisibility(opt) let x = match showsResults with None -> x | Some opt -> x.ShowsResults(opt) + let x = match currentItem with None -> x | Some opt -> x.CurrentItem(opt) + let x = match flyoutBackgroundColor with None -> x | Some opt -> x.FlyoutBackgroundColor(opt) + let x = match flyoutBehavior with None -> x | Some opt -> x.FlyoutBehavior(opt) + let x = match flyoutHeader with None -> x | Some opt -> x.FlyoutHeader(opt) + let x = match flyoutHeaderBehavior with None -> x | Some opt -> x.FlyoutHeaderBehavior(opt) + let x = match flyoutHeaderTemplate with None -> x | Some opt -> x.FlyoutHeaderTemplate(opt) + let x = match flyoutIsPresented with None -> x | Some opt -> x.FlyoutIsPresented(opt) + let x = match groupHeaderTemplate with None -> x | Some opt -> x.GroupHeaderTemplate(opt) + let x = match menuItemTemplate with None -> x | Some opt -> x.MenuItemTemplate(opt) + let x = match routeHost with None -> x | Some opt -> x.RouteHost(opt) + let x = match routeScheme with None -> x | Some opt -> x.RouteScheme(opt) let x = match flyoutDisplayOptions with None -> x | Some opt -> x.FlyoutDisplayOptions(opt) let x = match selectedItem with None -> x | Some opt -> x.SelectedItem(opt) let x = match selectionChangedCommand with None -> x | Some opt -> x.SelectionChangedCommand(opt) @@ -20596,6 +21182,28 @@ module ViewElementExtensions = let searchBoxVisibility (value: Xamarin.Forms.SearchBoxVisiblity) (x: ViewElement) = x.SearchBoxVisibility(value) /// Adjusts the ShowsResults property in the visual element let showsResults (value: bool) (x: ViewElement) = x.ShowsResults(value) + /// Adjusts the CurrentItem property in the visual element + let currentItem (value: Xamarin.Forms.ShellItem) (x: ViewElement) = x.CurrentItem(value) + /// Adjusts the FlyoutBackgroundColor property in the visual element + let flyoutBackgroundColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.FlyoutBackgroundColor(value) + /// Adjusts the FlyoutBehavior property in the visual element + let flyoutBehavior (value: Xamarin.Forms.FlyoutBehavior) (x: ViewElement) = x.FlyoutBehavior(value) + /// Adjusts the FlyoutHeader property in the visual element + let flyoutHeader (value: System.Object) (x: ViewElement) = x.FlyoutHeader(value) + /// Adjusts the FlyoutHeaderBehavior property in the visual element + let flyoutHeaderBehavior (value: Xamarin.Forms.FlyoutHeaderBehavior) (x: ViewElement) = x.FlyoutHeaderBehavior(value) + /// Adjusts the FlyoutHeaderTemplate property in the visual element + let flyoutHeaderTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.FlyoutHeaderTemplate(value) + /// Adjusts the FlyoutIsPresented property in the visual element + let flyoutIsPresented (value: bool) (x: ViewElement) = x.FlyoutIsPresented(value) + /// Adjusts the GroupHeaderTemplate property in the visual element + let groupHeaderTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.GroupHeaderTemplate(value) + /// Adjusts the MenuItemTemplate property in the visual element + let menuItemTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.MenuItemTemplate(value) + /// Adjusts the RouteHost property in the visual element + let routeHost (value: string) (x: ViewElement) = x.RouteHost(value) + /// Adjusts the RouteScheme property in the visual element + let routeScheme (value: string) (x: ViewElement) = x.RouteScheme(value) /// Adjusts the FlyoutDisplayOptions property in the visual element let flyoutDisplayOptions (value: Xamarin.Forms.FlyoutDisplayOptions) (x: ViewElement) = x.FlyoutDisplayOptions(value) /// Adjusts the SelectedItem property in the visual element diff --git a/tools/Generator/Xamarin.Forms.Core.json b/tools/Generator/Xamarin.Forms.Core.json index 12ec7e586..d3d08b921 100644 --- a/tools/Generator/Xamarin.Forms.Core.json +++ b/tools/Generator/Xamarin.Forms.Core.json @@ -2266,6 +2266,63 @@ } ] }, + { + "name": "Xamarin.Forms.Shell", + "members": [ + { + "name": "CurrentItem", + "defaultValue": "null" + }, + { + "name": "FlyoutBackgroundColor", + "defaultValue": "Xamarin.Forms.Color.Default" + }, + { + "name": "FlyoutBehavior", + "defaultValue": "Xamarin.Forms.FlyoutBehavior.Flyout" + }, + { + "name": "FlyoutHeader", + "defaultValue": "null" + }, + { + "name": "FlyoutHeaderBehavior", + "defaultValue": "Xamarin.Forms.FlyoutHeaderBehavior.Default" + }, + { + "name": "FlyoutHeaderTemplate", + "defaultValue": "null" + }, + { + "name": "FlyoutIsPresented", + "defaultValue": "false" + }, + { + "name": "GroupHeaderTemplate", + "defaultValue": "null" + }, + { + "name": "ItemTemplate", + "defaultValue": "null" + }, + { + "name": "MenuItemTemplate", + "defaultValue": "null" + }, + { + "name": "Route", + "defaultValue": "null" + }, + { + "name": "RouteHost", + "defaultValue": "null" + }, + { + "name": "RouteScheme", + "defaultValue": "null" + } + ] + }, { "name": "Xamarin.Forms.ShellGroupItem", "members": [ From 4aae2dc2df4e5ef3a24f6504158c7f7ea989cc17 Mon Sep 17 00:00:00 2001 From: Sergej Dick Date: Tue, 5 Mar 2019 09:05:42 +0100 Subject: [PATCH 05/18] shellcontent, shellitem, shellsection first input --- src/Fabulous.Core/ViewConverters.fs | 6 + src/Fabulous.Core/Xamarin.Forms.Core.fs | 404 +++++++++++++++++++++++- tools/Generator/Xamarin.Forms.Core.json | 34 ++ 3 files changed, 432 insertions(+), 12 deletions(-) diff --git a/src/Fabulous.Core/ViewConverters.fs b/src/Fabulous.Core/ViewConverters.fs index fc732d12f..851f83a41 100644 --- a/src/Fabulous.Core/ViewConverters.fs +++ b/src/Fabulous.Core/ViewConverters.fs @@ -221,6 +221,12 @@ module Converters = | :? Uri as uri -> ShellNavigationState.op_Implicit uri | _ -> failwithf "makeUri: invalid argument %O" v + /// Converts a datatemplate to a Xamarin.Forms TemplatedPage + let makeTemplate (v: obj) = + match v with + | :? TemplatedPage as p -> ShellContent.op_Implicit p + | _ -> failwithf "makeTemplate: invalid argument %O" v + /// Checks whether two objects are reference-equal let identical (x: 'T) (y:'T) = System.Object.ReferenceEquals(x, y) diff --git a/src/Fabulous.Core/Xamarin.Forms.Core.fs b/src/Fabulous.Core/Xamarin.Forms.Core.fs index eb1ad1eaa..136205219 100644 --- a/src/Fabulous.Core/Xamarin.Forms.Core.fs +++ b/src/Fabulous.Core/Xamarin.Forms.Core.fs @@ -293,6 +293,7 @@ module ViewAttributes = let selectableItemsModeAttribKey : AttributeKey<_> = AttributeKey<_>("selectableItemsMode") let SelectionChangedAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionChanged") let LocationAttribKey : AttributeKey<_> = AttributeKey<_>("Location") + let ContentTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("ContentTemplate") type ViewProto() = static member val ProtoElement : ViewElement option = None with get, set @@ -362,6 +363,9 @@ type ViewProto() = static member val ProtoShellGroupItem : ViewElement option = None with get, set static member val ProtoSelectableItemsView : ViewElement option = None with get, set static member val ProtoShellNavigationState : ViewElement option = None with get, set + static member val ProtoShellContent : ViewElement option = None with get, set + static member val ProtoShellItem : ViewElement option = None with get, set + static member val ProtoShellSection : ViewElement option = None with get, set type ViewBuilders() = /// Builds the attributes for a Element in the view @@ -13079,7 +13083,7 @@ type ViewBuilders() = /// Builds the attributes for a Shell in the view static member inline BuildShell(attribCount: int, - ?currentItem: Xamarin.Forms.ShellItem, + ?currentItem: ViewElement, ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, @@ -13209,7 +13213,7 @@ type ViewBuilders() = let mutable currRouteSchemeOpt = ValueNone for kvp in curr.AttributesKeyed do if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then - currCurrentItemOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ShellItem) + currCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) if kvp.Key = ViewAttributes.FlyoutBackgroundColorAttribKey.KeyValue then currFlyoutBackgroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) if kvp.Key = ViewAttributes.FlyoutBehaviorAttribKey.KeyValue then @@ -13239,7 +13243,7 @@ type ViewBuilders() = | ValueSome prev -> for kvp in prev.AttributesKeyed do if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then - prevCurrentItemOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ShellItem) + prevCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) if kvp.Key = ViewAttributes.FlyoutBackgroundColorAttribKey.KeyValue then prevFlyoutBackgroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) if kvp.Key = ViewAttributes.FlyoutBehaviorAttribKey.KeyValue then @@ -13265,9 +13269,14 @@ type ViewBuilders() = if kvp.Key = ViewAttributes.RouteSchemeAttribKey.KeyValue then prevRouteSchemeOpt <- ValueSome (kvp.Value :?> string) match prevCurrentItemOpt, currCurrentItemOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.CurrentItem <- currValue - | ValueSome _, ValueNone -> target.CurrentItem <- null + // For structured objects, dependsOn on reference equality + | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () + | ValueSome prevValue, ValueSome newValue when canReuseChild prevValue newValue -> + newValue.UpdateIncremental(prevValue, target.CurrentItem) + | _, ValueSome newValue -> + target.CurrentItem <- (newValue.Create() :?> Xamarin.Forms.ShellItem) + | ValueSome _, ValueNone -> + target.CurrentItem <- null | ValueNone, ValueNone -> () match prevFlyoutBackgroundColorOpt, currFlyoutBackgroundColorOpt with | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () @@ -13330,7 +13339,7 @@ type ViewBuilders() = | ValueSome _, ValueNone -> target.RouteScheme <- null | ValueNone, ValueNone -> () - static member inline ConstructShell(?currentItem: Xamarin.Forms.ShellItem, + static member inline ConstructShell(?currentItem: ViewElement, ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, @@ -13818,6 +13827,266 @@ type ViewBuilders() = ViewElement.Create(ViewBuilders.CreateFuncShellNavigationState, ViewBuilders.UpdateFuncShellNavigationState, attribBuilder) + /// Builds the attributes for a ShellContent in the view + static member inline BuildShellContent(attribCount: int, + ?content: ViewElement, + ?contentTemplate: Xamarin.Forms.DataTemplate, + ?title: string, + ?route: string, + ?icon: string, + ?flyoutIcon: string, + ?isEnabled: bool, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: obj -> unit, + ?ref: ViewRef) = + + let attribCount = match content with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match contentTemplate with Some _ -> attribCount + 1 | None -> attribCount + + let attribBuilder = ViewBuilders.BuildBaseShellItem(attribCount, ?title=title, ?route=route, ?icon=icon, ?flyoutIcon=flyoutIcon, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + match content with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ContentAttribKey, (v)) + match contentTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ContentTemplateAttribKey, makeTemplate(v)) + attribBuilder + + static member val CreateFuncShellContent : (unit -> Xamarin.Forms.ShellContent) = (fun () -> ViewBuilders.CreateShellContent()) with get, set + + static member CreateShellContent () : Xamarin.Forms.ShellContent = + upcast (new Xamarin.Forms.ShellContent()) + + static member val UpdateFuncShellContent = + (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ShellContent) -> ViewBuilders.UpdateShellContent (prevOpt, curr, target)) + + static member UpdateShellContent (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ShellContent) = + // update the inherited BaseShellItem element + let baseElement = (if ViewProto.ProtoBaseShellItem.IsNone then ViewProto.ProtoBaseShellItem <- Some (ViewBuilders.ConstructBaseShellItem())); ViewProto.ProtoBaseShellItem.Value + baseElement.UpdateInherited (prevOpt, curr, target) + let mutable prevContentOpt = ValueNone + let mutable currContentOpt = ValueNone + let mutable prevContentTemplateOpt = ValueNone + let mutable currContentTemplateOpt = ValueNone + for kvp in curr.AttributesKeyed do + if kvp.Key = ViewAttributes.ContentAttribKey.KeyValue then + currContentOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.ContentTemplateAttribKey.KeyValue then + currContentTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + match prevOpt with + | ValueNone -> () + | ValueSome prev -> + for kvp in prev.AttributesKeyed do + if kvp.Key = ViewAttributes.ContentAttribKey.KeyValue then + prevContentOpt <- ValueSome (kvp.Value :?> System.Object) + if kvp.Key = ViewAttributes.ContentTemplateAttribKey.KeyValue then + prevContentTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + match prevContentOpt, currContentOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.Content <- currValue + | ValueSome _, ValueNone -> target.Content <- null + | ValueNone, ValueNone -> () + match prevContentTemplateOpt, currContentTemplateOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ContentTemplate <- currValue + | ValueSome _, ValueNone -> target.ContentTemplate <- null + | ValueNone, ValueNone -> () + + static member inline ConstructShellContent(?content: ViewElement, + ?contentTemplate: Xamarin.Forms.DataTemplate, + ?title: string, + ?route: string, + ?icon: string, + ?flyoutIcon: string, + ?isEnabled: bool, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.ShellContent -> unit), + ?ref: ViewRef) = + + let attribBuilder = ViewBuilders.BuildShellContent(0, + ?content=content, + ?contentTemplate=contentTemplate, + ?title=title, + ?route=route, + ?icon=icon, + ?flyoutIcon=flyoutIcon, + ?isEnabled=isEnabled, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), + ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) + + ViewElement.Create(ViewBuilders.CreateFuncShellContent, ViewBuilders.UpdateFuncShellContent, attribBuilder) + + /// Builds the attributes for a ShellItem in the view + static member inline BuildShellItem(attribCount: int, + ?currentItem: ViewElement, + ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, + ?title: string, + ?route: string, + ?icon: string, + ?flyoutIcon: string, + ?isEnabled: bool, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: obj -> unit, + ?ref: ViewRef) = + + let attribCount = match currentItem with Some _ -> attribCount + 1 | None -> attribCount + + let attribBuilder = ViewBuilders.BuildShellGroupItem(attribCount, ?flyoutDisplayOptions=flyoutDisplayOptions, ?title=title, ?route=route, ?icon=icon, ?flyoutIcon=flyoutIcon, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + match currentItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CurrentItemAttribKey, (v)) + attribBuilder + + static member val CreateFuncShellItem : (unit -> Xamarin.Forms.ShellItem) = (fun () -> ViewBuilders.CreateShellItem()) with get, set + + static member CreateShellItem () : Xamarin.Forms.ShellItem = + upcast (new Xamarin.Forms.ShellItem()) + + static member val UpdateFuncShellItem = + (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ShellItem) -> ViewBuilders.UpdateShellItem (prevOpt, curr, target)) + + static member UpdateShellItem (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ShellItem) = + // update the inherited ShellGroupItem element + let baseElement = (if ViewProto.ProtoShellGroupItem.IsNone then ViewProto.ProtoShellGroupItem <- Some (ViewBuilders.ConstructShellGroupItem())); ViewProto.ProtoShellGroupItem.Value + baseElement.UpdateInherited (prevOpt, curr, target) + let mutable prevCurrentItemOpt = ValueNone + let mutable currCurrentItemOpt = ValueNone + for kvp in curr.AttributesKeyed do + if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then + currCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) + match prevOpt with + | ValueNone -> () + | ValueSome prev -> + for kvp in prev.AttributesKeyed do + if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then + prevCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) + match prevCurrentItemOpt, currCurrentItemOpt with + // For structured objects, dependsOn on reference equality + | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () + | ValueSome prevValue, ValueSome newValue when canReuseChild prevValue newValue -> + newValue.UpdateIncremental(prevValue, target.CurrentItem) + | _, ValueSome newValue -> + target.CurrentItem <- (newValue.Create() :?> Xamarin.Forms.ShellSection) + | ValueSome _, ValueNone -> + target.CurrentItem <- null + | ValueNone, ValueNone -> () + + static member inline ConstructShellItem(?currentItem: ViewElement, + ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, + ?title: string, + ?route: string, + ?icon: string, + ?flyoutIcon: string, + ?isEnabled: bool, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.ShellItem -> unit), + ?ref: ViewRef) = + + let attribBuilder = ViewBuilders.BuildShellItem(0, + ?currentItem=currentItem, + ?flyoutDisplayOptions=flyoutDisplayOptions, + ?title=title, + ?route=route, + ?icon=icon, + ?flyoutIcon=flyoutIcon, + ?isEnabled=isEnabled, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), + ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) + + ViewElement.Create(ViewBuilders.CreateFuncShellItem, ViewBuilders.UpdateFuncShellItem, attribBuilder) + + /// Builds the attributes for a ShellSection in the view + static member inline BuildShellSection(attribCount: int, + ?currentItem: ViewElement, + ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, + ?title: string, + ?route: string, + ?icon: string, + ?flyoutIcon: string, + ?isEnabled: bool, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: obj -> unit, + ?ref: ViewRef) = + + let attribCount = match currentItem with Some _ -> attribCount + 1 | None -> attribCount + + let attribBuilder = ViewBuilders.BuildShellGroupItem(attribCount, ?flyoutDisplayOptions=flyoutDisplayOptions, ?title=title, ?route=route, ?icon=icon, ?flyoutIcon=flyoutIcon, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + match currentItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CurrentItemAttribKey, (v)) + attribBuilder + + static member val CreateFuncShellSection : (unit -> Xamarin.Forms.ShellSection) = (fun () -> ViewBuilders.CreateShellSection()) with get, set + + static member CreateShellSection () : Xamarin.Forms.ShellSection = + upcast (new Xamarin.Forms.ShellSection()) + + static member val UpdateFuncShellSection = + (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ShellSection) -> ViewBuilders.UpdateShellSection (prevOpt, curr, target)) + + static member UpdateShellSection (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ShellSection) = + // update the inherited ShellGroupItem element + let baseElement = (if ViewProto.ProtoShellGroupItem.IsNone then ViewProto.ProtoShellGroupItem <- Some (ViewBuilders.ConstructShellGroupItem())); ViewProto.ProtoShellGroupItem.Value + baseElement.UpdateInherited (prevOpt, curr, target) + let mutable prevCurrentItemOpt = ValueNone + let mutable currCurrentItemOpt = ValueNone + for kvp in curr.AttributesKeyed do + if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then + currCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) + match prevOpt with + | ValueNone -> () + | ValueSome prev -> + for kvp in prev.AttributesKeyed do + if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then + prevCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) + match prevCurrentItemOpt, currCurrentItemOpt with + // For structured objects, dependsOn on reference equality + | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () + | ValueSome prevValue, ValueSome newValue when canReuseChild prevValue newValue -> + newValue.UpdateIncremental(prevValue, target.CurrentItem) + | _, ValueSome newValue -> + target.CurrentItem <- (newValue.Create() :?> Xamarin.Forms.ShellContent) + | ValueSome _, ValueNone -> + target.CurrentItem <- null + | ValueNone, ValueNone -> () + + static member inline ConstructShellSection(?currentItem: ViewElement, + ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, + ?title: string, + ?route: string, + ?icon: string, + ?flyoutIcon: string, + ?isEnabled: bool, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.ShellSection -> unit), + ?ref: ViewRef) = + + let attribBuilder = ViewBuilders.BuildShellSection(0, + ?currentItem=currentItem, + ?flyoutDisplayOptions=flyoutDisplayOptions, + ?title=title, + ?route=route, + ?icon=icon, + ?flyoutIcon=flyoutIcon, + ?isEnabled=isEnabled, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), + ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) + + ViewElement.Create(ViewBuilders.CreateFuncShellSection, ViewBuilders.UpdateFuncShellSection, attribBuilder) + /// Viewer that allows to read the properties of a ViewElement representing a Element type ElementViewer(element: ViewElement) = do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Element' is expected, but '%s' was provided." element.TargetType.FullName @@ -14879,6 +15148,29 @@ type ShellNavigationStateViewer(element: ViewElement) = /// Get the value of the Location property member this.Location = element.GetAttributeKeyed(ViewAttributes.LocationAttribKey) +/// Viewer that allows to read the properties of a ViewElement representing a ShellContent +type ShellContentViewer(element: ViewElement) = + inherit BaseShellItemViewer(element) + do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ShellContent' is expected, but '%s' was provided." element.TargetType.FullName + /// Get the value of the Content property + member this.Content = element.GetAttributeKeyed(ViewAttributes.ContentAttribKey) + /// Get the value of the ContentTemplate property + member this.ContentTemplate = element.GetAttributeKeyed(ViewAttributes.ContentTemplateAttribKey) + +/// Viewer that allows to read the properties of a ViewElement representing a ShellItem +type ShellItemViewer(element: ViewElement) = + inherit ShellGroupItemViewer(element) + do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ShellItem' is expected, but '%s' was provided." element.TargetType.FullName + /// Get the value of the CurrentItem property + member this.CurrentItem = element.GetAttributeKeyed(ViewAttributes.CurrentItemAttribKey) + +/// Viewer that allows to read the properties of a ViewElement representing a ShellSection +type ShellSectionViewer(element: ViewElement) = + inherit ShellGroupItemViewer(element) + do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ShellSection' is expected, but '%s' was provided." element.TargetType.FullName + /// Get the value of the CurrentItem property + member this.CurrentItem = element.GetAttributeKeyed(ViewAttributes.CurrentItemAttribKey) + type View() = /// Describes a Element in the view static member inline Element(?classId: string, @@ -19190,7 +19482,7 @@ type View() = ?showsResults=showsResults) /// Describes a Shell in the view - static member inline Shell(?currentItem: Xamarin.Forms.ShellItem, + static member inline Shell(?currentItem: ViewElement, ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, @@ -19443,6 +19735,87 @@ type View() = ViewBuilders.ConstructShellNavigationState(?location=location) + /// Describes a ShellContent in the view + static member inline ShellContent(?content: ViewElement, + ?contentTemplate: Xamarin.Forms.DataTemplate, + ?title: string, + ?route: string, + ?icon: string, + ?flyoutIcon: string, + ?isEnabled: bool, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.ShellContent -> unit), + ?ref: ViewRef) = + + ViewBuilders.ConstructShellContent(?content=content, + ?contentTemplate=contentTemplate, + ?title=title, + ?route=route, + ?icon=icon, + ?flyoutIcon=flyoutIcon, + ?isEnabled=isEnabled, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=created, + ?ref=ref) + + /// Describes a ShellItem in the view + static member inline ShellItem(?currentItem: ViewElement, + ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, + ?title: string, + ?route: string, + ?icon: string, + ?flyoutIcon: string, + ?isEnabled: bool, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.ShellItem -> unit), + ?ref: ViewRef) = + + ViewBuilders.ConstructShellItem(?currentItem=currentItem, + ?flyoutDisplayOptions=flyoutDisplayOptions, + ?title=title, + ?route=route, + ?icon=icon, + ?flyoutIcon=flyoutIcon, + ?isEnabled=isEnabled, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=created, + ?ref=ref) + + /// Describes a ShellSection in the view + static member inline ShellSection(?currentItem: ViewElement, + ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, + ?title: string, + ?route: string, + ?icon: string, + ?flyoutIcon: string, + ?isEnabled: bool, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.ShellSection -> unit), + ?ref: ViewRef) = + + ViewBuilders.ConstructShellSection(?currentItem=currentItem, + ?flyoutDisplayOptions=flyoutDisplayOptions, + ?title=title, + ?route=route, + ?icon=icon, + ?flyoutIcon=flyoutIcon, + ?isEnabled=isEnabled, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=created, + ?ref=ref) + [] module ViewElementExtensions = @@ -20251,7 +20624,7 @@ module ViewElementExtensions = member x.ShowsResults(value: bool) = x.WithAttribute(ViewAttributes.ShowsResultsAttribKey, (value)) /// Adjusts the CurrentItem property in the visual element - member x.CurrentItem(value: Xamarin.Forms.ShellItem) = x.WithAttribute(ViewAttributes.CurrentItemAttribKey, (value)) + member x.CurrentItem(value: ViewElement) = x.WithAttribute(ViewAttributes.CurrentItemAttribKey, (value)) /// Adjusts the FlyoutBackgroundColor property in the visual element member x.FlyoutBackgroundColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.FlyoutBackgroundColorAttribKey, (value)) @@ -20304,6 +20677,9 @@ module ViewElementExtensions = /// Adjusts the Location property in the visual element member x.Location(value: System.Uri) = x.WithAttribute(ViewAttributes.LocationAttribKey, makeUri(value)) + /// Adjusts the ContentTemplate property in the visual element + member x.ContentTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.ContentTemplateAttribKey, makeTemplate(value)) + member x.With(?classId: string, ?styleId: string, ?automationId: string, ?anchorX: double, ?anchorY: double, ?backgroundColor: Xamarin.Forms.Color, ?heightRequest: double, ?inputTransparent: bool, ?isEnabled: bool, ?isVisible: bool, ?minimumHeightRequest: double, ?minimumWidthRequest: double, ?opacity: double, ?rotation: double, ?rotationX: double, @@ -20357,10 +20733,11 @@ module ViewElementExtensions = ?clearIcon: string, ?clearIconHelpText: string, ?clearIconName: string, ?clearPlaceholderCommand: unit -> unit, ?clearPlaceholderCommandParameter: System.Object, ?clearPlaceholderEnabled: bool, ?clearPlaceholderHelpText: string, ?clearPlaceholderIcon: string, ?clearPlaceholderName: string, ?displayMemberName: string, ?isSearchEnabled: bool, ?query: string, ?queryIcon: string, ?queryIconHelpText: string, ?queryIconName: string, - ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, ?currentItem: Xamarin.Forms.ShellItem, ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, + ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, ?currentItem: ViewElement, ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, ?flyoutIsPresented: bool, ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, ?menuItemTemplate: Xamarin.Forms.DataTemplate, ?routeHost: string, ?routeScheme: string, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?selectedItem: System.Object, - ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?location: System.Uri) = + ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?location: System.Uri, + ?contentTemplate: Xamarin.Forms.DataTemplate) = let x = match classId with None -> x | Some opt -> x.ClassId(opt) let x = match styleId with None -> x | Some opt -> x.StyleId(opt) let x = match automationId with None -> x | Some opt -> x.AutomationId(opt) @@ -20646,6 +21023,7 @@ module ViewElementExtensions = let x = match selectableItemsMode with None -> x | Some opt -> x.selectableItemsMode(opt) let x = match selectionChanged with None -> x | Some opt -> x.SelectionChanged(opt) let x = match location with None -> x | Some opt -> x.Location(opt) + let x = match contentTemplate with None -> x | Some opt -> x.ContentTemplate(opt) x /// Adjusts the ClassId property in the visual element @@ -21183,7 +21561,7 @@ module ViewElementExtensions = /// Adjusts the ShowsResults property in the visual element let showsResults (value: bool) (x: ViewElement) = x.ShowsResults(value) /// Adjusts the CurrentItem property in the visual element - let currentItem (value: Xamarin.Forms.ShellItem) (x: ViewElement) = x.CurrentItem(value) + let currentItem (value: ViewElement) (x: ViewElement) = x.CurrentItem(value) /// Adjusts the FlyoutBackgroundColor property in the visual element let flyoutBackgroundColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.FlyoutBackgroundColor(value) /// Adjusts the FlyoutBehavior property in the visual element @@ -21218,3 +21596,5 @@ module ViewElementExtensions = let selectionChanged (value: Xamarin.Forms.SelectionChangedEventArgs -> unit) (x: ViewElement) = x.SelectionChanged(value) /// Adjusts the Location property in the visual element let location (value: System.Uri) (x: ViewElement) = x.Location(value) + /// Adjusts the ContentTemplate property in the visual element + let contentTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.ContentTemplate(value) diff --git a/tools/Generator/Xamarin.Forms.Core.json b/tools/Generator/Xamarin.Forms.Core.json index d3d08b921..0653223ab 100644 --- a/tools/Generator/Xamarin.Forms.Core.json +++ b/tools/Generator/Xamarin.Forms.Core.json @@ -2374,6 +2374,40 @@ "convToModel": "makeUri" } ] + }, + { + "name": "Xamarin.Forms.ShellContent", + "members": [ + { + "name": "Content", + "defaultValue": "null", + "inputType": "ViewElement" + }, + { + "name": "ContentTemplate", + "defaultValue": "null", + "inputType": "Xamarin.Forms.DataTemplate", + "convToModel": "makeTemplate" + } + ] + }, + { + "name": "Xamarin.Forms.ShellItem", + "members": [ + { + "name": "CurrentItem", + "defaultValue": "null" + } + ] + }, + { + "name": "Xamarin.Forms.ShellSection", + "members": [ + { + "name": "CurrentItem", + "defaultValue": "null" + } + ] } ] } \ No newline at end of file From 8124c5ae46c99fcb894447085a44a76e214c96be Mon Sep 17 00:00:00 2001 From: Sergej Dick Date: Wed, 6 Mar 2019 08:30:49 +0100 Subject: [PATCH 06/18] added events for shell and shellsection --- src/Fabulous.Core/ViewConverters.fs | 24 ++++++ src/Fabulous.Core/Xamarin.Forms.Core.fs | 108 +++++++++++++++++++++++- tools/Generator/Xamarin.Forms.Core.json | 27 ++++++ 3 files changed, 156 insertions(+), 3 deletions(-) diff --git a/src/Fabulous.Core/ViewConverters.fs b/src/Fabulous.Core/ViewConverters.fs index 851f83a41..67969170f 100644 --- a/src/Fabulous.Core/ViewConverters.fs +++ b/src/Fabulous.Core/ViewConverters.fs @@ -668,6 +668,30 @@ module Converters = target.ScrollToAsync(x, y, animated) |> ignore | _ -> () + /// Trigger Shell.GoToAsync if needed, given the current values + let internal triggerGoToAsync (currValue: (ShellNavigationState * AnimationKind) voption) (target: Xamarin.Forms.Shell) = + match currValue with + | ValueSome (navigationState, animationKind) -> + let animated = + match animationKind with + | Animated -> true + | NotAnimated -> false + target.GoToAsync(navigationState, animated) |> ignore + | _ -> () + + /// Trigger ShellSection.GoToAsync if needed, given the current values + let internal triggerSSGoToAsync (currValue: (string list * Map * AnimationKind) voption) (target: Xamarin.Forms.ShellSection) = + match currValue with + | ValueSome (routes, queryData, animationKind) -> + let animated = + match animationKind with + | Animated -> true + | NotAnimated -> false + let lst = ResizeArray() + lst.AddRange(routes) + target.GoToAsync(lst, queryData, animated) |> ignore + | _ -> () + /// Check if two LayoutOptions are equal let internal equalLayoutOptions (x:Xamarin.Forms.LayoutOptions) (y:Xamarin.Forms.LayoutOptions) = x.Alignment = y.Alignment && x.Expands = y.Expands diff --git a/src/Fabulous.Core/Xamarin.Forms.Core.fs b/src/Fabulous.Core/Xamarin.Forms.Core.fs index 136205219..f19b667de 100644 --- a/src/Fabulous.Core/Xamarin.Forms.Core.fs +++ b/src/Fabulous.Core/Xamarin.Forms.Core.fs @@ -286,6 +286,9 @@ module ViewAttributes = let MenuItemTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("MenuItemTemplate") let RouteHostAttribKey : AttributeKey<_> = AttributeKey<_>("RouteHost") let RouteSchemeAttribKey : AttributeKey<_> = AttributeKey<_>("RouteScheme") + let OnNavigatedAttribKey : AttributeKey<_> = AttributeKey<_>("OnNavigated") + let OnNavigatingAttribKey : AttributeKey<_> = AttributeKey<_>("OnNavigating") + let GoToAsyncAttribKey : AttributeKey<_> = AttributeKey<_>("GoToAsync") let FlyoutDisplayOptionsAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutDisplayOptions") let SelectedItemAttribKey : AttributeKey<_> = AttributeKey<_>("SelectedItem") let SelectionChangedCommandAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionChangedCommand") @@ -294,6 +297,7 @@ module ViewAttributes = let SelectionChangedAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionChanged") let LocationAttribKey : AttributeKey<_> = AttributeKey<_>("Location") let ContentTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("ContentTemplate") + let ssGoToAsyncAttribKey : AttributeKey<_> = AttributeKey<_>("ssGoToAsync") type ViewProto() = static member val ProtoElement : ViewElement option = None with get, set @@ -13096,6 +13100,9 @@ type ViewBuilders() = ?route: string, ?routeHost: string, ?routeScheme: string, + ?navigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, + ?navigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, + ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, ?title: string, ?backgroundImage: string, ?icon: string, @@ -13156,6 +13163,9 @@ type ViewBuilders() = let attribCount = match route with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match routeHost with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match routeScheme with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match navigated with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match navigating with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match goToAsync with Some _ -> attribCount + 1 | None -> attribCount let attribBuilder = ViewBuilders.BuildPage(attribCount, ?title=title, ?backgroundImage=backgroundImage, ?icon=icon, ?isBusy=isBusy, ?padding=padding, ?toolbarItems=toolbarItems, ?useSafeArea=useSafeArea, ?appearing=appearing, ?disappearing=disappearing, ?layoutChanged=layoutChanged, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match currentItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CurrentItemAttribKey, (v)) @@ -13171,6 +13181,9 @@ type ViewBuilders() = match route with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RouteAttribKey, (v)) match routeHost with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RouteHostAttribKey, (v)) match routeScheme with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RouteSchemeAttribKey, (v)) + match navigated with None -> () | Some v -> attribBuilder.Add(ViewAttributes.OnNavigatedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) + match navigating with None -> () | Some v -> attribBuilder.Add(ViewAttributes.OnNavigatingAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) + match goToAsync with None -> () | Some v -> attribBuilder.Add(ViewAttributes.GoToAsyncAttribKey, (v)) attribBuilder static member val CreateFuncShell : (unit -> Xamarin.Forms.Shell) = (fun () -> ViewBuilders.CreateShell()) with get, set @@ -13211,6 +13224,12 @@ type ViewBuilders() = let mutable currRouteHostOpt = ValueNone let mutable prevRouteSchemeOpt = ValueNone let mutable currRouteSchemeOpt = ValueNone + let mutable prevOnNavigatedOpt = ValueNone + let mutable currOnNavigatedOpt = ValueNone + let mutable prevOnNavigatingOpt = ValueNone + let mutable currOnNavigatingOpt = ValueNone + let mutable prevGoToAsyncOpt = ValueNone + let mutable currGoToAsyncOpt = ValueNone for kvp in curr.AttributesKeyed do if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then currCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) @@ -13238,6 +13257,12 @@ type ViewBuilders() = currRouteHostOpt <- ValueSome (kvp.Value :?> string) if kvp.Key = ViewAttributes.RouteSchemeAttribKey.KeyValue then currRouteSchemeOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.OnNavigatedAttribKey.KeyValue then + currOnNavigatedOpt <- ValueSome (kvp.Value :?> System.EventHandler) + if kvp.Key = ViewAttributes.OnNavigatingAttribKey.KeyValue then + currOnNavigatingOpt <- ValueSome (kvp.Value :?> System.EventHandler) + if kvp.Key = ViewAttributes.GoToAsyncAttribKey.KeyValue then + currGoToAsyncOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind) match prevOpt with | ValueNone -> () | ValueSome prev -> @@ -13268,6 +13293,12 @@ type ViewBuilders() = prevRouteHostOpt <- ValueSome (kvp.Value :?> string) if kvp.Key = ViewAttributes.RouteSchemeAttribKey.KeyValue then prevRouteSchemeOpt <- ValueSome (kvp.Value :?> string) + if kvp.Key = ViewAttributes.OnNavigatedAttribKey.KeyValue then + prevOnNavigatedOpt <- ValueSome (kvp.Value :?> System.EventHandler) + if kvp.Key = ViewAttributes.OnNavigatingAttribKey.KeyValue then + prevOnNavigatingOpt <- ValueSome (kvp.Value :?> System.EventHandler) + if kvp.Key = ViewAttributes.GoToAsyncAttribKey.KeyValue then + prevGoToAsyncOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind) match prevCurrentItemOpt, currCurrentItemOpt with // For structured objects, dependsOn on reference equality | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () @@ -13338,6 +13369,19 @@ type ViewBuilders() = | _, ValueSome currValue -> target.RouteScheme <- currValue | ValueSome _, ValueNone -> target.RouteScheme <- null | ValueNone, ValueNone -> () + match prevOnNavigatedOpt, currOnNavigatedOpt with + | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () + | ValueSome prevValue, ValueSome currValue -> target.Navigated.RemoveHandler(prevValue); target.Navigated.AddHandler(currValue) + | ValueNone, ValueSome currValue -> target.Navigated.AddHandler(currValue) + | ValueSome prevValue, ValueNone -> target.Navigated.RemoveHandler(prevValue) + | ValueNone, ValueNone -> () + match prevOnNavigatingOpt, currOnNavigatingOpt with + | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () + | ValueSome prevValue, ValueSome currValue -> target.Navigating.RemoveHandler(prevValue); target.Navigating.AddHandler(currValue) + | ValueNone, ValueSome currValue -> target.Navigating.AddHandler(currValue) + | ValueSome prevValue, ValueNone -> target.Navigating.RemoveHandler(prevValue) + | ValueNone, ValueNone -> () + (fun _ curr target -> triggerGoToAsync curr target) prevGoToAsyncOpt currGoToAsyncOpt target static member inline ConstructShell(?currentItem: ViewElement, ?flyoutBackgroundColor: Xamarin.Forms.Color, @@ -13352,6 +13396,9 @@ type ViewBuilders() = ?route: string, ?routeHost: string, ?routeScheme: string, + ?navigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, + ?navigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, + ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, ?title: string, ?backgroundImage: string, ?icon: string, @@ -13413,6 +13460,9 @@ type ViewBuilders() = ?route=route, ?routeHost=routeHost, ?routeScheme=routeScheme, + ?navigated=navigated, + ?navigating=navigating, + ?goToAsync=goToAsync, ?title=title, ?backgroundImage=backgroundImage, ?icon=icon, @@ -14006,6 +14056,7 @@ type ViewBuilders() = /// Builds the attributes for a ShellSection in the view static member inline BuildShellSection(attribCount: int, ?currentItem: ViewElement, + ?goToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?title: string, ?route: string, @@ -14019,9 +14070,11 @@ type ViewBuilders() = ?ref: ViewRef) = let attribCount = match currentItem with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match goToAsync with Some _ -> attribCount + 1 | None -> attribCount let attribBuilder = ViewBuilders.BuildShellGroupItem(attribCount, ?flyoutDisplayOptions=flyoutDisplayOptions, ?title=title, ?route=route, ?icon=icon, ?flyoutIcon=flyoutIcon, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match currentItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CurrentItemAttribKey, (v)) + match goToAsync with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ssGoToAsyncAttribKey, (v)) attribBuilder static member val CreateFuncShellSection : (unit -> Xamarin.Forms.ShellSection) = (fun () -> ViewBuilders.CreateShellSection()) with get, set @@ -14038,15 +14091,21 @@ type ViewBuilders() = baseElement.UpdateInherited (prevOpt, curr, target) let mutable prevCurrentItemOpt = ValueNone let mutable currCurrentItemOpt = ValueNone + let mutable prevssGoToAsyncOpt = ValueNone + let mutable currssGoToAsyncOpt = ValueNone for kvp in curr.AttributesKeyed do if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then currCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) + if kvp.Key = ViewAttributes.ssGoToAsyncAttribKey.KeyValue then + currssGoToAsyncOpt <- ValueSome (kvp.Value :?> string list * Map * Fabulous.DynamicViews.AnimationKind) match prevOpt with | ValueNone -> () | ValueSome prev -> for kvp in prev.AttributesKeyed do if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then prevCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) + if kvp.Key = ViewAttributes.ssGoToAsyncAttribKey.KeyValue then + prevssGoToAsyncOpt <- ValueSome (kvp.Value :?> string list * Map * Fabulous.DynamicViews.AnimationKind) match prevCurrentItemOpt, currCurrentItemOpt with // For structured objects, dependsOn on reference equality | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () @@ -14057,8 +14116,10 @@ type ViewBuilders() = | ValueSome _, ValueNone -> target.CurrentItem <- null | ValueNone, ValueNone -> () + (fun _ curr target -> triggerSSGoToAsync curr target) prevssGoToAsyncOpt currssGoToAsyncOpt target static member inline ConstructShellSection(?currentItem: ViewElement, + ?goToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?title: string, ?route: string, @@ -14073,6 +14134,7 @@ type ViewBuilders() = let attribBuilder = ViewBuilders.BuildShellSection(0, ?currentItem=currentItem, + ?goToAsync=goToAsync, ?flyoutDisplayOptions=flyoutDisplayOptions, ?title=title, ?route=route, @@ -15119,6 +15181,12 @@ type ShellViewer(element: ViewElement) = member this.RouteHost = element.GetAttributeKeyed(ViewAttributes.RouteHostAttribKey) /// Get the value of the RouteScheme property member this.RouteScheme = element.GetAttributeKeyed(ViewAttributes.RouteSchemeAttribKey) + /// Get the value of the Navigated property + member this.Navigated = element.GetAttributeKeyed(ViewAttributes.OnNavigatedAttribKey) + /// Get the value of the Navigating property + member this.Navigating = element.GetAttributeKeyed(ViewAttributes.OnNavigatingAttribKey) + /// Get the value of the GoToAsync property + member this.GoToAsync = element.GetAttributeKeyed(ViewAttributes.GoToAsyncAttribKey) /// Viewer that allows to read the properties of a ViewElement representing a ShellGroupItem type ShellGroupItemViewer(element: ViewElement) = @@ -15170,6 +15238,8 @@ type ShellSectionViewer(element: ViewElement) = do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ShellSection' is expected, but '%s' was provided." element.TargetType.FullName /// Get the value of the CurrentItem property member this.CurrentItem = element.GetAttributeKeyed(ViewAttributes.CurrentItemAttribKey) + /// Get the value of the GoToAsync property + member this.GoToAsync = element.GetAttributeKeyed(ViewAttributes.ssGoToAsyncAttribKey) type View() = /// Describes a Element in the view @@ -19495,6 +19565,9 @@ type View() = ?route: string, ?routeHost: string, ?routeScheme: string, + ?navigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, + ?navigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, + ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, ?title: string, ?backgroundImage: string, ?icon: string, @@ -19555,6 +19628,9 @@ type View() = ?route=route, ?routeHost=routeHost, ?routeScheme=routeScheme, + ?navigated=navigated, + ?navigating=navigating, + ?goToAsync=goToAsync, ?title=title, ?backgroundImage=backgroundImage, ?icon=icon, @@ -19791,6 +19867,7 @@ type View() = /// Describes a ShellSection in the view static member inline ShellSection(?currentItem: ViewElement, + ?goToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?title: string, ?route: string, @@ -19804,6 +19881,7 @@ type View() = ?ref: ViewRef) = ViewBuilders.ConstructShellSection(?currentItem=currentItem, + ?goToAsync=goToAsync, ?flyoutDisplayOptions=flyoutDisplayOptions, ?title=title, ?route=route, @@ -20656,6 +20734,15 @@ module ViewElementExtensions = /// Adjusts the RouteScheme property in the visual element member x.RouteScheme(value: string) = x.WithAttribute(ViewAttributes.RouteSchemeAttribKey, (value)) + /// Adjusts the OnNavigated property in the visual element + member x.OnNavigated(value: Xamarin.Forms.ShellNavigatedEventArgs -> unit) = x.WithAttribute(ViewAttributes.OnNavigatedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) + + /// Adjusts the OnNavigating property in the visual element + member x.OnNavigating(value: Xamarin.Forms.ShellNavigatingEventArgs -> unit) = x.WithAttribute(ViewAttributes.OnNavigatingAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) + + /// Adjusts the GoToAsync property in the visual element + member x.GoToAsync(value: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind) = x.WithAttribute(ViewAttributes.GoToAsyncAttribKey, (value)) + /// Adjusts the FlyoutDisplayOptions property in the visual element member x.FlyoutDisplayOptions(value: Xamarin.Forms.FlyoutDisplayOptions) = x.WithAttribute(ViewAttributes.FlyoutDisplayOptionsAttribKey, (value)) @@ -20680,6 +20767,9 @@ module ViewElementExtensions = /// Adjusts the ContentTemplate property in the visual element member x.ContentTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.ContentTemplateAttribKey, makeTemplate(value)) + /// Adjusts the ssGoToAsync property in the visual element + member x.ssGoToAsync(value: string list * Map * Fabulous.DynamicViews.AnimationKind) = x.WithAttribute(ViewAttributes.ssGoToAsyncAttribKey, (value)) + member x.With(?classId: string, ?styleId: string, ?automationId: string, ?anchorX: double, ?anchorY: double, ?backgroundColor: Xamarin.Forms.Color, ?heightRequest: double, ?inputTransparent: bool, ?isEnabled: bool, ?isVisible: bool, ?minimumHeightRequest: double, ?minimumWidthRequest: double, ?opacity: double, ?rotation: double, ?rotationX: double, @@ -20735,9 +20825,9 @@ module ViewElementExtensions = ?isSearchEnabled: bool, ?query: string, ?queryIcon: string, ?queryIconHelpText: string, ?queryIconName: string, ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, ?currentItem: ViewElement, ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, ?flyoutIsPresented: bool, ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, - ?menuItemTemplate: Xamarin.Forms.DataTemplate, ?routeHost: string, ?routeScheme: string, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?selectedItem: System.Object, - ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?location: System.Uri, - ?contentTemplate: Xamarin.Forms.DataTemplate) = + ?menuItemTemplate: Xamarin.Forms.DataTemplate, ?routeHost: string, ?routeScheme: string, ?onNavigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, ?onNavigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, + ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?selectedItem: System.Object, ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, + ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?location: System.Uri, ?contentTemplate: Xamarin.Forms.DataTemplate, ?ssGoToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind) = let x = match classId with None -> x | Some opt -> x.ClassId(opt) let x = match styleId with None -> x | Some opt -> x.StyleId(opt) let x = match automationId with None -> x | Some opt -> x.AutomationId(opt) @@ -21016,6 +21106,9 @@ module ViewElementExtensions = let x = match menuItemTemplate with None -> x | Some opt -> x.MenuItemTemplate(opt) let x = match routeHost with None -> x | Some opt -> x.RouteHost(opt) let x = match routeScheme with None -> x | Some opt -> x.RouteScheme(opt) + let x = match onNavigated with None -> x | Some opt -> x.OnNavigated(opt) + let x = match onNavigating with None -> x | Some opt -> x.OnNavigating(opt) + let x = match goToAsync with None -> x | Some opt -> x.GoToAsync(opt) let x = match flyoutDisplayOptions with None -> x | Some opt -> x.FlyoutDisplayOptions(opt) let x = match selectedItem with None -> x | Some opt -> x.SelectedItem(opt) let x = match selectionChangedCommand with None -> x | Some opt -> x.SelectionChangedCommand(opt) @@ -21024,6 +21117,7 @@ module ViewElementExtensions = let x = match selectionChanged with None -> x | Some opt -> x.SelectionChanged(opt) let x = match location with None -> x | Some opt -> x.Location(opt) let x = match contentTemplate with None -> x | Some opt -> x.ContentTemplate(opt) + let x = match ssGoToAsync with None -> x | Some opt -> x.ssGoToAsync(opt) x /// Adjusts the ClassId property in the visual element @@ -21582,6 +21676,12 @@ module ViewElementExtensions = let routeHost (value: string) (x: ViewElement) = x.RouteHost(value) /// Adjusts the RouteScheme property in the visual element let routeScheme (value: string) (x: ViewElement) = x.RouteScheme(value) + /// Adjusts the OnNavigated property in the visual element + let onNavigated (value: Xamarin.Forms.ShellNavigatedEventArgs -> unit) (x: ViewElement) = x.OnNavigated(value) + /// Adjusts the OnNavigating property in the visual element + let onNavigating (value: Xamarin.Forms.ShellNavigatingEventArgs -> unit) (x: ViewElement) = x.OnNavigating(value) + /// Adjusts the GoToAsync property in the visual element + let goToAsync (value: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind) (x: ViewElement) = x.GoToAsync(value) /// Adjusts the FlyoutDisplayOptions property in the visual element let flyoutDisplayOptions (value: Xamarin.Forms.FlyoutDisplayOptions) (x: ViewElement) = x.FlyoutDisplayOptions(value) /// Adjusts the SelectedItem property in the visual element @@ -21598,3 +21698,5 @@ module ViewElementExtensions = let location (value: System.Uri) (x: ViewElement) = x.Location(value) /// Adjusts the ContentTemplate property in the visual element let contentTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.ContentTemplate(value) + /// Adjusts the ssGoToAsync property in the visual element + let ssGoToAsync (value: string list * Map * Fabulous.DynamicViews.AnimationKind) (x: ViewElement) = x.ssGoToAsync(value) diff --git a/tools/Generator/Xamarin.Forms.Core.json b/tools/Generator/Xamarin.Forms.Core.json index 0653223ab..daec2377e 100644 --- a/tools/Generator/Xamarin.Forms.Core.json +++ b/tools/Generator/Xamarin.Forms.Core.json @@ -2320,6 +2320,26 @@ { "name": "RouteScheme", "defaultValue": "null" + }, + { + "name": "Navigated", + "uniqueName": "OnNavigated", + "defaultValue": "null", + "inputType": "Xamarin.Forms.ShellNavigatedEventArgs -> unit", + "convToModel": "(fun f -> System.EventHandler(fun _sender args -> f args))" + }, + { + "name": "Navigating", + "uniqueName": "OnNavigating", + "defaultValue": "null", + "inputType": "Xamarin.Forms.ShellNavigatingEventArgs -> unit", + "convToModel": "(fun f -> System.EventHandler(fun _sender args -> f args))" + }, + { + "name": "GoToAsync", + "inputType": "Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind", + "modelType": "Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind", + "updateCode": "(fun _ curr target -> triggerGoToAsync curr target)" } ] }, @@ -2406,6 +2426,13 @@ { "name": "CurrentItem", "defaultValue": "null" + }, + { + "name": "GoToAsync", + "uniqueName": "ssGoToAsync", + "inputType": "string list * Map * Fabulous.DynamicViews.AnimationKind", + "modelType": "string list * Map * Fabulous.DynamicViews.AnimationKind", + "updateCode": "(fun _ curr target -> triggerSSGoToAsync curr target)" } ] } From f4cab272f3c581154c4b9af039b6e3e743c93bce Mon Sep 17 00:00:00 2001 From: Sergej Dick Date: Wed, 6 Mar 2019 09:21:41 +0100 Subject: [PATCH 07/18] carouselview, collectionview ... --- src/Fabulous.Core/ViewConverters.fs | 11 + src/Fabulous.Core/Xamarin.Forms.Core.fs | 701 +++++++++++++++++++++++- tools/Generator/Xamarin.Forms.Core.json | 35 +- 3 files changed, 727 insertions(+), 20 deletions(-) diff --git a/src/Fabulous.Core/ViewConverters.fs b/src/Fabulous.Core/ViewConverters.fs index 67969170f..90847c1b2 100644 --- a/src/Fabulous.Core/ViewConverters.fs +++ b/src/Fabulous.Core/ViewConverters.fs @@ -668,6 +668,17 @@ module Converters = target.ScrollToAsync(x, y, animated) |> ignore | _ -> () + /// Trigger ItemsView.ScrollTo if needed, given the current values + let internal triggerScrollTo (currValue: (obj * obj * ScrollToPosition * AnimationKind) voption) (target: Xamarin.Forms.ItemsView) = + match currValue with + | ValueSome (x, y, scrollToPosition, animationKind) -> + let animated = + match animationKind with + | Animated -> true + | NotAnimated -> false + target.ScrollTo(x,y, scrollToPosition, animated) + | _ -> () + /// Trigger Shell.GoToAsync if needed, given the current values let internal triggerGoToAsync (currValue: (ShellNavigationState * AnimationKind) voption) (target: Xamarin.Forms.Shell) = match currValue with diff --git a/src/Fabulous.Core/Xamarin.Forms.Core.fs b/src/Fabulous.Core/Xamarin.Forms.Core.fs index f19b667de..d8e73a181 100644 --- a/src/Fabulous.Core/Xamarin.Forms.Core.fs +++ b/src/Fabulous.Core/Xamarin.Forms.Core.fs @@ -258,6 +258,8 @@ module ViewAttributes = let ItemsLayoutAttribKey : AttributeKey<_> = AttributeKey<_>("ItemsLayout") let ItemsSourceAttribKey : AttributeKey<_> = AttributeKey<_>("ItemsSource") let ItemTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("ItemTemplate") + let ScrollToRequestedAttribKey : AttributeKey<_> = AttributeKey<_>("ScrollToRequested") + let iScrollToAttribKey : AttributeKey<_> = AttributeKey<_>("iScrollTo") let ClearIconAttribKey : AttributeKey<_> = AttributeKey<_>("ClearIcon") let ClearIconHelpTextAttribKey : AttributeKey<_> = AttributeKey<_>("ClearIconHelpText") let ClearIconNameAttribKey : AttributeKey<_> = AttributeKey<_>("ClearIconName") @@ -370,6 +372,8 @@ type ViewProto() = static member val ProtoShellContent : ViewElement option = None with get, set static member val ProtoShellItem : ViewElement option = None with get, set static member val ProtoShellSection : ViewElement option = None with get, set + static member val ProtoCarouselView : ViewElement option = None with get, set + static member val ProtoCollectionView : ViewElement option = None with get, set type ViewBuilders() = /// Builds the attributes for a Element in the view @@ -12515,6 +12519,8 @@ type ViewBuilders() = ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, ?itemTemplate: Xamarin.Forms.DataTemplate, + ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, + ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, ?verticalOptions: Xamarin.Forms.LayoutOptions, ?margin: obj, @@ -12561,6 +12567,8 @@ type ViewBuilders() = let attribCount = match itemsLayout with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match itemsSource with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match itemTemplate with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match scrollToRequested with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match scrollTo with Some _ -> attribCount + 1 | None -> attribCount let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match emptyView with None -> () | Some v -> attribBuilder.Add(ViewAttributes.EmptyViewAttribKey, (v)) @@ -12568,6 +12576,8 @@ type ViewBuilders() = match itemsLayout with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsLayoutAttribKey, (v)) match itemsSource with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsSourceAttribKey, (v)) match itemTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemTemplateAttribKey, (v)) + match scrollToRequested with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ScrollToRequestedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) + match scrollTo with None -> () | Some v -> attribBuilder.Add(ViewAttributes.iScrollToAttribKey, (v)) attribBuilder static member val CreateFuncItemsView : (unit -> Xamarin.Forms.ItemsView) = (fun () -> ViewBuilders.CreateItemsView()) with get, set @@ -12592,6 +12602,10 @@ type ViewBuilders() = let mutable currItemsSourceOpt = ValueNone let mutable prevItemTemplateOpt = ValueNone let mutable currItemTemplateOpt = ValueNone + let mutable prevScrollToRequestedOpt = ValueNone + let mutable currScrollToRequestedOpt = ValueNone + let mutable previScrollToOpt = ValueNone + let mutable curriScrollToOpt = ValueNone for kvp in curr.AttributesKeyed do if kvp.Key = ViewAttributes.EmptyViewAttribKey.KeyValue then currEmptyViewOpt <- ValueSome (kvp.Value :?> System.Object) @@ -12603,6 +12617,10 @@ type ViewBuilders() = currItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IEnumerable) if kvp.Key = ViewAttributes.ItemTemplateAttribKey.KeyValue then currItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + if kvp.Key = ViewAttributes.ScrollToRequestedAttribKey.KeyValue then + currScrollToRequestedOpt <- ValueSome (kvp.Value :?> System.EventHandler) + if kvp.Key = ViewAttributes.iScrollToAttribKey.KeyValue then + curriScrollToOpt <- ValueSome (kvp.Value :?> obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind) match prevOpt with | ValueNone -> () | ValueSome prev -> @@ -12617,6 +12635,10 @@ type ViewBuilders() = prevItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IEnumerable) if kvp.Key = ViewAttributes.ItemTemplateAttribKey.KeyValue then prevItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + if kvp.Key = ViewAttributes.ScrollToRequestedAttribKey.KeyValue then + prevScrollToRequestedOpt <- ValueSome (kvp.Value :?> System.EventHandler) + if kvp.Key = ViewAttributes.iScrollToAttribKey.KeyValue then + previScrollToOpt <- ValueSome (kvp.Value :?> obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind) match prevEmptyViewOpt, currEmptyViewOpt with | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () | _, ValueSome currValue -> target.EmptyView <- currValue @@ -12642,12 +12664,21 @@ type ViewBuilders() = | _, ValueSome currValue -> target.ItemTemplate <- currValue | ValueSome _, ValueNone -> target.ItemTemplate <- null | ValueNone, ValueNone -> () + match prevScrollToRequestedOpt, currScrollToRequestedOpt with + | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () + | ValueSome prevValue, ValueSome currValue -> target.ScrollToRequested.RemoveHandler(prevValue); target.ScrollToRequested.AddHandler(currValue) + | ValueNone, ValueSome currValue -> target.ScrollToRequested.AddHandler(currValue) + | ValueSome prevValue, ValueNone -> target.ScrollToRequested.RemoveHandler(prevValue) + | ValueNone, ValueNone -> () + (fun _ curr target -> triggerScrollTo curr target) previScrollToOpt curriScrollToOpt target static member inline ConstructItemsView(?emptyView: System.Object, ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, ?itemTemplate: Xamarin.Forms.DataTemplate, + ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, + ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, ?verticalOptions: Xamarin.Forms.LayoutOptions, ?margin: obj, @@ -12695,6 +12726,8 @@ type ViewBuilders() = ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?itemTemplate=itemTemplate, + ?scrollToRequested=scrollToRequested, + ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, @@ -12759,7 +12792,9 @@ type ViewBuilders() = ?queryIconHelpText: string, ?queryIconName: string, ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, - ?showsResults: bool) = + ?showsResults: bool, + ?itemsSource: System.Collections.IEnumerable, + ?itemTemplate: Xamarin.Forms.DataTemplate) = let attribCount = match clearIcon with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match clearIconHelpText with Some _ -> attribCount + 1 | None -> attribCount @@ -12781,6 +12816,8 @@ type ViewBuilders() = let attribCount = match queryIconName with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match searchBoxVisibility with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match showsResults with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match itemsSource with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match itemTemplate with Some _ -> attribCount + 1 | None -> attribCount let attribBuilder = new AttributesBuilder(attribCount) match clearIcon with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearIconAttribKey, (v)) @@ -12803,6 +12840,8 @@ type ViewBuilders() = match queryIconName with None -> () | Some v -> attribBuilder.Add(ViewAttributes.QueryIconNameAttribKey, (v)) match searchBoxVisibility with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SearchBoxVisibilityAttribKey, (v)) match showsResults with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ShowsResultsAttribKey, (v)) + match itemsSource with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsSourceAttribKey, (v)) + match itemTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemTemplateAttribKey, (v)) attribBuilder static member val CreateFuncSearchHandler : (unit -> Xamarin.Forms.SearchHandler) = (fun () -> ViewBuilders.CreateSearchHandler()) with get, set @@ -12854,6 +12893,10 @@ type ViewBuilders() = let mutable currSearchBoxVisibilityOpt = ValueNone let mutable prevShowsResultsOpt = ValueNone let mutable currShowsResultsOpt = ValueNone + let mutable prevItemsSourceOpt = ValueNone + let mutable currItemsSourceOpt = ValueNone + let mutable prevItemTemplateOpt = ValueNone + let mutable currItemTemplateOpt = ValueNone for kvp in curr.AttributesKeyed do if kvp.Key = ViewAttributes.ClearIconAttribKey.KeyValue then currClearIconOpt <- ValueSome (kvp.Value :?> string) @@ -12895,6 +12938,10 @@ type ViewBuilders() = currSearchBoxVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SearchBoxVisiblity) if kvp.Key = ViewAttributes.ShowsResultsAttribKey.KeyValue then currShowsResultsOpt <- ValueSome (kvp.Value :?> bool) + if kvp.Key = ViewAttributes.ItemsSourceAttribKey.KeyValue then + currItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IEnumerable) + if kvp.Key = ViewAttributes.ItemTemplateAttribKey.KeyValue then + currItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) match prevOpt with | ValueNone -> () | ValueSome prev -> @@ -12939,9 +12986,13 @@ type ViewBuilders() = prevSearchBoxVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SearchBoxVisiblity) if kvp.Key = ViewAttributes.ShowsResultsAttribKey.KeyValue then prevShowsResultsOpt <- ValueSome (kvp.Value :?> bool) + if kvp.Key = ViewAttributes.ItemsSourceAttribKey.KeyValue then + prevItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IEnumerable) + if kvp.Key = ViewAttributes.ItemTemplateAttribKey.KeyValue then + prevItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) match prevClearIconOpt, currClearIconOpt with | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ClearIcon <- makeFileImageSource currValue + | _, ValueSome currValue -> target.ClearIcon <- makeImageSource currValue | ValueSome _, ValueNone -> target.ClearIcon <- null | ValueNone, ValueNone -> () match prevClearIconHelpTextOpt, currClearIconHelpTextOpt with @@ -12976,7 +13027,7 @@ type ViewBuilders() = | ValueNone, ValueNone -> () match prevClearPlaceholderIconOpt, currClearPlaceholderIconOpt with | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ClearPlaceholderIcon <- makeFileImageSource currValue + | _, ValueSome currValue -> target.ClearPlaceholderIcon <- makeImageSource currValue | ValueSome _, ValueNone -> target.ClearPlaceholderIcon <- null | ValueNone, ValueNone -> () match prevClearPlaceholderNameOpt, currClearPlaceholderNameOpt with @@ -13016,7 +13067,7 @@ type ViewBuilders() = | ValueNone, ValueNone -> () match prevQueryIconOpt, currQueryIconOpt with | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.QueryIcon <- makeFileImageSource currValue + | _, ValueSome currValue -> target.QueryIcon <- makeImageSource currValue | ValueSome _, ValueNone -> target.QueryIcon <- null | ValueNone, ValueNone -> () match prevQueryIconHelpTextOpt, currQueryIconHelpTextOpt with @@ -13039,6 +13090,16 @@ type ViewBuilders() = | _, ValueSome currValue -> target.ShowsResults <- currValue | ValueSome _, ValueNone -> target.ShowsResults <- true | ValueNone, ValueNone -> () + match prevItemsSourceOpt, currItemsSourceOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ItemsSource <- currValue + | ValueSome _, ValueNone -> target.ItemsSource <- null + | ValueNone, ValueNone -> () + match prevItemTemplateOpt, currItemTemplateOpt with + | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () + | _, ValueSome currValue -> target.ItemTemplate <- currValue + | ValueSome _, ValueNone -> target.ItemTemplate <- null + | ValueNone, ValueNone -> () static member inline ConstructSearchHandler(?clearIcon: string, ?clearIconHelpText: string, @@ -13059,7 +13120,9 @@ type ViewBuilders() = ?queryIconHelpText: string, ?queryIconName: string, ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, - ?showsResults: bool) = + ?showsResults: bool, + ?itemsSource: System.Collections.IEnumerable, + ?itemTemplate: Xamarin.Forms.DataTemplate) = let attribBuilder = ViewBuilders.BuildSearchHandler(0, ?clearIcon=clearIcon, @@ -13081,7 +13144,9 @@ type ViewBuilders() = ?queryIconHelpText=queryIconHelpText, ?queryIconName=queryIconName, ?searchBoxVisibility=searchBoxVisibility, - ?showsResults=showsResults) + ?showsResults=showsResults, + ?itemsSource=itemsSource, + ?itemTemplate=itemTemplate) ViewElement.Create(ViewBuilders.CreateFuncSearchHandler, ViewBuilders.UpdateFuncSearchHandler, attribBuilder) @@ -13600,6 +13665,8 @@ type ViewBuilders() = ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, ?itemTemplate: Xamarin.Forms.DataTemplate, + ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, + ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, ?verticalOptions: Xamarin.Forms.LayoutOptions, ?margin: obj, @@ -13647,7 +13714,7 @@ type ViewBuilders() = let attribCount = match selectionMode with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match selectionChanged with Some _ -> attribCount + 1 | None -> attribCount - let attribBuilder = ViewBuilders.BuildItemsView(attribCount, ?emptyView=emptyView, ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?itemTemplate=itemTemplate, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + let attribBuilder = ViewBuilders.BuildItemsView(attribCount, ?emptyView=emptyView, ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?itemTemplate=itemTemplate, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match selectedItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectedItemAttribKey, (v)) match selectionChangedCommand with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionChangedCommandAttribKey, makeCommand(v)) match selectionChangedCommandParameter with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionChangedCommandParameterAttribKey, (v)) @@ -13739,6 +13806,8 @@ type ViewBuilders() = ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, ?itemTemplate: Xamarin.Forms.DataTemplate, + ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, + ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, ?verticalOptions: Xamarin.Forms.LayoutOptions, ?margin: obj, @@ -13791,6 +13860,8 @@ type ViewBuilders() = ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?itemTemplate=itemTemplate, + ?scrollToRequested=scrollToRequested, + ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, @@ -14149,6 +14220,355 @@ type ViewBuilders() = ViewElement.Create(ViewBuilders.CreateFuncShellSection, ViewBuilders.UpdateFuncShellSection, attribBuilder) + /// Builds the attributes for a CarouselView in the view + static member inline BuildCarouselView(attribCount: int, + ?emptyView: System.Object, + ?emptyViewTemplate: Xamarin.Forms.DataTemplate, + ?itemsLayout: Xamarin.Forms.IItemsLayout, + ?itemsSource: System.Collections.IEnumerable, + ?itemTemplate: Xamarin.Forms.DataTemplate, + ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, + ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, + ?horizontalOptions: Xamarin.Forms.LayoutOptions, + ?verticalOptions: Xamarin.Forms.LayoutOptions, + ?margin: obj, + ?gestureRecognizers: ViewElement list, + ?anchorX: double, + ?anchorY: double, + ?backgroundColor: Xamarin.Forms.Color, + ?heightRequest: double, + ?inputTransparent: bool, + ?isEnabled: bool, + ?isVisible: bool, + ?minimumHeightRequest: double, + ?minimumWidthRequest: double, + ?opacity: double, + ?rotation: double, + ?rotationX: double, + ?rotationY: double, + ?scale: double, + ?style: Xamarin.Forms.Style, + ?styleClass: obj, + ?translationX: double, + ?translationY: double, + ?widthRequest: double, + ?resources: (string * obj) list, + ?styles: Xamarin.Forms.Style list, + ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, + ?isTabStop: bool, + ?scaleX: double, + ?scaleY: double, + ?tabIndex: int, + ?childrenReordered: System.EventArgs -> unit, + ?measureInvalidated: System.EventArgs -> unit, + ?focused: Xamarin.Forms.FocusEventArgs -> unit, + ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, + ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: obj -> unit, + ?ref: ViewRef) = + let attribBuilder = ViewBuilders.BuildItemsView(attribCount, ?emptyView=emptyView, ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?itemTemplate=itemTemplate, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + attribBuilder + + static member val CreateFuncCarouselView : (unit -> Xamarin.Forms.CarouselView) = (fun () -> ViewBuilders.CreateCarouselView()) with get, set + + static member CreateCarouselView () : Xamarin.Forms.CarouselView = + upcast (new Xamarin.Forms.CarouselView()) + + static member val UpdateFuncCarouselView = + (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.CarouselView) -> ViewBuilders.UpdateCarouselView (prevOpt, curr, target)) + + static member UpdateCarouselView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.CarouselView) = + // update the inherited ItemsView element + let baseElement = (if ViewProto.ProtoItemsView.IsNone then ViewProto.ProtoItemsView <- Some (ViewBuilders.ConstructItemsView())); ViewProto.ProtoItemsView.Value + baseElement.UpdateInherited (prevOpt, curr, target) + ignore prevOpt + ignore curr + ignore target + + static member inline ConstructCarouselView(?emptyView: System.Object, + ?emptyViewTemplate: Xamarin.Forms.DataTemplate, + ?itemsLayout: Xamarin.Forms.IItemsLayout, + ?itemsSource: System.Collections.IEnumerable, + ?itemTemplate: Xamarin.Forms.DataTemplate, + ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, + ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, + ?horizontalOptions: Xamarin.Forms.LayoutOptions, + ?verticalOptions: Xamarin.Forms.LayoutOptions, + ?margin: obj, + ?gestureRecognizers: ViewElement list, + ?anchorX: double, + ?anchorY: double, + ?backgroundColor: Xamarin.Forms.Color, + ?heightRequest: double, + ?inputTransparent: bool, + ?isEnabled: bool, + ?isVisible: bool, + ?minimumHeightRequest: double, + ?minimumWidthRequest: double, + ?opacity: double, + ?rotation: double, + ?rotationX: double, + ?rotationY: double, + ?scale: double, + ?style: Xamarin.Forms.Style, + ?styleClass: obj, + ?translationX: double, + ?translationY: double, + ?widthRequest: double, + ?resources: (string * obj) list, + ?styles: Xamarin.Forms.Style list, + ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, + ?isTabStop: bool, + ?scaleX: double, + ?scaleY: double, + ?tabIndex: int, + ?childrenReordered: System.EventArgs -> unit, + ?measureInvalidated: System.EventArgs -> unit, + ?focused: Xamarin.Forms.FocusEventArgs -> unit, + ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, + ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.CarouselView -> unit), + ?ref: ViewRef) = + + let attribBuilder = ViewBuilders.BuildCarouselView(0, + ?emptyView=emptyView, + ?emptyViewTemplate=emptyViewTemplate, + ?itemsLayout=itemsLayout, + ?itemsSource=itemsSource, + ?itemTemplate=itemTemplate, + ?scrollToRequested=scrollToRequested, + ?scrollTo=scrollTo, + ?horizontalOptions=horizontalOptions, + ?verticalOptions=verticalOptions, + ?margin=margin, + ?gestureRecognizers=gestureRecognizers, + ?anchorX=anchorX, + ?anchorY=anchorY, + ?backgroundColor=backgroundColor, + ?heightRequest=heightRequest, + ?inputTransparent=inputTransparent, + ?isEnabled=isEnabled, + ?isVisible=isVisible, + ?minimumHeightRequest=minimumHeightRequest, + ?minimumWidthRequest=minimumWidthRequest, + ?opacity=opacity, + ?rotation=rotation, + ?rotationX=rotationX, + ?rotationY=rotationY, + ?scale=scale, + ?style=style, + ?styleClass=styleClass, + ?translationX=translationX, + ?translationY=translationY, + ?widthRequest=widthRequest, + ?resources=resources, + ?styles=styles, + ?styleSheets=styleSheets, + ?isTabStop=isTabStop, + ?scaleX=scaleX, + ?scaleY=scaleY, + ?tabIndex=tabIndex, + ?childrenReordered=childrenReordered, + ?measureInvalidated=measureInvalidated, + ?focused=focused, + ?sizeChanged=sizeChanged, + ?unfocused=unfocused, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), + ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) + + ViewElement.Create(ViewBuilders.CreateFuncCarouselView, ViewBuilders.UpdateFuncCarouselView, attribBuilder) + + /// Builds the attributes for a CollectionView in the view + static member inline BuildCollectionView(attribCount: int, + ?selectedItem: System.Object, + ?selectionChangedCommand: unit -> unit, + ?selectionChangedCommandParameter: System.Object, + ?selectionMode: Xamarin.Forms.SelectionMode, + ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, + ?emptyView: System.Object, + ?emptyViewTemplate: Xamarin.Forms.DataTemplate, + ?itemsLayout: Xamarin.Forms.IItemsLayout, + ?itemsSource: System.Collections.IEnumerable, + ?itemTemplate: Xamarin.Forms.DataTemplate, + ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, + ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, + ?horizontalOptions: Xamarin.Forms.LayoutOptions, + ?verticalOptions: Xamarin.Forms.LayoutOptions, + ?margin: obj, + ?gestureRecognizers: ViewElement list, + ?anchorX: double, + ?anchorY: double, + ?backgroundColor: Xamarin.Forms.Color, + ?heightRequest: double, + ?inputTransparent: bool, + ?isEnabled: bool, + ?isVisible: bool, + ?minimumHeightRequest: double, + ?minimumWidthRequest: double, + ?opacity: double, + ?rotation: double, + ?rotationX: double, + ?rotationY: double, + ?scale: double, + ?style: Xamarin.Forms.Style, + ?styleClass: obj, + ?translationX: double, + ?translationY: double, + ?widthRequest: double, + ?resources: (string * obj) list, + ?styles: Xamarin.Forms.Style list, + ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, + ?isTabStop: bool, + ?scaleX: double, + ?scaleY: double, + ?tabIndex: int, + ?childrenReordered: System.EventArgs -> unit, + ?measureInvalidated: System.EventArgs -> unit, + ?focused: Xamarin.Forms.FocusEventArgs -> unit, + ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, + ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: obj -> unit, + ?ref: ViewRef) = + let attribBuilder = ViewBuilders.BuildSelectableItemsView(attribCount, ?selectedItem=selectedItem, ?selectionChangedCommand=selectionChangedCommand, ?selectionChangedCommandParameter=selectionChangedCommandParameter, ?selectionMode=selectionMode, ?selectionChanged=selectionChanged, ?emptyView=emptyView, ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?itemTemplate=itemTemplate, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + attribBuilder + + static member val CreateFuncCollectionView : (unit -> Xamarin.Forms.CollectionView) = (fun () -> ViewBuilders.CreateCollectionView()) with get, set + + static member CreateCollectionView () : Xamarin.Forms.CollectionView = + upcast (new Xamarin.Forms.CollectionView()) + + static member val UpdateFuncCollectionView = + (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.CollectionView) -> ViewBuilders.UpdateCollectionView (prevOpt, curr, target)) + + static member UpdateCollectionView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.CollectionView) = + // update the inherited SelectableItemsView element + let baseElement = (if ViewProto.ProtoSelectableItemsView.IsNone then ViewProto.ProtoSelectableItemsView <- Some (ViewBuilders.ConstructSelectableItemsView())); ViewProto.ProtoSelectableItemsView.Value + baseElement.UpdateInherited (prevOpt, curr, target) + ignore prevOpt + ignore curr + ignore target + + static member inline ConstructCollectionView(?selectedItem: System.Object, + ?selectionChangedCommand: unit -> unit, + ?selectionChangedCommandParameter: System.Object, + ?selectionMode: Xamarin.Forms.SelectionMode, + ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, + ?emptyView: System.Object, + ?emptyViewTemplate: Xamarin.Forms.DataTemplate, + ?itemsLayout: Xamarin.Forms.IItemsLayout, + ?itemsSource: System.Collections.IEnumerable, + ?itemTemplate: Xamarin.Forms.DataTemplate, + ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, + ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, + ?horizontalOptions: Xamarin.Forms.LayoutOptions, + ?verticalOptions: Xamarin.Forms.LayoutOptions, + ?margin: obj, + ?gestureRecognizers: ViewElement list, + ?anchorX: double, + ?anchorY: double, + ?backgroundColor: Xamarin.Forms.Color, + ?heightRequest: double, + ?inputTransparent: bool, + ?isEnabled: bool, + ?isVisible: bool, + ?minimumHeightRequest: double, + ?minimumWidthRequest: double, + ?opacity: double, + ?rotation: double, + ?rotationX: double, + ?rotationY: double, + ?scale: double, + ?style: Xamarin.Forms.Style, + ?styleClass: obj, + ?translationX: double, + ?translationY: double, + ?widthRequest: double, + ?resources: (string * obj) list, + ?styles: Xamarin.Forms.Style list, + ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, + ?isTabStop: bool, + ?scaleX: double, + ?scaleY: double, + ?tabIndex: int, + ?childrenReordered: System.EventArgs -> unit, + ?measureInvalidated: System.EventArgs -> unit, + ?focused: Xamarin.Forms.FocusEventArgs -> unit, + ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, + ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.CollectionView -> unit), + ?ref: ViewRef) = + + let attribBuilder = ViewBuilders.BuildCollectionView(0, + ?selectedItem=selectedItem, + ?selectionChangedCommand=selectionChangedCommand, + ?selectionChangedCommandParameter=selectionChangedCommandParameter, + ?selectionMode=selectionMode, + ?selectionChanged=selectionChanged, + ?emptyView=emptyView, + ?emptyViewTemplate=emptyViewTemplate, + ?itemsLayout=itemsLayout, + ?itemsSource=itemsSource, + ?itemTemplate=itemTemplate, + ?scrollToRequested=scrollToRequested, + ?scrollTo=scrollTo, + ?horizontalOptions=horizontalOptions, + ?verticalOptions=verticalOptions, + ?margin=margin, + ?gestureRecognizers=gestureRecognizers, + ?anchorX=anchorX, + ?anchorY=anchorY, + ?backgroundColor=backgroundColor, + ?heightRequest=heightRequest, + ?inputTransparent=inputTransparent, + ?isEnabled=isEnabled, + ?isVisible=isVisible, + ?minimumHeightRequest=minimumHeightRequest, + ?minimumWidthRequest=minimumWidthRequest, + ?opacity=opacity, + ?rotation=rotation, + ?rotationX=rotationX, + ?rotationY=rotationY, + ?scale=scale, + ?style=style, + ?styleClass=styleClass, + ?translationX=translationX, + ?translationY=translationY, + ?widthRequest=widthRequest, + ?resources=resources, + ?styles=styles, + ?styleSheets=styleSheets, + ?isTabStop=isTabStop, + ?scaleX=scaleX, + ?scaleY=scaleY, + ?tabIndex=tabIndex, + ?childrenReordered=childrenReordered, + ?measureInvalidated=measureInvalidated, + ?focused=focused, + ?sizeChanged=sizeChanged, + ?unfocused=unfocused, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), + ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) + + ViewElement.Create(ViewBuilders.CreateFuncCollectionView, ViewBuilders.UpdateFuncCollectionView, attribBuilder) + /// Viewer that allows to read the properties of a ViewElement representing a Element type ElementViewer(element: ViewElement) = do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Element' is expected, but '%s' was provided." element.TargetType.FullName @@ -15106,6 +15526,10 @@ type ItemsViewViewer(element: ViewElement) = member this.ItemsSource = element.GetAttributeKeyed(ViewAttributes.ItemsSourceAttribKey) /// Get the value of the ItemTemplate property member this.ItemTemplate = element.GetAttributeKeyed(ViewAttributes.ItemTemplateAttribKey) + /// Get the value of the ScrollToRequested property + member this.ScrollToRequested = element.GetAttributeKeyed(ViewAttributes.ScrollToRequestedAttribKey) + /// Get the value of the ScrollTo property + member this.ScrollTo = element.GetAttributeKeyed(ViewAttributes.iScrollToAttribKey) /// Viewer that allows to read the properties of a ViewElement representing a SearchHandler type SearchHandlerViewer(element: ViewElement) = @@ -15150,6 +15574,10 @@ type SearchHandlerViewer(element: ViewElement) = member this.SearchBoxVisibility = element.GetAttributeKeyed(ViewAttributes.SearchBoxVisibilityAttribKey) /// Get the value of the ShowsResults property member this.ShowsResults = element.GetAttributeKeyed(ViewAttributes.ShowsResultsAttribKey) + /// Get the value of the ItemsSource property + member this.ItemsSource = element.GetAttributeKeyed(ViewAttributes.ItemsSourceAttribKey) + /// Get the value of the ItemTemplate property + member this.ItemTemplate = element.GetAttributeKeyed(ViewAttributes.ItemTemplateAttribKey) /// Viewer that allows to read the properties of a ViewElement representing a Shell type ShellViewer(element: ViewElement) = @@ -15241,6 +15669,16 @@ type ShellSectionViewer(element: ViewElement) = /// Get the value of the GoToAsync property member this.GoToAsync = element.GetAttributeKeyed(ViewAttributes.ssGoToAsyncAttribKey) +/// Viewer that allows to read the properties of a ViewElement representing a CarouselView +type CarouselViewViewer(element: ViewElement) = + inherit ItemsViewViewer(element) + do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.CarouselView' is expected, but '%s' was provided." element.TargetType.FullName + +/// Viewer that allows to read the properties of a ViewElement representing a CollectionView +type CollectionViewViewer(element: ViewElement) = + inherit SelectableItemsViewViewer(element) + do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.CollectionView' is expected, but '%s' was provided." element.TargetType.FullName + type View() = /// Describes a Element in the view static member inline Element(?classId: string, @@ -19421,6 +19859,8 @@ type View() = ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, ?itemTemplate: Xamarin.Forms.DataTemplate, + ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, + ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, ?verticalOptions: Xamarin.Forms.LayoutOptions, ?margin: obj, @@ -19467,6 +19907,8 @@ type View() = ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?itemTemplate=itemTemplate, + ?scrollToRequested=scrollToRequested, + ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, @@ -19528,7 +19970,9 @@ type View() = ?queryIconHelpText: string, ?queryIconName: string, ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, - ?showsResults: bool) = + ?showsResults: bool, + ?itemsSource: System.Collections.IEnumerable, + ?itemTemplate: Xamarin.Forms.DataTemplate) = ViewBuilders.ConstructSearchHandler(?clearIcon=clearIcon, ?clearIconHelpText=clearIconHelpText, @@ -19549,7 +19993,9 @@ type View() = ?queryIconHelpText=queryIconHelpText, ?queryIconName=queryIconName, ?searchBoxVisibility=searchBoxVisibility, - ?showsResults=showsResults) + ?showsResults=showsResults, + ?itemsSource=itemsSource, + ?itemTemplate=itemTemplate) /// Describes a Shell in the view static member inline Shell(?currentItem: ViewElement, @@ -19714,6 +20160,8 @@ type View() = ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, ?itemTemplate: Xamarin.Forms.DataTemplate, + ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, + ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, ?verticalOptions: Xamarin.Forms.LayoutOptions, ?margin: obj, @@ -19765,6 +20213,8 @@ type View() = ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?itemTemplate=itemTemplate, + ?scrollToRequested=scrollToRequested, + ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, @@ -19894,6 +20344,210 @@ type View() = ?created=created, ?ref=ref) + /// Describes a CarouselView in the view + static member inline CarouselView(?emptyView: System.Object, + ?emptyViewTemplate: Xamarin.Forms.DataTemplate, + ?itemsLayout: Xamarin.Forms.IItemsLayout, + ?itemsSource: System.Collections.IEnumerable, + ?itemTemplate: Xamarin.Forms.DataTemplate, + ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, + ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, + ?horizontalOptions: Xamarin.Forms.LayoutOptions, + ?verticalOptions: Xamarin.Forms.LayoutOptions, + ?margin: obj, + ?gestureRecognizers: ViewElement list, + ?anchorX: double, + ?anchorY: double, + ?backgroundColor: Xamarin.Forms.Color, + ?heightRequest: double, + ?inputTransparent: bool, + ?isEnabled: bool, + ?isVisible: bool, + ?minimumHeightRequest: double, + ?minimumWidthRequest: double, + ?opacity: double, + ?rotation: double, + ?rotationX: double, + ?rotationY: double, + ?scale: double, + ?style: Xamarin.Forms.Style, + ?styleClass: obj, + ?translationX: double, + ?translationY: double, + ?widthRequest: double, + ?resources: (string * obj) list, + ?styles: Xamarin.Forms.Style list, + ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, + ?isTabStop: bool, + ?scaleX: double, + ?scaleY: double, + ?tabIndex: int, + ?childrenReordered: System.EventArgs -> unit, + ?measureInvalidated: System.EventArgs -> unit, + ?focused: Xamarin.Forms.FocusEventArgs -> unit, + ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, + ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.CarouselView -> unit), + ?ref: ViewRef) = + + ViewBuilders.ConstructCarouselView(?emptyView=emptyView, + ?emptyViewTemplate=emptyViewTemplate, + ?itemsLayout=itemsLayout, + ?itemsSource=itemsSource, + ?itemTemplate=itemTemplate, + ?scrollToRequested=scrollToRequested, + ?scrollTo=scrollTo, + ?horizontalOptions=horizontalOptions, + ?verticalOptions=verticalOptions, + ?margin=margin, + ?gestureRecognizers=gestureRecognizers, + ?anchorX=anchorX, + ?anchorY=anchorY, + ?backgroundColor=backgroundColor, + ?heightRequest=heightRequest, + ?inputTransparent=inputTransparent, + ?isEnabled=isEnabled, + ?isVisible=isVisible, + ?minimumHeightRequest=minimumHeightRequest, + ?minimumWidthRequest=minimumWidthRequest, + ?opacity=opacity, + ?rotation=rotation, + ?rotationX=rotationX, + ?rotationY=rotationY, + ?scale=scale, + ?style=style, + ?styleClass=styleClass, + ?translationX=translationX, + ?translationY=translationY, + ?widthRequest=widthRequest, + ?resources=resources, + ?styles=styles, + ?styleSheets=styleSheets, + ?isTabStop=isTabStop, + ?scaleX=scaleX, + ?scaleY=scaleY, + ?tabIndex=tabIndex, + ?childrenReordered=childrenReordered, + ?measureInvalidated=measureInvalidated, + ?focused=focused, + ?sizeChanged=sizeChanged, + ?unfocused=unfocused, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=created, + ?ref=ref) + + /// Describes a CollectionView in the view + static member inline CollectionView(?selectedItem: System.Object, + ?selectionChangedCommand: unit -> unit, + ?selectionChangedCommandParameter: System.Object, + ?selectionMode: Xamarin.Forms.SelectionMode, + ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, + ?emptyView: System.Object, + ?emptyViewTemplate: Xamarin.Forms.DataTemplate, + ?itemsLayout: Xamarin.Forms.IItemsLayout, + ?itemsSource: System.Collections.IEnumerable, + ?itemTemplate: Xamarin.Forms.DataTemplate, + ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, + ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, + ?horizontalOptions: Xamarin.Forms.LayoutOptions, + ?verticalOptions: Xamarin.Forms.LayoutOptions, + ?margin: obj, + ?gestureRecognizers: ViewElement list, + ?anchorX: double, + ?anchorY: double, + ?backgroundColor: Xamarin.Forms.Color, + ?heightRequest: double, + ?inputTransparent: bool, + ?isEnabled: bool, + ?isVisible: bool, + ?minimumHeightRequest: double, + ?minimumWidthRequest: double, + ?opacity: double, + ?rotation: double, + ?rotationX: double, + ?rotationY: double, + ?scale: double, + ?style: Xamarin.Forms.Style, + ?styleClass: obj, + ?translationX: double, + ?translationY: double, + ?widthRequest: double, + ?resources: (string * obj) list, + ?styles: Xamarin.Forms.Style list, + ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, + ?isTabStop: bool, + ?scaleX: double, + ?scaleY: double, + ?tabIndex: int, + ?childrenReordered: System.EventArgs -> unit, + ?measureInvalidated: System.EventArgs -> unit, + ?focused: Xamarin.Forms.FocusEventArgs -> unit, + ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, + ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, + ?classId: string, + ?styleId: string, + ?automationId: string, + ?created: (Xamarin.Forms.CollectionView -> unit), + ?ref: ViewRef) = + + ViewBuilders.ConstructCollectionView(?selectedItem=selectedItem, + ?selectionChangedCommand=selectionChangedCommand, + ?selectionChangedCommandParameter=selectionChangedCommandParameter, + ?selectionMode=selectionMode, + ?selectionChanged=selectionChanged, + ?emptyView=emptyView, + ?emptyViewTemplate=emptyViewTemplate, + ?itemsLayout=itemsLayout, + ?itemsSource=itemsSource, + ?itemTemplate=itemTemplate, + ?scrollToRequested=scrollToRequested, + ?scrollTo=scrollTo, + ?horizontalOptions=horizontalOptions, + ?verticalOptions=verticalOptions, + ?margin=margin, + ?gestureRecognizers=gestureRecognizers, + ?anchorX=anchorX, + ?anchorY=anchorY, + ?backgroundColor=backgroundColor, + ?heightRequest=heightRequest, + ?inputTransparent=inputTransparent, + ?isEnabled=isEnabled, + ?isVisible=isVisible, + ?minimumHeightRequest=minimumHeightRequest, + ?minimumWidthRequest=minimumWidthRequest, + ?opacity=opacity, + ?rotation=rotation, + ?rotationX=rotationX, + ?rotationY=rotationY, + ?scale=scale, + ?style=style, + ?styleClass=styleClass, + ?translationX=translationX, + ?translationY=translationY, + ?widthRequest=widthRequest, + ?resources=resources, + ?styles=styles, + ?styleSheets=styleSheets, + ?isTabStop=isTabStop, + ?scaleX=scaleX, + ?scaleY=scaleY, + ?tabIndex=tabIndex, + ?childrenReordered=childrenReordered, + ?measureInvalidated=measureInvalidated, + ?focused=focused, + ?sizeChanged=sizeChanged, + ?unfocused=unfocused, + ?classId=classId, + ?styleId=styleId, + ?automationId=automationId, + ?created=created, + ?ref=ref) + [] module ViewElementExtensions = @@ -20650,6 +21304,12 @@ module ViewElementExtensions = /// Adjusts the ItemTemplate property in the visual element member x.ItemTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.ItemTemplateAttribKey, (value)) + /// Adjusts the ScrollToRequested property in the visual element + member x.ScrollToRequested(value: Xamarin.Forms.ScrollToRequestEventArgs -> unit) = x.WithAttribute(ViewAttributes.ScrollToRequestedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) + + /// Adjusts the iScrollTo property in the visual element + member x.iScrollTo(value: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind) = x.WithAttribute(ViewAttributes.iScrollToAttribKey, (value)) + /// Adjusts the ClearIcon property in the visual element member x.ClearIcon(value: string) = x.WithAttribute(ViewAttributes.ClearIconAttribKey, (value)) @@ -20820,14 +21480,15 @@ module ViewElementExtensions = ?listViewGrouped_ItemAppearing: int * int option -> unit, ?listViewGrouped_ItemDisappearing: int * int option -> unit, ?listViewGrouped_ItemSelected: (int * int) option -> unit, ?listViewGrouped_ItemTapped: int * int -> unit, ?refreshing: unit -> unit, ?textOverride: string, ?iconOverride: string, ?route: string, ?flyoutIcon: string, ?span: int, ?emptyView: System.Object, ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, ?itemTemplate: Xamarin.Forms.DataTemplate, - ?clearIcon: string, ?clearIconHelpText: string, ?clearIconName: string, ?clearPlaceholderCommand: unit -> unit, ?clearPlaceholderCommandParameter: System.Object, - ?clearPlaceholderEnabled: bool, ?clearPlaceholderHelpText: string, ?clearPlaceholderIcon: string, ?clearPlaceholderName: string, ?displayMemberName: string, - ?isSearchEnabled: bool, ?query: string, ?queryIcon: string, ?queryIconHelpText: string, ?queryIconName: string, - ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, ?currentItem: ViewElement, ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, - ?flyoutHeader: System.Object, ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, ?flyoutIsPresented: bool, ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, - ?menuItemTemplate: Xamarin.Forms.DataTemplate, ?routeHost: string, ?routeScheme: string, ?onNavigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, ?onNavigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, - ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?selectedItem: System.Object, ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, - ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?location: System.Uri, ?contentTemplate: Xamarin.Forms.DataTemplate, ?ssGoToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind) = + ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?iScrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?clearIcon: string, ?clearIconHelpText: string, ?clearIconName: string, + ?clearPlaceholderCommand: unit -> unit, ?clearPlaceholderCommandParameter: System.Object, ?clearPlaceholderEnabled: bool, ?clearPlaceholderHelpText: string, ?clearPlaceholderIcon: string, + ?clearPlaceholderName: string, ?displayMemberName: string, ?isSearchEnabled: bool, ?query: string, ?queryIcon: string, + ?queryIconHelpText: string, ?queryIconName: string, ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, ?currentItem: ViewElement, + ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, + ?flyoutIsPresented: bool, ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, ?menuItemTemplate: Xamarin.Forms.DataTemplate, ?routeHost: string, ?routeScheme: string, + ?onNavigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, ?onNavigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?selectedItem: System.Object, + ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?location: System.Uri, + ?contentTemplate: Xamarin.Forms.DataTemplate, ?ssGoToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind) = let x = match classId with None -> x | Some opt -> x.ClassId(opt) let x = match styleId with None -> x | Some opt -> x.StyleId(opt) let x = match automationId with None -> x | Some opt -> x.AutomationId(opt) @@ -21078,6 +21739,8 @@ module ViewElementExtensions = let x = match itemsLayout with None -> x | Some opt -> x.ItemsLayout(opt) let x = match itemsSource with None -> x | Some opt -> x.ItemsSource(opt) let x = match itemTemplate with None -> x | Some opt -> x.ItemTemplate(opt) + let x = match scrollToRequested with None -> x | Some opt -> x.ScrollToRequested(opt) + let x = match iScrollTo with None -> x | Some opt -> x.iScrollTo(opt) let x = match clearIcon with None -> x | Some opt -> x.ClearIcon(opt) let x = match clearIconHelpText with None -> x | Some opt -> x.ClearIconHelpText(opt) let x = match clearIconName with None -> x | Some opt -> x.ClearIconName(opt) @@ -21620,6 +22283,10 @@ module ViewElementExtensions = let itemsSource (value: System.Collections.IEnumerable) (x: ViewElement) = x.ItemsSource(value) /// Adjusts the ItemTemplate property in the visual element let itemTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.ItemTemplate(value) + /// Adjusts the ScrollToRequested property in the visual element + let scrollToRequested (value: Xamarin.Forms.ScrollToRequestEventArgs -> unit) (x: ViewElement) = x.ScrollToRequested(value) + /// Adjusts the iScrollTo property in the visual element + let iScrollTo (value: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind) (x: ViewElement) = x.iScrollTo(value) /// Adjusts the ClearIcon property in the visual element let clearIcon (value: string) (x: ViewElement) = x.ClearIcon(value) /// Adjusts the ClearIconHelpText property in the visual element diff --git a/tools/Generator/Xamarin.Forms.Core.json b/tools/Generator/Xamarin.Forms.Core.json index daec2377e..792755a86 100644 --- a/tools/Generator/Xamarin.Forms.Core.json +++ b/tools/Generator/Xamarin.Forms.Core.json @@ -2143,6 +2143,19 @@ { "name": "ItemTemplate", "defaultValue": "null" + }, + { + "name": "ScrollToRequested", + "defaultValue": "null", + "inputType": "Xamarin.Forms.ScrollToRequestEventArgs -> unit", + "convToModel": "(fun f -> System.EventHandler(fun _sender args -> f args))" + }, + { + "name": "ScrollTo", + "uniqueName": "iScrollTo", + "inputType": "obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind", + "modelType": "obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind", + "updateCode": "(fun _ curr target -> triggerScrollTo curr target)" } ] }, @@ -2153,7 +2166,7 @@ "name": "ClearIcon", "inputType": "string", "modelType": "string", - "convToValue": "makeFileImageSource", + "convToValue": "makeImageSource", "defaultValue": "null" }, { @@ -2194,7 +2207,7 @@ "name": "ClearPlaceholderIcon", "inputType": "string", "modelType": "string", - "convToValue": "makeFileImageSource", + "convToValue": "makeImageSource", "defaultValue": "null" }, { @@ -2239,7 +2252,7 @@ "name": "QueryIcon", "inputType": "string", "modelType": "string", - "convToValue": "makeFileImageSource", + "convToValue": "makeImageSource", "defaultValue": "null" }, { @@ -2263,6 +2276,14 @@ "defaultValue": "true", "inputType": "bool", "modelType": "bool" + }, + { + "name": "ItemsSource", + "defaultValue": "null" + }, + { + "name": "ItemTemplate", + "defaultValue": "null" } ] }, @@ -2435,6 +2456,14 @@ "updateCode": "(fun _ curr target -> triggerSSGoToAsync curr target)" } ] + }, + { + "name": "Xamarin.Forms.CarouselView", + "members": [] + }, + { + "name": "Xamarin.Forms.CollectionView", + "members": [] } ] } \ No newline at end of file From 149f4fe2a4f1226360f570edbf91f8abe06e7eef Mon Sep 17 00:00:00 2001 From: SergejDK Date: Wed, 6 Mar 2019 19:28:07 +0100 Subject: [PATCH 08/18] changed folderpath --- samples/AllControls/Droid/AllControls.Droid.fsproj | 10 +++++----- samples/Calculator/Droid/Calculator.Droid.fsproj | 10 +++++----- samples/CounterApp/Droid/CounterApp.Droid.fsproj | 10 +++++----- .../Droid/StaticViewCounterApp.Droid.fsproj | 10 +++++----- samples/TicTacToe/Droid/TicTacToe.Droid.fsproj | 10 +++++----- .../content/blank/NewApp.Android/NewApp.Android.fsproj | 10 +++++----- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/samples/AllControls/Droid/AllControls.Droid.fsproj b/samples/AllControls/Droid/AllControls.Droid.fsproj index 53208fa60..6724213b8 100644 --- a/samples/AllControls/Droid/AllControls.Droid.fsproj +++ b/samples/AllControls/Droid/AllControls.Droid.fsproj @@ -150,19 +150,19 @@ ../../../packages/androidapp/Xamarin.Android.Support.Vector.Drawable/lib/MonoAndroid81/Xamarin.Android.Support.Vector.Drawable.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Core.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Core.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Platform.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Platform.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/FormsViewGroup.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/FormsViewGroup.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Platform.Android.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Platform.Android.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Xaml.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Xaml.dll ../../../packages/androidapp/FSharp.Core/lib/netstandard1.6/FSharp.Core.dll diff --git a/samples/Calculator/Droid/Calculator.Droid.fsproj b/samples/Calculator/Droid/Calculator.Droid.fsproj index c8444aa18..ef5bb267b 100644 --- a/samples/Calculator/Droid/Calculator.Droid.fsproj +++ b/samples/Calculator/Droid/Calculator.Droid.fsproj @@ -153,19 +153,19 @@ ../../../packages/androidapp/Xamarin.Android.Support.Vector.Drawable/lib/MonoAndroid81/Xamarin.Android.Support.Vector.Drawable.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Core.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Core.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Platform.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Platform.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Platform.Android.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Platform.Android.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/FormsViewGroup.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/FormsViewGroup.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Xaml.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Xaml.dll {B459AFAD-BB5B-43C3-BD86-609E8DB3E3FD} diff --git a/samples/CounterApp/Droid/CounterApp.Droid.fsproj b/samples/CounterApp/Droid/CounterApp.Droid.fsproj index 8b216e6e8..6f920def2 100644 --- a/samples/CounterApp/Droid/CounterApp.Droid.fsproj +++ b/samples/CounterApp/Droid/CounterApp.Droid.fsproj @@ -153,19 +153,19 @@ ../../../packages/androidapp/Xamarin.Android.Support.Vector.Drawable/lib/MonoAndroid81/Xamarin.Android.Support.Vector.Drawable.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Core.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Core.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Platform.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Platform.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Platform.Android.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Platform.Android.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/FormsViewGroup.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/FormsViewGroup.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Xaml.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Xaml.dll {AC36B11A-383D-45A3-8999-4F6475E9DD13} diff --git a/samples/StaticView/StaticViewCounterApp/Droid/StaticViewCounterApp.Droid.fsproj b/samples/StaticView/StaticViewCounterApp/Droid/StaticViewCounterApp.Droid.fsproj index ef44b565d..22ee89f15 100644 --- a/samples/StaticView/StaticViewCounterApp/Droid/StaticViewCounterApp.Droid.fsproj +++ b/samples/StaticView/StaticViewCounterApp/Droid/StaticViewCounterApp.Droid.fsproj @@ -148,19 +148,19 @@ ../../../../packages/androidapp/Xamarin.Android.Support.Vector.Drawable/lib/MonoAndroid81/Xamarin.Android.Support.Vector.Drawable.dll - ../../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Core.dll + ../../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Core.dll - ../../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Platform.dll + ../../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Platform.dll - ../../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Platform.Android.dll + ../../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Platform.Android.dll - ../../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/FormsViewGroup.dll + ../../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/FormsViewGroup.dll - ../../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Xaml.dll + ../../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Xaml.dll ../../../../packages/androidapp/FSharp.Core/lib/netstandard1.6/FSharp.Core.dll diff --git a/samples/TicTacToe/Droid/TicTacToe.Droid.fsproj b/samples/TicTacToe/Droid/TicTacToe.Droid.fsproj index d7453650f..82bf67a2c 100644 --- a/samples/TicTacToe/Droid/TicTacToe.Droid.fsproj +++ b/samples/TicTacToe/Droid/TicTacToe.Droid.fsproj @@ -161,19 +161,19 @@ ../../../packages/androidapp/Xamarin.Android.Support.Vector.Drawable/lib/MonoAndroid81/Xamarin.Android.Support.Vector.Drawable.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Core.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Core.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Platform.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Platform.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/FormsViewGroup.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/FormsViewGroup.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Platform.Android.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Platform.Android.dll - ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid10/Xamarin.Forms.Xaml.dll + ../../../packages/androidapp/Xamarin.Forms/lib/MonoAndroid81/Xamarin.Forms.Xaml.dll ../../../packages/androidapp/FSharp.Core/lib/netstandard1.6/FSharp.Core.dll diff --git a/templates/content/blank/NewApp.Android/NewApp.Android.fsproj b/templates/content/blank/NewApp.Android/NewApp.Android.fsproj index f9e7616be..c25d57dbd 100644 --- a/templates/content/blank/NewApp.Android/NewApp.Android.fsproj +++ b/templates/content/blank/NewApp.Android/NewApp.Android.fsproj @@ -157,19 +157,19 @@ ..\packages/Xamarin.Android.Support.Vector.Drawable.XamarinAndroidSdkVersion/lib/MonoAndroid81/Xamarin.Android.Support.Vector.Drawable.dll - ..\packages/Xamarin.Forms.XamarinFormsSdk/lib/MonoAndroid10/Xamarin.Forms.Core.dll + ..\packages/Xamarin.Forms.XamarinFormsSdk/lib/MonoAndroid81/Xamarin.Forms.Core.dll - ..\packages/Xamarin.Forms.XamarinFormsSdk/lib/MonoAndroid10/Xamarin.Forms.Platform.dll + ..\packages/Xamarin.Forms.XamarinFormsSdk/lib/MonoAndroid81/Xamarin.Forms.Platform.dll - ..\packages/Xamarin.Forms.XamarinFormsSdk/lib/MonoAndroid10/FormsViewGroup.dll + ..\packages/Xamarin.Forms.XamarinFormsSdk/lib/MonoAndroid81/FormsViewGroup.dll - ..\packages/Xamarin.Forms.XamarinFormsSdk/lib/MonoAndroid10/Xamarin.Forms.Platform.Android.dll + ..\packages/Xamarin.Forms.XamarinFormsSdk/lib/MonoAndroid81/Xamarin.Forms.Platform.Android.dll - ..\packages/Xamarin.Forms.XamarinFormsSdk/lib/MonoAndroid10/Xamarin.Forms.Xaml.dll + ..\packages/Xamarin.Forms.XamarinFormsSdk/lib/MonoAndroid81/Xamarin.Forms.Xaml.dll ..\packages/FSharp.Core.FSharpCorePkgVersion/lib/netstandard1.6/FSharp.Core.dll From dcc1a7817791a1cf2241a7aa98322a40a3ffecd0 Mon Sep 17 00:00:00 2001 From: SergejDK Date: Mon, 11 Mar 2019 23:46:12 +0100 Subject: [PATCH 09/18] items property for shell, example included but not ready --- .../AllControls/AllControls/AllControls.fs | 37 ++++-- samples/AllControls/Droid/MainActivity.fs | 3 +- samples/AllControls/iOS/AppDelegate.fs | 1 + src/Fabulous.Core/ViewConverters.fs | 40 +++++++ src/Fabulous.Core/Xamarin.Forms.Core.fs | 112 ++++++++++++++++-- tools/Generator/Xamarin.Forms.Core.json | 39 +++++- 6 files changed, 212 insertions(+), 20 deletions(-) diff --git a/samples/AllControls/AllControls/AllControls.fs b/samples/AllControls/AllControls/AllControls.fs index 7b18acff4..c6b5a1970 100644 --- a/samples/AllControls/AllControls/AllControls.fs +++ b/samples/AllControls/AllControls/AllControls.fs @@ -19,6 +19,7 @@ type RootPageKind = | Animations | WebCall | ScrollView + | ShellView type Model = { RootPageKind: RootPageKind @@ -115,6 +116,8 @@ type Msg = | ScrollFabulous of float * float * AnimationKind | ScrollXamarinForms of float * float * AnimationKind | Scrolled of float * float + // For ShellView page demo + //| ShowShell [] module MyExtension = @@ -342,8 +345,8 @@ module App = [ yield View.ContentPage(useSafeArea=true, padding = new Thickness (10.0, 20.0, 10.0, 5.0), - content= View.StackLayout( - children=[ + content= View.ListView( + items=[ View.Button(text = "TabbedPage #1 (various controls)", command=(fun () -> dispatch (SetRootPageKind Tabbed1))) View.Button(text = "TabbedPage #2 (various controls)", command=(fun () -> dispatch (SetRootPageKind Tabbed2))) View.Button(text = "TabbedPage #3 (various controls)", command=(fun () -> dispatch (SetRootPageKind Tabbed3))) @@ -355,13 +358,14 @@ module App = View.Button(text = "Pop-up", command=(fun () -> dispatch ShowPopup)) View.Button(text = "WebRequest", command=(fun () -> dispatch (SetRootPageKind WebCall))) View.Button(text = "ScrollView", command=(fun () -> dispatch (SetRootPageKind ScrollView))) + View.Button(text = "Shell", command=(fun () -> dispatch (SetRootPageKind ShellView))) ])) - .ToolbarItems([View.ToolbarItem(text="About", command=(fun () -> dispatch (SetRootPageKind (Choice true))))] ) - .TitleView(View.StackLayout(orientation=StackOrientation.Horizontal, children=[ - View.Label(text="Fabulous", verticalOptions=LayoutOptions.Center) - View.Label(text="RootPage", verticalOptions=LayoutOptions.Center, horizontalOptions=LayoutOptions.CenterAndExpand) - ] - )) + //.ToolbarItems([View.ToolbarItem(text="about", command=(fun () -> dispatch (SetRootPageKind (Choice true))))] ) + //.TitleView(View.StackLayout(orientation=StackOrientation.Horizontal, children=[ + // View.Label(text="fabulous", verticalOptions=LayoutOptions.Center) + // View.Label(text="rootpage", verticalOptions=LayoutOptions.Center, horizontalOptions=LayoutOptions.CenterAndExpand) + // ] + //)) if showAbout then yield @@ -910,7 +914,22 @@ module App = ) ] ) - ) + ) + | ShellView -> + + match Device.RuntimePlatform with + | Device.iOS | Device.Android -> + + View.Shell( title = "TitleShell", + items = [ + View.ShellItem( title = "TitleshellItem", + items = [ + View.ShellSection(items = [ + View.ShellContent(content=View.ContentPage(content=MainPageButton, title="ContentpageTitle")) + ]) + ]) + ]) + | _ -> View.ContentPage(content = View.Label(text="Your Platform does not support Shell")) type App () as app = diff --git a/samples/AllControls/Droid/MainActivity.fs b/samples/AllControls/Droid/MainActivity.fs index 68b32ee85..822fe3f1e 100644 --- a/samples/AllControls/Droid/MainActivity.fs +++ b/samples/AllControls/Droid/MainActivity.fs @@ -20,7 +20,8 @@ type MainActivity() = override this.OnCreate (bundle: Bundle) = base.OnCreate (bundle) - + global.Xamarin.Forms.Forms.SetFlags([|"Shell_Experimental"; "CollectionView_Experimental"; "Visual_Experimental"|]) + Xamarin.Forms.Forms.Init (this, bundle) let app = new AllControls.App() diff --git a/samples/AllControls/iOS/AppDelegate.fs b/samples/AllControls/iOS/AppDelegate.fs index 05db4acac..2f14ed34c 100644 --- a/samples/AllControls/iOS/AppDelegate.fs +++ b/samples/AllControls/iOS/AppDelegate.fs @@ -15,6 +15,7 @@ type AppDelegate () = let mutable _app: AllControls.App option = None override this.FinishedLaunching (uiApp, options) = + Xamarin.Forms.Forms.SetFlags("Shell_Experimental"); Forms.Init() let app = new AllControls.App() this.LoadApplication (app) diff --git a/src/Fabulous.Core/ViewConverters.fs b/src/Fabulous.Core/ViewConverters.fs index 90847c1b2..26b8753ae 100644 --- a/src/Fabulous.Core/ViewConverters.fs +++ b/src/Fabulous.Core/ViewConverters.fs @@ -657,6 +657,46 @@ module Converters = | _, ValueNone -> Xamarin.Forms.MenuItem.SetAccelerator(target, null) | _, ValueSome newVal -> Xamarin.Forms.MenuItem.SetAccelerator(target, makeAccelerator newVal) + let internal updateShellItems (prevCollOpt: seq<'T> voption) (collOpt: seq<'T> voption) (target: Xamarin.Forms.Shell) = + let create (desc: ViewElement) = + desc.Create() :?> Xamarin.Forms.ShellItem + + let prevArray = ValueOption.map seqToArray prevCollOpt + let currArray = ValueOption.map seqToArray collOpt + updateCollectionGeneric prevArray currArray target.Items create (fun _ _ _ -> ()) (fun _ _ -> true) updateChild + + let internal updateMenuItemsShell (prevCollOpt: seq<'T> voption) (collOpt: seq<'T> voption) (target: Xamarin.Forms.Shell) = + let create (desc: ViewElement) = + desc.Create() :?> Xamarin.Forms.MenuItem + + let prevArray = ValueOption.map seqToArray prevCollOpt + let currArray = ValueOption.map seqToArray collOpt + updateCollectionGeneric prevArray currArray target.MenuItems create (fun _ _ _ -> ()) (fun _ _ -> true) updateChild + + let internal updateMenuItemsShellContent (prevCollOpt: seq<'T> voption) (collOpt: seq<'T> voption) (target: Xamarin.Forms.ShellContent) = + let create (desc: ViewElement) = + desc.Create() :?> Xamarin.Forms.MenuItem + + let prevArray = ValueOption.map seqToArray prevCollOpt + let currArray = ValueOption.map seqToArray collOpt + updateCollectionGeneric prevArray currArray target.MenuItems create (fun _ _ _ -> ()) (fun _ _ -> true) updateChild + + let internal updateShellItemItems (prevCollOpt: seq<'T> voption) (collOpt: seq<'T> voption) (target: Xamarin.Forms.ShellItem) = + let create (desc: ViewElement) = + desc.Create() :?> Xamarin.Forms.ShellSection + + let prevArray = ValueOption.map seqToArray prevCollOpt + let currArray = ValueOption.map seqToArray collOpt + updateCollectionGeneric prevArray currArray target.Items create (fun _ _ _ -> ()) (fun _ _ -> true) updateChild + + let internal updateShellSectionItems (prevCollOpt: seq<'T> voption) (collOpt: seq<'T> voption) (target: Xamarin.Forms.ShellSection) = + let create (desc: ViewElement) = + desc.Create() :?> Xamarin.Forms.ShellContent + + let prevArray = ValueOption.map seqToArray prevCollOpt + let currArray = ValueOption.map seqToArray collOpt + updateCollectionGeneric prevArray currArray target.Items create (fun _ _ _ -> ()) (fun _ _ -> true) updateChild + /// Trigger ScrollView.ScrollToAsync if needed, given the current values let internal triggerScrollToAsync (currValue: (float * float * AnimationKind) voption) (target: Xamarin.Forms.ScrollView) = match currValue with diff --git a/src/Fabulous.Core/Xamarin.Forms.Core.fs b/src/Fabulous.Core/Xamarin.Forms.Core.fs index d8e73a181..d51588de6 100644 --- a/src/Fabulous.Core/Xamarin.Forms.Core.fs +++ b/src/Fabulous.Core/Xamarin.Forms.Core.fs @@ -277,6 +277,8 @@ module ViewAttributes = let QueryIconNameAttribKey : AttributeKey<_> = AttributeKey<_>("QueryIconName") let SearchBoxVisibilityAttribKey : AttributeKey<_> = AttributeKey<_>("SearchBoxVisibility") let ShowsResultsAttribKey : AttributeKey<_> = AttributeKey<_>("ShowsResults") + let ItemsAttribKey : AttributeKey<_> = AttributeKey<_>("Items") + let MenuItemsAttribKey : AttributeKey<_> = AttributeKey<_>("MenuItems") let CurrentItemAttribKey : AttributeKey<_> = AttributeKey<_>("CurrentItem") let FlyoutBackgroundColorAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutBackgroundColor") let FlyoutBehaviorAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutBehavior") @@ -13152,6 +13154,8 @@ type ViewBuilders() = /// Builds the attributes for a Shell in the view static member inline BuildShell(attribCount: int, + ?items: seq, + ?menuItems: seq, ?currentItem: ViewElement, ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, @@ -13215,6 +13219,8 @@ type ViewBuilders() = ?created: obj -> unit, ?ref: ViewRef) = + let attribCount = match items with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match menuItems with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match currentItem with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match flyoutBackgroundColor with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match flyoutBehavior with Some _ -> attribCount + 1 | None -> attribCount @@ -13233,6 +13239,8 @@ type ViewBuilders() = let attribCount = match goToAsync with Some _ -> attribCount + 1 | None -> attribCount let attribBuilder = ViewBuilders.BuildPage(attribCount, ?title=title, ?backgroundImage=backgroundImage, ?icon=icon, ?isBusy=isBusy, ?padding=padding, ?toolbarItems=toolbarItems, ?useSafeArea=useSafeArea, ?appearing=appearing, ?disappearing=disappearing, ?layoutChanged=layoutChanged, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsAttribKey, (v)) + match menuItems with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MenuItemsAttribKey, (v)) match currentItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CurrentItemAttribKey, (v)) match flyoutBackgroundColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutBackgroundColorAttribKey, (v)) match flyoutBehavior with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutBehaviorAttribKey, (v)) @@ -13263,6 +13271,10 @@ type ViewBuilders() = // update the inherited Page element let baseElement = (if ViewProto.ProtoPage.IsNone then ViewProto.ProtoPage <- Some (ViewBuilders.ConstructPage())); ViewProto.ProtoPage.Value baseElement.UpdateInherited (prevOpt, curr, target) + let mutable prevItemsOpt = ValueNone + let mutable currItemsOpt = ValueNone + let mutable prevMenuItemsOpt = ValueNone + let mutable currMenuItemsOpt = ValueNone let mutable prevCurrentItemOpt = ValueNone let mutable currCurrentItemOpt = ValueNone let mutable prevFlyoutBackgroundColorOpt = ValueNone @@ -13296,6 +13308,10 @@ type ViewBuilders() = let mutable prevGoToAsyncOpt = ValueNone let mutable currGoToAsyncOpt = ValueNone for kvp in curr.AttributesKeyed do + if kvp.Key = ViewAttributes.ItemsAttribKey.KeyValue then + currItemsOpt <- ValueSome (kvp.Value :?> seq) + if kvp.Key = ViewAttributes.MenuItemsAttribKey.KeyValue then + currMenuItemsOpt <- ValueSome (kvp.Value :?> seq) if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then currCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) if kvp.Key = ViewAttributes.FlyoutBackgroundColorAttribKey.KeyValue then @@ -13332,6 +13348,10 @@ type ViewBuilders() = | ValueNone -> () | ValueSome prev -> for kvp in prev.AttributesKeyed do + if kvp.Key = ViewAttributes.ItemsAttribKey.KeyValue then + prevItemsOpt <- ValueSome (kvp.Value :?> seq) + if kvp.Key = ViewAttributes.MenuItemsAttribKey.KeyValue then + prevMenuItemsOpt <- ValueSome (kvp.Value :?> seq) if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then prevCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) if kvp.Key = ViewAttributes.FlyoutBackgroundColorAttribKey.KeyValue then @@ -13364,6 +13384,8 @@ type ViewBuilders() = prevOnNavigatingOpt <- ValueSome (kvp.Value :?> System.EventHandler) if kvp.Key = ViewAttributes.GoToAsyncAttribKey.KeyValue then prevGoToAsyncOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind) + updateShellItems prevItemsOpt currItemsOpt target + updateMenuItemsShell prevMenuItemsOpt currMenuItemsOpt target match prevCurrentItemOpt, currCurrentItemOpt with // For structured objects, dependsOn on reference equality | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () @@ -13448,7 +13470,9 @@ type ViewBuilders() = | ValueNone, ValueNone -> () (fun _ curr target -> triggerGoToAsync curr target) prevGoToAsyncOpt currGoToAsyncOpt target - static member inline ConstructShell(?currentItem: ViewElement, + static member inline ConstructShell(?items: seq, + ?menuItems: seq, + ?currentItem: ViewElement, ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, @@ -13512,6 +13536,8 @@ type ViewBuilders() = ?ref: ViewRef) = let attribBuilder = ViewBuilders.BuildShell(0, + ?items=items, + ?menuItems=menuItems, ?currentItem=currentItem, ?flyoutBackgroundColor=flyoutBackgroundColor, ?flyoutBehavior=flyoutBehavior, @@ -13952,6 +13978,7 @@ type ViewBuilders() = static member inline BuildShellContent(attribCount: int, ?content: ViewElement, ?contentTemplate: Xamarin.Forms.DataTemplate, + ?menuItems: seq, ?title: string, ?route: string, ?icon: string, @@ -13965,10 +13992,12 @@ type ViewBuilders() = let attribCount = match content with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match contentTemplate with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match menuItems with Some _ -> attribCount + 1 | None -> attribCount let attribBuilder = ViewBuilders.BuildBaseShellItem(attribCount, ?title=title, ?route=route, ?icon=icon, ?flyoutIcon=flyoutIcon, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match content with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ContentAttribKey, (v)) match contentTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ContentTemplateAttribKey, makeTemplate(v)) + match menuItems with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MenuItemsAttribKey, (v)) attribBuilder static member val CreateFuncShellContent : (unit -> Xamarin.Forms.ShellContent) = (fun () -> ViewBuilders.CreateShellContent()) with get, set @@ -13987,11 +14016,15 @@ type ViewBuilders() = let mutable currContentOpt = ValueNone let mutable prevContentTemplateOpt = ValueNone let mutable currContentTemplateOpt = ValueNone + let mutable prevMenuItemsOpt = ValueNone + let mutable currMenuItemsOpt = ValueNone for kvp in curr.AttributesKeyed do if kvp.Key = ViewAttributes.ContentAttribKey.KeyValue then currContentOpt <- ValueSome (kvp.Value :?> System.Object) if kvp.Key = ViewAttributes.ContentTemplateAttribKey.KeyValue then currContentTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + if kvp.Key = ViewAttributes.MenuItemsAttribKey.KeyValue then + currMenuItemsOpt <- ValueSome (kvp.Value :?> seq) match prevOpt with | ValueNone -> () | ValueSome prev -> @@ -14000,6 +14033,8 @@ type ViewBuilders() = prevContentOpt <- ValueSome (kvp.Value :?> System.Object) if kvp.Key = ViewAttributes.ContentTemplateAttribKey.KeyValue then prevContentTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) + if kvp.Key = ViewAttributes.MenuItemsAttribKey.KeyValue then + prevMenuItemsOpt <- ValueSome (kvp.Value :?> seq) match prevContentOpt, currContentOpt with | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () | _, ValueSome currValue -> target.Content <- currValue @@ -14010,9 +14045,11 @@ type ViewBuilders() = | _, ValueSome currValue -> target.ContentTemplate <- currValue | ValueSome _, ValueNone -> target.ContentTemplate <- null | ValueNone, ValueNone -> () + updateMenuItemsShellContent prevMenuItemsOpt currMenuItemsOpt target static member inline ConstructShellContent(?content: ViewElement, ?contentTemplate: Xamarin.Forms.DataTemplate, + ?menuItems: seq, ?title: string, ?route: string, ?icon: string, @@ -14027,6 +14064,7 @@ type ViewBuilders() = let attribBuilder = ViewBuilders.BuildShellContent(0, ?content=content, ?contentTemplate=contentTemplate, + ?menuItems=menuItems, ?title=title, ?route=route, ?icon=icon, @@ -14043,6 +14081,7 @@ type ViewBuilders() = /// Builds the attributes for a ShellItem in the view static member inline BuildShellItem(attribCount: int, ?currentItem: ViewElement, + ?items: seq, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?title: string, ?route: string, @@ -14056,9 +14095,11 @@ type ViewBuilders() = ?ref: ViewRef) = let attribCount = match currentItem with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match items with Some _ -> attribCount + 1 | None -> attribCount let attribBuilder = ViewBuilders.BuildShellGroupItem(attribCount, ?flyoutDisplayOptions=flyoutDisplayOptions, ?title=title, ?route=route, ?icon=icon, ?flyoutIcon=flyoutIcon, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match currentItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CurrentItemAttribKey, (v)) + match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsAttribKey, (v)) attribBuilder static member val CreateFuncShellItem : (unit -> Xamarin.Forms.ShellItem) = (fun () -> ViewBuilders.CreateShellItem()) with get, set @@ -14075,15 +14116,21 @@ type ViewBuilders() = baseElement.UpdateInherited (prevOpt, curr, target) let mutable prevCurrentItemOpt = ValueNone let mutable currCurrentItemOpt = ValueNone + let mutable prevItemsOpt = ValueNone + let mutable currItemsOpt = ValueNone for kvp in curr.AttributesKeyed do if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then currCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) + if kvp.Key = ViewAttributes.ItemsAttribKey.KeyValue then + currItemsOpt <- ValueSome (kvp.Value :?> seq) match prevOpt with | ValueNone -> () | ValueSome prev -> for kvp in prev.AttributesKeyed do if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then prevCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) + if kvp.Key = ViewAttributes.ItemsAttribKey.KeyValue then + prevItemsOpt <- ValueSome (kvp.Value :?> seq) match prevCurrentItemOpt, currCurrentItemOpt with // For structured objects, dependsOn on reference equality | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () @@ -14094,8 +14141,10 @@ type ViewBuilders() = | ValueSome _, ValueNone -> target.CurrentItem <- null | ValueNone, ValueNone -> () + updateShellItemItems prevItemsOpt currItemsOpt target static member inline ConstructShellItem(?currentItem: ViewElement, + ?items: seq, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?title: string, ?route: string, @@ -14110,6 +14159,7 @@ type ViewBuilders() = let attribBuilder = ViewBuilders.BuildShellItem(0, ?currentItem=currentItem, + ?items=items, ?flyoutDisplayOptions=flyoutDisplayOptions, ?title=title, ?route=route, @@ -14128,6 +14178,7 @@ type ViewBuilders() = static member inline BuildShellSection(attribCount: int, ?currentItem: ViewElement, ?goToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, + ?items: seq, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?title: string, ?route: string, @@ -14142,10 +14193,12 @@ type ViewBuilders() = let attribCount = match currentItem with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match goToAsync with Some _ -> attribCount + 1 | None -> attribCount + let attribCount = match items with Some _ -> attribCount + 1 | None -> attribCount let attribBuilder = ViewBuilders.BuildShellGroupItem(attribCount, ?flyoutDisplayOptions=flyoutDisplayOptions, ?title=title, ?route=route, ?icon=icon, ?flyoutIcon=flyoutIcon, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match currentItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CurrentItemAttribKey, (v)) match goToAsync with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ssGoToAsyncAttribKey, (v)) + match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsAttribKey, (v)) attribBuilder static member val CreateFuncShellSection : (unit -> Xamarin.Forms.ShellSection) = (fun () -> ViewBuilders.CreateShellSection()) with get, set @@ -14164,11 +14217,15 @@ type ViewBuilders() = let mutable currCurrentItemOpt = ValueNone let mutable prevssGoToAsyncOpt = ValueNone let mutable currssGoToAsyncOpt = ValueNone + let mutable prevItemsOpt = ValueNone + let mutable currItemsOpt = ValueNone for kvp in curr.AttributesKeyed do if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then currCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) if kvp.Key = ViewAttributes.ssGoToAsyncAttribKey.KeyValue then currssGoToAsyncOpt <- ValueSome (kvp.Value :?> string list * Map * Fabulous.DynamicViews.AnimationKind) + if kvp.Key = ViewAttributes.ItemsAttribKey.KeyValue then + currItemsOpt <- ValueSome (kvp.Value :?> seq) match prevOpt with | ValueNone -> () | ValueSome prev -> @@ -14177,6 +14234,8 @@ type ViewBuilders() = prevCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) if kvp.Key = ViewAttributes.ssGoToAsyncAttribKey.KeyValue then prevssGoToAsyncOpt <- ValueSome (kvp.Value :?> string list * Map * Fabulous.DynamicViews.AnimationKind) + if kvp.Key = ViewAttributes.ItemsAttribKey.KeyValue then + prevItemsOpt <- ValueSome (kvp.Value :?> seq) match prevCurrentItemOpt, currCurrentItemOpt with // For structured objects, dependsOn on reference equality | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () @@ -14188,9 +14247,11 @@ type ViewBuilders() = target.CurrentItem <- null | ValueNone, ValueNone -> () (fun _ curr target -> triggerSSGoToAsync curr target) prevssGoToAsyncOpt currssGoToAsyncOpt target + updateShellSectionItems prevItemsOpt currItemsOpt target static member inline ConstructShellSection(?currentItem: ViewElement, ?goToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, + ?items: seq, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?title: string, ?route: string, @@ -14206,6 +14267,7 @@ type ViewBuilders() = let attribBuilder = ViewBuilders.BuildShellSection(0, ?currentItem=currentItem, ?goToAsync=goToAsync, + ?items=items, ?flyoutDisplayOptions=flyoutDisplayOptions, ?title=title, ?route=route, @@ -15583,6 +15645,10 @@ type SearchHandlerViewer(element: ViewElement) = type ShellViewer(element: ViewElement) = inherit PageViewer(element) do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Shell' is expected, but '%s' was provided." element.TargetType.FullName + /// Get the value of the Items property + member this.Items = element.GetAttributeKeyed(ViewAttributes.ItemsAttribKey) + /// Get the value of the MenuItems property + member this.MenuItems = element.GetAttributeKeyed(ViewAttributes.MenuItemsAttribKey) /// Get the value of the CurrentItem property member this.CurrentItem = element.GetAttributeKeyed(ViewAttributes.CurrentItemAttribKey) /// Get the value of the FlyoutBackgroundColor property @@ -15652,6 +15718,8 @@ type ShellContentViewer(element: ViewElement) = member this.Content = element.GetAttributeKeyed(ViewAttributes.ContentAttribKey) /// Get the value of the ContentTemplate property member this.ContentTemplate = element.GetAttributeKeyed(ViewAttributes.ContentTemplateAttribKey) + /// Get the value of the MenuItems property + member this.MenuItems = element.GetAttributeKeyed(ViewAttributes.MenuItemsAttribKey) /// Viewer that allows to read the properties of a ViewElement representing a ShellItem type ShellItemViewer(element: ViewElement) = @@ -15659,6 +15727,8 @@ type ShellItemViewer(element: ViewElement) = do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ShellItem' is expected, but '%s' was provided." element.TargetType.FullName /// Get the value of the CurrentItem property member this.CurrentItem = element.GetAttributeKeyed(ViewAttributes.CurrentItemAttribKey) + /// Get the value of the Items property + member this.Items = element.GetAttributeKeyed(ViewAttributes.ItemsAttribKey) /// Viewer that allows to read the properties of a ViewElement representing a ShellSection type ShellSectionViewer(element: ViewElement) = @@ -15668,6 +15738,8 @@ type ShellSectionViewer(element: ViewElement) = member this.CurrentItem = element.GetAttributeKeyed(ViewAttributes.CurrentItemAttribKey) /// Get the value of the GoToAsync property member this.GoToAsync = element.GetAttributeKeyed(ViewAttributes.ssGoToAsyncAttribKey) + /// Get the value of the Items property + member this.Items = element.GetAttributeKeyed(ViewAttributes.ItemsAttribKey) /// Viewer that allows to read the properties of a ViewElement representing a CarouselView type CarouselViewViewer(element: ViewElement) = @@ -19998,7 +20070,9 @@ type View() = ?itemTemplate=itemTemplate) /// Describes a Shell in the view - static member inline Shell(?currentItem: ViewElement, + static member inline Shell(?items: seq, + ?menuItems: seq, + ?currentItem: ViewElement, ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, @@ -20061,7 +20135,9 @@ type View() = ?created: (Xamarin.Forms.Shell -> unit), ?ref: ViewRef) = - ViewBuilders.ConstructShell(?currentItem=currentItem, + ViewBuilders.ConstructShell(?items=items, + ?menuItems=menuItems, + ?currentItem=currentItem, ?flyoutBackgroundColor=flyoutBackgroundColor, ?flyoutBehavior=flyoutBehavior, ?flyoutHeader=flyoutHeader, @@ -20264,6 +20340,7 @@ type View() = /// Describes a ShellContent in the view static member inline ShellContent(?content: ViewElement, ?contentTemplate: Xamarin.Forms.DataTemplate, + ?menuItems: seq, ?title: string, ?route: string, ?icon: string, @@ -20277,6 +20354,7 @@ type View() = ViewBuilders.ConstructShellContent(?content=content, ?contentTemplate=contentTemplate, + ?menuItems=menuItems, ?title=title, ?route=route, ?icon=icon, @@ -20290,6 +20368,7 @@ type View() = /// Describes a ShellItem in the view static member inline ShellItem(?currentItem: ViewElement, + ?items: seq, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?title: string, ?route: string, @@ -20303,6 +20382,7 @@ type View() = ?ref: ViewRef) = ViewBuilders.ConstructShellItem(?currentItem=currentItem, + ?items=items, ?flyoutDisplayOptions=flyoutDisplayOptions, ?title=title, ?route=route, @@ -20318,6 +20398,7 @@ type View() = /// Describes a ShellSection in the view static member inline ShellSection(?currentItem: ViewElement, ?goToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, + ?items: seq, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?title: string, ?route: string, @@ -20332,6 +20413,7 @@ type View() = ViewBuilders.ConstructShellSection(?currentItem=currentItem, ?goToAsync=goToAsync, + ?items=items, ?flyoutDisplayOptions=flyoutDisplayOptions, ?title=title, ?route=route, @@ -21361,6 +21443,12 @@ module ViewElementExtensions = /// Adjusts the ShowsResults property in the visual element member x.ShowsResults(value: bool) = x.WithAttribute(ViewAttributes.ShowsResultsAttribKey, (value)) + /// Adjusts the Items property in the visual element + member x.Items(value: seq) = x.WithAttribute(ViewAttributes.ItemsAttribKey, (value)) + + /// Adjusts the MenuItems property in the visual element + member x.MenuItems(value: seq) = x.WithAttribute(ViewAttributes.MenuItemsAttribKey, (value)) + /// Adjusts the CurrentItem property in the visual element member x.CurrentItem(value: ViewElement) = x.WithAttribute(ViewAttributes.CurrentItemAttribKey, (value)) @@ -21483,12 +21571,12 @@ module ViewElementExtensions = ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?iScrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?clearIcon: string, ?clearIconHelpText: string, ?clearIconName: string, ?clearPlaceholderCommand: unit -> unit, ?clearPlaceholderCommandParameter: System.Object, ?clearPlaceholderEnabled: bool, ?clearPlaceholderHelpText: string, ?clearPlaceholderIcon: string, ?clearPlaceholderName: string, ?displayMemberName: string, ?isSearchEnabled: bool, ?query: string, ?queryIcon: string, - ?queryIconHelpText: string, ?queryIconName: string, ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, ?currentItem: ViewElement, - ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, - ?flyoutIsPresented: bool, ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, ?menuItemTemplate: Xamarin.Forms.DataTemplate, ?routeHost: string, ?routeScheme: string, - ?onNavigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, ?onNavigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?selectedItem: System.Object, - ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?location: System.Uri, - ?contentTemplate: Xamarin.Forms.DataTemplate, ?ssGoToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind) = + ?queryIconHelpText: string, ?queryIconName: string, ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, ?items: seq, + ?menuItems: seq, ?currentItem: ViewElement, ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, + ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, ?flyoutIsPresented: bool, ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, ?menuItemTemplate: Xamarin.Forms.DataTemplate, + ?routeHost: string, ?routeScheme: string, ?onNavigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, ?onNavigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, + ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?selectedItem: System.Object, ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, + ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?location: System.Uri, ?contentTemplate: Xamarin.Forms.DataTemplate, ?ssGoToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind) = let x = match classId with None -> x | Some opt -> x.ClassId(opt) let x = match styleId with None -> x | Some opt -> x.StyleId(opt) let x = match automationId with None -> x | Some opt -> x.AutomationId(opt) @@ -21758,6 +21846,8 @@ module ViewElementExtensions = let x = match queryIconName with None -> x | Some opt -> x.QueryIconName(opt) let x = match searchBoxVisibility with None -> x | Some opt -> x.SearchBoxVisibility(opt) let x = match showsResults with None -> x | Some opt -> x.ShowsResults(opt) + let x = match items with None -> x | Some opt -> x.Items(opt) + let x = match menuItems with None -> x | Some opt -> x.MenuItems(opt) let x = match currentItem with None -> x | Some opt -> x.CurrentItem(opt) let x = match flyoutBackgroundColor with None -> x | Some opt -> x.FlyoutBackgroundColor(opt) let x = match flyoutBehavior with None -> x | Some opt -> x.FlyoutBehavior(opt) @@ -22321,6 +22411,10 @@ module ViewElementExtensions = let searchBoxVisibility (value: Xamarin.Forms.SearchBoxVisiblity) (x: ViewElement) = x.SearchBoxVisibility(value) /// Adjusts the ShowsResults property in the visual element let showsResults (value: bool) (x: ViewElement) = x.ShowsResults(value) + /// Adjusts the Items property in the visual element + let items (value: seq) (x: ViewElement) = x.Items(value) + /// Adjusts the MenuItems property in the visual element + let menuItems (value: seq) (x: ViewElement) = x.MenuItems(value) /// Adjusts the CurrentItem property in the visual element let currentItem (value: ViewElement) (x: ViewElement) = x.CurrentItem(value) /// Adjusts the FlyoutBackgroundColor property in the visual element diff --git a/tools/Generator/Xamarin.Forms.Core.json b/tools/Generator/Xamarin.Forms.Core.json index 792755a86..b693fb51c 100644 --- a/tools/Generator/Xamarin.Forms.Core.json +++ b/tools/Generator/Xamarin.Forms.Core.json @@ -2290,6 +2290,20 @@ { "name": "Xamarin.Forms.Shell", "members": [ + { + "name": "Items", + "defaultValue": "null", + "inputType": "seq", + "modelType": "seq", + "updateCode": "updateShellItems" + }, + { + "name": "MenuItems", + "defaultValue": "null", + "inputType": "seq", + "modelType": "seq", + "updateCode": "updateMenuItemsShell" + }, { "name": "CurrentItem", "defaultValue": "null" @@ -2429,6 +2443,13 @@ "defaultValue": "null", "inputType": "Xamarin.Forms.DataTemplate", "convToModel": "makeTemplate" + }, + { + "name": "MenuItems", + "defaultValue": "null", + "inputType": "seq", + "modelType": "seq", + "updateCode": "updateMenuItemsShellContent" } ] }, @@ -2437,7 +2458,16 @@ "members": [ { "name": "CurrentItem", - "defaultValue": "null" + "defaultValue": "null", + "inputType": "ViewElement", + "modelType": "ViewElement" + }, + { + "name": "Items", + "defaultValue": "null", + "inputType": "seq", + "modelType": "seq", + "updateCode": "updateShellItemItems" } ] }, @@ -2454,6 +2484,13 @@ "inputType": "string list * Map * Fabulous.DynamicViews.AnimationKind", "modelType": "string list * Map * Fabulous.DynamicViews.AnimationKind", "updateCode": "(fun _ curr target -> triggerSSGoToAsync curr target)" + }, + { + "name": "Items", + "defaultValue": "null", + "inputType": "seq", + "modelType": "seq", + "updateCode": "updateShellSectionItems" } ] }, From a6eb44168944850f4bc60ab7af5304f097874905 Mon Sep 17 00:00:00 2001 From: Sergej Dick Date: Mon, 18 Mar 2019 06:56:09 +0100 Subject: [PATCH 10/18] removed baseshellitem --- src/Fabulous.Core/Xamarin.Forms.Core.fs | 327 ++---------------------- tools/Generator/Xamarin.Forms.Core.json | 37 --- 2 files changed, 28 insertions(+), 336 deletions(-) diff --git a/src/Fabulous.Core/Xamarin.Forms.Core.fs b/src/Fabulous.Core/Xamarin.Forms.Core.fs index d51588de6..b1d18d00d 100644 --- a/src/Fabulous.Core/Xamarin.Forms.Core.fs +++ b/src/Fabulous.Core/Xamarin.Forms.Core.fs @@ -250,8 +250,6 @@ module ViewAttributes = let RefreshingAttribKey : AttributeKey<_> = AttributeKey<_>("Refreshing") let TextOverrideAttribKey : AttributeKey<_> = AttributeKey<_>("TextOverride") let IconOverrideAttribKey : AttributeKey<_> = AttributeKey<_>("IconOverride") - let RouteAttribKey : AttributeKey<_> = AttributeKey<_>("Route") - let FlyoutIconAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutIcon") let SpanAttribKey : AttributeKey<_> = AttributeKey<_>("Span") let EmptyViewAttribKey : AttributeKey<_> = AttributeKey<_>("EmptyView") let EmptyViewTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("EmptyViewTemplate") @@ -288,6 +286,7 @@ module ViewAttributes = let FlyoutIsPresentedAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutIsPresented") let GroupHeaderTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("GroupHeaderTemplate") let MenuItemTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("MenuItemTemplate") + let RouteAttribKey : AttributeKey<_> = AttributeKey<_>("Route") let RouteHostAttribKey : AttributeKey<_> = AttributeKey<_>("RouteHost") let RouteSchemeAttribKey : AttributeKey<_> = AttributeKey<_>("RouteScheme") let OnNavigatedAttribKey : AttributeKey<_> = AttributeKey<_>("OnNavigated") @@ -363,7 +362,6 @@ type ViewProto() = static member val ProtoListView : ViewElement option = None with get, set static member val ProtoListViewGrouped : ViewElement option = None with get, set static member val ProtoBackButtonBehavior : ViewElement option = None with get, set - static member val ProtoBaseShellItem : ViewElement option = None with get, set static member val ProtoGridItemsLayout : ViewElement option = None with get, set static member val ProtoItemsView : ViewElement option = None with get, set static member val ProtoSearchHandler : ViewElement option = None with get, set @@ -12346,131 +12344,6 @@ type ViewBuilders() = ViewElement.Create(ViewBuilders.CreateFuncBackButtonBehavior, ViewBuilders.UpdateFuncBackButtonBehavior, attribBuilder) - /// Builds the attributes for a BaseShellItem in the view - static member inline BuildBaseShellItem(attribCount: int, - ?title: string, - ?route: string, - ?icon: string, - ?flyoutIcon: string, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match title with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match route with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match icon with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match flyoutIcon with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isEnabled with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match title with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TitleAttribKey, (v)) - match route with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RouteAttribKey, (v)) - match icon with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IconAttribKey, (v)) - match flyoutIcon with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutIconAttribKey, (v)) - match isEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsEnabledAttribKey, (v)) - attribBuilder - - static member val CreateFuncBaseShellItem : (unit -> Xamarin.Forms.BaseShellItem) = (fun () -> ViewBuilders.CreateBaseShellItem()) with get, set - - static member CreateBaseShellItem () : Xamarin.Forms.BaseShellItem = - upcast (new Xamarin.Forms.BaseShellItem()) - - static member val UpdateFuncBaseShellItem = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.BaseShellItem) -> ViewBuilders.UpdateBaseShellItem (prevOpt, curr, target)) - - static member UpdateBaseShellItem (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.BaseShellItem) = - // update the inherited Element element - let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevTitleOpt = ValueNone - let mutable currTitleOpt = ValueNone - let mutable prevRouteOpt = ValueNone - let mutable currRouteOpt = ValueNone - let mutable prevIconOpt = ValueNone - let mutable currIconOpt = ValueNone - let mutable prevFlyoutIconOpt = ValueNone - let mutable currFlyoutIconOpt = ValueNone - let mutable prevIsEnabledOpt = ValueNone - let mutable currIsEnabledOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.TitleAttribKey.KeyValue then - currTitleOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.RouteAttribKey.KeyValue then - currRouteOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.IconAttribKey.KeyValue then - currIconOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FlyoutIconAttribKey.KeyValue then - currFlyoutIconOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.IsEnabledAttribKey.KeyValue then - currIsEnabledOpt <- ValueSome (kvp.Value :?> bool) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.TitleAttribKey.KeyValue then - prevTitleOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.RouteAttribKey.KeyValue then - prevRouteOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.IconAttribKey.KeyValue then - prevIconOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FlyoutIconAttribKey.KeyValue then - prevFlyoutIconOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.IsEnabledAttribKey.KeyValue then - prevIsEnabledOpt <- ValueSome (kvp.Value :?> bool) - match prevTitleOpt, currTitleOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Title <- currValue - | ValueSome _, ValueNone -> target.Title <- null - | ValueNone, ValueNone -> () - match prevRouteOpt, currRouteOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Route <- currValue - | ValueSome _, ValueNone -> target.Route <- null - | ValueNone, ValueNone -> () - match prevIconOpt, currIconOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Icon <- makeFileImageSource currValue - | ValueSome _, ValueNone -> target.Icon <- null - | ValueNone, ValueNone -> () - match prevFlyoutIconOpt, currFlyoutIconOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FlyoutIcon <- makeFileImageSource currValue - | ValueSome _, ValueNone -> target.FlyoutIcon <- null - | ValueNone, ValueNone -> () - match prevIsEnabledOpt, currIsEnabledOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsEnabled <- currValue - | ValueSome _, ValueNone -> target.IsEnabled <- true - | ValueNone, ValueNone -> () - - static member inline ConstructBaseShellItem(?title: string, - ?route: string, - ?icon: string, - ?flyoutIcon: string, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.BaseShellItem -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildBaseShellItem(0, - ?title=title, - ?route=route, - ?icon=icon, - ?flyoutIcon=flyoutIcon, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncBaseShellItem, ViewBuilders.UpdateFuncBaseShellItem, attribBuilder) - /// Builds the attributes for a GridItemsLayout in the view static member inline BuildGridItemsLayout(attribCount: int, ?span: int) = @@ -13606,11 +13479,6 @@ type ViewBuilders() = /// Builds the attributes for a ShellGroupItem in the view static member inline BuildShellGroupItem(attribCount: int, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?title: string, - ?route: string, - ?icon: string, - ?flyoutIcon: string, - ?isEnabled: bool, ?classId: string, ?styleId: string, ?automationId: string, @@ -13619,7 +13487,7 @@ type ViewBuilders() = let attribCount = match flyoutDisplayOptions with Some _ -> attribCount + 1 | None -> attribCount - let attribBuilder = ViewBuilders.BuildBaseShellItem(attribCount, ?title=title, ?route=route, ?icon=icon, ?flyoutIcon=flyoutIcon, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match flyoutDisplayOptions with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutDisplayOptionsAttribKey, (v)) attribBuilder @@ -13632,8 +13500,8 @@ type ViewBuilders() = (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ShellGroupItem) -> ViewBuilders.UpdateShellGroupItem (prevOpt, curr, target)) static member UpdateShellGroupItem (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ShellGroupItem) = - // update the inherited BaseShellItem element - let baseElement = (if ViewProto.ProtoBaseShellItem.IsNone then ViewProto.ProtoBaseShellItem <- Some (ViewBuilders.ConstructBaseShellItem())); ViewProto.ProtoBaseShellItem.Value + // update the inherited Element element + let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value baseElement.UpdateInherited (prevOpt, curr, target) let mutable prevFlyoutDisplayOptionsOpt = ValueNone let mutable currFlyoutDisplayOptionsOpt = ValueNone @@ -13653,11 +13521,6 @@ type ViewBuilders() = | ValueNone, ValueNone -> () static member inline ConstructShellGroupItem(?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?title: string, - ?route: string, - ?icon: string, - ?flyoutIcon: string, - ?isEnabled: bool, ?classId: string, ?styleId: string, ?automationId: string, @@ -13666,11 +13529,6 @@ type ViewBuilders() = let attribBuilder = ViewBuilders.BuildShellGroupItem(0, ?flyoutDisplayOptions=flyoutDisplayOptions, - ?title=title, - ?route=route, - ?icon=icon, - ?flyoutIcon=flyoutIcon, - ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, @@ -13979,11 +13837,6 @@ type ViewBuilders() = ?content: ViewElement, ?contentTemplate: Xamarin.Forms.DataTemplate, ?menuItems: seq, - ?title: string, - ?route: string, - ?icon: string, - ?flyoutIcon: string, - ?isEnabled: bool, ?classId: string, ?styleId: string, ?automationId: string, @@ -13994,7 +13847,7 @@ type ViewBuilders() = let attribCount = match contentTemplate with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match menuItems with Some _ -> attribCount + 1 | None -> attribCount - let attribBuilder = ViewBuilders.BuildBaseShellItem(attribCount, ?title=title, ?route=route, ?icon=icon, ?flyoutIcon=flyoutIcon, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match content with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ContentAttribKey, (v)) match contentTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ContentTemplateAttribKey, makeTemplate(v)) match menuItems with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MenuItemsAttribKey, (v)) @@ -14009,8 +13862,8 @@ type ViewBuilders() = (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ShellContent) -> ViewBuilders.UpdateShellContent (prevOpt, curr, target)) static member UpdateShellContent (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ShellContent) = - // update the inherited BaseShellItem element - let baseElement = (if ViewProto.ProtoBaseShellItem.IsNone then ViewProto.ProtoBaseShellItem <- Some (ViewBuilders.ConstructBaseShellItem())); ViewProto.ProtoBaseShellItem.Value + // update the inherited Element element + let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value baseElement.UpdateInherited (prevOpt, curr, target) let mutable prevContentOpt = ValueNone let mutable currContentOpt = ValueNone @@ -14050,11 +13903,6 @@ type ViewBuilders() = static member inline ConstructShellContent(?content: ViewElement, ?contentTemplate: Xamarin.Forms.DataTemplate, ?menuItems: seq, - ?title: string, - ?route: string, - ?icon: string, - ?flyoutIcon: string, - ?isEnabled: bool, ?classId: string, ?styleId: string, ?automationId: string, @@ -14065,11 +13913,6 @@ type ViewBuilders() = ?content=content, ?contentTemplate=contentTemplate, ?menuItems=menuItems, - ?title=title, - ?route=route, - ?icon=icon, - ?flyoutIcon=flyoutIcon, - ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, @@ -14083,11 +13926,6 @@ type ViewBuilders() = ?currentItem: ViewElement, ?items: seq, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?title: string, - ?route: string, - ?icon: string, - ?flyoutIcon: string, - ?isEnabled: bool, ?classId: string, ?styleId: string, ?automationId: string, @@ -14097,7 +13935,7 @@ type ViewBuilders() = let attribCount = match currentItem with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match items with Some _ -> attribCount + 1 | None -> attribCount - let attribBuilder = ViewBuilders.BuildShellGroupItem(attribCount, ?flyoutDisplayOptions=flyoutDisplayOptions, ?title=title, ?route=route, ?icon=icon, ?flyoutIcon=flyoutIcon, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + let attribBuilder = ViewBuilders.BuildShellGroupItem(attribCount, ?flyoutDisplayOptions=flyoutDisplayOptions, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match currentItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CurrentItemAttribKey, (v)) match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsAttribKey, (v)) attribBuilder @@ -14146,11 +13984,6 @@ type ViewBuilders() = static member inline ConstructShellItem(?currentItem: ViewElement, ?items: seq, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?title: string, - ?route: string, - ?icon: string, - ?flyoutIcon: string, - ?isEnabled: bool, ?classId: string, ?styleId: string, ?automationId: string, @@ -14161,11 +13994,6 @@ type ViewBuilders() = ?currentItem=currentItem, ?items=items, ?flyoutDisplayOptions=flyoutDisplayOptions, - ?title=title, - ?route=route, - ?icon=icon, - ?flyoutIcon=flyoutIcon, - ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, @@ -14180,11 +14008,6 @@ type ViewBuilders() = ?goToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, ?items: seq, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?title: string, - ?route: string, - ?icon: string, - ?flyoutIcon: string, - ?isEnabled: bool, ?classId: string, ?styleId: string, ?automationId: string, @@ -14195,7 +14018,7 @@ type ViewBuilders() = let attribCount = match goToAsync with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match items with Some _ -> attribCount + 1 | None -> attribCount - let attribBuilder = ViewBuilders.BuildShellGroupItem(attribCount, ?flyoutDisplayOptions=flyoutDisplayOptions, ?title=title, ?route=route, ?icon=icon, ?flyoutIcon=flyoutIcon, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + let attribBuilder = ViewBuilders.BuildShellGroupItem(attribCount, ?flyoutDisplayOptions=flyoutDisplayOptions, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match currentItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CurrentItemAttribKey, (v)) match goToAsync with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ssGoToAsyncAttribKey, (v)) match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsAttribKey, (v)) @@ -14253,11 +14076,6 @@ type ViewBuilders() = ?goToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, ?items: seq, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?title: string, - ?route: string, - ?icon: string, - ?flyoutIcon: string, - ?isEnabled: bool, ?classId: string, ?styleId: string, ?automationId: string, @@ -14269,11 +14087,6 @@ type ViewBuilders() = ?goToAsync=goToAsync, ?items=items, ?flyoutDisplayOptions=flyoutDisplayOptions, - ?title=title, - ?route=route, - ?icon=icon, - ?flyoutIcon=flyoutIcon, - ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, @@ -15553,21 +15366,6 @@ type BackButtonBehaviorViewer(element: ViewElement) = /// Get the value of the IsEnabled property member this.IsEnabled = element.GetAttributeKeyed(ViewAttributes.IsEnabledAttribKey) -/// Viewer that allows to read the properties of a ViewElement representing a BaseShellItem -type BaseShellItemViewer(element: ViewElement) = - inherit ElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.BaseShellItem' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Title property - member this.Title = element.GetAttributeKeyed(ViewAttributes.TitleAttribKey) - /// Get the value of the Route property - member this.Route = element.GetAttributeKeyed(ViewAttributes.RouteAttribKey) - /// Get the value of the Icon property - member this.Icon = element.GetAttributeKeyed(ViewAttributes.IconAttribKey) - /// Get the value of the FlyoutIcon property - member this.FlyoutIcon = element.GetAttributeKeyed(ViewAttributes.FlyoutIconAttribKey) - /// Get the value of the IsEnabled property - member this.IsEnabled = element.GetAttributeKeyed(ViewAttributes.IsEnabledAttribKey) - /// Viewer that allows to read the properties of a ViewElement representing a GridItemsLayout type GridItemsLayoutViewer(element: ViewElement) = do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.GridItemsLayout' is expected, but '%s' was provided." element.TargetType.FullName @@ -15684,7 +15482,7 @@ type ShellViewer(element: ViewElement) = /// Viewer that allows to read the properties of a ViewElement representing a ShellGroupItem type ShellGroupItemViewer(element: ViewElement) = - inherit BaseShellItemViewer(element) + inherit ElementViewer(element) do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ShellGroupItem' is expected, but '%s' was provided." element.TargetType.FullName /// Get the value of the FlyoutDisplayOptions property member this.FlyoutDisplayOptions = element.GetAttributeKeyed(ViewAttributes.FlyoutDisplayOptionsAttribKey) @@ -15712,7 +15510,7 @@ type ShellNavigationStateViewer(element: ViewElement) = /// Viewer that allows to read the properties of a ViewElement representing a ShellContent type ShellContentViewer(element: ViewElement) = - inherit BaseShellItemViewer(element) + inherit ElementViewer(element) do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ShellContent' is expected, but '%s' was provided." element.TargetType.FullName /// Get the value of the Content property member this.Content = element.GetAttributeKeyed(ViewAttributes.ContentAttribKey) @@ -19897,29 +19695,6 @@ type View() = ?iconOverride=iconOverride, ?isEnabled=isEnabled) - /// Describes a BaseShellItem in the view - static member inline BaseShellItem(?title: string, - ?route: string, - ?icon: string, - ?flyoutIcon: string, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.BaseShellItem -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructBaseShellItem(?title=title, - ?route=route, - ?icon=icon, - ?flyoutIcon=flyoutIcon, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - /// Describes a GridItemsLayout in the view static member inline GridItemsLayout(?span: int) = @@ -20202,11 +19977,6 @@ type View() = /// Describes a ShellGroupItem in the view static member inline ShellGroupItem(?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?title: string, - ?route: string, - ?icon: string, - ?flyoutIcon: string, - ?isEnabled: bool, ?classId: string, ?styleId: string, ?automationId: string, @@ -20214,11 +19984,6 @@ type View() = ?ref: ViewRef) = ViewBuilders.ConstructShellGroupItem(?flyoutDisplayOptions=flyoutDisplayOptions, - ?title=title, - ?route=route, - ?icon=icon, - ?flyoutIcon=flyoutIcon, - ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, @@ -20341,11 +20106,6 @@ type View() = static member inline ShellContent(?content: ViewElement, ?contentTemplate: Xamarin.Forms.DataTemplate, ?menuItems: seq, - ?title: string, - ?route: string, - ?icon: string, - ?flyoutIcon: string, - ?isEnabled: bool, ?classId: string, ?styleId: string, ?automationId: string, @@ -20355,11 +20115,6 @@ type View() = ViewBuilders.ConstructShellContent(?content=content, ?contentTemplate=contentTemplate, ?menuItems=menuItems, - ?title=title, - ?route=route, - ?icon=icon, - ?flyoutIcon=flyoutIcon, - ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, @@ -20370,11 +20125,6 @@ type View() = static member inline ShellItem(?currentItem: ViewElement, ?items: seq, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?title: string, - ?route: string, - ?icon: string, - ?flyoutIcon: string, - ?isEnabled: bool, ?classId: string, ?styleId: string, ?automationId: string, @@ -20384,11 +20134,6 @@ type View() = ViewBuilders.ConstructShellItem(?currentItem=currentItem, ?items=items, ?flyoutDisplayOptions=flyoutDisplayOptions, - ?title=title, - ?route=route, - ?icon=icon, - ?flyoutIcon=flyoutIcon, - ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, @@ -20400,11 +20145,6 @@ type View() = ?goToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, ?items: seq, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?title: string, - ?route: string, - ?icon: string, - ?flyoutIcon: string, - ?isEnabled: bool, ?classId: string, ?styleId: string, ?automationId: string, @@ -20415,11 +20155,6 @@ type View() = ?goToAsync=goToAsync, ?items=items, ?flyoutDisplayOptions=flyoutDisplayOptions, - ?title=title, - ?route=route, - ?icon=icon, - ?flyoutIcon=flyoutIcon, - ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, @@ -21362,12 +21097,6 @@ module ViewElementExtensions = /// Adjusts the IconOverride property in the visual element member x.IconOverride(value: string) = x.WithAttribute(ViewAttributes.IconOverrideAttribKey, (value)) - /// Adjusts the Route property in the visual element - member x.Route(value: string) = x.WithAttribute(ViewAttributes.RouteAttribKey, (value)) - - /// Adjusts the FlyoutIcon property in the visual element - member x.FlyoutIcon(value: string) = x.WithAttribute(ViewAttributes.FlyoutIconAttribKey, (value)) - /// Adjusts the Span property in the visual element member x.Span(value: int) = x.WithAttribute(ViewAttributes.SpanAttribKey, (value)) @@ -21476,6 +21205,9 @@ module ViewElementExtensions = /// Adjusts the MenuItemTemplate property in the visual element member x.MenuItemTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.MenuItemTemplateAttribKey, (value)) + /// Adjusts the Route property in the visual element + member x.Route(value: string) = x.WithAttribute(ViewAttributes.RouteAttribKey, (value)) + /// Adjusts the RouteHost property in the visual element member x.RouteHost(value: string) = x.WithAttribute(ViewAttributes.RouteHostAttribKey, (value)) @@ -21566,17 +21298,17 @@ module ViewElementExtensions = ?listView_ItemSelected: int option -> unit, ?listView_ItemTapped: int -> unit, ?listView_Refreshing: unit -> unit, ?selectionMode: Xamarin.Forms.ListViewSelectionMode, ?refreshControlColor: Xamarin.Forms.Color, ?listViewGrouped_ItemsSource: (string * ViewElement * ViewElement list) list, ?listViewGrouped_ShowJumpList: bool, ?listViewGrouped_SelectedItem: (int * int) option, ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, ?separatorColor: Xamarin.Forms.Color, ?listViewGrouped_ItemAppearing: int * int option -> unit, ?listViewGrouped_ItemDisappearing: int * int option -> unit, ?listViewGrouped_ItemSelected: (int * int) option -> unit, ?listViewGrouped_ItemTapped: int * int -> unit, ?refreshing: unit -> unit, - ?textOverride: string, ?iconOverride: string, ?route: string, ?flyoutIcon: string, ?span: int, - ?emptyView: System.Object, ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, ?itemTemplate: Xamarin.Forms.DataTemplate, - ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?iScrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?clearIcon: string, ?clearIconHelpText: string, ?clearIconName: string, - ?clearPlaceholderCommand: unit -> unit, ?clearPlaceholderCommandParameter: System.Object, ?clearPlaceholderEnabled: bool, ?clearPlaceholderHelpText: string, ?clearPlaceholderIcon: string, - ?clearPlaceholderName: string, ?displayMemberName: string, ?isSearchEnabled: bool, ?query: string, ?queryIcon: string, - ?queryIconHelpText: string, ?queryIconName: string, ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, ?items: seq, - ?menuItems: seq, ?currentItem: ViewElement, ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, - ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, ?flyoutIsPresented: bool, ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, ?menuItemTemplate: Xamarin.Forms.DataTemplate, - ?routeHost: string, ?routeScheme: string, ?onNavigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, ?onNavigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, - ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?selectedItem: System.Object, ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, - ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?location: System.Uri, ?contentTemplate: Xamarin.Forms.DataTemplate, ?ssGoToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind) = + ?textOverride: string, ?iconOverride: string, ?span: int, ?emptyView: System.Object, ?emptyViewTemplate: Xamarin.Forms.DataTemplate, + ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, ?itemTemplate: Xamarin.Forms.DataTemplate, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?iScrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, + ?clearIcon: string, ?clearIconHelpText: string, ?clearIconName: string, ?clearPlaceholderCommand: unit -> unit, ?clearPlaceholderCommandParameter: System.Object, + ?clearPlaceholderEnabled: bool, ?clearPlaceholderHelpText: string, ?clearPlaceholderIcon: string, ?clearPlaceholderName: string, ?displayMemberName: string, + ?isSearchEnabled: bool, ?query: string, ?queryIcon: string, ?queryIconHelpText: string, ?queryIconName: string, + ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, ?items: seq, ?menuItems: seq, ?currentItem: ViewElement, + ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, + ?flyoutIsPresented: bool, ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, ?menuItemTemplate: Xamarin.Forms.DataTemplate, ?route: string, ?routeHost: string, + ?routeScheme: string, ?onNavigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, ?onNavigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, + ?selectedItem: System.Object, ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, + ?location: System.Uri, ?contentTemplate: Xamarin.Forms.DataTemplate, ?ssGoToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind) = let x = match classId with None -> x | Some opt -> x.ClassId(opt) let x = match styleId with None -> x | Some opt -> x.StyleId(opt) let x = match automationId with None -> x | Some opt -> x.AutomationId(opt) @@ -21819,8 +21551,6 @@ module ViewElementExtensions = let x = match refreshing with None -> x | Some opt -> x.Refreshing(opt) let x = match textOverride with None -> x | Some opt -> x.TextOverride(opt) let x = match iconOverride with None -> x | Some opt -> x.IconOverride(opt) - let x = match route with None -> x | Some opt -> x.Route(opt) - let x = match flyoutIcon with None -> x | Some opt -> x.FlyoutIcon(opt) let x = match span with None -> x | Some opt -> x.Span(opt) let x = match emptyView with None -> x | Some opt -> x.EmptyView(opt) let x = match emptyViewTemplate with None -> x | Some opt -> x.EmptyViewTemplate(opt) @@ -21857,6 +21587,7 @@ module ViewElementExtensions = let x = match flyoutIsPresented with None -> x | Some opt -> x.FlyoutIsPresented(opt) let x = match groupHeaderTemplate with None -> x | Some opt -> x.GroupHeaderTemplate(opt) let x = match menuItemTemplate with None -> x | Some opt -> x.MenuItemTemplate(opt) + let x = match route with None -> x | Some opt -> x.Route(opt) let x = match routeHost with None -> x | Some opt -> x.RouteHost(opt) let x = match routeScheme with None -> x | Some opt -> x.RouteScheme(opt) let x = match onNavigated with None -> x | Some opt -> x.OnNavigated(opt) @@ -22357,10 +22088,6 @@ module ViewElementExtensions = let textOverride (value: string) (x: ViewElement) = x.TextOverride(value) /// Adjusts the IconOverride property in the visual element let iconOverride (value: string) (x: ViewElement) = x.IconOverride(value) - /// Adjusts the Route property in the visual element - let route (value: string) (x: ViewElement) = x.Route(value) - /// Adjusts the FlyoutIcon property in the visual element - let flyoutIcon (value: string) (x: ViewElement) = x.FlyoutIcon(value) /// Adjusts the Span property in the visual element let span (value: int) (x: ViewElement) = x.Span(value) /// Adjusts the EmptyView property in the visual element @@ -22433,6 +22160,8 @@ module ViewElementExtensions = let groupHeaderTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.GroupHeaderTemplate(value) /// Adjusts the MenuItemTemplate property in the visual element let menuItemTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.MenuItemTemplate(value) + /// Adjusts the Route property in the visual element + let route (value: string) (x: ViewElement) = x.Route(value) /// Adjusts the RouteHost property in the visual element let routeHost (value: string) (x: ViewElement) = x.RouteHost(value) /// Adjusts the RouteScheme property in the visual element diff --git a/tools/Generator/Xamarin.Forms.Core.json b/tools/Generator/Xamarin.Forms.Core.json index b693fb51c..b16c1f698 100644 --- a/tools/Generator/Xamarin.Forms.Core.json +++ b/tools/Generator/Xamarin.Forms.Core.json @@ -2073,43 +2073,6 @@ } ] }, - { - "name": "Xamarin.Forms.BaseShellItem", - "members": [ - { - "name": "Title", - "inputType": "string", - "modelType": "string", - "defaultValue": "null" - }, - { - "name": "Route", - "inputType": "string", - "modelType": "string", - "defaultValue": "null" - }, - { - "name": "Icon", - "inputType": "string", - "modelType": "string", - "convToValue": "makeFileImageSource", - "defaultValue": "null" - }, - { - "name": "FlyoutIcon", - "inputType": "string", - "modelType": "string", - "convToValue": "makeFileImageSource", - "defaultValue": "null" - }, - { - "name": "IsEnabled", - "inputType": "bool", - "modelType": "bool", - "defaultValue": "true" - } - ] - }, { "name": "Xamarin.Forms.GridItemsLayout", "members": [ From f62643355ace99fde07d6aa72cd38231d254472e Mon Sep 17 00:00:00 2001 From: Sergej Dick Date: Tue, 19 Mar 2019 14:27:10 +0100 Subject: [PATCH 11/18] error fix, removed some templateobjects --- .../AllControls/AllControls/AllControls.fs | 2 +- src/Fabulous.Core/Xamarin.Forms.Core.fs | 265 ++---------------- tools/Generator/Xamarin.Forms.Core.json | 34 --- 3 files changed, 17 insertions(+), 284 deletions(-) diff --git a/samples/AllControls/AllControls/AllControls.fs b/samples/AllControls/AllControls/AllControls.fs index c6b5a1970..57f44ef38 100644 --- a/samples/AllControls/AllControls/AllControls.fs +++ b/samples/AllControls/AllControls/AllControls.fs @@ -922,7 +922,7 @@ module App = View.Shell( title = "TitleShell", items = [ - View.ShellItem( title = "TitleshellItem", + View.ShellItem( items = [ View.ShellSection(items = [ View.ShellContent(content=View.ContentPage(content=MainPageButton, title="ContentpageTitle")) diff --git a/src/Fabulous.Core/Xamarin.Forms.Core.fs b/src/Fabulous.Core/Xamarin.Forms.Core.fs index b1d18d00d..ce5eaf12a 100644 --- a/src/Fabulous.Core/Xamarin.Forms.Core.fs +++ b/src/Fabulous.Core/Xamarin.Forms.Core.fs @@ -252,10 +252,8 @@ module ViewAttributes = let IconOverrideAttribKey : AttributeKey<_> = AttributeKey<_>("IconOverride") let SpanAttribKey : AttributeKey<_> = AttributeKey<_>("Span") let EmptyViewAttribKey : AttributeKey<_> = AttributeKey<_>("EmptyView") - let EmptyViewTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("EmptyViewTemplate") let ItemsLayoutAttribKey : AttributeKey<_> = AttributeKey<_>("ItemsLayout") let ItemsSourceAttribKey : AttributeKey<_> = AttributeKey<_>("ItemsSource") - let ItemTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("ItemTemplate") let ScrollToRequestedAttribKey : AttributeKey<_> = AttributeKey<_>("ScrollToRequested") let iScrollToAttribKey : AttributeKey<_> = AttributeKey<_>("iScrollTo") let ClearIconAttribKey : AttributeKey<_> = AttributeKey<_>("ClearIcon") @@ -282,10 +280,7 @@ module ViewAttributes = let FlyoutBehaviorAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutBehavior") let FlyoutHeaderAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutHeader") let FlyoutHeaderBehaviorAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutHeaderBehavior") - let FlyoutHeaderTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutHeaderTemplate") let FlyoutIsPresentedAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutIsPresented") - let GroupHeaderTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("GroupHeaderTemplate") - let MenuItemTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("MenuItemTemplate") let RouteAttribKey : AttributeKey<_> = AttributeKey<_>("Route") let RouteHostAttribKey : AttributeKey<_> = AttributeKey<_>("RouteHost") let RouteSchemeAttribKey : AttributeKey<_> = AttributeKey<_>("RouteScheme") @@ -299,7 +294,6 @@ module ViewAttributes = let selectableItemsModeAttribKey : AttributeKey<_> = AttributeKey<_>("selectableItemsMode") let SelectionChangedAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionChanged") let LocationAttribKey : AttributeKey<_> = AttributeKey<_>("Location") - let ContentTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("ContentTemplate") let ssGoToAsyncAttribKey : AttributeKey<_> = AttributeKey<_>("ssGoToAsync") type ViewProto() = @@ -12390,10 +12384,8 @@ type ViewBuilders() = /// Builds the attributes for a ItemsView in the view static member inline BuildItemsView(attribCount: int, ?emptyView: System.Object, - ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, - ?itemTemplate: Xamarin.Forms.DataTemplate, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, @@ -12438,19 +12430,15 @@ type ViewBuilders() = ?ref: ViewRef) = let attribCount = match emptyView with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match emptyViewTemplate with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match itemsLayout with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match itemsSource with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match itemTemplate with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match scrollToRequested with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match scrollTo with Some _ -> attribCount + 1 | None -> attribCount let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match emptyView with None -> () | Some v -> attribBuilder.Add(ViewAttributes.EmptyViewAttribKey, (v)) - match emptyViewTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.EmptyViewTemplateAttribKey, (v)) match itemsLayout with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsLayoutAttribKey, (v)) match itemsSource with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsSourceAttribKey, (v)) - match itemTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemTemplateAttribKey, (v)) match scrollToRequested with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ScrollToRequestedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) match scrollTo with None -> () | Some v -> attribBuilder.Add(ViewAttributes.iScrollToAttribKey, (v)) attribBuilder @@ -12469,14 +12457,10 @@ type ViewBuilders() = baseElement.UpdateInherited (prevOpt, curr, target) let mutable prevEmptyViewOpt = ValueNone let mutable currEmptyViewOpt = ValueNone - let mutable prevEmptyViewTemplateOpt = ValueNone - let mutable currEmptyViewTemplateOpt = ValueNone let mutable prevItemsLayoutOpt = ValueNone let mutable currItemsLayoutOpt = ValueNone let mutable prevItemsSourceOpt = ValueNone let mutable currItemsSourceOpt = ValueNone - let mutable prevItemTemplateOpt = ValueNone - let mutable currItemTemplateOpt = ValueNone let mutable prevScrollToRequestedOpt = ValueNone let mutable currScrollToRequestedOpt = ValueNone let mutable previScrollToOpt = ValueNone @@ -12484,14 +12468,10 @@ type ViewBuilders() = for kvp in curr.AttributesKeyed do if kvp.Key = ViewAttributes.EmptyViewAttribKey.KeyValue then currEmptyViewOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.EmptyViewTemplateAttribKey.KeyValue then - currEmptyViewTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) if kvp.Key = ViewAttributes.ItemsLayoutAttribKey.KeyValue then currItemsLayoutOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.IItemsLayout) if kvp.Key = ViewAttributes.ItemsSourceAttribKey.KeyValue then currItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IEnumerable) - if kvp.Key = ViewAttributes.ItemTemplateAttribKey.KeyValue then - currItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) if kvp.Key = ViewAttributes.ScrollToRequestedAttribKey.KeyValue then currScrollToRequestedOpt <- ValueSome (kvp.Value :?> System.EventHandler) if kvp.Key = ViewAttributes.iScrollToAttribKey.KeyValue then @@ -12502,14 +12482,10 @@ type ViewBuilders() = for kvp in prev.AttributesKeyed do if kvp.Key = ViewAttributes.EmptyViewAttribKey.KeyValue then prevEmptyViewOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.EmptyViewTemplateAttribKey.KeyValue then - prevEmptyViewTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) if kvp.Key = ViewAttributes.ItemsLayoutAttribKey.KeyValue then prevItemsLayoutOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.IItemsLayout) if kvp.Key = ViewAttributes.ItemsSourceAttribKey.KeyValue then prevItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IEnumerable) - if kvp.Key = ViewAttributes.ItemTemplateAttribKey.KeyValue then - prevItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) if kvp.Key = ViewAttributes.ScrollToRequestedAttribKey.KeyValue then prevScrollToRequestedOpt <- ValueSome (kvp.Value :?> System.EventHandler) if kvp.Key = ViewAttributes.iScrollToAttribKey.KeyValue then @@ -12519,11 +12495,6 @@ type ViewBuilders() = | _, ValueSome currValue -> target.EmptyView <- currValue | ValueSome _, ValueNone -> target.EmptyView <- null | ValueNone, ValueNone -> () - match prevEmptyViewTemplateOpt, currEmptyViewTemplateOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.EmptyViewTemplate <- currValue - | ValueSome _, ValueNone -> target.EmptyViewTemplate <- null - | ValueNone, ValueNone -> () match prevItemsLayoutOpt, currItemsLayoutOpt with | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () | _, ValueSome currValue -> target.ItemsLayout <- currValue @@ -12534,11 +12505,6 @@ type ViewBuilders() = | _, ValueSome currValue -> target.ItemsSource <- currValue | ValueSome _, ValueNone -> target.ItemsSource <- null | ValueNone, ValueNone -> () - match prevItemTemplateOpt, currItemTemplateOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ItemTemplate <- currValue - | ValueSome _, ValueNone -> target.ItemTemplate <- null - | ValueNone, ValueNone -> () match prevScrollToRequestedOpt, currScrollToRequestedOpt with | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () | ValueSome prevValue, ValueSome currValue -> target.ScrollToRequested.RemoveHandler(prevValue); target.ScrollToRequested.AddHandler(currValue) @@ -12548,10 +12514,8 @@ type ViewBuilders() = (fun _ curr target -> triggerScrollTo curr target) previScrollToOpt curriScrollToOpt target static member inline ConstructItemsView(?emptyView: System.Object, - ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, - ?itemTemplate: Xamarin.Forms.DataTemplate, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, @@ -12597,10 +12561,8 @@ type ViewBuilders() = let attribBuilder = ViewBuilders.BuildItemsView(0, ?emptyView=emptyView, - ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, - ?itemTemplate=itemTemplate, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, @@ -12668,8 +12630,7 @@ type ViewBuilders() = ?queryIconName: string, ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, - ?itemsSource: System.Collections.IEnumerable, - ?itemTemplate: Xamarin.Forms.DataTemplate) = + ?itemsSource: System.Collections.IEnumerable) = let attribCount = match clearIcon with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match clearIconHelpText with Some _ -> attribCount + 1 | None -> attribCount @@ -12692,7 +12653,6 @@ type ViewBuilders() = let attribCount = match searchBoxVisibility with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match showsResults with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match itemsSource with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match itemTemplate with Some _ -> attribCount + 1 | None -> attribCount let attribBuilder = new AttributesBuilder(attribCount) match clearIcon with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearIconAttribKey, (v)) @@ -12716,7 +12676,6 @@ type ViewBuilders() = match searchBoxVisibility with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SearchBoxVisibilityAttribKey, (v)) match showsResults with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ShowsResultsAttribKey, (v)) match itemsSource with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsSourceAttribKey, (v)) - match itemTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemTemplateAttribKey, (v)) attribBuilder static member val CreateFuncSearchHandler : (unit -> Xamarin.Forms.SearchHandler) = (fun () -> ViewBuilders.CreateSearchHandler()) with get, set @@ -12770,8 +12729,6 @@ type ViewBuilders() = let mutable currShowsResultsOpt = ValueNone let mutable prevItemsSourceOpt = ValueNone let mutable currItemsSourceOpt = ValueNone - let mutable prevItemTemplateOpt = ValueNone - let mutable currItemTemplateOpt = ValueNone for kvp in curr.AttributesKeyed do if kvp.Key = ViewAttributes.ClearIconAttribKey.KeyValue then currClearIconOpt <- ValueSome (kvp.Value :?> string) @@ -12815,8 +12772,6 @@ type ViewBuilders() = currShowsResultsOpt <- ValueSome (kvp.Value :?> bool) if kvp.Key = ViewAttributes.ItemsSourceAttribKey.KeyValue then currItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IEnumerable) - if kvp.Key = ViewAttributes.ItemTemplateAttribKey.KeyValue then - currItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) match prevOpt with | ValueNone -> () | ValueSome prev -> @@ -12863,8 +12818,6 @@ type ViewBuilders() = prevShowsResultsOpt <- ValueSome (kvp.Value :?> bool) if kvp.Key = ViewAttributes.ItemsSourceAttribKey.KeyValue then prevItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IEnumerable) - if kvp.Key = ViewAttributes.ItemTemplateAttribKey.KeyValue then - prevItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) match prevClearIconOpt, currClearIconOpt with | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () | _, ValueSome currValue -> target.ClearIcon <- makeImageSource currValue @@ -12970,11 +12923,6 @@ type ViewBuilders() = | _, ValueSome currValue -> target.ItemsSource <- currValue | ValueSome _, ValueNone -> target.ItemsSource <- null | ValueNone, ValueNone -> () - match prevItemTemplateOpt, currItemTemplateOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ItemTemplate <- currValue - | ValueSome _, ValueNone -> target.ItemTemplate <- null - | ValueNone, ValueNone -> () static member inline ConstructSearchHandler(?clearIcon: string, ?clearIconHelpText: string, @@ -12996,8 +12944,7 @@ type ViewBuilders() = ?queryIconName: string, ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, - ?itemsSource: System.Collections.IEnumerable, - ?itemTemplate: Xamarin.Forms.DataTemplate) = + ?itemsSource: System.Collections.IEnumerable) = let attribBuilder = ViewBuilders.BuildSearchHandler(0, ?clearIcon=clearIcon, @@ -13020,8 +12967,7 @@ type ViewBuilders() = ?queryIconName=queryIconName, ?searchBoxVisibility=searchBoxVisibility, ?showsResults=showsResults, - ?itemsSource=itemsSource, - ?itemTemplate=itemTemplate) + ?itemsSource=itemsSource) ViewElement.Create(ViewBuilders.CreateFuncSearchHandler, ViewBuilders.UpdateFuncSearchHandler, attribBuilder) @@ -13034,11 +12980,7 @@ type ViewBuilders() = ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, - ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, ?flyoutIsPresented: bool, - ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, - ?itemTemplate: Xamarin.Forms.DataTemplate, - ?menuItemTemplate: Xamarin.Forms.DataTemplate, ?route: string, ?routeHost: string, ?routeScheme: string, @@ -13099,11 +13041,7 @@ type ViewBuilders() = let attribCount = match flyoutBehavior with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match flyoutHeader with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match flyoutHeaderBehavior with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match flyoutHeaderTemplate with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match flyoutIsPresented with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match groupHeaderTemplate with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match itemTemplate with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match menuItemTemplate with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match route with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match routeHost with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match routeScheme with Some _ -> attribCount + 1 | None -> attribCount @@ -13119,11 +13057,7 @@ type ViewBuilders() = match flyoutBehavior with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutBehaviorAttribKey, (v)) match flyoutHeader with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutHeaderAttribKey, (v)) match flyoutHeaderBehavior with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutHeaderBehaviorAttribKey, (v)) - match flyoutHeaderTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutHeaderTemplateAttribKey, (v)) match flyoutIsPresented with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutIsPresentedAttribKey, (v)) - match groupHeaderTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.GroupHeaderTemplateAttribKey, (v)) - match itemTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemTemplateAttribKey, (v)) - match menuItemTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MenuItemTemplateAttribKey, (v)) match route with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RouteAttribKey, (v)) match routeHost with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RouteHostAttribKey, (v)) match routeScheme with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RouteSchemeAttribKey, (v)) @@ -13158,16 +13092,8 @@ type ViewBuilders() = let mutable currFlyoutHeaderOpt = ValueNone let mutable prevFlyoutHeaderBehaviorOpt = ValueNone let mutable currFlyoutHeaderBehaviorOpt = ValueNone - let mutable prevFlyoutHeaderTemplateOpt = ValueNone - let mutable currFlyoutHeaderTemplateOpt = ValueNone let mutable prevFlyoutIsPresentedOpt = ValueNone let mutable currFlyoutIsPresentedOpt = ValueNone - let mutable prevGroupHeaderTemplateOpt = ValueNone - let mutable currGroupHeaderTemplateOpt = ValueNone - let mutable prevItemTemplateOpt = ValueNone - let mutable currItemTemplateOpt = ValueNone - let mutable prevMenuItemTemplateOpt = ValueNone - let mutable currMenuItemTemplateOpt = ValueNone let mutable prevRouteOpt = ValueNone let mutable currRouteOpt = ValueNone let mutable prevRouteHostOpt = ValueNone @@ -13195,16 +13121,8 @@ type ViewBuilders() = currFlyoutHeaderOpt <- ValueSome (kvp.Value :?> System.Object) if kvp.Key = ViewAttributes.FlyoutHeaderBehaviorAttribKey.KeyValue then currFlyoutHeaderBehaviorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlyoutHeaderBehavior) - if kvp.Key = ViewAttributes.FlyoutHeaderTemplateAttribKey.KeyValue then - currFlyoutHeaderTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) if kvp.Key = ViewAttributes.FlyoutIsPresentedAttribKey.KeyValue then currFlyoutIsPresentedOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.GroupHeaderTemplateAttribKey.KeyValue then - currGroupHeaderTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) - if kvp.Key = ViewAttributes.ItemTemplateAttribKey.KeyValue then - currItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) - if kvp.Key = ViewAttributes.MenuItemTemplateAttribKey.KeyValue then - currMenuItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) if kvp.Key = ViewAttributes.RouteAttribKey.KeyValue then currRouteOpt <- ValueSome (kvp.Value :?> string) if kvp.Key = ViewAttributes.RouteHostAttribKey.KeyValue then @@ -13235,16 +13153,8 @@ type ViewBuilders() = prevFlyoutHeaderOpt <- ValueSome (kvp.Value :?> System.Object) if kvp.Key = ViewAttributes.FlyoutHeaderBehaviorAttribKey.KeyValue then prevFlyoutHeaderBehaviorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlyoutHeaderBehavior) - if kvp.Key = ViewAttributes.FlyoutHeaderTemplateAttribKey.KeyValue then - prevFlyoutHeaderTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) if kvp.Key = ViewAttributes.FlyoutIsPresentedAttribKey.KeyValue then prevFlyoutIsPresentedOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.GroupHeaderTemplateAttribKey.KeyValue then - prevGroupHeaderTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) - if kvp.Key = ViewAttributes.ItemTemplateAttribKey.KeyValue then - prevItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) - if kvp.Key = ViewAttributes.MenuItemTemplateAttribKey.KeyValue then - prevMenuItemTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) if kvp.Key = ViewAttributes.RouteAttribKey.KeyValue then prevRouteOpt <- ValueSome (kvp.Value :?> string) if kvp.Key = ViewAttributes.RouteHostAttribKey.KeyValue then @@ -13289,31 +13199,11 @@ type ViewBuilders() = | _, ValueSome currValue -> target.FlyoutHeaderBehavior <- currValue | ValueSome _, ValueNone -> target.FlyoutHeaderBehavior <- Xamarin.Forms.FlyoutHeaderBehavior.Default | ValueNone, ValueNone -> () - match prevFlyoutHeaderTemplateOpt, currFlyoutHeaderTemplateOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FlyoutHeaderTemplate <- currValue - | ValueSome _, ValueNone -> target.FlyoutHeaderTemplate <- null - | ValueNone, ValueNone -> () match prevFlyoutIsPresentedOpt, currFlyoutIsPresentedOpt with | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () | _, ValueSome currValue -> target.FlyoutIsPresented <- currValue | ValueSome _, ValueNone -> target.FlyoutIsPresented <- false | ValueNone, ValueNone -> () - match prevGroupHeaderTemplateOpt, currGroupHeaderTemplateOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.GroupHeaderTemplate <- currValue - | ValueSome _, ValueNone -> target.GroupHeaderTemplate <- null - | ValueNone, ValueNone -> () - match prevItemTemplateOpt, currItemTemplateOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ItemTemplate <- currValue - | ValueSome _, ValueNone -> target.ItemTemplate <- null - | ValueNone, ValueNone -> () - match prevMenuItemTemplateOpt, currMenuItemTemplateOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.MenuItemTemplate <- currValue - | ValueSome _, ValueNone -> target.MenuItemTemplate <- null - | ValueNone, ValueNone -> () match prevRouteOpt, currRouteOpt with | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () | _, ValueSome currValue -> target.Route <- currValue @@ -13350,11 +13240,7 @@ type ViewBuilders() = ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, - ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, ?flyoutIsPresented: bool, - ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, - ?itemTemplate: Xamarin.Forms.DataTemplate, - ?menuItemTemplate: Xamarin.Forms.DataTemplate, ?route: string, ?routeHost: string, ?routeScheme: string, @@ -13416,11 +13302,7 @@ type ViewBuilders() = ?flyoutBehavior=flyoutBehavior, ?flyoutHeader=flyoutHeader, ?flyoutHeaderBehavior=flyoutHeaderBehavior, - ?flyoutHeaderTemplate=flyoutHeaderTemplate, ?flyoutIsPresented=flyoutIsPresented, - ?groupHeaderTemplate=groupHeaderTemplate, - ?itemTemplate=itemTemplate, - ?menuItemTemplate=menuItemTemplate, ?route=route, ?routeHost=routeHost, ?routeScheme=routeScheme, @@ -13545,10 +13427,8 @@ type ViewBuilders() = ?selectionMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?emptyView: System.Object, - ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, - ?itemTemplate: Xamarin.Forms.DataTemplate, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, @@ -13598,7 +13478,7 @@ type ViewBuilders() = let attribCount = match selectionMode with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match selectionChanged with Some _ -> attribCount + 1 | None -> attribCount - let attribBuilder = ViewBuilders.BuildItemsView(attribCount, ?emptyView=emptyView, ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?itemTemplate=itemTemplate, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + let attribBuilder = ViewBuilders.BuildItemsView(attribCount, ?emptyView=emptyView, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match selectedItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectedItemAttribKey, (v)) match selectionChangedCommand with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionChangedCommandAttribKey, makeCommand(v)) match selectionChangedCommandParameter with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionChangedCommandParameterAttribKey, (v)) @@ -13686,10 +13566,8 @@ type ViewBuilders() = ?selectionMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?emptyView: System.Object, - ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, - ?itemTemplate: Xamarin.Forms.DataTemplate, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, @@ -13740,10 +13618,8 @@ type ViewBuilders() = ?selectionMode=selectionMode, ?selectionChanged=selectionChanged, ?emptyView=emptyView, - ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, - ?itemTemplate=itemTemplate, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, @@ -13835,7 +13711,6 @@ type ViewBuilders() = /// Builds the attributes for a ShellContent in the view static member inline BuildShellContent(attribCount: int, ?content: ViewElement, - ?contentTemplate: Xamarin.Forms.DataTemplate, ?menuItems: seq, ?classId: string, ?styleId: string, @@ -13844,12 +13719,10 @@ type ViewBuilders() = ?ref: ViewRef) = let attribCount = match content with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match contentTemplate with Some _ -> attribCount + 1 | None -> attribCount let attribCount = match menuItems with Some _ -> attribCount + 1 | None -> attribCount let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) match content with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ContentAttribKey, (v)) - match contentTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ContentTemplateAttribKey, makeTemplate(v)) match menuItems with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MenuItemsAttribKey, (v)) attribBuilder @@ -13867,15 +13740,11 @@ type ViewBuilders() = baseElement.UpdateInherited (prevOpt, curr, target) let mutable prevContentOpt = ValueNone let mutable currContentOpt = ValueNone - let mutable prevContentTemplateOpt = ValueNone - let mutable currContentTemplateOpt = ValueNone let mutable prevMenuItemsOpt = ValueNone let mutable currMenuItemsOpt = ValueNone for kvp in curr.AttributesKeyed do if kvp.Key = ViewAttributes.ContentAttribKey.KeyValue then currContentOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.ContentTemplateAttribKey.KeyValue then - currContentTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) if kvp.Key = ViewAttributes.MenuItemsAttribKey.KeyValue then currMenuItemsOpt <- ValueSome (kvp.Value :?> seq) match prevOpt with @@ -13884,8 +13753,6 @@ type ViewBuilders() = for kvp in prev.AttributesKeyed do if kvp.Key = ViewAttributes.ContentAttribKey.KeyValue then prevContentOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.ContentTemplateAttribKey.KeyValue then - prevContentTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) if kvp.Key = ViewAttributes.MenuItemsAttribKey.KeyValue then prevMenuItemsOpt <- ValueSome (kvp.Value :?> seq) match prevContentOpt, currContentOpt with @@ -13893,15 +13760,9 @@ type ViewBuilders() = | _, ValueSome currValue -> target.Content <- currValue | ValueSome _, ValueNone -> target.Content <- null | ValueNone, ValueNone -> () - match prevContentTemplateOpt, currContentTemplateOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ContentTemplate <- currValue - | ValueSome _, ValueNone -> target.ContentTemplate <- null - | ValueNone, ValueNone -> () updateMenuItemsShellContent prevMenuItemsOpt currMenuItemsOpt target static member inline ConstructShellContent(?content: ViewElement, - ?contentTemplate: Xamarin.Forms.DataTemplate, ?menuItems: seq, ?classId: string, ?styleId: string, @@ -13911,7 +13772,6 @@ type ViewBuilders() = let attribBuilder = ViewBuilders.BuildShellContent(0, ?content=content, - ?contentTemplate=contentTemplate, ?menuItems=menuItems, ?classId=classId, ?styleId=styleId, @@ -14098,10 +13958,8 @@ type ViewBuilders() = /// Builds the attributes for a CarouselView in the view static member inline BuildCarouselView(attribCount: int, ?emptyView: System.Object, - ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, - ?itemTemplate: Xamarin.Forms.DataTemplate, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, @@ -14144,7 +14002,7 @@ type ViewBuilders() = ?automationId: string, ?created: obj -> unit, ?ref: ViewRef) = - let attribBuilder = ViewBuilders.BuildItemsView(attribCount, ?emptyView=emptyView, ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?itemTemplate=itemTemplate, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + let attribBuilder = ViewBuilders.BuildItemsView(attribCount, ?emptyView=emptyView, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) attribBuilder static member val CreateFuncCarouselView : (unit -> Xamarin.Forms.CarouselView) = (fun () -> ViewBuilders.CreateCarouselView()) with get, set @@ -14164,10 +14022,8 @@ type ViewBuilders() = ignore target static member inline ConstructCarouselView(?emptyView: System.Object, - ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, - ?itemTemplate: Xamarin.Forms.DataTemplate, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, @@ -14213,10 +14069,8 @@ type ViewBuilders() = let attribBuilder = ViewBuilders.BuildCarouselView(0, ?emptyView=emptyView, - ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, - ?itemTemplate=itemTemplate, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, @@ -14270,10 +14124,8 @@ type ViewBuilders() = ?selectionMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?emptyView: System.Object, - ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, - ?itemTemplate: Xamarin.Forms.DataTemplate, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, @@ -14316,7 +14168,7 @@ type ViewBuilders() = ?automationId: string, ?created: obj -> unit, ?ref: ViewRef) = - let attribBuilder = ViewBuilders.BuildSelectableItemsView(attribCount, ?selectedItem=selectedItem, ?selectionChangedCommand=selectionChangedCommand, ?selectionChangedCommandParameter=selectionChangedCommandParameter, ?selectionMode=selectionMode, ?selectionChanged=selectionChanged, ?emptyView=emptyView, ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?itemTemplate=itemTemplate, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + let attribBuilder = ViewBuilders.BuildSelectableItemsView(attribCount, ?selectedItem=selectedItem, ?selectionChangedCommand=selectionChangedCommand, ?selectionChangedCommandParameter=selectionChangedCommandParameter, ?selectionMode=selectionMode, ?selectionChanged=selectionChanged, ?emptyView=emptyView, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) attribBuilder static member val CreateFuncCollectionView : (unit -> Xamarin.Forms.CollectionView) = (fun () -> ViewBuilders.CreateCollectionView()) with get, set @@ -14341,10 +14193,8 @@ type ViewBuilders() = ?selectionMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?emptyView: System.Object, - ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, - ?itemTemplate: Xamarin.Forms.DataTemplate, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, @@ -14395,10 +14245,8 @@ type ViewBuilders() = ?selectionMode=selectionMode, ?selectionChanged=selectionChanged, ?emptyView=emptyView, - ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, - ?itemTemplate=itemTemplate, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, @@ -15378,14 +15226,10 @@ type ItemsViewViewer(element: ViewElement) = do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ItemsView' is expected, but '%s' was provided." element.TargetType.FullName /// Get the value of the EmptyView property member this.EmptyView = element.GetAttributeKeyed(ViewAttributes.EmptyViewAttribKey) - /// Get the value of the EmptyViewTemplate property - member this.EmptyViewTemplate = element.GetAttributeKeyed(ViewAttributes.EmptyViewTemplateAttribKey) /// Get the value of the ItemsLayout property member this.ItemsLayout = element.GetAttributeKeyed(ViewAttributes.ItemsLayoutAttribKey) /// Get the value of the ItemsSource property member this.ItemsSource = element.GetAttributeKeyed(ViewAttributes.ItemsSourceAttribKey) - /// Get the value of the ItemTemplate property - member this.ItemTemplate = element.GetAttributeKeyed(ViewAttributes.ItemTemplateAttribKey) /// Get the value of the ScrollToRequested property member this.ScrollToRequested = element.GetAttributeKeyed(ViewAttributes.ScrollToRequestedAttribKey) /// Get the value of the ScrollTo property @@ -15436,8 +15280,6 @@ type SearchHandlerViewer(element: ViewElement) = member this.ShowsResults = element.GetAttributeKeyed(ViewAttributes.ShowsResultsAttribKey) /// Get the value of the ItemsSource property member this.ItemsSource = element.GetAttributeKeyed(ViewAttributes.ItemsSourceAttribKey) - /// Get the value of the ItemTemplate property - member this.ItemTemplate = element.GetAttributeKeyed(ViewAttributes.ItemTemplateAttribKey) /// Viewer that allows to read the properties of a ViewElement representing a Shell type ShellViewer(element: ViewElement) = @@ -15457,16 +15299,8 @@ type ShellViewer(element: ViewElement) = member this.FlyoutHeader = element.GetAttributeKeyed(ViewAttributes.FlyoutHeaderAttribKey) /// Get the value of the FlyoutHeaderBehavior property member this.FlyoutHeaderBehavior = element.GetAttributeKeyed(ViewAttributes.FlyoutHeaderBehaviorAttribKey) - /// Get the value of the FlyoutHeaderTemplate property - member this.FlyoutHeaderTemplate = element.GetAttributeKeyed(ViewAttributes.FlyoutHeaderTemplateAttribKey) /// Get the value of the FlyoutIsPresented property member this.FlyoutIsPresented = element.GetAttributeKeyed(ViewAttributes.FlyoutIsPresentedAttribKey) - /// Get the value of the GroupHeaderTemplate property - member this.GroupHeaderTemplate = element.GetAttributeKeyed(ViewAttributes.GroupHeaderTemplateAttribKey) - /// Get the value of the ItemTemplate property - member this.ItemTemplate = element.GetAttributeKeyed(ViewAttributes.ItemTemplateAttribKey) - /// Get the value of the MenuItemTemplate property - member this.MenuItemTemplate = element.GetAttributeKeyed(ViewAttributes.MenuItemTemplateAttribKey) /// Get the value of the Route property member this.Route = element.GetAttributeKeyed(ViewAttributes.RouteAttribKey) /// Get the value of the RouteHost property @@ -15514,8 +15348,6 @@ type ShellContentViewer(element: ViewElement) = do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ShellContent' is expected, but '%s' was provided." element.TargetType.FullName /// Get the value of the Content property member this.Content = element.GetAttributeKeyed(ViewAttributes.ContentAttribKey) - /// Get the value of the ContentTemplate property - member this.ContentTemplate = element.GetAttributeKeyed(ViewAttributes.ContentTemplateAttribKey) /// Get the value of the MenuItems property member this.MenuItems = element.GetAttributeKeyed(ViewAttributes.MenuItemsAttribKey) @@ -19702,10 +19534,8 @@ type View() = /// Describes a ItemsView in the view static member inline ItemsView(?emptyView: System.Object, - ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, - ?itemTemplate: Xamarin.Forms.DataTemplate, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, @@ -19750,10 +19580,8 @@ type View() = ?ref: ViewRef) = ViewBuilders.ConstructItemsView(?emptyView=emptyView, - ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, - ?itemTemplate=itemTemplate, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, @@ -19818,8 +19646,7 @@ type View() = ?queryIconName: string, ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, - ?itemsSource: System.Collections.IEnumerable, - ?itemTemplate: Xamarin.Forms.DataTemplate) = + ?itemsSource: System.Collections.IEnumerable) = ViewBuilders.ConstructSearchHandler(?clearIcon=clearIcon, ?clearIconHelpText=clearIconHelpText, @@ -19841,8 +19668,7 @@ type View() = ?queryIconName=queryIconName, ?searchBoxVisibility=searchBoxVisibility, ?showsResults=showsResults, - ?itemsSource=itemsSource, - ?itemTemplate=itemTemplate) + ?itemsSource=itemsSource) /// Describes a Shell in the view static member inline Shell(?items: seq, @@ -19852,11 +19678,7 @@ type View() = ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, - ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, ?flyoutIsPresented: bool, - ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, - ?itemTemplate: Xamarin.Forms.DataTemplate, - ?menuItemTemplate: Xamarin.Forms.DataTemplate, ?route: string, ?routeHost: string, ?routeScheme: string, @@ -19917,11 +19739,7 @@ type View() = ?flyoutBehavior=flyoutBehavior, ?flyoutHeader=flyoutHeader, ?flyoutHeaderBehavior=flyoutHeaderBehavior, - ?flyoutHeaderTemplate=flyoutHeaderTemplate, ?flyoutIsPresented=flyoutIsPresented, - ?groupHeaderTemplate=groupHeaderTemplate, - ?itemTemplate=itemTemplate, - ?menuItemTemplate=menuItemTemplate, ?route=route, ?routeHost=routeHost, ?routeScheme=routeScheme, @@ -19997,10 +19815,8 @@ type View() = ?selectionMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?emptyView: System.Object, - ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, - ?itemTemplate: Xamarin.Forms.DataTemplate, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, @@ -20050,10 +19866,8 @@ type View() = ?selectionMode=selectionMode, ?selectionChanged=selectionChanged, ?emptyView=emptyView, - ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, - ?itemTemplate=itemTemplate, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, @@ -20104,7 +19918,6 @@ type View() = /// Describes a ShellContent in the view static member inline ShellContent(?content: ViewElement, - ?contentTemplate: Xamarin.Forms.DataTemplate, ?menuItems: seq, ?classId: string, ?styleId: string, @@ -20113,7 +19926,6 @@ type View() = ?ref: ViewRef) = ViewBuilders.ConstructShellContent(?content=content, - ?contentTemplate=contentTemplate, ?menuItems=menuItems, ?classId=classId, ?styleId=styleId, @@ -20163,10 +19975,8 @@ type View() = /// Describes a CarouselView in the view static member inline CarouselView(?emptyView: System.Object, - ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, - ?itemTemplate: Xamarin.Forms.DataTemplate, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, @@ -20211,10 +20021,8 @@ type View() = ?ref: ViewRef) = ViewBuilders.ConstructCarouselView(?emptyView=emptyView, - ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, - ?itemTemplate=itemTemplate, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, @@ -20265,10 +20073,8 @@ type View() = ?selectionMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, ?emptyView: System.Object, - ?emptyViewTemplate: Xamarin.Forms.DataTemplate, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, - ?itemTemplate: Xamarin.Forms.DataTemplate, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?horizontalOptions: Xamarin.Forms.LayoutOptions, @@ -20318,10 +20124,8 @@ type View() = ?selectionMode=selectionMode, ?selectionChanged=selectionChanged, ?emptyView=emptyView, - ?emptyViewTemplate=emptyViewTemplate, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, - ?itemTemplate=itemTemplate, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, @@ -21103,18 +20907,12 @@ module ViewElementExtensions = /// Adjusts the EmptyView property in the visual element member x.EmptyView(value: System.Object) = x.WithAttribute(ViewAttributes.EmptyViewAttribKey, (value)) - /// Adjusts the EmptyViewTemplate property in the visual element - member x.EmptyViewTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.EmptyViewTemplateAttribKey, (value)) - /// Adjusts the ItemsLayout property in the visual element member x.ItemsLayout(value: Xamarin.Forms.IItemsLayout) = x.WithAttribute(ViewAttributes.ItemsLayoutAttribKey, (value)) /// Adjusts the ItemsSource property in the visual element member x.ItemsSource(value: System.Collections.IEnumerable) = x.WithAttribute(ViewAttributes.ItemsSourceAttribKey, (value)) - /// Adjusts the ItemTemplate property in the visual element - member x.ItemTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.ItemTemplateAttribKey, (value)) - /// Adjusts the ScrollToRequested property in the visual element member x.ScrollToRequested(value: Xamarin.Forms.ScrollToRequestEventArgs -> unit) = x.WithAttribute(ViewAttributes.ScrollToRequestedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) @@ -21193,18 +20991,9 @@ module ViewElementExtensions = /// Adjusts the FlyoutHeaderBehavior property in the visual element member x.FlyoutHeaderBehavior(value: Xamarin.Forms.FlyoutHeaderBehavior) = x.WithAttribute(ViewAttributes.FlyoutHeaderBehaviorAttribKey, (value)) - /// Adjusts the FlyoutHeaderTemplate property in the visual element - member x.FlyoutHeaderTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.FlyoutHeaderTemplateAttribKey, (value)) - /// Adjusts the FlyoutIsPresented property in the visual element member x.FlyoutIsPresented(value: bool) = x.WithAttribute(ViewAttributes.FlyoutIsPresentedAttribKey, (value)) - /// Adjusts the GroupHeaderTemplate property in the visual element - member x.GroupHeaderTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.GroupHeaderTemplateAttribKey, (value)) - - /// Adjusts the MenuItemTemplate property in the visual element - member x.MenuItemTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.MenuItemTemplateAttribKey, (value)) - /// Adjusts the Route property in the visual element member x.Route(value: string) = x.WithAttribute(ViewAttributes.RouteAttribKey, (value)) @@ -21244,9 +21033,6 @@ module ViewElementExtensions = /// Adjusts the Location property in the visual element member x.Location(value: System.Uri) = x.WithAttribute(ViewAttributes.LocationAttribKey, makeUri(value)) - /// Adjusts the ContentTemplate property in the visual element - member x.ContentTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.ContentTemplateAttribKey, makeTemplate(value)) - /// Adjusts the ssGoToAsync property in the visual element member x.ssGoToAsync(value: string list * Map * Fabulous.DynamicViews.AnimationKind) = x.WithAttribute(ViewAttributes.ssGoToAsyncAttribKey, (value)) @@ -21298,17 +21084,16 @@ module ViewElementExtensions = ?listView_ItemSelected: int option -> unit, ?listView_ItemTapped: int -> unit, ?listView_Refreshing: unit -> unit, ?selectionMode: Xamarin.Forms.ListViewSelectionMode, ?refreshControlColor: Xamarin.Forms.Color, ?listViewGrouped_ItemsSource: (string * ViewElement * ViewElement list) list, ?listViewGrouped_ShowJumpList: bool, ?listViewGrouped_SelectedItem: (int * int) option, ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, ?separatorColor: Xamarin.Forms.Color, ?listViewGrouped_ItemAppearing: int * int option -> unit, ?listViewGrouped_ItemDisappearing: int * int option -> unit, ?listViewGrouped_ItemSelected: (int * int) option -> unit, ?listViewGrouped_ItemTapped: int * int -> unit, ?refreshing: unit -> unit, - ?textOverride: string, ?iconOverride: string, ?span: int, ?emptyView: System.Object, ?emptyViewTemplate: Xamarin.Forms.DataTemplate, - ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, ?itemTemplate: Xamarin.Forms.DataTemplate, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?iScrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, - ?clearIcon: string, ?clearIconHelpText: string, ?clearIconName: string, ?clearPlaceholderCommand: unit -> unit, ?clearPlaceholderCommandParameter: System.Object, - ?clearPlaceholderEnabled: bool, ?clearPlaceholderHelpText: string, ?clearPlaceholderIcon: string, ?clearPlaceholderName: string, ?displayMemberName: string, - ?isSearchEnabled: bool, ?query: string, ?queryIcon: string, ?queryIconHelpText: string, ?queryIconName: string, - ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, ?items: seq, ?menuItems: seq, ?currentItem: ViewElement, - ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, ?flyoutHeader: System.Object, ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, ?flyoutHeaderTemplate: Xamarin.Forms.DataTemplate, - ?flyoutIsPresented: bool, ?groupHeaderTemplate: Xamarin.Forms.DataTemplate, ?menuItemTemplate: Xamarin.Forms.DataTemplate, ?route: string, ?routeHost: string, + ?textOverride: string, ?iconOverride: string, ?span: int, ?emptyView: System.Object, ?itemsLayout: Xamarin.Forms.IItemsLayout, + ?itemsSource: System.Collections.IEnumerable, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?iScrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?clearIcon: string, ?clearIconHelpText: string, + ?clearIconName: string, ?clearPlaceholderCommand: unit -> unit, ?clearPlaceholderCommandParameter: System.Object, ?clearPlaceholderEnabled: bool, ?clearPlaceholderHelpText: string, + ?clearPlaceholderIcon: string, ?clearPlaceholderName: string, ?displayMemberName: string, ?isSearchEnabled: bool, ?query: string, + ?queryIcon: string, ?queryIconHelpText: string, ?queryIconName: string, ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, + ?items: seq, ?menuItems: seq, ?currentItem: ViewElement, ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, + ?flyoutHeader: System.Object, ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, ?flyoutIsPresented: bool, ?route: string, ?routeHost: string, ?routeScheme: string, ?onNavigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, ?onNavigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?selectedItem: System.Object, ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, - ?location: System.Uri, ?contentTemplate: Xamarin.Forms.DataTemplate, ?ssGoToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind) = + ?location: System.Uri, ?ssGoToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind) = let x = match classId with None -> x | Some opt -> x.ClassId(opt) let x = match styleId with None -> x | Some opt -> x.StyleId(opt) let x = match automationId with None -> x | Some opt -> x.AutomationId(opt) @@ -21553,10 +21338,8 @@ module ViewElementExtensions = let x = match iconOverride with None -> x | Some opt -> x.IconOverride(opt) let x = match span with None -> x | Some opt -> x.Span(opt) let x = match emptyView with None -> x | Some opt -> x.EmptyView(opt) - let x = match emptyViewTemplate with None -> x | Some opt -> x.EmptyViewTemplate(opt) let x = match itemsLayout with None -> x | Some opt -> x.ItemsLayout(opt) let x = match itemsSource with None -> x | Some opt -> x.ItemsSource(opt) - let x = match itemTemplate with None -> x | Some opt -> x.ItemTemplate(opt) let x = match scrollToRequested with None -> x | Some opt -> x.ScrollToRequested(opt) let x = match iScrollTo with None -> x | Some opt -> x.iScrollTo(opt) let x = match clearIcon with None -> x | Some opt -> x.ClearIcon(opt) @@ -21583,10 +21366,7 @@ module ViewElementExtensions = let x = match flyoutBehavior with None -> x | Some opt -> x.FlyoutBehavior(opt) let x = match flyoutHeader with None -> x | Some opt -> x.FlyoutHeader(opt) let x = match flyoutHeaderBehavior with None -> x | Some opt -> x.FlyoutHeaderBehavior(opt) - let x = match flyoutHeaderTemplate with None -> x | Some opt -> x.FlyoutHeaderTemplate(opt) let x = match flyoutIsPresented with None -> x | Some opt -> x.FlyoutIsPresented(opt) - let x = match groupHeaderTemplate with None -> x | Some opt -> x.GroupHeaderTemplate(opt) - let x = match menuItemTemplate with None -> x | Some opt -> x.MenuItemTemplate(opt) let x = match route with None -> x | Some opt -> x.Route(opt) let x = match routeHost with None -> x | Some opt -> x.RouteHost(opt) let x = match routeScheme with None -> x | Some opt -> x.RouteScheme(opt) @@ -21600,7 +21380,6 @@ module ViewElementExtensions = let x = match selectableItemsMode with None -> x | Some opt -> x.selectableItemsMode(opt) let x = match selectionChanged with None -> x | Some opt -> x.SelectionChanged(opt) let x = match location with None -> x | Some opt -> x.Location(opt) - let x = match contentTemplate with None -> x | Some opt -> x.ContentTemplate(opt) let x = match ssGoToAsync with None -> x | Some opt -> x.ssGoToAsync(opt) x @@ -22092,14 +21871,10 @@ module ViewElementExtensions = let span (value: int) (x: ViewElement) = x.Span(value) /// Adjusts the EmptyView property in the visual element let emptyView (value: System.Object) (x: ViewElement) = x.EmptyView(value) - /// Adjusts the EmptyViewTemplate property in the visual element - let emptyViewTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.EmptyViewTemplate(value) /// Adjusts the ItemsLayout property in the visual element let itemsLayout (value: Xamarin.Forms.IItemsLayout) (x: ViewElement) = x.ItemsLayout(value) /// Adjusts the ItemsSource property in the visual element let itemsSource (value: System.Collections.IEnumerable) (x: ViewElement) = x.ItemsSource(value) - /// Adjusts the ItemTemplate property in the visual element - let itemTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.ItemTemplate(value) /// Adjusts the ScrollToRequested property in the visual element let scrollToRequested (value: Xamarin.Forms.ScrollToRequestEventArgs -> unit) (x: ViewElement) = x.ScrollToRequested(value) /// Adjusts the iScrollTo property in the visual element @@ -22152,14 +21927,8 @@ module ViewElementExtensions = let flyoutHeader (value: System.Object) (x: ViewElement) = x.FlyoutHeader(value) /// Adjusts the FlyoutHeaderBehavior property in the visual element let flyoutHeaderBehavior (value: Xamarin.Forms.FlyoutHeaderBehavior) (x: ViewElement) = x.FlyoutHeaderBehavior(value) - /// Adjusts the FlyoutHeaderTemplate property in the visual element - let flyoutHeaderTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.FlyoutHeaderTemplate(value) /// Adjusts the FlyoutIsPresented property in the visual element let flyoutIsPresented (value: bool) (x: ViewElement) = x.FlyoutIsPresented(value) - /// Adjusts the GroupHeaderTemplate property in the visual element - let groupHeaderTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.GroupHeaderTemplate(value) - /// Adjusts the MenuItemTemplate property in the visual element - let menuItemTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.MenuItemTemplate(value) /// Adjusts the Route property in the visual element let route (value: string) (x: ViewElement) = x.Route(value) /// Adjusts the RouteHost property in the visual element @@ -22186,7 +21955,5 @@ module ViewElementExtensions = let selectionChanged (value: Xamarin.Forms.SelectionChangedEventArgs -> unit) (x: ViewElement) = x.SelectionChanged(value) /// Adjusts the Location property in the visual element let location (value: System.Uri) (x: ViewElement) = x.Location(value) - /// Adjusts the ContentTemplate property in the visual element - let contentTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.ContentTemplate(value) /// Adjusts the ssGoToAsync property in the visual element let ssGoToAsync (value: string list * Map * Fabulous.DynamicViews.AnimationKind) (x: ViewElement) = x.ssGoToAsync(value) diff --git a/tools/Generator/Xamarin.Forms.Core.json b/tools/Generator/Xamarin.Forms.Core.json index b16c1f698..87cf5943e 100644 --- a/tools/Generator/Xamarin.Forms.Core.json +++ b/tools/Generator/Xamarin.Forms.Core.json @@ -2091,10 +2091,6 @@ "name": "EmptyView", "defaultValue": "null" }, - { - "name": "EmptyViewTemplate", - "defaultValue": "null" - }, { "name": "ItemsLayout", "defaultValue": "null" @@ -2103,10 +2099,6 @@ "name": "ItemsSource", "defaultValue": "null" }, - { - "name": "ItemTemplate", - "defaultValue": "null" - }, { "name": "ScrollToRequested", "defaultValue": "null", @@ -2243,10 +2235,6 @@ { "name": "ItemsSource", "defaultValue": "null" - }, - { - "name": "ItemTemplate", - "defaultValue": "null" } ] }, @@ -2287,26 +2275,10 @@ "name": "FlyoutHeaderBehavior", "defaultValue": "Xamarin.Forms.FlyoutHeaderBehavior.Default" }, - { - "name": "FlyoutHeaderTemplate", - "defaultValue": "null" - }, { "name": "FlyoutIsPresented", "defaultValue": "false" }, - { - "name": "GroupHeaderTemplate", - "defaultValue": "null" - }, - { - "name": "ItemTemplate", - "defaultValue": "null" - }, - { - "name": "MenuItemTemplate", - "defaultValue": "null" - }, { "name": "Route", "defaultValue": "null" @@ -2401,12 +2373,6 @@ "defaultValue": "null", "inputType": "ViewElement" }, - { - "name": "ContentTemplate", - "defaultValue": "null", - "inputType": "Xamarin.Forms.DataTemplate", - "convToModel": "makeTemplate" - }, { "name": "MenuItems", "defaultValue": "null", From 1ecd3a2477d5849474a1fc110107c942dbeeb991 Mon Sep 17 00:00:00 2001 From: SergejDK Date: Tue, 19 Mar 2019 21:28:00 +0100 Subject: [PATCH 12/18] allcontrol back with toolbaritems --- samples/AllControls/AllControls/AllControls.fs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/AllControls/AllControls/AllControls.fs b/samples/AllControls/AllControls/AllControls.fs index 57f44ef38..625e58608 100644 --- a/samples/AllControls/AllControls/AllControls.fs +++ b/samples/AllControls/AllControls/AllControls.fs @@ -360,12 +360,12 @@ module App = View.Button(text = "ScrollView", command=(fun () -> dispatch (SetRootPageKind ScrollView))) View.Button(text = "Shell", command=(fun () -> dispatch (SetRootPageKind ShellView))) ])) - //.ToolbarItems([View.ToolbarItem(text="about", command=(fun () -> dispatch (SetRootPageKind (Choice true))))] ) - //.TitleView(View.StackLayout(orientation=StackOrientation.Horizontal, children=[ - // View.Label(text="fabulous", verticalOptions=LayoutOptions.Center) - // View.Label(text="rootpage", verticalOptions=LayoutOptions.Center, horizontalOptions=LayoutOptions.CenterAndExpand) - // ] - //)) + .ToolbarItems([View.ToolbarItem(text="about", command=(fun () -> dispatch (SetRootPageKind (Choice true))))] ) + .TitleView(View.StackLayout(orientation=StackOrientation.Horizontal, children=[ + View.Label(text="fabulous", verticalOptions=LayoutOptions.Center) + View.Label(text="rootpage", verticalOptions=LayoutOptions.Center, horizontalOptions=LayoutOptions.CenterAndExpand) + ] + )) if showAbout then yield From f18a8566a397f123813fdc95b1330867e43cfc08 Mon Sep 17 00:00:00 2001 From: SergejDK Date: Wed, 27 Mar 2019 00:14:57 +0100 Subject: [PATCH 13/18] added example carousel and collectionview --- .../AllControls/AllControls/AllControls.fs | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/samples/AllControls/AllControls/AllControls.fs b/samples/AllControls/AllControls/AllControls.fs index 625e58608..28a519a60 100644 --- a/samples/AllControls/AllControls/AllControls.fs +++ b/samples/AllControls/AllControls/AllControls.fs @@ -20,6 +20,8 @@ type RootPageKind = | WebCall | ScrollView | ShellView + | CollectionView + | CarouselView type Model = { RootPageKind: RootPageKind @@ -359,6 +361,8 @@ module App = View.Button(text = "WebRequest", command=(fun () -> dispatch (SetRootPageKind WebCall))) View.Button(text = "ScrollView", command=(fun () -> dispatch (SetRootPageKind ScrollView))) View.Button(text = "Shell", command=(fun () -> dispatch (SetRootPageKind ShellView))) + View.Button(text = "CollectionView", command=(fun () -> dispatch (SetRootPageKind CollectionView))) + View.Button(text = "CarouselView", command=(fun () -> dispatch (SetRootPageKind CarouselView))) ])) .ToolbarItems([View.ToolbarItem(text="about", command=(fun () -> dispatch (SetRootPageKind (Choice true))))] ) .TitleView(View.StackLayout(orientation=StackOrientation.Horizontal, children=[ @@ -931,6 +935,58 @@ module App = ]) | _ -> View.ContentPage(content = View.Label(text="Your Platform does not support Shell")) + | CollectionView -> + match Device.RuntimePlatform with + | Device.iOS | Device.Android -> + View.ContentPage(content=View.StackLayout(children = [ + MainPageButton + // use Collectionview instead of listview + View.CollectionView(itemsSource= ["Person 1"; "Person2";"Person3";"Person4";"Person5";"Person6";"Person7";"Person8";"Person9";"Person11";"Person12";"Person13";"Person14";] ) + ] + )) + + | _ -> View.ContentPage(content = View.Label(text="Your Platform does not support CollectionView")) + + | CarouselView -> + match Device.RuntimePlatform with + | Device.iOS | Device.Android -> + View.ContentPage(content= + View.StackLayout( + children = [ + MainPageButton + View.CarouselView(itemsSource = [ + "Alan" + "Betty" + "Charles" + "David" + "Edward" + "Francis" + "Gary" + "Helen" + "Ivan" + "Joel" + "Kelly" + "Larry" + "Mary" + "Nancy" + "Olivia" + "Peter" + "Quincy" + "Robert" + "Stephen" + "Timothy" + "Ursula" + "Vincent" + "William" + "Xavier" + "Yvonne" + "Zack" + ], margin=10.) + ] + )) + + | _ -> View.ContentPage(content = View.Label(text="Your Platform does not support CarouselView")) + type App () as app = inherit Application () From 82e50c828248c2ff22207e8e216212ea76d1c77a Mon Sep 17 00:00:00 2001 From: SergejDK Date: Wed, 27 Mar 2019 00:19:14 +0100 Subject: [PATCH 14/18] added xamarin flags for collectionview carousel and shell --- samples/AllControls/iOS/AppDelegate.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/AllControls/iOS/AppDelegate.fs b/samples/AllControls/iOS/AppDelegate.fs index 2f14ed34c..84e4ecfa6 100644 --- a/samples/AllControls/iOS/AppDelegate.fs +++ b/samples/AllControls/iOS/AppDelegate.fs @@ -15,7 +15,7 @@ type AppDelegate () = let mutable _app: AllControls.App option = None override this.FinishedLaunching (uiApp, options) = - Xamarin.Forms.Forms.SetFlags("Shell_Experimental"); + Xamarin.Forms.Forms.SetFlags([|"Shell_Experimental"; "CollectionView_Experimental"; "Visual_Experimental"|]); Forms.Init() let app = new AllControls.App() this.LoadApplication (app) From 090812fd2dfd539bd511645527817965845a1e11 Mon Sep 17 00:00:00 2001 From: SergejDK Date: Wed, 3 Apr 2019 23:36:50 +0200 Subject: [PATCH 15/18] collection/carouselview viewconverter functions --- .../AllControls/AllControls/AllControls.fs | 54 +++++------ src/Fabulous.Core/ViewConverters.fs | 89 +++++++++++++++++++ src/Fabulous.Core/Xamarin.Forms.Core.fs | 84 +++++++++++++---- tools/Generator/Xamarin.Forms.Core.json | 24 ++++- 4 files changed, 207 insertions(+), 44 deletions(-) diff --git a/samples/AllControls/AllControls/AllControls.fs b/samples/AllControls/AllControls/AllControls.fs index 28a519a60..1de0117d2 100644 --- a/samples/AllControls/AllControls/AllControls.fs +++ b/samples/AllControls/AllControls/AllControls.fs @@ -941,7 +941,20 @@ module App = View.ContentPage(content=View.StackLayout(children = [ MainPageButton // use Collectionview instead of listview - View.CollectionView(itemsSource= ["Person 1"; "Person2";"Person3";"Person4";"Person5";"Person6";"Person7";"Person8";"Person9";"Person11";"Person12";"Person13";"Person14";] ) + View.CollectionView(items= [ + View.Label(text="Person 1") + View.Label(text="Person2") + View.Label(text="Person3") + View.Label(text="Person4") + View.Label(text="Person5") + View.Label(text="Person6") + View.Label(text="Person7") + View.Label(text="Person8") + View.Label(text="Person9") + View.Label(text="Person11") + View.Label(text="Person12") + View.Label(text="Person13") + View.Label(text="Person14")] ) ] )) @@ -955,32 +968,19 @@ module App = children = [ MainPageButton View.CarouselView(itemsSource = [ - "Alan" - "Betty" - "Charles" - "David" - "Edward" - "Francis" - "Gary" - "Helen" - "Ivan" - "Joel" - "Kelly" - "Larry" - "Mary" - "Nancy" - "Olivia" - "Peter" - "Quincy" - "Robert" - "Stephen" - "Timothy" - "Ursula" - "Vincent" - "William" - "Xavier" - "Yvonne" - "Zack" + View.Label(text="Person1") + View.Label(text="Person2") + View.Label(text="Person3") + View.Label(text="Person4") + View.Label(text="Person5") + View.Label(text="Person6") + View.Label(text="Person7") + View.Label(text="Person8") + View.Label(text="Person9") + View.Label(text="Person11") + View.Label(text="Person12") + View.Label(text="Person13") + View.Label(text="Person14") ], margin=10.) ] )) diff --git a/src/Fabulous.Core/ViewConverters.fs b/src/Fabulous.Core/ViewConverters.fs index 26b8753ae..ac510109c 100644 --- a/src/Fabulous.Core/ViewConverters.fs +++ b/src/Fabulous.Core/ViewConverters.fs @@ -24,6 +24,11 @@ type IListElement = inherit INotifyPropertyChanged abstract Key : ViewElement +[] +type IItemListElement = + inherit INotifyPropertyChanged + abstract Key : ViewElement + /// A custom data element for the ListView view element [] type ListElementData(key) = @@ -40,6 +45,21 @@ type ListElementData(key) = data <- value ev.Trigger(x, PropertyChangedEventArgs "Key") +[] +type ItemListElementData(key) = + let ev = new Event<_,_>() + let mutable data = key + + interface IItemListElement with + member x.Key = data + [] member x.PropertyChanged = ev.Publish + + member x.Key + with get() = data + and set(value) = + data <- value + ev.Trigger(x, PropertyChangedEventArgs "Key") + /// A custom data element for the GroupedListView view element [] type ListGroupData(shortName: string, key, coll: ViewElement[]) = @@ -111,10 +131,59 @@ type ViewElementCell() = modelOpt <- None | None -> () +type ItemViewElementCell() = + inherit ContentView() + + let mutable listElementOpt : IItemListElement option = None + let mutable modelOpt : ViewElement option = None + + let createView (newModel: ViewElement) = + match newModel.Create () with + | :? View as v -> v + | x -> failwithf "The cells of a CollectionView must each be some kind of 'View' and not a '%A'" (x.GetType()) + + member x.OnDataPropertyChanged = PropertyChangedEventHandler(fun _ args -> + match args.PropertyName, listElementOpt, modelOpt with + | "Key", Some curr, Some prevModel -> + curr.Key.UpdateIncremental (prevModel, x.Content) + modelOpt <- Some curr.Key + | _ -> () + ) + + override x.OnBindingContextChanged () = + base.OnBindingContextChanged () + match x.BindingContext with + | :? IItemListElement as curr -> + let newModel = curr.Key + match listElementOpt with + | Some prev -> + prev.PropertyChanged.RemoveHandler x.OnDataPropertyChanged + curr.PropertyChanged.AddHandler x.OnDataPropertyChanged + newModel.UpdateIncremental (prev.Key, x.Content) + | None -> + curr.PropertyChanged.AddHandler x.OnDataPropertyChanged + x.Content <- createView newModel + + listElementOpt <- Some curr + modelOpt <- Some curr.Key + | _ -> + match listElementOpt with + | Some prev -> + prev.PropertyChanged.RemoveHandler x.OnDataPropertyChanged + listElementOpt <- None + modelOpt <- None + | None -> () + /// A custom control for the ListView view element type CustomListView() = inherit ListView(ItemTemplate=DataTemplate(typeof)) +type CustomCollectionListView() = + inherit CollectionView(ItemTemplate=DataTemplate(typeof)) + +type CustomCarouselView() = + inherit CarouselView(ItemTemplate=DataTemplate(typeof)) + /// A custom control for the ListViewGrouped view element type CustomGroupListView() = inherit ListView(ItemTemplate=DataTemplate(typeof), GroupHeaderTemplate=DataTemplate(typeof), IsGroupingEnabled=true) @@ -371,6 +440,26 @@ module Converters = oc updateCollectionGeneric (ValueOption.map seqToArray prevCollOpt) (ValueOption.map seqToArray collOpt) targetColl ListElementData (fun _ _ _ -> ()) canReuseChild (fun _ curr target -> target.Key <- curr) + let internal updateCollectionViewItems (prevCollOpt: seq<'T> voption) (collOpt: seq<'T> voption) (target: Xamarin.Forms.CollectionView) = + let targetColl = + match target.ItemsSource with + | :? ObservableCollection as oc -> oc + | _ -> + let oc = ObservableCollection() + target.ItemsSource <- oc + oc + updateCollectionGeneric (ValueOption.map seqToArray prevCollOpt) (ValueOption.map seqToArray collOpt) targetColl ItemListElementData (fun _ _ _ -> ()) canReuseChild (fun _ curr target -> target.Key <- curr) + + let internal updateCarouselViewItems (prevCollOpt: seq<'T> voption) (collOpt: seq<'T> voption) (target: Xamarin.Forms.CarouselView) = + let targetColl = + match target.ItemsSource with + | :? ObservableCollection as oc -> oc + | _ -> + let oc = ObservableCollection() + target.ItemsSource <- oc + oc + updateCollectionGeneric (ValueOption.map seqToArray prevCollOpt) (ValueOption.map seqToArray collOpt) targetColl ItemListElementData (fun _ _ _ -> ()) canReuseChild (fun _ curr target -> target.Key <- curr) + let private updateListGroupData (_prevShortName: string, _prevKey, prevColl: ViewElement[]) (currShortName: string, currKey, currColl: ViewElement[]) (target: ListGroupData) = target.ShortName <- currShortName target.Key <- currKey diff --git a/src/Fabulous.Core/Xamarin.Forms.Core.fs b/src/Fabulous.Core/Xamarin.Forms.Core.fs index ce5eaf12a..3a9f14151 100644 --- a/src/Fabulous.Core/Xamarin.Forms.Core.fs +++ b/src/Fabulous.Core/Xamarin.Forms.Core.fs @@ -295,6 +295,8 @@ module ViewAttributes = let SelectionChangedAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionChanged") let LocationAttribKey : AttributeKey<_> = AttributeKey<_>("Location") let ssGoToAsyncAttribKey : AttributeKey<_> = AttributeKey<_>("ssGoToAsync") + let CarouselViewItemsAttribKey : AttributeKey<_> = AttributeKey<_>("CarouselViewItems") + let CollectionViewItemsAttribKey : AttributeKey<_> = AttributeKey<_>("CollectionViewItems") type ViewProto() = static member val ProtoElement : ViewElement option = None with get, set @@ -13957,6 +13959,7 @@ type ViewBuilders() = /// Builds the attributes for a CarouselView in the view static member inline BuildCarouselView(attribCount: int, + ?items: seq, ?emptyView: System.Object, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, @@ -14002,13 +14005,17 @@ type ViewBuilders() = ?automationId: string, ?created: obj -> unit, ?ref: ViewRef) = + + let attribCount = match items with Some _ -> attribCount + 1 | None -> attribCount + let attribBuilder = ViewBuilders.BuildItemsView(attribCount, ?emptyView=emptyView, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CarouselViewItemsAttribKey, (v)) attribBuilder static member val CreateFuncCarouselView : (unit -> Xamarin.Forms.CarouselView) = (fun () -> ViewBuilders.CreateCarouselView()) with get, set static member CreateCarouselView () : Xamarin.Forms.CarouselView = - upcast (new Xamarin.Forms.CarouselView()) + upcast (new Fabulous.DynamicViews.CustomCarouselView()) static member val UpdateFuncCarouselView = (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.CarouselView) -> ViewBuilders.UpdateCarouselView (prevOpt, curr, target)) @@ -14017,11 +14024,21 @@ type ViewBuilders() = // update the inherited ItemsView element let baseElement = (if ViewProto.ProtoItemsView.IsNone then ViewProto.ProtoItemsView <- Some (ViewBuilders.ConstructItemsView())); ViewProto.ProtoItemsView.Value baseElement.UpdateInherited (prevOpt, curr, target) - ignore prevOpt - ignore curr - ignore target + let mutable prevCarouselViewItemsOpt = ValueNone + let mutable currCarouselViewItemsOpt = ValueNone + for kvp in curr.AttributesKeyed do + if kvp.Key = ViewAttributes.CarouselViewItemsAttribKey.KeyValue then + currCarouselViewItemsOpt <- ValueSome (kvp.Value :?> seq) + match prevOpt with + | ValueNone -> () + | ValueSome prev -> + for kvp in prev.AttributesKeyed do + if kvp.Key = ViewAttributes.CarouselViewItemsAttribKey.KeyValue then + prevCarouselViewItemsOpt <- ValueSome (kvp.Value :?> seq) + updateCarouselViewItems prevCarouselViewItemsOpt currCarouselViewItemsOpt target - static member inline ConstructCarouselView(?emptyView: System.Object, + static member inline ConstructCarouselView(?items: seq, + ?emptyView: System.Object, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, @@ -14068,6 +14085,7 @@ type ViewBuilders() = ?ref: ViewRef) = let attribBuilder = ViewBuilders.BuildCarouselView(0, + ?items=items, ?emptyView=emptyView, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, @@ -14118,6 +14136,7 @@ type ViewBuilders() = /// Builds the attributes for a CollectionView in the view static member inline BuildCollectionView(attribCount: int, + ?items: seq, ?selectedItem: System.Object, ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, @@ -14168,13 +14187,17 @@ type ViewBuilders() = ?automationId: string, ?created: obj -> unit, ?ref: ViewRef) = + + let attribCount = match items with Some _ -> attribCount + 1 | None -> attribCount + let attribBuilder = ViewBuilders.BuildSelectableItemsView(attribCount, ?selectedItem=selectedItem, ?selectionChangedCommand=selectionChangedCommand, ?selectionChangedCommandParameter=selectionChangedCommandParameter, ?selectionMode=selectionMode, ?selectionChanged=selectionChanged, ?emptyView=emptyView, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) + match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CollectionViewItemsAttribKey, (v)) attribBuilder static member val CreateFuncCollectionView : (unit -> Xamarin.Forms.CollectionView) = (fun () -> ViewBuilders.CreateCollectionView()) with get, set static member CreateCollectionView () : Xamarin.Forms.CollectionView = - upcast (new Xamarin.Forms.CollectionView()) + upcast (new Fabulous.DynamicViews.CustomCollectionListView()) static member val UpdateFuncCollectionView = (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.CollectionView) -> ViewBuilders.UpdateCollectionView (prevOpt, curr, target)) @@ -14183,11 +14206,21 @@ type ViewBuilders() = // update the inherited SelectableItemsView element let baseElement = (if ViewProto.ProtoSelectableItemsView.IsNone then ViewProto.ProtoSelectableItemsView <- Some (ViewBuilders.ConstructSelectableItemsView())); ViewProto.ProtoSelectableItemsView.Value baseElement.UpdateInherited (prevOpt, curr, target) - ignore prevOpt - ignore curr - ignore target + let mutable prevCollectionViewItemsOpt = ValueNone + let mutable currCollectionViewItemsOpt = ValueNone + for kvp in curr.AttributesKeyed do + if kvp.Key = ViewAttributes.CollectionViewItemsAttribKey.KeyValue then + currCollectionViewItemsOpt <- ValueSome (kvp.Value :?> seq) + match prevOpt with + | ValueNone -> () + | ValueSome prev -> + for kvp in prev.AttributesKeyed do + if kvp.Key = ViewAttributes.CollectionViewItemsAttribKey.KeyValue then + prevCollectionViewItemsOpt <- ValueSome (kvp.Value :?> seq) + updateCollectionViewItems prevCollectionViewItemsOpt currCollectionViewItemsOpt target - static member inline ConstructCollectionView(?selectedItem: System.Object, + static member inline ConstructCollectionView(?items: seq, + ?selectedItem: System.Object, ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, ?selectionMode: Xamarin.Forms.SelectionMode, @@ -14239,6 +14272,7 @@ type ViewBuilders() = ?ref: ViewRef) = let attribBuilder = ViewBuilders.BuildCollectionView(0, + ?items=items, ?selectedItem=selectedItem, ?selectionChangedCommand=selectionChangedCommand, ?selectionChangedCommandParameter=selectionChangedCommandParameter, @@ -15375,11 +15409,15 @@ type ShellSectionViewer(element: ViewElement) = type CarouselViewViewer(element: ViewElement) = inherit ItemsViewViewer(element) do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.CarouselView' is expected, but '%s' was provided." element.TargetType.FullName + /// Get the value of the ItemsSource property + member this.ItemsSource = element.GetAttributeKeyed(ViewAttributes.CarouselViewItemsAttribKey) /// Viewer that allows to read the properties of a ViewElement representing a CollectionView type CollectionViewViewer(element: ViewElement) = inherit SelectableItemsViewViewer(element) do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.CollectionView' is expected, but '%s' was provided." element.TargetType.FullName + /// Get the value of the ItemsSource property + member this.ItemsSource = element.GetAttributeKeyed(ViewAttributes.CollectionViewItemsAttribKey) type View() = /// Describes a Element in the view @@ -19974,7 +20012,8 @@ type View() = ?ref=ref) /// Describes a CarouselView in the view - static member inline CarouselView(?emptyView: System.Object, + static member inline CarouselView(?items: seq, + ?emptyView: System.Object, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, @@ -20020,7 +20059,8 @@ type View() = ?created: (Xamarin.Forms.CarouselView -> unit), ?ref: ViewRef) = - ViewBuilders.ConstructCarouselView(?emptyView=emptyView, + ViewBuilders.ConstructCarouselView(?items=items, + ?emptyView=emptyView, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?scrollToRequested=scrollToRequested, @@ -20067,7 +20107,8 @@ type View() = ?ref=ref) /// Describes a CollectionView in the view - static member inline CollectionView(?selectedItem: System.Object, + static member inline CollectionView(?items: seq, + ?selectedItem: System.Object, ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, ?selectionMode: Xamarin.Forms.SelectionMode, @@ -20118,7 +20159,8 @@ type View() = ?created: (Xamarin.Forms.CollectionView -> unit), ?ref: ViewRef) = - ViewBuilders.ConstructCollectionView(?selectedItem=selectedItem, + ViewBuilders.ConstructCollectionView(?items=items, + ?selectedItem=selectedItem, ?selectionChangedCommand=selectionChangedCommand, ?selectionChangedCommandParameter=selectionChangedCommandParameter, ?selectionMode=selectionMode, @@ -21036,6 +21078,12 @@ module ViewElementExtensions = /// Adjusts the ssGoToAsync property in the visual element member x.ssGoToAsync(value: string list * Map * Fabulous.DynamicViews.AnimationKind) = x.WithAttribute(ViewAttributes.ssGoToAsyncAttribKey, (value)) + /// Adjusts the CarouselViewItems property in the visual element + member x.CarouselViewItems(value: seq) = x.WithAttribute(ViewAttributes.CarouselViewItemsAttribKey, (value)) + + /// Adjusts the CollectionViewItems property in the visual element + member x.CollectionViewItems(value: seq) = x.WithAttribute(ViewAttributes.CollectionViewItemsAttribKey, (value)) + member x.With(?classId: string, ?styleId: string, ?automationId: string, ?anchorX: double, ?anchorY: double, ?backgroundColor: Xamarin.Forms.Color, ?heightRequest: double, ?inputTransparent: bool, ?isEnabled: bool, ?isVisible: bool, ?minimumHeightRequest: double, ?minimumWidthRequest: double, ?opacity: double, ?rotation: double, ?rotationX: double, @@ -21093,7 +21141,7 @@ module ViewElementExtensions = ?flyoutHeader: System.Object, ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, ?flyoutIsPresented: bool, ?route: string, ?routeHost: string, ?routeScheme: string, ?onNavigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, ?onNavigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?selectedItem: System.Object, ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, - ?location: System.Uri, ?ssGoToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind) = + ?location: System.Uri, ?ssGoToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, ?carouselViewItems: seq, ?collectionViewItems: seq) = let x = match classId with None -> x | Some opt -> x.ClassId(opt) let x = match styleId with None -> x | Some opt -> x.StyleId(opt) let x = match automationId with None -> x | Some opt -> x.AutomationId(opt) @@ -21381,6 +21429,8 @@ module ViewElementExtensions = let x = match selectionChanged with None -> x | Some opt -> x.SelectionChanged(opt) let x = match location with None -> x | Some opt -> x.Location(opt) let x = match ssGoToAsync with None -> x | Some opt -> x.ssGoToAsync(opt) + let x = match carouselViewItems with None -> x | Some opt -> x.CarouselViewItems(opt) + let x = match collectionViewItems with None -> x | Some opt -> x.CollectionViewItems(opt) x /// Adjusts the ClassId property in the visual element @@ -21957,3 +22007,7 @@ module ViewElementExtensions = let location (value: System.Uri) (x: ViewElement) = x.Location(value) /// Adjusts the ssGoToAsync property in the visual element let ssGoToAsync (value: string list * Map * Fabulous.DynamicViews.AnimationKind) (x: ViewElement) = x.ssGoToAsync(value) + /// Adjusts the CarouselViewItems property in the visual element + let carouselViewItems (value: seq) (x: ViewElement) = x.CarouselViewItems(value) + /// Adjusts the CollectionViewItems property in the visual element + let collectionViewItems (value: seq) (x: ViewElement) = x.CollectionViewItems(value) diff --git a/tools/Generator/Xamarin.Forms.Core.json b/tools/Generator/Xamarin.Forms.Core.json index 87cf5943e..6bfd0f5fd 100644 --- a/tools/Generator/Xamarin.Forms.Core.json +++ b/tools/Generator/Xamarin.Forms.Core.json @@ -2425,11 +2425,31 @@ }, { "name": "Xamarin.Forms.CarouselView", - "members": [] + "customType": "Fabulous.DynamicViews.CustomCarouselView", + "members": [ + { + "name": "ItemsSource", + "uniqueName": "CarouselViewItems", + "shortName": "items", + "inputType": "seq", + "modelType": "seq", + "updateCode": "updateCarouselViewItems" + } + ] }, { "name": "Xamarin.Forms.CollectionView", - "members": [] + "customType": "Fabulous.DynamicViews.CustomCollectionListView", + "members": [ + { + "name": "ItemsSource", + "uniqueName": "CollectionViewItems", + "shortName": "items", + "inputType": "seq", + "modelType": "seq", + "updateCode": "updateCollectionViewItems" + } + ] } ] } \ No newline at end of file From 56ecd6c138ae9eb074118f7e240267ef99a0f5ec Mon Sep 17 00:00:00 2001 From: SergejDK Date: Mon, 8 Apr 2019 23:38:02 +0200 Subject: [PATCH 16/18] merge --- src/Fabulous.Core/Xamarin.Forms.Core.fs | 430 +++--------------------- 1 file changed, 42 insertions(+), 388 deletions(-) diff --git a/src/Fabulous.Core/Xamarin.Forms.Core.fs b/src/Fabulous.Core/Xamarin.Forms.Core.fs index 382d769a1..2723a0b26 100644 --- a/src/Fabulous.Core/Xamarin.Forms.Core.fs +++ b/src/Fabulous.Core/Xamarin.Forms.Core.fs @@ -248,6 +248,7 @@ module ViewAttributes = let ListViewGrouped_ItemTappedAttribKey : AttributeKey<_> = AttributeKey<_>("ListViewGrouped_ItemTapped") let RefreshingAttribKey : AttributeKey<_> = AttributeKey<_>("Refreshing") let TextOverrideAttribKey : AttributeKey<_> = AttributeKey<_>("TextOverride") + let CommandParameterAttribKey : AttributeKey<_> = AttributeKey<_>("CommandParameter") let IconOverrideAttribKey : AttributeKey<_> = AttributeKey<_>("IconOverride") let SpanAttribKey : AttributeKey<_> = AttributeKey<_>("Span") let EmptyViewAttribKey : AttributeKey<_> = AttributeKey<_>("EmptyView") @@ -12300,37 +12301,6 @@ type ViewBuilders() = static member CreateGridItemsLayout () : Xamarin.Forms.GridItemsLayout = failwith "can't create Xamarin.Forms.GridItemsLayout" -/// Viewer that allows to read the properties of a ViewElement representing a Button -type ButtonViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Button' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Text property - member this.Text = element.GetAttributeKeyed(ViewAttributes.TextAttribKey) - /// Get the value of the Command property - member this.Command = element.GetAttributeKeyed(ViewAttributes.ButtonCommandAttribKey) - /// Get the value of the CanExecute property - member this.CanExecute = element.GetAttributeKeyed(ViewAttributes.ButtonCanExecuteAttribKey) - /// Get the value of the BorderColor property - member this.BorderColor = element.GetAttributeKeyed(ViewAttributes.BorderColorAttribKey) - /// Get the value of the BorderWidth property - member this.BorderWidth = element.GetAttributeKeyed(ViewAttributes.BorderWidthAttribKey) - /// Get the value of the ContentLayout property - member this.ContentLayout = element.GetAttributeKeyed(ViewAttributes.ContentLayoutAttribKey) - /// Get the value of the CornerRadius property - member this.CornerRadius = element.GetAttributeKeyed(ViewAttributes.ButtonCornerRadiusAttribKey) - /// Get the value of the FontFamily property - member this.FontFamily = element.GetAttributeKeyed(ViewAttributes.FontFamilyAttribKey) - /// Get the value of the FontAttributes property - member this.FontAttributes = element.GetAttributeKeyed(ViewAttributes.FontAttributesAttribKey) - /// Get the value of the FontSize property - member this.FontSize = element.GetAttributeKeyed(ViewAttributes.FontSizeAttribKey) - /// Get the value of the Image property - member this.Image = element.GetAttributeKeyed(ViewAttributes.ButtonImageSourceAttribKey) - /// Get the value of the TextColor property - member this.TextColor = element.GetAttributeKeyed(ViewAttributes.TextColorAttribKey) - /// Get the value of the Padding property - member this.Padding = element.GetAttributeKeyed(ViewAttributes.PaddingAttribKey) - static member val UpdateFuncGridItemsLayout = (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.GridItemsLayout) -> ViewBuilders.UpdateGridItemsLayout (prevOpt, curr, target)) @@ -13353,43 +13323,12 @@ type ButtonViewer(element: ViewElement) = static member val CreateFuncShellGroupItem : (unit -> Xamarin.Forms.ShellGroupItem) = (fun () -> ViewBuilders.CreateShellGroupItem()) with get, set - static member CreateShellGroupItem () : Xamarin.Forms.ShellGroupItem = upcast (new Xamarin.Forms.ShellGroupItem()) static member val UpdateFuncShellGroupItem = (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ShellGroupItem) -> ViewBuilders.UpdateShellGroupItem (prevOpt, curr, target)) -/// Viewer that allows to read the properties of a ViewElement representing a MenuItem -type MenuItemViewer(element: ViewElement) = - inherit ElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.MenuItem' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Text property - member this.Text = element.GetAttributeKeyed(ViewAttributes.TextAttribKey) - /// Get the value of the Command property - member this.Command = element.GetAttributeKeyed(ViewAttributes.CommandAttribKey) - /// Get the value of the Icon property - member this.Icon = element.GetAttributeKeyed(ViewAttributes.IconAttribKey) - /// Get the value of the Accelerator property - member this.Accelerator = element.GetAttributeKeyed(ViewAttributes.AcceleratorAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a TextCell -type TextCellViewer(element: ViewElement) = - inherit CellViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.TextCell' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Text property - member this.Text = element.GetAttributeKeyed(ViewAttributes.TextAttribKey) - /// Get the value of the Detail property - member this.Detail = element.GetAttributeKeyed(ViewAttributes.TextDetailAttribKey) - /// Get the value of the TextColor property - member this.TextColor = element.GetAttributeKeyed(ViewAttributes.TextColorAttribKey) - /// Get the value of the DetailColor property - member this.DetailColor = element.GetAttributeKeyed(ViewAttributes.TextDetailColorAttribKey) - /// Get the value of the Command property - member this.Command = element.GetAttributeKeyed(ViewAttributes.TextCellCommandAttribKey) - /// Get the value of the CanExecute property - member this.CanExecute = element.GetAttributeKeyed(ViewAttributes.TextCellCanExecuteAttribKey) - static member UpdateShellGroupItem (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ShellGroupItem) = // update the inherited Element element let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value @@ -14574,8 +14513,6 @@ type ButtonViewer(element: ViewElement) = member this.BorderColor = element.GetAttributeKeyed(ViewAttributes.BorderColorAttribKey) /// Get the value of the BorderWidth property member this.BorderWidth = element.GetAttributeKeyed(ViewAttributes.BorderWidthAttribKey) - /// Get the value of the CommandParameter property - member this.CommandParameter = element.GetAttributeKeyed(ViewAttributes.CommandParameterAttribKey) /// Get the value of the ContentLayout property member this.ContentLayout = element.GetAttributeKeyed(ViewAttributes.ContentLayoutAttribKey) /// Get the value of the CornerRadius property @@ -15102,8 +15039,6 @@ type MenuItemViewer(element: ViewElement) = member this.Text = element.GetAttributeKeyed(ViewAttributes.TextAttribKey) /// Get the value of the Command property member this.Command = element.GetAttributeKeyed(ViewAttributes.CommandAttribKey) - /// Get the value of the CommandParameter property - member this.CommandParameter = element.GetAttributeKeyed(ViewAttributes.CommandParameterAttribKey) /// Get the value of the Icon property member this.Icon = element.GetAttributeKeyed(ViewAttributes.IconAttribKey) /// Get the value of the Accelerator property @@ -15125,8 +15060,6 @@ type TextCellViewer(element: ViewElement) = member this.Command = element.GetAttributeKeyed(ViewAttributes.TextCellCommandAttribKey) /// Get the value of the CanExecute property member this.CanExecute = element.GetAttributeKeyed(ViewAttributes.TextCellCanExecuteAttribKey) - /// Get the value of the CommandParameter property - member this.CommandParameter = element.GetAttributeKeyed(ViewAttributes.CommandParameterAttribKey) /// Viewer that allows to read the properties of a ViewElement representing a ToolbarItem type ToolbarItemViewer(element: ViewElement) = @@ -16254,7 +16187,6 @@ type View() = ?canExecute: bool, ?borderColor: Xamarin.Forms.Color, ?borderWidth: double, - ?commandParameter: System.Object, ?contentLayout: Xamarin.Forms.Button.ButtonContentLayout, ?cornerRadius: int, ?fontFamily: string, @@ -16309,7 +16241,6 @@ type View() = ?canExecute=canExecute, ?borderColor=borderColor, ?borderWidth=borderWidth, - ?commandParameter=commandParameter, ?contentLayout=contentLayout, ?cornerRadius=cornerRadius, ?fontFamily=fontFamily, @@ -16826,74 +16757,6 @@ type View() = ?columnSpacing=columnSpacing, ?children=children, ?isClippedToBounds=isClippedToBounds, - - /// Describes a Button in the view - static member inline Button(?text: string, - ?command: unit -> unit, - ?canExecute: bool, - ?borderColor: Xamarin.Forms.Color, - ?borderWidth: double, - ?contentLayout: Xamarin.Forms.Button.ButtonContentLayout, - ?cornerRadius: int, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?fontSize: obj, - ?image: string, - ?textColor: Xamarin.Forms.Color, - ?padding: Xamarin.Forms.Thickness, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Button -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructButton(?text=text, - ?command=command, - ?canExecute=canExecute, - ?borderColor=borderColor, - ?borderWidth=borderWidth, - ?contentLayout=contentLayout, - ?cornerRadius=cornerRadius, - ?fontFamily=fontFamily, - ?fontAttributes=fontAttributes, - ?fontSize=fontSize, - ?image=image, - ?textColor=textColor, ?padding=padding, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, @@ -19251,7 +19114,6 @@ type View() = /// Describes a MenuItem in the view static member inline MenuItem(?text: string, ?command: unit -> unit, - ?commandParameter: System.Object, ?icon: string, ?accelerator: string, ?classId: string, @@ -19262,7 +19124,6 @@ type View() = ViewBuilders.ConstructMenuItem(?text=text, ?command=command, - ?commandParameter=commandParameter, ?icon=icon, ?accelerator=accelerator, ?classId=classId, @@ -19278,7 +19139,6 @@ type View() = ?detailColor: Xamarin.Forms.Color, ?command: unit -> unit, ?canExecute: bool, - ?commandParameter: System.Object, ?height: double, ?isEnabled: bool, ?classId: string, @@ -19293,7 +19153,6 @@ type View() = ?detailColor=detailColor, ?command=command, ?canExecute=canExecute, - ?commandParameter=commandParameter, ?height=height, ?isEnabled=isEnabled, ?classId=classId, @@ -19307,7 +19166,6 @@ type View() = ?priority: int, ?text: string, ?command: unit -> unit, - ?commandParameter: System.Object, ?icon: string, ?accelerator: string, ?classId: string, @@ -19320,7 +19178,6 @@ type View() = ?priority=priority, ?text=text, ?command=command, - ?commandParameter=commandParameter, ?icon=icon, ?accelerator=accelerator, ?classId=classId, @@ -19337,7 +19194,6 @@ type View() = ?detailColor: Xamarin.Forms.Color, ?command: unit -> unit, ?canExecute: bool, - ?commandParameter: System.Object, ?height: double, ?isEnabled: bool, ?classId: string, @@ -19353,7 +19209,6 @@ type View() = ?detailColor=detailColor, ?command=command, ?canExecute=canExecute, - ?commandParameter=commandParameter, ?height=height, ?isEnabled=isEnabled, ?classId=classId, @@ -19915,22 +19770,6 @@ type View() = ?ref: ViewRef) = ViewBuilders.ConstructShellGroupItem(?flyoutDisplayOptions=flyoutDisplayOptions, - - /// Describes a MenuItem in the view - static member inline MenuItem(?text: string, - ?command: unit -> unit, - ?icon: string, - ?accelerator: string, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.MenuItem -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructMenuItem(?text=text, - ?command=command, - ?icon=icon, - ?accelerator=accelerator, ?classId=classId, ?styleId=styleId, ?automationId=automationId, @@ -20008,29 +19847,6 @@ type View() = ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, - - /// Describes a TextCell in the view - static member inline TextCell(?text: string, - ?detail: string, - ?textColor: Xamarin.Forms.Color, - ?detailColor: Xamarin.Forms.Color, - ?command: unit -> unit, - ?canExecute: bool, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.TextCell -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructTextCell(?text=text, - ?detail=detail, - ?textColor=textColor, - ?detailColor=detailColor, - ?command=command, - ?canExecute=canExecute, - ?height=height, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, @@ -20079,26 +19895,6 @@ type View() = ViewBuilders.ConstructShellContent(?content=content, ?menuItems=menuItems, - - /// Describes a ToolbarItem in the view - static member inline ToolbarItem(?order: Xamarin.Forms.ToolbarItemOrder, - ?priority: int, - ?text: string, - ?command: unit -> unit, - ?icon: string, - ?accelerator: string, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ToolbarItem -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructToolbarItem(?order=order, - ?priority=priority, - ?text=text, - ?command=command, - ?icon=icon, - ?accelerator=accelerator, ?classId=classId, ?styleId=styleId, ?automationId=automationId, @@ -20115,117 +19911,6 @@ type View() = ?created: (Xamarin.Forms.ShellItem -> unit), ?ref: ViewRef) = - /// Describes a ImageCell in the view - static member inline ImageCell(?imageSource: obj, - ?text: string, - ?detail: string, - ?textColor: Xamarin.Forms.Color, - ?detailColor: Xamarin.Forms.Color, - ?command: unit -> unit, - ?canExecute: bool, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ImageCell -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructImageCell(?imageSource=imageSource, - ?text=text, - ?detail=detail, - ?textColor=textColor, - ?detailColor=detailColor, - ?command=command, - ?canExecute=canExecute, - ?height=height, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ViewCell in the view - static member inline ViewCell(?view: ViewElement, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ViewCell -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructViewCell(?view=view, - ?height=height, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ListView in the view - static member inline ListView(?items: seq, - ?footer: System.Object, - ?hasUnevenRows: bool, - ?header: System.Object, - ?headerTemplate: Xamarin.Forms.DataTemplate, - ?isGroupingEnabled: bool, - ?isPullToRefreshEnabled: bool, - ?isRefreshing: bool, - ?refreshCommand: unit -> unit, - ?rowHeight: int, - ?selectedItem: int option, - ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, - ?separatorColor: Xamarin.Forms.Color, - ?itemAppearing: int -> unit, - ?itemDisappearing: int -> unit, - ?itemSelected: int option -> unit, - ?itemTapped: int -> unit, - ?refreshing: unit -> unit, - ?selectionMode: Xamarin.Forms.ListViewSelectionMode, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ListView -> unit), - ?ref: ViewRef) = - ViewBuilders.ConstructShellItem(?currentItem=currentItem, ?items=items, ?flyoutDisplayOptions=flyoutDisplayOptions, @@ -21182,6 +20867,9 @@ module ViewElementExtensions = /// Adjusts the TextOverride property in the visual element member x.TextOverride(value: string) = x.WithAttribute(ViewAttributes.TextOverrideAttribKey, (value)) + /// Adjusts the CommandParameter property in the visual element + member x.CommandParameter(value: System.Object) = x.WithAttribute(ViewAttributes.CommandParameterAttribKey, (value)) + /// Adjusts the IconOverride property in the visual element member x.IconOverride(value: string) = x.WithAttribute(ViewAttributes.IconOverrideAttribKey, (value)) @@ -21341,40 +21029,40 @@ module ViewElementExtensions = ?scrolled: Xamarin.Forms.ScrolledEventArgs -> unit, ?layoutAreaOverride: Xamarin.Forms.Rectangle, ?cancelButtonColor: Xamarin.Forms.Color, ?fontFamily: string, ?fontAttributes: Xamarin.Forms.FontAttributes, ?fontSize: obj, ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, ?placeholder: string, ?placeholderColor: Xamarin.Forms.Color, ?searchBarCommand: string -> unit, ?searchBarCanExecute: bool, ?text: string, ?textColor: Xamarin.Forms.Color, ?searchBarTextChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?buttonCommand: unit -> unit, - ?buttonCanExecute: bool, ?borderColor: Xamarin.Forms.Color, ?borderWidth: double, ?commandParameter: System.Object, ?contentLayout: Xamarin.Forms.Button.ButtonContentLayout, - ?buttonCornerRadius: int, ?buttonImageSource: string, ?minimumMaximum: float * float, ?value: double, ?valueChanged: Xamarin.Forms.ValueChangedEventArgs -> unit, - ?increment: double, ?isToggled: bool, ?toggled: Xamarin.Forms.ToggledEventArgs -> unit, ?onColor: Xamarin.Forms.Color, ?height: double, - ?on: bool, ?onChanged: Xamarin.Forms.ToggledEventArgs -> unit, ?intent: Xamarin.Forms.TableIntent, ?hasUnevenRows: bool, ?rowHeight: int, - ?tableRoot: (string * ViewElement list) list, ?rowDefinitionHeight: obj, ?columnDefinitionWidth: obj, ?gridRowDefinitions: obj list, ?gridColumnDefinitions: obj list, - ?rowSpacing: double, ?columnSpacing: double, ?children: ViewElement list, ?gridRow: int, ?gridRowSpan: int, - ?gridColumn: int, ?gridColumnSpan: int, ?layoutBounds: Xamarin.Forms.Rectangle, ?layoutFlags: Xamarin.Forms.AbsoluteLayoutFlags, ?boundsConstraint: Xamarin.Forms.BoundsConstraint, - ?heightConstraint: Xamarin.Forms.Constraint, ?widthConstraint: Xamarin.Forms.Constraint, ?xConstraint: Xamarin.Forms.Constraint, ?yConstraint: Xamarin.Forms.Constraint, ?alignContent: Xamarin.Forms.FlexAlignContent, - ?alignItems: Xamarin.Forms.FlexAlignItems, ?flexLayoutDirection: Xamarin.Forms.FlexDirection, ?position: Xamarin.Forms.FlexPosition, ?wrap: Xamarin.Forms.FlexWrap, ?justifyContent: Xamarin.Forms.FlexJustify, - ?flexAlignSelf: Xamarin.Forms.FlexAlignSelf, ?flexOrder: int, ?flexBasis: Xamarin.Forms.FlexBasis, ?flexGrow: double, ?flexShrink: double, - ?date: System.DateTime, ?format: string, ?minimumDate: System.DateTime, ?maximumDate: System.DateTime, ?dateSelected: Xamarin.Forms.DateChangedEventArgs -> unit, - ?pickerItemsSource: seq<'T>, ?selectedIndex: int, ?title: string, ?selectedIndexChanged: (int * 'T option) -> unit, ?frameCornerRadius: double, - ?hasShadow: bool, ?imageSource: obj, ?aspect: Xamarin.Forms.Aspect, ?isOpaque: bool, ?imageButtonCommand: unit -> unit, - ?imageButtonCornerRadius: int, ?clicked: System.EventArgs -> unit, ?pressed: System.EventArgs -> unit, ?released: System.EventArgs -> unit, ?keyboard: Xamarin.Forms.Keyboard, - ?editorCompleted: string -> unit, ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?autoSize: Xamarin.Forms.EditorAutoSizeOption, ?isTextPredictionEnabled: bool, ?isPassword: bool, - ?entryCompleted: string -> unit, ?returnType: Xamarin.Forms.ReturnType, ?returnCommand: unit -> unit, ?cursorPosition: int, ?selectionLength: int, - ?label: string, ?entryCellTextChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?verticalTextAlignment: Xamarin.Forms.TextAlignment, ?formattedText: ViewElement, ?lineBreakMode: Xamarin.Forms.LineBreakMode, - ?lineHeight: double, ?maxLines: int, ?textDecorations: Xamarin.Forms.TextDecorations, ?stackOrientation: Xamarin.Forms.StackOrientation, ?spacing: double, - ?foregroundColor: Xamarin.Forms.Color, ?propertyChanged: System.ComponentModel.PropertyChangedEventArgs -> unit, ?spans: ViewElement[], ?time: System.TimeSpan, ?webSource: Xamarin.Forms.WebViewSource, - ?reload: bool, ?navigated: Xamarin.Forms.WebNavigatedEventArgs -> unit, ?navigating: Xamarin.Forms.WebNavigatingEventArgs -> unit, ?reloadRequested: System.EventArgs -> unit, ?backgroundImage: string, - ?icon: string, ?isBusy: bool, ?toolbarItems: ViewElement list, ?useSafeArea: bool, ?page_Appearing: unit -> unit, - ?page_Disappearing: unit -> unit, ?page_LayoutChanged: unit -> unit, ?carouselPage_CurrentPage: int, ?carouselPage_CurrentPageChanged: int option -> unit, ?pages: ViewElement list, - ?backButtonTitle: string, ?hasBackButton: bool, ?hasNavigationBar: bool, ?titleIcon: string, ?titleView: ViewElement, - ?barBackgroundColor: Xamarin.Forms.Color, ?barTextColor: Xamarin.Forms.Color, ?popped: Xamarin.Forms.NavigationEventArgs -> unit, ?poppedToRoot: Xamarin.Forms.NavigationEventArgs -> unit, ?pushed: Xamarin.Forms.NavigationEventArgs -> unit, - ?tabbedPage_CurrentPage: int, ?tabbedPage_CurrentPageChanged: int option -> unit, ?onSizeAllocatedCallback: (double * double) -> unit, ?master: ViewElement, ?detail: ViewElement, - ?isGestureEnabled: bool, ?isPresented: bool, ?masterBehavior: Xamarin.Forms.MasterBehavior, ?isPresentedChanged: bool -> unit, ?accelerator: string, - ?textDetail: string, ?textDetailColor: Xamarin.Forms.Color, ?textCellCommand: unit -> unit, ?textCellCanExecute: bool, ?order: Xamarin.Forms.ToolbarItemOrder, - ?priority: int, ?view: ViewElement, ?listViewItems: seq, ?footer: System.Object, ?header: System.Object, - ?headerTemplate: Xamarin.Forms.DataTemplate, ?isGroupingEnabled: bool, ?isPullToRefreshEnabled: bool, ?isRefreshing: bool, ?refreshCommand: unit -> unit, - ?listView_SelectedItem: int option, ?listView_SeparatorVisibility: Xamarin.Forms.SeparatorVisibility, ?listView_SeparatorColor: Xamarin.Forms.Color, ?listView_ItemAppearing: int -> unit, ?listView_ItemDisappearing: int -> unit, - ?listView_ItemSelected: int option -> unit, ?listView_ItemTapped: int -> unit, ?listView_Refreshing: unit -> unit, ?selectionMode: Xamarin.Forms.ListViewSelectionMode, ?refreshControlColor: Xamarin.Forms.Color, - ?listViewGrouped_ItemsSource: (string * ViewElement * ViewElement list) list, ?listViewGrouped_ShowJumpList: bool, ?listViewGrouped_SelectedItem: (int * int) option, ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, ?separatorColor: Xamarin.Forms.Color, - ?listViewGrouped_ItemAppearing: int * int option -> unit, ?listViewGrouped_ItemDisappearing: int * int option -> unit, ?listViewGrouped_ItemSelected: (int * int) option -> unit, ?listViewGrouped_ItemTapped: int * int -> unit, ?refreshing: unit -> unit, - ?textOverride: string, ?iconOverride: string, ?span: int, ?emptyView: System.Object, ?itemsLayout: Xamarin.Forms.IItemsLayout, + ?buttonCanExecute: bool, ?borderColor: Xamarin.Forms.Color, ?borderWidth: double, ?contentLayout: Xamarin.Forms.Button.ButtonContentLayout, ?buttonCornerRadius: int, + ?buttonImageSource: string, ?minimumMaximum: float * float, ?value: double, ?valueChanged: Xamarin.Forms.ValueChangedEventArgs -> unit, ?increment: double, + ?isToggled: bool, ?toggled: Xamarin.Forms.ToggledEventArgs -> unit, ?onColor: Xamarin.Forms.Color, ?height: double, ?on: bool, + ?onChanged: Xamarin.Forms.ToggledEventArgs -> unit, ?intent: Xamarin.Forms.TableIntent, ?hasUnevenRows: bool, ?rowHeight: int, ?tableRoot: (string * ViewElement list) list, + ?rowDefinitionHeight: obj, ?columnDefinitionWidth: obj, ?gridRowDefinitions: obj list, ?gridColumnDefinitions: obj list, ?rowSpacing: double, + ?columnSpacing: double, ?children: ViewElement list, ?gridRow: int, ?gridRowSpan: int, ?gridColumn: int, + ?gridColumnSpan: int, ?layoutBounds: Xamarin.Forms.Rectangle, ?layoutFlags: Xamarin.Forms.AbsoluteLayoutFlags, ?boundsConstraint: Xamarin.Forms.BoundsConstraint, ?heightConstraint: Xamarin.Forms.Constraint, + ?widthConstraint: Xamarin.Forms.Constraint, ?xConstraint: Xamarin.Forms.Constraint, ?yConstraint: Xamarin.Forms.Constraint, ?alignContent: Xamarin.Forms.FlexAlignContent, ?alignItems: Xamarin.Forms.FlexAlignItems, + ?flexLayoutDirection: Xamarin.Forms.FlexDirection, ?position: Xamarin.Forms.FlexPosition, ?wrap: Xamarin.Forms.FlexWrap, ?justifyContent: Xamarin.Forms.FlexJustify, ?flexAlignSelf: Xamarin.Forms.FlexAlignSelf, + ?flexOrder: int, ?flexBasis: Xamarin.Forms.FlexBasis, ?flexGrow: double, ?flexShrink: double, ?date: System.DateTime, + ?format: string, ?minimumDate: System.DateTime, ?maximumDate: System.DateTime, ?dateSelected: Xamarin.Forms.DateChangedEventArgs -> unit, ?pickerItemsSource: seq<'T>, + ?selectedIndex: int, ?title: string, ?selectedIndexChanged: (int * 'T option) -> unit, ?frameCornerRadius: double, ?hasShadow: bool, + ?imageSource: obj, ?aspect: Xamarin.Forms.Aspect, ?isOpaque: bool, ?imageButtonCommand: unit -> unit, ?imageButtonCornerRadius: int, + ?clicked: System.EventArgs -> unit, ?pressed: System.EventArgs -> unit, ?released: System.EventArgs -> unit, ?keyboard: Xamarin.Forms.Keyboard, ?editorCompleted: string -> unit, + ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?autoSize: Xamarin.Forms.EditorAutoSizeOption, ?isTextPredictionEnabled: bool, ?isPassword: bool, ?entryCompleted: string -> unit, + ?returnType: Xamarin.Forms.ReturnType, ?returnCommand: unit -> unit, ?cursorPosition: int, ?selectionLength: int, ?label: string, + ?entryCellTextChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?verticalTextAlignment: Xamarin.Forms.TextAlignment, ?formattedText: ViewElement, ?lineBreakMode: Xamarin.Forms.LineBreakMode, ?lineHeight: double, + ?maxLines: int, ?textDecorations: Xamarin.Forms.TextDecorations, ?stackOrientation: Xamarin.Forms.StackOrientation, ?spacing: double, ?foregroundColor: Xamarin.Forms.Color, + ?propertyChanged: System.ComponentModel.PropertyChangedEventArgs -> unit, ?spans: ViewElement[], ?time: System.TimeSpan, ?webSource: Xamarin.Forms.WebViewSource, ?reload: bool, + ?navigated: Xamarin.Forms.WebNavigatedEventArgs -> unit, ?navigating: Xamarin.Forms.WebNavigatingEventArgs -> unit, ?reloadRequested: System.EventArgs -> unit, ?backgroundImage: string, ?icon: string, + ?isBusy: bool, ?toolbarItems: ViewElement list, ?useSafeArea: bool, ?page_Appearing: unit -> unit, ?page_Disappearing: unit -> unit, + ?page_LayoutChanged: unit -> unit, ?carouselPage_CurrentPage: int, ?carouselPage_CurrentPageChanged: int option -> unit, ?pages: ViewElement list, ?backButtonTitle: string, + ?hasBackButton: bool, ?hasNavigationBar: bool, ?titleIcon: string, ?titleView: ViewElement, ?barBackgroundColor: Xamarin.Forms.Color, + ?barTextColor: Xamarin.Forms.Color, ?popped: Xamarin.Forms.NavigationEventArgs -> unit, ?poppedToRoot: Xamarin.Forms.NavigationEventArgs -> unit, ?pushed: Xamarin.Forms.NavigationEventArgs -> unit, ?tabbedPage_CurrentPage: int, + ?tabbedPage_CurrentPageChanged: int option -> unit, ?onSizeAllocatedCallback: (double * double) -> unit, ?master: ViewElement, ?detail: ViewElement, ?isGestureEnabled: bool, + ?isPresented: bool, ?masterBehavior: Xamarin.Forms.MasterBehavior, ?isPresentedChanged: bool -> unit, ?accelerator: string, ?textDetail: string, + ?textDetailColor: Xamarin.Forms.Color, ?textCellCommand: unit -> unit, ?textCellCanExecute: bool, ?order: Xamarin.Forms.ToolbarItemOrder, ?priority: int, + ?view: ViewElement, ?listViewItems: seq, ?footer: System.Object, ?header: System.Object, ?headerTemplate: Xamarin.Forms.DataTemplate, + ?isGroupingEnabled: bool, ?isPullToRefreshEnabled: bool, ?isRefreshing: bool, ?refreshCommand: unit -> unit, ?listView_SelectedItem: int option, + ?listView_SeparatorVisibility: Xamarin.Forms.SeparatorVisibility, ?listView_SeparatorColor: Xamarin.Forms.Color, ?listView_ItemAppearing: int -> unit, ?listView_ItemDisappearing: int -> unit, ?listView_ItemSelected: int option -> unit, + ?listView_ItemTapped: int -> unit, ?listView_Refreshing: unit -> unit, ?selectionMode: Xamarin.Forms.ListViewSelectionMode, ?refreshControlColor: Xamarin.Forms.Color, ?listViewGrouped_ItemsSource: (string * ViewElement * ViewElement list) list, + ?listViewGrouped_ShowJumpList: bool, ?listViewGrouped_SelectedItem: (int * int) option, ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, ?separatorColor: Xamarin.Forms.Color, ?listViewGrouped_ItemAppearing: int * int option -> unit, + ?listViewGrouped_ItemDisappearing: int * int option -> unit, ?listViewGrouped_ItemSelected: (int * int) option -> unit, ?listViewGrouped_ItemTapped: int * int -> unit, ?refreshing: unit -> unit, ?textOverride: string, + ?commandParameter: System.Object, ?iconOverride: string, ?span: int, ?emptyView: System.Object, ?itemsLayout: Xamarin.Forms.IItemsLayout, ?itemsSource: System.Collections.IEnumerable, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?iScrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?clearIcon: string, ?clearIconHelpText: string, ?clearIconName: string, ?clearPlaceholderCommand: unit -> unit, ?clearPlaceholderCommandParameter: System.Object, ?clearPlaceholderEnabled: bool, ?clearPlaceholderHelpText: string, ?clearPlaceholderIcon: string, ?clearPlaceholderName: string, ?displayMemberName: string, ?isSearchEnabled: bool, ?query: string, @@ -21383,44 +21071,7 @@ module ViewElementExtensions = ?flyoutHeader: System.Object, ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, ?flyoutIsPresented: bool, ?route: string, ?routeHost: string, ?routeScheme: string, ?onNavigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, ?onNavigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, ?selectedItem: System.Object, ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, - ?location: System.Uri, ?ssGoToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, ?carouselViewItems: seq, ?collectionViewItems: seq), - ?scrolled: Xamarin.Forms.ScrolledEventArgs -> unit, ?cancelButtonColor: Xamarin.Forms.Color, ?fontFamily: string, ?fontAttributes: Xamarin.Forms.FontAttributes, ?fontSize: obj, - ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, ?placeholder: string, ?placeholderColor: Xamarin.Forms.Color, ?searchBarCommand: string -> unit, ?searchBarCanExecute: bool, - ?text: string, ?textColor: Xamarin.Forms.Color, ?searchBarTextChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?buttonCommand: unit -> unit, ?buttonCanExecute: bool, - ?borderColor: Xamarin.Forms.Color, ?borderWidth: double, ?contentLayout: Xamarin.Forms.Button.ButtonContentLayout, ?buttonCornerRadius: int, ?buttonImageSource: string, - ?minimumMaximum: float * float, ?value: double, ?valueChanged: Xamarin.Forms.ValueChangedEventArgs -> unit, ?increment: double, ?isToggled: bool, - ?toggled: Xamarin.Forms.ToggledEventArgs -> unit, ?onColor: Xamarin.Forms.Color, ?height: double, ?on: bool, ?onChanged: Xamarin.Forms.ToggledEventArgs -> unit, - ?intent: Xamarin.Forms.TableIntent, ?hasUnevenRows: bool, ?rowHeight: int, ?tableRoot: (string * ViewElement list) list, ?rowDefinitionHeight: obj, - ?columnDefinitionWidth: obj, ?gridRowDefinitions: obj list, ?gridColumnDefinitions: obj list, ?rowSpacing: double, ?columnSpacing: double, - ?children: ViewElement list, ?gridRow: int, ?gridRowSpan: int, ?gridColumn: int, ?gridColumnSpan: int, - ?layoutBounds: Xamarin.Forms.Rectangle, ?layoutFlags: Xamarin.Forms.AbsoluteLayoutFlags, ?boundsConstraint: Xamarin.Forms.BoundsConstraint, ?heightConstraint: Xamarin.Forms.Constraint, ?widthConstraint: Xamarin.Forms.Constraint, - ?xConstraint: Xamarin.Forms.Constraint, ?yConstraint: Xamarin.Forms.Constraint, ?alignContent: Xamarin.Forms.FlexAlignContent, ?alignItems: Xamarin.Forms.FlexAlignItems, ?flexLayoutDirection: Xamarin.Forms.FlexDirection, - ?position: Xamarin.Forms.FlexPosition, ?wrap: Xamarin.Forms.FlexWrap, ?justifyContent: Xamarin.Forms.FlexJustify, ?flexAlignSelf: Xamarin.Forms.FlexAlignSelf, ?flexOrder: int, - ?flexBasis: Xamarin.Forms.FlexBasis, ?flexGrow: double, ?flexShrink: double, ?date: System.DateTime, ?format: string, - ?minimumDate: System.DateTime, ?maximumDate: System.DateTime, ?dateSelected: Xamarin.Forms.DateChangedEventArgs -> unit, ?pickerItemsSource: seq<'T>, ?selectedIndex: int, - ?title: string, ?selectedIndexChanged: (int * 'T option) -> unit, ?frameCornerRadius: double, ?hasShadow: bool, ?imageSource: obj, - ?aspect: Xamarin.Forms.Aspect, ?isOpaque: bool, ?imageButtonCommand: unit -> unit, ?imageButtonCornerRadius: int, ?clicked: System.EventArgs -> unit, - ?pressed: System.EventArgs -> unit, ?released: System.EventArgs -> unit, ?keyboard: Xamarin.Forms.Keyboard, ?editorCompleted: string -> unit, ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, - ?autoSize: Xamarin.Forms.EditorAutoSizeOption, ?isPassword: bool, ?entryCompleted: string -> unit, ?isTextPredictionEnabled: bool, ?returnType: Xamarin.Forms.ReturnType, - ?returnCommand: unit -> unit, ?cursorPosition: int, ?selectionLength: int, ?label: string, ?entryCellTextChanged: Xamarin.Forms.TextChangedEventArgs -> unit, - ?verticalTextAlignment: Xamarin.Forms.TextAlignment, ?formattedText: ViewElement, ?lineBreakMode: Xamarin.Forms.LineBreakMode, ?lineHeight: double, ?maxLines: int, - ?textDecorations: Xamarin.Forms.TextDecorations, ?stackOrientation: Xamarin.Forms.StackOrientation, ?spacing: double, ?foregroundColor: Xamarin.Forms.Color, ?propertyChanged: System.ComponentModel.PropertyChangedEventArgs -> unit, - ?spans: ViewElement[], ?time: System.TimeSpan, ?webSource: Xamarin.Forms.WebViewSource, ?reload: bool, ?navigated: Xamarin.Forms.WebNavigatedEventArgs -> unit, - ?navigating: Xamarin.Forms.WebNavigatingEventArgs -> unit, ?reloadRequested: System.EventArgs -> unit, ?backgroundImage: string, ?icon: string, ?isBusy: bool, - ?toolbarItems: ViewElement list, ?useSafeArea: bool, ?page_Appearing: unit -> unit, ?page_Disappearing: unit -> unit, ?page_LayoutChanged: unit -> unit, - ?carouselPage_CurrentPage: int, ?carouselPage_CurrentPageChanged: int option -> unit, ?pages: ViewElement list, ?backButtonTitle: string, ?hasBackButton: bool, - ?hasNavigationBar: bool, ?titleIcon: string, ?titleView: ViewElement, ?barBackgroundColor: Xamarin.Forms.Color, ?barTextColor: Xamarin.Forms.Color, - ?popped: Xamarin.Forms.NavigationEventArgs -> unit, ?poppedToRoot: Xamarin.Forms.NavigationEventArgs -> unit, ?pushed: Xamarin.Forms.NavigationEventArgs -> unit, ?tabbedPage_CurrentPage: int, ?tabbedPage_CurrentPageChanged: int option -> unit, - ?onSizeAllocatedCallback: (double * double) -> unit, ?master: ViewElement, ?detail: ViewElement, ?isGestureEnabled: bool, ?isPresented: bool, - ?masterBehavior: Xamarin.Forms.MasterBehavior, ?isPresentedChanged: bool -> unit, ?accelerator: string, ?textDetail: string, ?textDetailColor: Xamarin.Forms.Color, - ?textCellCommand: unit -> unit, ?textCellCanExecute: bool, ?order: Xamarin.Forms.ToolbarItemOrder, ?priority: int, ?view: ViewElement, - ?listViewItems: seq, ?footer: System.Object, ?header: System.Object, ?headerTemplate: Xamarin.Forms.DataTemplate, ?isGroupingEnabled: bool, - ?isPullToRefreshEnabled: bool, ?isRefreshing: bool, ?refreshCommand: unit -> unit, ?listView_SelectedItem: int option, ?listView_SeparatorVisibility: Xamarin.Forms.SeparatorVisibility, - ?listView_SeparatorColor: Xamarin.Forms.Color, ?listView_ItemAppearing: int -> unit, ?listView_ItemDisappearing: int -> unit, ?listView_ItemSelected: int option -> unit, ?listView_ItemTapped: int -> unit, - ?listView_Refreshing: unit -> unit, ?selectionMode: Xamarin.Forms.ListViewSelectionMode, ?listViewGrouped_ItemsSource: (string * ViewElement * ViewElement list) list, ?listViewGrouped_ShowJumpList: bool, ?listViewGrouped_SelectedItem: (int * int) option, - ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, ?separatorColor: Xamarin.Forms.Color, ?listViewGrouped_ItemAppearing: int * int option -> unit, ?listViewGrouped_ItemDisappearing: int * int option -> unit, ?listViewGrouped_ItemSelected: (int * int) option -> unit, - ?listViewGrouped_ItemTapped: int * int -> unit, ?refreshing: unit -> unit) = - + ?location: System.Uri, ?ssGoToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, ?carouselViewItems: seq, ?collectionViewItems: seq) = let x = match classId with None -> x | Some opt -> x.ClassId(opt) let x = match styleId with None -> x | Some opt -> x.StyleId(opt) let x = match automationId with None -> x | Some opt -> x.AutomationId(opt) @@ -21661,6 +21312,7 @@ module ViewElementExtensions = let x = match listViewGrouped_ItemTapped with None -> x | Some opt -> x.ListViewGrouped_ItemTapped(opt) let x = match refreshing with None -> x | Some opt -> x.Refreshing(opt) let x = match textOverride with None -> x | Some opt -> x.TextOverride(opt) + let x = match commandParameter with None -> x | Some opt -> x.CommandParameter(opt) let x = match iconOverride with None -> x | Some opt -> x.IconOverride(opt) let x = match span with None -> x | Some opt -> x.Span(opt) let x = match emptyView with None -> x | Some opt -> x.EmptyView(opt) @@ -22191,6 +21843,8 @@ module ViewElementExtensions = let refreshing (value: unit -> unit) (x: ViewElement) = x.Refreshing(value) /// Adjusts the TextOverride property in the visual element let textOverride (value: string) (x: ViewElement) = x.TextOverride(value) + /// Adjusts the CommandParameter property in the visual element + let commandParameter (value: System.Object) (x: ViewElement) = x.CommandParameter(value) /// Adjusts the IconOverride property in the visual element let iconOverride (value: string) (x: ViewElement) = x.IconOverride(value) /// Adjusts the Span property in the visual element From 6d4f4d644a0feded75d257f67e22c3e44903abb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9=20Larivi=C3=A8re?= Date: Wed, 15 May 2019 19:16:02 +0200 Subject: [PATCH 17/18] Merge branch 'master' into xf35update --- .gitignore | 1 + .nuget/NuGet.config | 1 - .paket/paket.exe | Bin 64296 -> 69928 bytes .paket/paket.targets | 28 +- .travis.yml | 3 - DEVGUIDE.md | 19 +- Packages.targets | 4 +- appveyor.yml | 4 +- build.cmd | 3 +- build.fsx | 11 +- build.fsx.lock | 686 - build.proj | 18 + build.sh | 5 +- docs/tools.md | 7 + extensions/OxyPlot/Fabulous.OxyPlot.fsproj | 1 - paket.dependencies | 23 +- paket.lock | 629 +- paket.references | 2 + samples/paket.dependencies | 1 + src/Fabulous.Core/ViewConverters.fs | 12 +- src/Fabulous.Core/ViewHelpers.fs | 5 +- src/Fabulous.Core/Xamarin.Forms.Core.fs | 21943 ------------------- templates/paket.dependencies | 1 + tools/Generator/Xamarin.Forms.Core.json | 4 +- 24 files changed, 683 insertions(+), 22728 deletions(-) delete mode 100644 build.fsx.lock create mode 100644 build.proj create mode 100644 paket.references create mode 100644 samples/paket.dependencies delete mode 100644 src/Fabulous.Core/Xamarin.Forms.Core.fs create mode 100644 templates/paket.dependencies diff --git a/.gitignore b/.gitignore index 384928387..f4fa09d1e 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ tests/Fabulous.Cli\.Tests/data/ samples/CounterApp/CounterApp/CounterApp\.args\.txt samples/TicTacToe/TicTacToe/TicTacToe\.args\.txt +src/Fabulous.Core/Xamarin.Forms.Core.fs \ No newline at end of file diff --git a/.nuget/NuGet.config b/.nuget/NuGet.config index 4e552296d..dc1864a2a 100644 --- a/.nuget/NuGet.config +++ b/.nuget/NuGet.config @@ -2,7 +2,6 @@ - diff --git a/.paket/paket.exe b/.paket/paket.exe index b98e000b232408fe0a21730e88f89755f0d7a68c..9ddd49d2fac706e3057c68811789b1dcd6bb6d49 100644 GIT binary patch literal 69928 zcmb@v34D~*)jxip`^-EunQSxJCM1C*ge1dc5_S{>BX3_lSY@{ zlT|&Ay}^lZu4<2WciX*H>k?H?Uw2h!ch!tVtyP=tjzm*#ZeW;Jy?CY&^9@r}4!LWM zTiP)(RAd_?g?Ja7fZ{I9GlZxDUWF%FN4QjW0}~bj`m9Ad__<#(P_MNY3K8Ug>8B=@ zwD>sJ5Q_+h-qMs3&>ssCDaLcEA#(6|GRF`Vc>dR)Dk1zC!hX#I|10%l-y{ zG_EV`&iquNHcd{_X$O;SgN>~8ADL3@jj2seqRWOL*-AE(55#{?lAAV=Bg9DZD?VhK z6kahlF2q%L3HVNm4H<4_q5lFDj+A05&kuVyuw$Z9{!0QQ^jk%VC9@i5o z1;4@aL}0R&Eqyk!S<=Vi_7vbz(p3vxs7lDR?*%KJF(56KLFrc+AX_-nBaWgVln_b| zLY9DxfNaS2M$nV29Dgk6b6`=AU54U|j~fj}iEsDW=t#AV;kw;l1ajP}G=!BbC$sx0 zB?1E)aS_vn=24wt+>X ziQS?pg^MoqggmioANW!oSINs z!uAZ(vU}aYURRS25|qM00BAbW}s7@?sJk<`Wf(F*q#KK(&%4G;Sw>2_b@De1e+W^TdK(iky3@{^2k)6(Q^2m=6gh@P^1~0 zfE7XK4@i4DAh|oRyJKKAYpI$ukx<)DDHKo}A{b?|qvO~(8fO9#_w<6haCkLWzX&(gc+(|X12{A|d?H_>S_c4ijm^{EE(5)gO zJA}sq=|*n~CF@{ez%q9wV4jTCNs6)o>$p|#HV_5khFGq&c9MwQg5+os>p3e#5SY0MBWyOQ?)P-dZHq^7!m2$&eLUXj9CZQj8K=6Wx_)jj*o~HCP=OG=@i_eiHSItb|q>Sp{gX2Dl8BF(O|8 z#_fn+M)gN;iLAlXihe`dC@J9F1rwY@06ZxmP+`FlK$~OfY1wVSqfg1mT0DEvuZ>zI z3a15X!#2i#pjIkT48TC`AR8T2#Ywn^)`B6KM2n-77Z{P{P#FvPEE`P+do}>Zq%RuT z2qasx;r2);Clp2f$#a0!Mm7Q3U4(}1&3Ir8NrC$F$JF&Qxn4)jx}yTtcas>82NDVf zg;@pbsXx$i6OA7-8*`jLq1q8t!U{)CJBsISn4;EUFb?am710Zw#byI9*9wH~AXj6ybEZf1B$L2*NU!|}%*f`zfZ5r`3Ox|% z190|0X!jOi_Evyg=R(kKH@0*)z7IUNJ7wKg8}=%`m8D`&q338(x-3m%+$HT@f?VKz6Q{eI}MlwT-?ywO~)ih`mLYUcQz(eo1BS&9&jmz|Cq#i8N9w zd{d6~J_3S(86lG+c@?b(!^s`+5(Xq>EPE&L?1p@df%AanAfD{P6Xb3@8s9ovT3{S6 zLCwl_oJj?Bcl-|#6%(ll8tVmO{2bLrvz&rFT2WFNkuO0N5Q_OTAO|lX=J$gcXc)h{ z09Ci_J)p9E_W5|k%6;|)csixfVDANHUr6900K`wuXEpwmVzd-vxLnlF{xW45iYzLq zU=MU3%8p431L$I;A;c>rGMfBTq+&4oIqiaB&%NMc=ajqzvMhpVndi(Qg)|O}a*oc! zMvTTlZdURu5TdO|WEAL}qoc41p*;v{7I-BqW@Ra?(Cd5!`Q5P)(w!cvgdhGeBIL7i zB53ozl6eQ%gc~tUk;GG z0$_I$gd$f03mmP;c4i~HYlP3f3Tze2j|!_%n$hs(bGaKi_d)J9o>LoOo{mvc46YOv zWCz9c`P$zIWaCivpkYR^s_k zD-o$j|F2p<`VmVDsa>W0Riv6WZAe$zH<6^tld4)g|AbsYUonPqXh70XH)!1K~V_!IsORecI1c?+yWTY-V`U+J^alQ8_*Td^$ER~2XZ zBNJeW&&D9ZivMUJ9h)t+x>5av#(u+O)pzNf0rNb6JgA#r%DLf{%feAPw`8O&iF#1S zQF3nS7aQ}<$~8c~U>|_?x`uit(ZZTxdXy2e1erNa34$&`C!zjGRVk)+ZnToOLP?Y% z>P3yfb;NG7B)5bc_4KvRl!5wEzxFiRjTmZ}L+W>s_?SOR+gs~{<(gtJ0tTi@ z#b5*sI88Aa0i)7oFak!E%U}eIYL~$X7(-nKBknjZp*B*}b2u^wzLmUUpuK`63&ina zFQynPg79L=k_dV#?*r9*fi@AT8Id!1lnQTT3d!S8XDUCv5lkDKkJQl zOZyHuoKH+>b1v<#yCmikufQUZ*Q?H-5fLIwkQGZo)B-0fB^)B7R`~L@94aegda~W! zh3fM0*d`#ytx>e5`UdjU_EQQS1T@h8gaRs+F&kxs;S1CLCWKPzCf;0Xe+!I&MZ3Xa zR>_UrflEdW@&J$Ai6kqmp2=^6SQ3tUik4sy&=}Ybou$y}d;+^oRmT{FbQKUituQ9^ zyTFRII-#KG@!5BS@Y(kOs@3?tz<4>#3)>v&!)_F72OP5avv`5)R|{Ofho;ql+&K)j zLkPPc1gge%jMsIOkq1cIg8;ioOt)QRDS1>nBVd3<`x8q#6H<8e?A*Vn=lbWI>h73}f>!gd#&CDBFPo<7lSrsvh4fKpKupd{Pvstkj`5p?B zk?#XCiui1a_c3P;LOUi$qZ0+H-bLSuJOYW`b*MD$d;>+ttxgn@e3bG%29QKMVom-- zpgEDp0iBufD6fFj=3}?w?s2(wMUfvtjAp9XIzAFCqyyQ5;Ms=={FqXG4KSCXD5y zR@w{V>~joYWD-EG4{X)6!^F8bt`SXn$v6Gh7T62)yqR>!--hD?;bA zv|>_0f!%8KIdQNXyiO+`Y2lDt9g_6n*kB9=il<4}Ip9Rq`N#!g5N@kx4LN)Hp0sY|_D9aF$HoA=!K|@)QpCRdJIN&5pUrFtpFSc!&D9Kr_Vx({Tx}00G4sC9|&h_dj?tDAE_0r9Ow7Q>5u#z zvL)F*HUWWx>h(u7FhK$aj!Zc6kASdfB z>Q1&x6;5mlPFAjSW=5tgo+cX2EVTOt;H#YBLNq$tOy<#$Q*$2LB@kQdTnj<&NRh)} zV3oO({gAFDIh(Rs_7Mm;Z$RGNLSrj|BN@y773K65_#(dsa#=4LPZf>zjxKsSbi^v0 zB}FI<9ZHviArGHgr=Nq6qmB1xMf$;N@Fw@*fg$g=`+&rXv?9!0m<`-SFAHP5`!U*g zQHDS$P;y*`JZ+7BV3R&Z2P!H=qfw=7)X<8pcDBL_*ZJ;lNYy@93BoS4qE(n3%2kzq zC^JXyXV%yGG*eFRvy|o>S93cP zhH#eZXetjk=BpX0pRFnmRn|@#3HI}7;8*W~Qw#ILh56P=o$@}2Hg3`G#(1}4of$-7 z&>2^f?mjvN5yPT>6to%R!4L{6Ke;7P;T)n|26t#42UH|x-opG)e$4L+<=HR5#-llf zAzvt@a1m|B{6U`)`14`hkH_Dwz$c=sX7XPIKL-pIf4t%j;8>L+_Hk6LNM41)IJzYN z1WeL7trh74Xei4_dv{=3Ae|)b$(+{Akd!8IZJnto+Y`(7<@k#1e<86UY%*mjD$Amk zJ0*H=No+g7b{X+59r^(Imtp48I@Smya=kF=5;!S zs;4I{-5CJ`^ORyR0>*Hc!3Y=#rAmSkFdAG2BVfc_1|wiJx(r6(Us^jph*rQ%7c%?u zvG@&GjX~$8FpgdS29QKuaPWs?85@%!s@Mp{UPBKY<8A5}_xH5aNm? zS%e^o(33?7aYc5r2*Jq9&>NfVqXR0sBSh=r29^mA6BJL|Vz@WNDU7xuo!kDMvWg;@ z#c^y5irmf=LACkEUew2ljTK5LR-}ZSf1&zXCLC31jTK530g)AD$`oroO0uayNh->| z1mz(;qj0xs#KKLnsu~kMRW$@(s+tw@xm8Q&R#j8`Unw@B9V;{24|S4}bbF0iBqQmj z8PhBy=~fssM$!SU>mVGLryZy&Umzptf|(WNJ%<$6qg?u^vZ^jeH(ISqin|0Alp?5{ zMzf?LTNP=)g7!%zZcQf=Ixvw8&^ZYmm`DceL_$>}h6MVyC2)l;swjq}&Pf~ToV4L) z`&E=4z{V=I|7udaY+O3$U<(!=Rf_G_iK*a^^l`H{6rUnFd}FSf9dRz`FByr-`hD2D z9Yt9-f~Ey-SaGqFW3HpPrHWgsxtPTvOID2Z@q*!$r9tz>RO2m5#~{}-(>Lfw`#ff5 z**o|t?QQ%-sNo$rg`6fg7%&0`0<;P!jDRuHWiUc#I@iIk)$phD9|{h?N4;cZ4|`Ib z+iu5EF;>dh$E)+(sim3cx9ZT1yMA?naY~WMF=>29W#;EUuNL$HF@lcm$k<1Ju!( zuvP1$V_!PVr8Vnwun)Th#IoS$#In7}V9~L%4lx+4X_gx|EKeiEduF+ZCkm%?QGP0}$}Z@_8h3`DL0pL)P(5~oRrk@YfiH4@B7 zA)veaPk>U1u-|B%dAF=*PGbuVwn)|RR&g8y=7tt|8G#)IBAc4Pc7GX zkA>qSAAsBVb!R2|bn-*sJLo2Zb54{{vZ6JMs~p zb>uUwv)Ol_s02^sI3euBPYGLHc|17*U8Pp;LTvTan!6B1JrK|uqf61O^l6$J!ICV{ zPv%ko7)MX)AB?20q@E;$5MR9ly_Nb!C}JRA!1)2{qHgZh_PA^iPNVoHpXnj)EyH~9 zvFdbgi+mpk9YQ{}&{w!+CSC+=Wp1U<3glqk~|F##hU0J`uZ zo7PfQ@Nt$v&fRL5YWbaUN8xNma>hM{nQ>1Mw!KiO?lL~}&VtIqI!a*0hV@4no~E1W zr{J4x>0Aiqmd_ip$hx0`hga)xkp44n52v7lF2IKIiq{_4p0*zpC63C{z)mc!;cLMs}lKX*)Hx+q{s&wReTo;r( zkDxv$cAsQ`+TR&fIiUI{Rx?K%#C6WitTSC@`nlF2PsuqYb~e=2g*;ix5ml$Y-Av!t zyQ&^Q#o!=yuX(o^{EU0A`89Fc3$CxO77Kr$_7&opKo;E>`JA9p7SVAj))(}GYP#pd zus~H5bq(jjft76o@AR9XO$(*H?!0)iq}%m>iCo#vs49IDyrpUTq`9+8?i1x=t zWHyp;5>0WznZ_f7FfuAdG;4K%p3nlsV@hOEeIUE?3bEjs6FihhT-J56>|s&*PH& z2i6K!06T3&2pM??gcZRmM8$oN*ae?dLatQLGA57o-4~!lzMVNA$Z=~H)v_FQukEK4 zTFW%R8~xCuDqjr7?!5yu&8AF2RIIk2QfTGTK)tI0yJh`;mPK#AkSW|glkrqGzXq#+gItt;+0`0n=FneU@E>yg8=jx0IS( zUlzZ_+2{ju8~kWGYg2Nyf#NYg#;blj4g_)CISRt$ zE*!I5iHD554(K)cop-CT#W@XmBWH8UXN%=HUw6eCqE2jBx;T9#h;zA9a8+SGPnfQ= zbkRPWqZ!5Xdr=q6^`Z2F5pjvkQ%Aw3T?{W_+Pw0N3YMt#|QkynI&!W!n z!K0CeWAaa36cL$f2G6D)fY)&z22T~2WijDY*6DJNmeo01T|&v=)j-N{ybSH2){~n> z-L;|&ogU}r$;{K52nb0cQ+p`IIb5mp_X1EYNx`Q+lvh z;qn)za<-;&x^|--L&-%tAA$>&k8Z>H7E``bvb&S=mAQ6fAy4m1g_27+pSkNQWQeSW zLHLfrP9pe}IZAb3N;;_S9W@5$0DEwwFD zlG*w$0v*A9@n*XW{U&w5mU^4wrh&G#xnI37zNwoGhFLCE3m+ zaCVN#_mPc7Si3D}?(e}>5f=+_Yz?geF^}5wq?mVNBeyE0c(JR5&K2Q7hq@?sPaq43O0GlWID8qmibfqucS0fMpMXcL$GYGu2(^3UDgH z;ZvYOyu@Z#fvUO=z8O>Ke446j$VyftVTUVl6$z9%lcR73c=(b~Ac6@tkdjlcmGPDH z@iG~~&c=!rE6WGO_=XX>I@qRs2Ucb|UxLo`uCvgu)BUMAgMF+g1=L*4k1vbhJ7POx zI`3hxfqAD>e0vr)@!=5Wddm0Nb3MJGo-qt?T|&Je$GH^dUPHn2Mb_+82LTM@XwzdHn;LH{>7C5&R*q>Ie-(2Z*JlXaGY< zFG$!ndcl$0jc?kqzxU9aCA23fw9>1ZLZ5aTT3D@LI4_(?RK^0Pe82*Rh48k$TEV!^ zNHv&huc=04qrvaR2Jj9qo%_y2Thb?eCgN>y&qTcH1umS4q*&OHV9)KrYh$~n)6=sH z3Ov%gYX%$1sQf3lj-UJH(%njMA1tkHs7@YpL*3T`10C9P&q% zW!m3^vZKT6oQkHjXOu^jqmSm+ITs;~*WmPC3&K2o^72GQ6?8Hl6}gxpu&>r$|0Pwp zDT&}_^?#8nJ=)}Nu=1jw2u$fcilDx>0!k1o@V&IBsU(;luxn8n?1T;vU}Re{)7O|? z;5lCG$Jzy7WU%Zy2x3afWcrwy>(5HoBQe^9i()LV@S>MVWz#p+RN3QA=N0HLvm+!n zKHqRYrs9S(WlH|;lDeQ94{ALsqNt{11J!H;)oiYrnsD_tFj`<@Cs<&X+z1zpB*9H2 zxX+OzC`v`4-LZf=IRO0a4yOQE1Uhl%F8QS@`i=~JAK4UWZ2mYUl$%#tQoa8140QvF z^7Ks@ba)%3$c#5??gO{c7mmb8@5#wO=1k`zlUkrQB~K$;9kR77f^WG5qU+rkM0fR) z?g+ly64ik{eje1!~UxA~1roeJh zoRP|xEq7w0@5%AueTQ(<+>*f2K3S|v^vj*wkVJ1;T6B9A*tG+sto%eJ?ftIn4Qz_&wo z7gd;|MPw?BqVFUav@a4E`nV@TU2)>Eb0=hCSS!E+dLe!1d7!h8=2^Hgs&grX02SMD zXERI$XnZy$XHpZN59w%BEjj2V&j1e#`ofWo!su#i=S2{aJ892me}pokJLJxbnMK<% zxf4wRcqt`+Ov%VW+bp@0c3Ji(nngP(x${b59VgZ-ncfdMQFLeesu`+_L;hV?lPp%y zgX;LbOa9WZjrV@l7x~9Rc-J)$QSatP;1Aw!cY`l?Qi9w`8hAM1JS)d?4j_r&6vQpY z+0Nlp2}ajB@1DRn`FbI`RPwSrhSz1u#YJ#ZIQpRaE`Z!g`v88EcvKi+Aw}`a>ygpq z!4iap%#=#%F-^%YlJ{?CU^;g77h@K>tw!FUR>17~6MvBdF$S1T=Xc_G1<8SX8( zqq0zZ0^eEUT;|+R@bVx_+*3$!8N(36CWb#R_(_o^ep79_7rX)S!Js3SC1SBl zYAi9v^MV(eO-g-?@k!n{8!XYu<$lMrH=HLPte;$wC(bUITw#gP;RhgpI>VCkz2Shk zvHtDafM^*`u%waTkP_1N^D>f@Lmu$X78g@Xi?Zlklz2tO1F&IfG2#CyCz(CqSRy=# za(y#Q@Ib{a!!1$E_B;z15VJ~1^Kj_5#8ZVN^Xd>PeP{6x@Y3XB;{Uduy!S`;-rPL$;he$b!~1I}bq(9I z3_gVCi>SVrhRO4P8AST4^QiRv7`5rpT(WKAusbRPViGJ5hz0EJrz;6hD}zNeD=xftl=Zbmx%Yw1r;NV=PIZdZK)+oF3BcKa*C*w z??IAA%Qj59G@=aAj}YIBRv*XI9#HQM-ZOX{Mx9FQ)>H^|P~22QX;~PLL|vatR0uak zq~-J~q6+ZMW1?C)UlC48a3d<-kL?-!b-Y4-I;S<&l4Kbu(sJ)GMbWqqia$0IRU?)N zvgMa0MAeFwoNrc`s5<=03+3ymAgUhk1rW76NK}(JpYxr;T1JUW#jVi#)y6MXQGB_A zC7%Q}4iv2+g2G{HjM&GLEi5?>XUnAX2PLls#-RpJaM~@=xzI9RJj2x121OlVEl(q@ z2Wh|Jd=D@+LA=J)vyj|~)ylhK4|EO(H4fB!oNpMY9?baI(IM?4&Np2Y8t0?#!-vut z(`+%Asjt-%b(W^C=d>??GOL5)2wHQT_##orw-~y{iG-+QYA;jkMI=LV0~X=we4E4w zmfQu4#)-{hG*izp)h)(mNIGIXr_I3!biu_CSTKo5SH<_cvb%U?Uv#dwG z*XJ$ozpH)=U}=ot$`XQA*`)b)Kb7TV5gh3w__&YsPiFp2j4xpLw*Ln3b5ZUnQI~y7 zUbQ$-b$ecjEgU7fitj<{qyFmwf5q?>AL0GJ2Laz>&G`&Ju&9(;)_)FjF7?SA(ZR=tmiey5PgB)rtolp_?aA4FI6M5c}f3X z_#eIntQI?}uZR6(>j*!;@i6c!8lFeFjTM{B<^9{iU*5ln;qQZlS49bShX~$PPjCq1 z3vvj5KbzpWXj90*&gK1wN(ef+1T(cQXUQL-t(W&J%}T?QX!qs)%_wEO==HvmS0X+T zuK`9(g6oa90auy-1`IR*RZ0A7geTt;UqvnjDQ`}GiMZbg0e;6U1N@4oET8x_!0!JvF6n&J+}=d z+`#C-T!U7CZFy&dlgZD-4-OieUoCFrmR$!AFX`U_pDgKL#CSyk;m1+>lK!KBuC?Q| zx7Wdj-{J_lL`?S*+{#w1^K8gpT!kQjaX!4R2erOQQ!|Ea&-aMKOzjh$HG5#$V~B<% z`DpdN{A_V?jiP>AeN%pph#($O+QF(j^7F)6O}#hl?);#*o2hF>e(l})1!5Z_EJ^-q z*!S{_#Bb{q^eAoj2s)`E_C}E$@-KTYjHl@ zD2^%0f8DTbq`jr7Zx0KC`n#rHh?NAJ#D|)CJys4%#z^Ny{z-KexTOndYF^#LIGZTc zR03%uMY*Q>kTy~b(^P3i1y%?#P1ROBEJulPZocvgF7YCK37#41q6T~F!iiCJdoKf5=CyK>P?GtNBS=&BeGlNLh*v8&dd(tTWCi$H8)g&-zIuf zQ(p)@EEkFY)zovPt#YyWx2BGkVr9Y?on*^bgB4ie`Nt^B?higJmxz$2CgfD${fa@F zYRP$6E)_#HHNN_mV5^8~YGL&^L5mx&pQ;y!Ch{W`=oD$V~w?B!sG*srPAW4{M=tEP5aZv+$KUZ$=U*_CgD`caCyQ*IDH z)70;a-VSaQze`bf%5%h}6LdpFoCmTAfp{7-PJ=+e}&uncV%=i#J)dR;SaBX)=nGqM99}%f+Lb`gWjIULl^))Z>95_7%@*Y9G?B6whnw z0Mf1$$C!H4IInzu=qhnwD%JfdQChPkbhRjLR#bQPLs(Bd#?(G>UTAsf8gXPArKxy* zt$0aM{x`y{@>=nlrrr$)(ZcU&YH?nxyiWW>Q>*fV_-?>Qn%Y#cCUm_p>3|XAZ%ai7 zs2ryDiRRGe&^~cDQ_9Z&8BqESV($#fx6l8^@MP!)@vx@e9ljgXW14z(c!M8DS^Rm* z8!jFx)6}foYm6Jk(=4fKbd&fUQ+xco>c0}YNxZJ9i|elh^%thzG)T+M!atLgUL*>_ z*N46)<}>xCK{{^{8#Hx8tX1ABx;3@9w#9d=*rKVyd0!3PCi*pXc5YC7U0kfG*4*nu z-w;=6DqcELepBq%R3}RKmbgt*J+W(yZ;QJ$wIctv(B0zun!2z!i1po3O}&Hp;a>5M zrk-Z%eWtD!hr@SOMyvb=QX8n-N z!sjV3`7=$CKhqTX^Km5zN%H5R6h;30af%{;K9QoxpHHSJ^5;`2iv0O>iXwkLlcJ~& zKTAO*VNT@4|`t{6>})xMVR|v z3B61xK2PP+D1KEDpl)q=J(Q-t+wfMJ^1fU8x6n~n(pz8pUg-BJsvAEj@rM+(H}|8^ z>n@eME4M=YF-6To34au4u`N&esq{aJE=?)P?M%Iyr6l(#tNn4<@<;I%O_3+w5Z7pm zJn@G3s-kG7EO=8q&(xFR^x)q@Z;4n78StbS7JM)Cwir8?s6C=DC#&EuV(mPY_P_Zb zh29l==PRlhKg#xZaUD~8#2q<*3;jc6EugfE#N|07<$I!>Db%Y6Ppx}Km zQ&R^U!=M&wimd*pSgt9u`k$hWDdmZOiS?QyPy9=CGDU4WxZq!+pD9(N55%{a+9OJ$ z-R6g4>_W0^kN8cnRemJ;HFZ3PsAHO%Qd3*-kvM%3Nh(i#EIe2w5k@6MOrwG+r3D*9{;0l$w;41=l9ur_OTL*!JyjrUa=w`SP*SX0!RVZ*zO^YLgbHF7mYtyyZ6Xo^<9 zgNz}XqSfypqh3?A!YwmKXo^<2Wya~6qE%(NF;!Evsw_8Jn4)%=QBYxQVM_Iv>H)1% zZS-@R>LJxe(Q>j=wb4-H-4%)=ztkEBRw;`7QfJ)36qT^3px*dEr;&FXjQdxowZx2{ zYKpXsFkWCv*)r1ji>9dEM;ae8rAF~c!}A5wvPZm~O=;(8YH(c;)GJIqDae*l#yd=@ zQ8ik(3R!00r0`#yb^*?KTYNY-Tthl95Tnc%-xwpPDce|8FxE(FYMt3pFwXdrrm97Y zZ@h7trv4;be5V;VYU(D@U2yt<@+KJH(rJewIblHBMB}>|X%mennNn7tF+lPR}Cb**Q6!DQpF8Cs?c&@#pNP)mMSjFbb@&NM2&s625w4tCER zknc<*rqgWsrGhh!{Y)u4rw)*uYJ6Qwo+Ik5sm9$*k>~OI#KzN1y=K&5NHrVcY%1?H zW8d%!PHCl&uHms#V{v6VqPMX=k4z?Jb=alV2@3G2cfz?I&Db?pmrl`T81TrZJVN z3q+*mZ=u;nuckgl)R<#jrm54g(wQ^B&KBeAI&Hcg zQqD8}!<6#p`~msq8&+K4bAkASXQZ5O`&bKhv;T}9r}Y$ ztjeM9xUT2gDGv`Vk;s*U7B@r;c86`nrCoKwc?6WJ$vD|4#h>%6VrbuBm$LUJHW1zn+~hvv!Rb255J!p&(U(lI8qg3|vLw~r#mNIE z`^T-_f8+DI64Ia`^|VvvJy4mJQ93uVRn&W>NMz(n^YK4|WTfI-ozVO>=Jb`5opZSV zD1IiqJC}5R2hb2tGOqMz%HYBaGS71~$XAwdEr@T3ZR}wM6-UW0=JBZTGRTf|OW>K5wNhkSa-yBCr1H6nA#1pHbv)uW0LSmWa<9m2 zI~p&zA?LB9QYn%sjtevUhU!a7|L5g(%WAi1B%Z8O<;}E2mGXQe*_o;T9atzu9$WPU zM~O^p>p0dC$F(+7!^x7Wl#?w#Sk#E;^d3J;#T~x_+8yO_#N40csFA$e#dPMem`g}-pmN# zFNAl%EIePp-_P;(2CdygfL_QFUJV$)t<1HRK{0`0Gs6~!OBk+V7-x7Vpdq#!1P94$ zD~rXQ#ssWG_w)KQN4$vN^xkiL4=c?5#*0{47KsZh$BSxtAy$&ZA&*EbKg^p4cwhcv z(IQt4-wcbdF8Z<<2F=%j^Y^+N!ATa~BbG>i$wPoMioXZWwUv(nuBtG=IUaio-xZ4% zRRCUFc|@#|Pvp!4|IyfsA}%Lc@8TCYsjRpx8~$(6DSue^u{c*At~ZS(@?dSY@e)#l z;OrU}GR6X@a(_`9H705N)%;aPi#$8J-IyVqXgz)-J5+SJv0W^;t}!Y^aQH*8WMs}w zz=!306R@&|tX&`d4)h1XHiw=Be|h*>qglRy`Yw^BHAjqFalU)ZxLR)Vz5%$u z`p?FGc|-Bvjrm;e68T82M{XDQ)DDs@vL-eJ_#3q&4fH*#@_({Y3x;`RyDo>{88ZNqPM&wUz5KZ`Y!NChW-n11a{MR z%5L0TF5|kdVb~&1kJXqR;un))0f2$m2Sdr(+u7OpDPT6T*S>p3vV$|TR_w6Q)qqsS3 zSe|!}`E+%$ca^*#wqNcs?-*3(z1n!Xy4rh*d2e;ScfU!|;8w$l;@sXK&##i-s%rF7 zpC9d|ez;gX0-H(OSDQ{oci`QewtlF^6{ zmlzLQ*Lt5ZzE`>5`-t%vj;QvE$8wG!R)mV`kxD+i6V_gXae7`kye)rAegk9>JSR6nQRVZ4a2|m4D#9jxD(krPSjM3)26Z zp!vLKXaJz^Gwi>%iK-C7(nZ-7tkl=ZPe)}0trRn`%+C-#Ya3HIQb+L8{7K$^c>DJJ{pcZ9>DADG*YHndvuQ?g4~tg*nnj*L zUqyVr*BT|?wSH_F9^xDk(UPaFo4BSe^4mpkS*zsp#XcWN=K1c>{QUYG;k~Pi9!5LP zC~oi(J_)d}qy>@>q4c|1@?nOLvBzlKJ>+{%YgitA%W9DZ^c*oZ)&AOd#Q0}0&-%Nu zBl{)b7=ymQ8&UM|w~fl`k9=<%cZa3_5%IUea{nQ;NUNLyJ?P0OvBp2ja|T*rknz2I ziolQ5-V2+*o;}U`wm~;mtK`StQT_?29nC3~H7!0w`0z++n9tPB^*77x(s?2e>$JE( z5BsBw0CU9EfQSfqxw(j8DZ?t3nJ?yK`SHHuX23Ogv&)ZJcq?FsI1lhSu?M+42I=t| zq_e`f2%IY8TEJn({eThUS-_Za3~;3JDd1QmCy*yjH$s4uj1s`9MmgXNVzoj*uj2NYYcyaH`2V8Lnj*XV}kh55oftZ)JFp;UR{{ z7{10(cu0@Iu!>J6L8BS-omSH=?euft?Jizc)hPN|3$nXh<#~8lG@O6g5%Ox^2 z8CEf@W>~{;D#K=m(;2R17-!hda1X;<8Q#wD5W^=JzQ*u%hK5BYnha|gHZz>g@B)Un zGQ6GP6AWKtX!s~^HN$3xafW*s9$ zF@_?Ga#b;$%5W{ieuf7a9%Lx8S(4$CIh&AcST4c-T89%`Iv0Re;BXdL^=VCaO z;fy@WwU+UIh6flPWO$6B$md)Pr!rj2uwQY4l)9E-Kf?nI4>CN)u&RJ$rYcyR6yu84 zmJ+95!7{=RFg(cc7{jUx&c$#o!+wSbh7kWC!>Lt-uVvWJ@BqVu439As)g)8Ja4N&K zii6n*Rxv!l@F2ru3`K-es~FD0Z}_jq?@--f++)0Kf62+2gsw^Ok3_ceZzx_h#=mypMPv_rBo$v)96}x=ge#wQjJ!VSUFsY`tua z@=fzC^ey+b`#OEL?|k3IzT13<@J8#KzW04O{&D`v{^@=%c3t?zNko(Y{tu@@{2w>P zh};#}{ZxXg#@AAY;(fjve5a%id!c%~liq-sHG)?5_?_D^*h5Xko@ufWcuV~o*u%Xa zy9;np-Ti>u84j-?{M>SaD~CP|IE0}X{uuCgE1m>wtRuKQn_ydrB;P9~{NW(s3vvi9 zt$rHtPzmAh#|{IYZ@mC`-;kF8y_E#l7Zcnad=;>#gf#p(K=3(+pN0wd<`dje@dv>7 zhra{(>F|F7-dz6?pwozIYndN3c!BT9r4r9$T;=5on*|*I2QTm% zK#84XF7R4FiMGuLUJoeoOK9{>hT(t`En5h@0Z^iii-Au8l;TYE2}4W;#3>^Bg(0Q^ zN--U_7}y7v1D^?73^5B(;vM};;Bx?_Xn`#Te!r(0_&nHR;4Qlv;0s_2&Vd0XRtNRK zR{=_li{XGatT03mpcLndM&J&h6iM_&L-Ybl(T5$nA+`WYu@!w2XLNuPyIlJ2#tuL! zc8b%0W4#XieC*{7aRH#j+V>3L7XnJ$mQM!$Wk8&lqOJy3v1bCm9CfAt(Q`UD*8ocK z1Zs)%LqLhWka+=6ir?TH3x;?R zP+~Q_0{9;QrFb2+H}DR^D&TM6ceSK=6Yt>k?y-@_ZwQoJwP0so0_G8njdPXLz& zee=TvlvqP`0`~&q|1UH)0rvq)tg1Ex&jOSpV9<9%vH_*YHO>XhGm?N|qYtpu*a|oZ zJ9@Ofu@mr2V;A~FudD>zBC7#+$Qr=&WG&!sykCoNy2#;x=gS84ypgy+y&T>cY%DM? zGCnYJ&2n>rdBE)RJm|U5d(8WZ_n1}UTjT5V{g3Y!-y=RxKgJ$BX&|1c&ym4&2AKXV z@;{A}r4xDTJ39mACgZ$&pxjFTl{j-7$Xn!p9cRWT^4f5MOux%zq7Ei{s)>gY!Z6n2`DHGb-MvWqDR%ch&40~&LmmTj|)YIE(cPD2#_U2}1L*M2^cW-ja zI#==}O`M-Kk)jQW-nQ9^-i7v7&cdafSaz!DF@!;SPCU7h#hF36+>~kCdtmMS&SWp8 ztK<{ZjZLW=N7#b+Hde(1sbXYt+({-qjnr=I8Qfs1X z{aHO^CRG+HT6^P8@8bBTMDH})?oIYO@tz*|LZ>c>cXn&kElV4sxhEE-*(;zXEio^# zT@$(&kNU5BF(f(9xHe$v{-W8;{jd6q&M=iC*C(T87;>;&^ zf>B~tUw8Z3QDR|VS66&pR|06u%x;WT$E6lI9q6|m1DMV2)Z1D1+&=WI-tE)v%{_5+ z@QnPuHc>R>@R&4Zb6eZ2&hB_u*LGdY=B}>!o!yD#l#aHx(W6C6ckh_d%AqhD*ymJL z%dyzWl|rh6fs=5ijDu!X!_flm4AH*C;&`XCcC?t$$#sZ3+d*(MqSP^;Tk06Has1fN zmie5daiVoj^Ju&k?iK~?b1FDqY(V@wYuT*RDFZr}-O+~;BxcN9JagfUnG2_{YMa%9 zw|3_&o!NTU{AF!3mo8njv<*cpZCN zii^$3cH8OdTnFXtuFQ11t1H1iNjA++bSIq7cCj9vgDq+4;K%en$3YZd5bus}NOUaQ zNNz^bq$yo(ZJphny`Ax{6mwBeqMJIiP#iHIGlE#u-P+gQo=7Iw_ob!@(cIA?nv)zl zIz&4~kPfjT-q}0Lb|`M3*K{U{M=oheE_34TiJ9HhJ&~;krF6_pw#R#jN-j%m?y;S? z)7iDXWkWY2i^?^#E8dd?K0V&up6EhPKrBuYL;EMQ?yWtEcGRPD2a*>iw$ASBL1eO7tH^;j>urfG>9BOvz1b5m>EhtVdV_Dom7dn}b!O@=J?sak+`oQ{x z^BIZLyE-w1PtJseOz$ZZX0BgPabZgWKVE^UdBgUT^Ugw8Ux$(L*%FwT*V#!-6sO1x zKdW)L*s-^rLSRK=-O|LleY}J^l>o&B9)BX4!ibk1Ea}t}c`AU2vz*R(o!uRR*BVXf z#YVzuYUxh)qI#UXG=YV0dqT7%X}(*~#9b*BS{n5`DH)9ntW3ag>sz9f@#dV6~^NUH73ZJoWGMovf((9x1y5Z}<* zjwvJ|Hm5M^-OO4KWHY5Lv*+7e6HaS7^{%8Z!V_Z~^*1 z;hXhyDYR`#ERA=AhYSiK12e)Mdm@wWlaFU%XmdiGS3|DM zj7|q(&~~;nW73o{ZEaM^Znqw-ShrA3)MEzxxC|YEt2jTN>{aoBIAq>H4s0CAa7CJV zt;Bk0DMia=Yf_+wCsumV&C@ zx)Dovv0@|E`RNrA@DsZlZ8iopDl^h+3MSo5dMm~}t|0A!Gnv!lJ-vNUNETz0L2C>* zBqS9#9jw`D8DwX7dskma0vx@iW-Tgv29x}F5>v&R45^fL8N8l>nwKUJ1-fAt1zw(y zG>yEeG&RSiT$m9$np6})jCHp2j*!jGT#j)C2QWG^7HgDG1qwCVXKqWlZa&NDqTWog zNTn_8>)Ev7GgGH;OkkSs+k7ek)P)zn>pR;iTJadmRG;$GXQk=^sT(`PI;^z>MPqbKhc_a~*pW_}kyzKaVFLx= zG;cs`NwZsev5m!$rI|9Z02>PohIFc0SqvF>_8Mu^Ji|u0*TH! z(k!=N8b!L=CnvUaqmG;TfGFPenNl+n$#$ockId34u;ENN7#PXroyksAd6}I~Q$Av~ z*o4HlsS~Jlx@#MTdq-b;Z#n@zFpd*BC%!$+)AJV3g1w#VI%!XzPNi{lRuXX{(ba{% z*G^3|Z9BjQB=D}9ra8>3m`@c+37C@Q`g>RvKDApIt96S(F`*3o!#hnIcZo{x< znjA`#pis*R!P87rX2fesY=a)mQ`;7;ccYftYGQvT_|#(Bc5*7_GUCkaZnqiHdp=#` zCfy(;!ZCV9-03C)o#s?$PvR^bSD1Sy3E!{Yu~yg{|cOd zoLE4cE_Netzf_!K9;ydFqqnVKvbERl*~-{5yAN65&D4P&4;QovEdtzS5oz8iuot4W zk!VjXBbY>M(CBn=wPj+eJF(T}s)mLuQXPpj^$?)eouBC50F>R7T+s;>i)eufM%e4l z!CaHr#FbG8ue`Ef)J^M)F6^p%X~3n|d14`rk1kg0ZZ|n|im-dyX7fUcm!ylFnRM*L zA}3C2tVHchIbEZA6|bo{?_A+FUYfKZe5%-~H}gqEy@3q1q9k@7{&>#pg*}_e+iv_v z`w~Y@^wio!Ex>Bn*{%t+JMrL*4H$v=u~GFTZz5D}c6)Klq9z)LbVPyXZ{pJU97n9D z$y%Y**3DfTY(&wGn=wChZst_#ap>xOo5etv5jh_UX+thN$uFzTQ-LOpOOUv`E&SSO!iJTo$RxkmNp+$#c73CXZcq zim;kmWu7YLswQ=dA{7HR3S8TP92h>3(S?a5wTej<=BnJHj=@jej;c5I_1ZKOw9iPi zr<<7Fz-w=`w?N#1Z7I^NzAhxAVs1I;#_1~vK@EwaJCLakY=v6U(y3XizE!~Rp%~+; zTAEm|4*_XM9ZZXuP1}Xs%Z|N%4YBeFl6*oMxi5G_la`ZSCv9!5|hAX)bqP8>ftYI6*v7 z8@#BlbkZqUV)HI2&7pC`9p5!2ky1mwi%6NmWmH4GNaqjILsueAk69x%W8w2UZxPD=v<3~ zJ2O(dAEtIB94a>6BU-x>i5@oDJ*i{6Qv^+0g1ds-#a3?aYQpa1T$g5iI_||BF&+C5 z1e(n-l2xiBK31qv6-bwIKN8Cl+Yo%|pdSkfekfn^X%Cp|=+IWHQd1nO(x^V?)f8Nl zdFq3ang5CtT4&m8zIVXHeZ+5*TSnRtHL|ihP!XUPRrtOD(;Z z*|ct@lSSgQDRiK$HZb5U>g(<4>!q{~{Go;Pc^SqwuP0C$+87}rMN%*3gI;cFg%J;; zi46!ybYI(rY_y;~kq5)Mxmch*lVGiMPOP*t#`T`*IAFRLX4q-CojM)FQkN-Bt{9f_ zlk^%?`FaZOTd;WMOSjL^k&*WV;U+qh5KZm;NcN^In9&)>nOYK4O_ImbG8?Cui1v1O zM-tnxjM-;F0@F8`C#;JpA|aeOx@S`++IS&W(XnBYZf)o?B#E~GHiG2-k;$O*;B+Dm zi87ClRG%2ok(=BtDV%~?b^{KdxXtyk3y~-H{w6gpsQpQxM?cx0Cmr%7x$kAXm7q2( zd;pjf3EsVE!fg#cgiB%*67O)YD@7N^Et@vIFNxVawM$}`=(_?zL(#>#`=m}$Q}+qF zi@K+)Y5wL@$hM`Ki`KIrFvq8}pu)5tLk&|q4%O`LJkM1~5oA%uBH%>7WG2PaYX$B{ zr@r&xx_m|wx|(}6B09P#va%w?JjQ7#x;RzighMTNk)9DnIa`9_DPw3we#S}jq$y+D z+Ily3Cb51=og*jNyi8h!jZ6-?M8}s*Hd%)`@)RlU8R~gEk|a|ps&nT+cNw_WWv&j^ zsli55SkuzPhQ6-2Gjp4}(eP@H%?;R8%&nW zq%lfTX*2BJ?zFiX!yz@>Vs^v;LwBGZFzxg^+dF%4{xk!(+NdWD4c-RN>D;h!e&=RQ z!7{o+6Rnu;x)O^VJ^lq9)2FFfolYi6hR;D+xY85L+^2mOUQxgjdkft(bt6G7iqZ@n zVVvd-2xw}G%Z!1vKvzkmUR~a*aK`tzI7~=ja3;`4bXvROw_=z=-%34dQm?yO58wh1WyJ@!j}z3rxbnHiv5KO*avmGgv8q(qQcPV4xp7C4i?QFt z8z)ILYO0O&J$CvUfv>fxQy>U%5$P8dX&`1$>r!tpaPZa(C+WQi?D$4c$nX_;X2Ry(4ipnyg zrl!CgkrV|H5QP*4fo#DD;ix2=Y>MXffN5%GmR8#4(x#SKTIs!IrlmJ6+bvsM%Cc-z zORsvn=I{Hw?-^#!0b1_w-hco5`CXSeGw<@e&-Om=^E@;24xN&2x=)M13$+LfBs{b+ zRouWKYcvDy1(p>a!0^XiVD4zrmd)Ufz5ASbF52KZcqCwknyUpDSW+6lv;gsQj9LT> z<^j3I%+*p2@S~rp_@AX(a<>bK%Cfr5`iZTIc`)K$47A4Z!qsOTT6Lj(smGH={6WRq zRt;IS)vC1AdoUubWwaI)h~ceEvoebtoUMzCoGP|0{Ryh~!x&78tqMIkLvdFN5H&b) z-!6;8g74~L82m=E{>)2rpJ!F#i4vrZ zP(wU}O7h237_+piin2=WLVfBZqoNw!NK{xdXMj>QASGSo%xft@l*Ah$J;iPayStDV z#hda1COEG$8o|5WB(F9YQA0xilnf&aXn2$nMDMccUTt6#IK*m39Br}?T#YBhr{YQR zIy|NB#5)pBLGX*gQ|mQ&gQ60jFr)J-oY&!f3p&Q&-OMu7;;o1Xsw+V)5?Lslj4S#r z2MpBu)-f1>=g7gk5~J{5L_XeENW;4iV{w*;|Km`egTEO#D{^0_<4WjMjM0#RVtBz8 zVuZav(Wn*pk0dLe)2{?p^gD^+UJ0CK28BvEhBBVmpM`f4X4BgxmSVIh z#ke`Z*@-r|e}%VC>M<&DMhG1NI5nWvsW0uE)55!}SdUu3CT<9!91g)Eyo!N4_|Qp% zn8)zq5QR=z7>6*X_UUL{B21z7UG;psig76q?~;rK4*I%Sye~!^Y^h^%sn$^v1L!I( zT%yDmKDtMpIR==DI5r4k2a+z~Q4XH-E25$t+!3RwPJ>CkNJltC$Q}^TDwtXk?J?kC z75_c5w(oZUG<`vwlwW zBkESLOshB|`Js0uTzczc*(3iBH=&wOJ%^;#& z7|-dMg0fmjRO6pE7l?Dzx&(clm;3=Z`g`vVc&eF#xf&D zHFXo)VU`TytMI~DB}85Yl1drsb#4gdC?N(Bi(9Kh6_nm{6dPXULSW1U#*I;pM+;(d z+d>tJJHLi62*Ay1fq5w1gDnqHn$>?R?}ONED`wGDsAGLi6!P>ZQx zgPLiRpTzL{{?h2AGQ=g~9ajL=m~iOr8K_?$N#BzuxoX<@lx;0R88Xn!6E^@PK{Cv= zFmSm|29|_tJ!HZ$Y}-iwI(`I^^oL9apSEpbsmFr6oX47Gu-V5$7n8)u`I@a z)i4nzBoodbGS@SpmujtQ3X?%~7C0me+3dFfvmpb^A?FR@RmNtfI*ax6ahHcN4 zg5>7Cln}1mi6EWk`m8z`|63l>!dQwC$uwzeTka;1F(%1R2UfhC^RX7? zWti7w)=OcoIS^oYmPTz*nqNs_AhrfNE$RMVMfjXt#vY74(@!m=Nxgo`4W!1*Jw?& zsyd~|QVS1~uqvfuCT8m9p*QZs+4$O8tJfUWZBl0~GSwKf1e~JzPdZI#rEkr?M z3r^&WXl|$XxW9Cr1sT%npw2RNe6kue*VNUVMvyUHCB`S4Pz!9P;#YNbRqpUWiYzlZ zXS4>=JTJzPLK@9RwZ=*9sbb)*wVVfSSu@fn>c#CE%?4V_$U2a`RcDUlP~Q?Zk?Y?9 zc0%w~u@idgp_7dw8IUEUBguk%At7~mJ2jdmC;P-XrdmzSd4?oF zlTk+OC3nIJ^=}__8cOw^e+$wYYMSRSBwUYOh-&fvwx?%KWqsjOra*`)YlcGfm&3or zR-lv9!Pa`UiH^w!4ERqG=(Q)tB>E)S18irWK|E;snM2tQ~qKqlLxu;>Xg&ey*GH= zM;G@AW{P@*Ze*5K_-ZUglAH|lLedcW=vz=ry}6)8mnH~niMQ-oMg_SL9{&o-hv>soT5s#iI zGtvhdB(sbJO?D1h?MHfE1Jl9HBpF_zPg_9;pTW~WH4mE@X7S#pOoi&{h;qJC^o?vt zU(Y$I#>j2LPf2Hnmdv#ZIR}{X;Lm%`dD0t8l=RF;YckN>w3CduIpvO@JIYTV;g%L( zHp%q2-OCeml4pZ^ZV3Sea9l^>|5)twF-8z_$AGV`F>Jl~k*;bEph_hVJm`v+XGY7^ z(G2_cf>sR%=^xoK?&zu*s}7>s-w?N8Pnxr+$7?-hWL;aQ8C0%w+w_~c*5uR@r)>#A zZ^X!aWI?TX9IOtQ%~(;zl1#|ng8=eC$v3Cv(}}-i{&=ifhMH=$slhdskxxWsfwv)} zL^a$eB+s8}I8!tut}YV20ILdH|B#!&6J@>JL(*RF08}TF(hUb!3hw;+Kq3+x$}97UC-=sA#>E*!lxNeHP<3yIKEuV|U;&z54UQ=!B# zGPt{3FoJSuam4pFX$^ZUl+*$nS6j9dz?m^`oOZI8Xj6kIFYx_3j` zTEz^wy4vzt}iwiN#8wwW*R`issz%c!tELB+QBBA%+xJlDS zLjT(K`u|ctnyqA>NIC1UG!cfXpQiVJwYzY9o|R!{Vi|)cUIm5Je8RS=BSWn&gC01C zsx-zh8^RYzak@4!G_OcaFp!da-e)2uoCNHNdu=Vjd@<)Ek$0X2h1ICg=oRwRNx)5a zd$Q7&9aTSSn6snuP4(PJql8?|qt&J)Uv%2%mFB0nA?Is;Kg8dtK`Gj%&x`C1w>RpEE zUW5=)t$ga5qiWC__w`^v9-sSDdwWX+6*Cq zmM-#82z7eKq%G^9Stf2Fgo;e`;W4P{czgOF+&R<~M;%X{_cWGfUr2?CHN+szPSV;z z;SExw|NL+?3uu)mm(FugN_yziSnATG&MQ8v8d=u1kwW{D--d^Tdbx2kwxF#rl^g9}3U$d{~Exdk=cY#$SKC2mUvC^OL>T<_GuIE+s@ zB+5yvqHS+f67*evtf1RjA6(1+2(&cQ8|#jB=vEbZuTx>?=ou{4H0w&c@tAKk>Ubih z4$qe9eNG|D+xhpZ4^?GbfRR*<5xRNzQjN(7W}aZ>I$!6;k{(~-UY?r2Y+b|C1Kb~{ z5a`!3ecYH)QiEUsk;8CCKDLXBr&gZY{hUv|9Z|qsD;C~-MOl>PpQZwe>o~xE9 z;de7A+!X!PkQI(giXPYY=XkrcCjPemZE(T0G9Rj-W*NyDpcNC3{$iStUr8#XS7yA= zgHrtyVr0DaaqGV<{&mg$e}@`p0i_FRb`cx6EJfEcqE}T0Ef6NPpm2&WBHp18_sc0* zB$1IH;@v`ZhSbo5FIIfDCvSv51;Yi#J$N!y+$@Qc^K~fF(x>J!xS#NQV9|2M=^!6M z@10;0PHS%*Zw2S$Qg(s#MSY4$^{Vu0+nNu(;S6#*;b*0)6!&Jdw$@AHo2HqbOEbF( zlhGc|nj|P)$Fs%s+=-T1)ZJ<PK-x&9J zh}5?M+@O?(km$XbPlqj-?l#YS%EU5_nv6(?9>OidZv&0x;F9%DGkRzBD8_TAIpR{# zo5BF>O@pzq3mDTb(l9ORO9t2Jt_T*D2CngVf}UDuYj`f$MN{sFWz$ePw}_2McCd zkX-vs7K7bx5=6TlU!}0y?M91emn;@3Bov>Qwo^%HP?l&72oyysiA3*29E~>74uEKa z!L7jp2D`>!H<)FE7#=1CiUzeIl}8Gw5Dg3sE6}uCeSszc3KlT50gz}6v_S#Tz^IbN zBqc|L24&;i%71(WQ05?dqzUXi!ETX7X@b<0z)%nOlNn4_;!opB6L`-~fd&IZo7EF$ zgj1wwv$ZtwqcYyw&=Kf!D%B$+!DcNW-!~W5F8G{FiY!f|Ra*+ePE53p307zF{! zgb|8KF5%%O0gB0nbdrveE{IYi6JZ%s*r28gtHmhImKvqmAQC6D@mUlD{Sp%zS%=vS zWIb2#dO!v>z814xDg&{43(NT63>WP5#cBga_t1oB7Pz*Hpz9rlp`f`ys9PF zUMU%-OLDy}xel;aO@F2zscAdu3uYBKyq9x$H)F|ODo?dRN!@Ay+@%UqOe@VCE7#X+ zm{x`NwMdd{HE{hDZS1gtl52O6>kBDKO0r5}xM2TI7^Ff-$=!@7anV?4h*{Ku^tqb; zcCh%ej#ev}X&@00-=rj)#S9yOk)0u&WuYC2@Xu?#$iP8x^{OtPK8+#kAou|pFLXloz$Cudg6_WR9Q3@ll9M4znFqp30ktF#@fosHR;EEL{kZRsy z+yW}D_b@E1iIEW|B^iRC8m`ybsFLdhq{w8|97Gap4)vk=FI7N)pntrT-3}81`57Qb z{B+=QI*U`np;#)W#hO-33#>{p)z&5x?4qPQQH=73ciCl4VCn>B_-(#|Aja-kW!oMVs$n$wr3SP+P zqbCu_7bCx3jZqP?K${Sv0Gsz~sBKl5tu2;yIL_h-_-3$W+SAJ_bU z-#Dd^pgy(oOLuQvcm5H0XnNCDUe&eykHASYD{ZHs2YDm)TVqzG?SQfUkTtUH4r&B? z*)LbC0Vuv&=Ogtq`ULeb_!xY!Lc$54A1tUQAIWta9o86ptSBQ-5sejJT1VklON~^y z8%4u-t&P<%2L^@HOg>mVagvY!h4`OI%@{kuu{MnT|RO3w$459sUw{r@o ziZy}9Ld7fGVC;Y!LIsED@G!1&=;Q&MB+71<0p#}egL472a2nKuPJ?<_DAWgbR$Q?Y zRzUs_E5L~_AcnP|9ftA9@4v%JNaRbdmH6-^tL5b{)SZqOqKs10lII>h7 zjxpfrxpsmuD!>^vLCA-r6hdX;lIuf%tkQ7IAs$E?c)|zoXCOSu87JqJe%bi&`vhqi z(-BjJ_o=sEMz5xKn_tZgA2zKql5uTs70ZaZ$5S*o2zhkQB|(jgPQ!mT2{Z%%(AMM1PQX_$g|Id@In2kN!?^v?Nfe~kwF17$DVSL~K9?&Bd8u-#`T>td z89VP4Pj=SG*k4PI9g~qSPscu?axLEtmz9pG#~vawc1fY{XVl90R)&n7v1DvnMBnSd z{?g7`Od zGTH*t@YW=G?&_%90Gn-0(wBWBPu-5u{q;D;J|Qad@j^NyZid4e~+^udML6y90LP$;aeDdA@x`%)HSJM%*K#^8n3^tBVu zZRo2@C(@Arv448li4*+KP&${@E6-m=*ACxY#&5MHcFK1mY^%Ue` zo}K@D^&i9m1HR|Y)W8*n-yA`3c_L57Ou%F4t;?yMiw+)tc>5`>s<_^TVR>CDi^2km zVcmZg7zg0&D!iWW9Tyd`m-k2DO(^=a-E{J2+MsAJ()9Y@6jqCnn3cLO+&{xv*;NQ7 zu@|vBTFhb*WEE@CgZ0WsEu{!*5zlJ3zBq`dOkcskz|ykZ1ApeEHKbQq8wGJa|2qKB z$l|36;U%OOM7%FYuWHZ@F?tys#vQLz{3j$U1Vqijz+a_zI4G#a%_mA{(2gzcy^TPR zJ_c$pTSNR*utsX|JmYMt_sova`1B=lk{I3QrDrtghUyp`iJJnj(6U7BKO^9N=MwGV z1_0h@^qtHgk!0vuWTJ>a4k|E{coiFWth=0~PUEV4psRmw{C>zXi|nQy-EO7F;p%kM z==mt%nF`_+B_Fi5-W>DhR}x;<7NK3<`xO0hKY9@byy+ndU-M~-D?vE<{EnoQ85QMn z1OL)NaiI(xHF!pJc^iIhcJftGG6%qO7E*sL1CikUmlJ>;~J|2L{atp95 z_OZCSMh~1~6~e0$PDgTdb|W@M#kQa9`#7=K&p0}cL#V642F|pf{cpsle>Cfdv1{F1 z(LT1m zKB7r%9%v9vtA{E{N+(@OfZ}Tuh1I6D2A808)Acij@udTc$mUuGsU7R!<&Lg`9PjKLuV`D0=T1ls~ShHt2? zM0V=nNO1IzcPQ-7wYW@F1}ce;K?9WdE3Q?VZdOqR-Xqf-U6sxR&KfMaKW-&wV{3GL zO#vINI|3CuRa$~ApabE1siTV$MkTi3p!BiXV~3BG(^F-(Wwo=^ak_@d3wEQ-R36Uj$D7--!aIcW2^ zytInw(@($RW19Nl#pb%4^x1n>KOZ&bf??WaPoGRbICpX8KfVmOXXd@%+<*AdhwMYb zhlkZKnej-cvY)fU9{%k4!ZANDxjcVn&Zz@`d;N|tS2lidxN-RhcgO#1pZj9;j*^c3 z9y-*!>!#$#zrN?4(>qLoUnXZ}T#TCH+&Sl(m1QqQJNzeBK33=yyFFF%N_1GS?~niE z9U*yS?7D69ubN=`B)C)0%J3t@148$2{rHjb4QW-vl;)N19NT&L)UC_MkN(!WG`iax z(S29=ryWmQwtU61lNWtHOnKqD`|^|Ir@z1P{gE?wKkhoA+ifJ? zw(*{ToE_))`5K_T;zLbml%~^6B_g_;!jz7#kdMAAtqZw7BKi4n?AmJ)s`DpY(D#vWb!EaY(%MR0r&NbidFSF!z zOg?ml!M5O=VPE(te%m^Z`sCyb1-_T|43%OVwtVtN+Q|zI<3HVMGY?yF^}Q3ObzC-W zv9syxsvj4g`>A&0Ghgoba7on$zp*`k-1g~#L-i}BG@ak@(%Y_Gue_4DaOdClK3M)i z-GvYDIX`ySy|(?=-+sRHiKCCKdgaue-HyjJ_S_qN;pJ0H{^7?P236cRt>7v>%lu%SX8+qJd3U876a(g`i+hrfL$Z&) z`OIcE&G7V8W`tmK6wL_rSCm2VFiQ!E35hU5KkD!sp5d@Foiqjco0S0$CBYE@ddMjG z`{WhRsH$viF+~2B(ay5!nPrn5onh|L#MeI%AMPuy#U9NsuX4)qF))5tDw$Me^H0V1 zBwk+CPsVn`NIzaCjtVEmx(n!3g=PE~ z!1`62_iR$g$e%AwJeE6e!{N8aCT8C8#Gu=h$HpAG%JlBpm|;m-=7v4Dk2RJEY;w+VsEPQgvu^ zQ}W`{)eBy_Zo;sa=W=py)<;AJ@ ze7x$r`bnz-tcxGrI%Me9IiH>Wq07vXGrI?sj!Q1Ot1-C$x!jNkCw_bSx%>N!_{*i@ zQyH$(?qgp_N$h@PS5cS5XS;2jM(vV)3`_3~Q~b6{xR*qp+q z%z&eR-?QtmPf2Q4{0~!#{FV+He?H>k7xCQYHH(|TsmDF6UY|Q|xU?wy@84W_^u}#( zUN}B#d)6D0&gvyQXPJ+GeKBa@$!EKLU0yr%!m`1ids;n<%ggEoLqj5ZdYC+;66E81 z!~9Hf{`oZ6E7(d?pfZBm$)*$~SsCKv&m4};4$&YQ4N707k7~{gV#f$FXSGuR0ve9P1HMWI{d2gbCLaT8s}^)z%JU zM{L@SPt&8Rm+@ity62mtN3QBSd-&(4o_b`}^y}Y`So?b7Fbr?B~n=^yP;wy)UgEW7mafXsrsr;V^ZcTb$N&&;1< zK7O;;j?bUjHejwCHRl%j`>nR`W@Z;nJvYlTqvGy91J8{1zc~2X1FQSxRKHvKPUcTH z^nJJc$+=(o%x;i2eqMcb)I$?3a{7bMIX{Z&-J?= zj{AA}#qh2B2W--_%%8l;c{+pmul34EO_{-t)*Ebilx6tFGRsHEsrC5!7JZeQ8SZ!` z0j68^9{Uf%w4Ss4#_fextjz%vZIO{;;Qd>w^ZolI{@03o3rxX|4 z7O(x}Z!aqw_V*5}&)nH~t#$wNiwhQ?d#_>X;P??awJQqG%)4@Gfa}op?{B}jKJKNS zXD`h7;I^W`UBe5KmL@qyyjK0BWxeg#rk!Hd(k|UUD;o6i9_xgWTjr*oiWLTi{8`%2 zc;~qNw*<^OII+*ee^R!0eRgrpGnqde`>NZ8>qk#)yw%{dYR&;a)q>{2f@XVI(C0V( z$&mc_M^7i+ykz6|gI0X|VgLT`=`3iQ29|vP7Qa!PuSj&w{6?$d1BcNd3Q9Y66b)sQ zO+h;!6HX~wLs66|LrGUsSEsB_ozGyjtyWMM{$auzn?bxG#gO>&_viNwS$NpLBKzsnW9}TgY1g2Brq_3u z1U>Fsvgz@)9~e?zuj>4A^7~z^%P;jjxPHN7eFM83z3*vDbeG)l!S8)~!gt5<9(9`{ zXLWQ`c0ZY)8#B)ES-sUf`t;V^PjiJmxBRXA`@rE1<8M5DEu@sor0k2QS$^N%0>qrTI}-)=qU^zEJ%l|Fv%*ME|y7r&bQ!}HGUb?4?~ST@Zp z>*ZY9XV|SrW)03wT)Zx-x^ZJgn!NT+|8nEv(feyH%fGyK$zao8)~>lJ>a~)=p^v>6 z+V!zU@{Ia^@n)4Nx`_JioLy`Zz3(A!z#`!Mo*!5E12R?pF z-na1U-hb-9r1OzknemYyIL|-1_x#+DWeu}S-&*poGW}Dd?WL^_nsZNY((l!mP2p;J^kcg zCKq3toptniWp<(K*zt~uqaJfKn-IvFDh;BjG~MwB``m`sF@csWSzWCJ>XIY=4hsA_ zw4gWwj8D&<_5NvLvy!mphZ8CD;%?ryZ_%6+5%JZp4OeCby|(qnP2Hw{ zRJ{D?`g46V6L;mEJ6NCQxMBaT+tMztF1vPC@~0Ks-kAUW{Yzrv4?ZyJfaU&u0bh*o zHgDUUI>VQbEgJge+po>Nb+YQ&-R3*~rp>9+%x#bRM!cLZ4}7Om5a#w6 zS@!5XrZE#by^<|0=-^*-?Wm2{jy&;o&9So=Pdz_m>FjT3f4%R9B*&^p5_Z-E+%WNA zq_fC>{gJe{Z(HDK>MalIclKT5wjPI99$s~BO|v0gX*Q&2-1BiX8x$1vV;Z#n|JR&S z>s**lvnC)Rq-N`&M}93A77=RHQe$=muuRkdWspO042XAJ+e(c#SG{m>q&)qD*UiS> zAKsSs*V__aJJp67?aux5`zIQ=oecD8uAWdOWpy~!aoFb3%{MBuuM4Vw_4>Ep4|@B> z>EpJ4GEP|a(so}zX?;}5^}B@e+g}uxTwGnDhxL%U55zr}OeP7x&$MS>G!U%zABW=iK+#B=;)o zQaGx^`X0kRxanZnWqG^P-tBSM*`{S{R#@}jesI!PpGDkYd>}M%-a4NHUj?t5c8_cF zty330F<{xZU7Jg~uYL4XkL1c{`X-(q@TWZ|E=x0w>y#ip_d`bD?Ik}BJu@!uOpX2E pt|!l4vF_##C!-4%1wOp!wHGrSK^xZIe&d9DS9Ny26|sNV{{RzcFX;dP literal 64296 zcmb@v31C#!^*?^zdoyp6$xcFsgg_>Qgvn%)MGzE`071eI0YO~CkPI-If)8c)^OcaJSPLZ_3LHPSm1Twh%2fEc)m-pWEQ| z_A*VN9Ah%k??4GE>gEse8RoKq-?^%6D!rL%GvJ@Os0aP^JOks}cmYwN{FnaJsN$v) z$Xy|2gT|zUfbbeoWHdg*2Ib=8#Se%ogzvuuVWO-I)-2$QGVrFp_>Ml{T`vHjPR0to zGk?NF8=Ksu+X14|4P#@WFJ^LyHRd+C@h%69tSjrxHlSCB@y#1dflh2!{IG5&`RUYC zhz4#T*v=$~%e08_{U=a7*`&E(f(AuC=YB|tgfNLUjdraIT5r&5%(Gp1TyJCy==HWQ zf*H1R%z!fopJqVVo!KZyizoZ2S`DQr2`P5ai~z0A@kd|y$&(=)*?6 zQEEF7YiIeH(YCD!da~_&pR|i$G&VYfuiFi-UBk`n(8luFtmv5kCs}5Jf~& z5!^U_sNlw2MF}|zrG+yIA1*ZPbsO1sVMvWsu?7LVObsAPZ2K#dYm*c3+5{X-JH-8FXq%7& z-?F37i}kC=C+4Kca^GUcJXF;*=GIznwxQ9XYVf%H;!~J6v`bBR&>r1%6o$t0W?FV= zz2!`RMeLI?rJ$)vv}}*+Oau)+Wzj>>fqyKw2A%R;2OEl0HWFGbXi#c?s-8Pi_7a-Z z*O!}vdJeH&3 z=Wr_6WoNpjMpToKGmoY0S&v{@(-^AVvkryBcA-Ib5?&Ro8Q_`-e6=2?A8*-e0H*C; z1c{M4usE2#pq}5`GP@DP>xQS<+H>;YZi>>~aE){Wrb)*QvdoQ{f`0j}Y& zQy)17c+LSB)wZ1ilwS-)$-s7GLh|wR)y~Fi0&_3%QmGSkpM?5$BpV7uX0iy=`60>y z37AmYlGPf?2TdY^j9#rTi_n1J9Yx7vXcV-q-H7Ktv!T{>WxVgu`HcL!N2x zVixB(R7Xo>eZXIMn<+|;)-p~N8Iw&8%R!D|^$=7#SkNd4Vm=PzLFWV|ZJya^OW2Q^ z>^{LLjm28N2l6qxA~VtqT4TBU3I-gy46(qdDK&42oW>)AU-w2S30;Cg%XAQm5b$kh zKJWvaNw zmH;|S0WQS~F(S)QlBtAO@%Z5#k>&Wbqqmw4+%D+802SP~0i2aU5e8QAhZQM?%Fb$( zqfeNTHhlJB12bwA>l)xSA!jXrn2PlzE|)o2?<($rg%vI`lUVU^>QP1n((Hz!fbC$2 z&ElM}3ooDS$V1LNRTx0Hvtj1h-w1wpi>2@e;IT3vB0isqKdPdwTW4GJH zJr8gVX9D$mph+fAIrDS~57+G3IJkOjx|(ZvrPa&&A4N_atr~OOZm5ymjPlv0-}xTY z$dN#hn-y@jfEw8f;C=^8dlD!)X8`26cLDd@*w$|R5@?<~W#3X0@+-QXtzu2F??6e~ znF9?-IwVpQ`LLjspM90qe4zZyq#LQzFffHgO>VJ|dI#X$zUYHyXm zvm<3(wi2|97`A}$AVEbW09Jph3Q#M2T!@0o z9OD;&4|Xatog|3C`WbshVd%DlGXNHv(~pmau>ofrK3&B3US~T>&JG4U0T4f>o!$5( z$7qwLK^}}#WI1PZlc{K;f{JN7-^BPDOdAVm7wQn=Re?7*8zEj|FjQmZq0cu!4VrfH z9PkPYqGi6jo(1wcEXh5v1j#wCfxPVGZZH-5ihPlyfae~VQsiq0AkWAA24Bo>u(MUE z*zaD4_TE}3(oPRilm&Yjm;jTeQ}6_JTrsJU#xL<=Dbd=sG?ruOVz(-fdMmS&dmw&* z?WJ@_j3e||6vAAdiz;UTAh{P{PYIYJpFt^jpd!azhvuFV0p~oBRV+V1cB5%ULziLO zfE&3Ff$tWJljVA-r(={!<0`3w_28Jk6m+&X0vSw??8)N2*$yTzfYci2LO|2GC{?zd zi&N!N=d)7Y2UuIx=zGes}?QHT7Y;A;+wopmeLx4K!xM{d6z6rFr!$tt=%yP!y;c z49XLxjW@GHkr}XRX?k>KQ9z3-HnU5;T923&TA!Px#yIshGuxJWyCFNJfb2`lVNZBZ zQTS67lAni`m@60@>%TJKz*<=TVy%X3j8}DMXL0(5aEysS27e%!j?K2pZj_(!+OI!e z`7WPVv4hHw4`a(R&BdYhYeG?Tap`2UH0r|`r7nwOrw05)W|H1x^ZWA!(5)}X-Dz&DxpVJLPBW0Ode{A)WoBSo}U&> zZgU!)Azg^$ObeCf!jdOIGv{i6fO8FCZGEwH;S1%}XQ$eE?xgxW;lxir{WPl~1W$o~ ziLo*T$ySCONbM<7z@CClP!Xg60@5`_kOBxuJQP6+AdL42QUIaSBS-;+ut$&r2vr_I z3bJky)(CEey!K3t&kS)cYMYWFL=gXNa}*sOjg4rm&6y$JZ>W6%%_z0=38POn^+#rN zGhAQHkxzdF=`e6RGFLtWkwx;ErR4RP&KJ>fBn-fZYSa0WhoUb(As>_&=6;No&v_^g z2;(y+1IfFQYmD* zdHK|9sWBq>2K5jSCG8M4?yrE<(B@WwDd5}$B;ec(sIu-`P?EG)64+cbfK%oQSfC-0 zl`V;EmP%x^e9l+FYVNAW=n$&D1_VPBJrJ5?Y-Z$tSlX=syO~YT9cR1PN!=5mfE`)M zGvl_V%F)yJOaQOQmE#Oz^VeB;Q*sqp2e>j?zGotTj5i15b82J_s>%-gN)H>+dDwbx zM}x}T5a-f%G-{@bsk;0zsXDK?T(^sS1C4d{3^Nm(qdCTxsm8UYS6ZCeHi8Maqf=E= zg)9^WeMcEMXDiC-BG`(26P=k6#GRlN;eR$wHIRg19+Q=DqG0$P?BS99;Mh}xK|9|@ zspPO7M<>beaJ%mUBw-?44o2=^!kqvCmC~9Z%k^CZ$pDVVQvf5!0^}moO*3cleS^Kb z1M=-%44p9WhMYZ|H%B(29MyCL4_jnuyq58N_;o|XU5iQd(g^o^JfljM@VHP)Wfhu= zjKS7LL=&%w&|^oo0OYy%LqfLm8WZm3VV#arc1Gg>4%fKBwUgiD+Rdni1M)cu`Vyog zXM?lY4eQixkaIjsY6fpZ%OLxGAEXQxlP|#R$k7b$LDhj!(0wUmWH_;`L)`(2@*M?6 zPU99)2>l`dF$um+WxNK*79e)Wyxt2T&V2xKWt+a!4Tf^GK4rGdUj!3v=en(EnHBi~ z8kFV)LP>FeEqw5`-SaYNx&<3q zAKi9|UP=&?9e69I_4bTL*%DS8t?YWg`xfY`WvCclnChRCCbc(Iv7Q^lVL3&4 zYS80GWwgjU;&|OeCZ9fkD9O2=KqAU2Zy*`?}B z+`Qtn=Gn^8R2!Mh6EkX$Eb26fvUl-Ha2~+~zl7*X#rdJ)0(+QKA^_Ws+qAji4R%8! z11TLLM^Qoi#5iRCe-u;Lar|c?5B2SqI!DcBf_po3CSV6iZc^e4B~769AK+NHN8h<7>zXicI**;8Q11D}QxMfCxP8wHa-#Hgr=ogHf`I8XzN@tsR8 zfAXD+6hN5d5u^Y@#3M)nggTEP1rQK1l?*9>Q120>078RDkb>kbcfzt2u$|S9Kx_u> z#zNN~jVs3W07)z_Tyo(G;!F(57T7deVY#@|6+#5dH5d&z-NM36D)25kxqvaV0SHo!os=<#kBk7KX6qUT&q^r>{|ERvgm%)uTsGedT!d;{g z?x)cztw+AbMdxV@GgX;PS8{Q1B`cs?a&d4aE37NIs4C(A@NJv2p%l`rqV%0$Bi{+u z-{|}py$5l)NS#5N6fGxkc_J6bkkFJdIC2cF1$}ZrroDdj2-TtM^3;xpJFu+M$rx-_ z0Oyxy(3jH%oG1z}G_s^j`^iigMmRUsE%+(aR7awv+feMS6gf{$q0D+6D(Y7R5*_l(nkbI%TMy_f3vN+Nh zp~yk-<{en>{1KnwFa-vh%){k&qb)fkPNA=W9;ghi5C0j7O5{~wIk;7BxJRYndyvlf zB7Xw4@qgS$c_qDu^4a|Cun-;N>1wEwnmD(qwZ@c1zRcr1)+!50$$1^T7H)eqNQx-!wDQb1W8a=(lWsC5)RIW6~O->B-EKZtC_AuI4=2{T^tkd>dIdo-3cm z%|x`%c>rZ>oJzs(0pVwj^P%;~4+zT^Hz5Lf2aZjLt7&80 zuX@tFmaJ|)Rt+A<>jB&iih68{(4_t8Hp>34vJ25E)bSwkrL%z>LyiiTToZto?`5$i z(InU`c@$y~ziV<9)|(P7OV43nvn5~JjTB~3)jg=fZPihjV7X3~i)38yU>mZN?}5s@ zKz#(!vR>XDy9 z<2`9N_{M>6jDEIg$x7d|13k*iSKCoIY)|7+!gSczxrR67dRXHe$WepG23)@f*C?5d z@T!-c{HHYH8h*#4p0`N6w&lHLWAjsDRz-9^KBe<>pt}1oN@pKRc-kAmzGm+^dvFKS z(^_#2$2z{&hb%v>9xUtClq}nJmsUXVM^J3sdfPqKL&gKis5#mB7#yi|JFJrN&~@5w ziy=P(yOjpzK~_$Eqg|P^K4`f;kY_vpLfc%+&a#!5yg;_Rw$~Uy;cC=buAAbk367rj zC|mnjDj|`Sg8vw6Id^e?1 zwk?QzJhwO%=sab>JZez0eqh?{98=luVj96S() zt?=ySH1V@kZasyT?V%Id&)_MTUgarL0O2@~AO#R+dju(ffT*dONa6FTEdg5!ZwUy% zw&{<2#2q3)mqBC+;>riyDDp9&b1y){S;>Xq z$jf%kYU2TagU~ zghd{oaOBkQklj(KkerK3dl&15OIxQISTXwl2fBl4_u(V;n$;h4NLRo7Qfr=TYlG34kJ}dU>LQ*M)-N zFTgg_ie0=+tjAguNa9{Ccs3sS2*VZ3Q0{)089)o7E^-TICdH>-?vTfVhs(9b$lC8< z`?!BYv-BaX*stsTsclZo7;=69ZhfBn9TmPoJEvg{^W1%&yXQECMWYV$*!Q^6k@r1* zdp5((alOs6oa-KjE_vQ8BjWKa=elzydLzfA4xVLiMq$?Pqeq-Y)MV*VWUl6wN1Eug zc-1y*(DW5$>7%C%3D3{`YNG2W3}Q=h@d5>t-kjMC^70kiy2z)Dy#wQs{J7Xo@9@O| zZ8SImZ_RodU_{0;HuJHAHgo9!Zvrz@dT#Y>d3*a@BeK{#-Jm7;{OTBucnHSm46lR7(HU-HrcYvj#ljkL z6C)JwCWck=Y;iLB!1)HY;F00=vQU%;+2u|M4!YYR*E52B=?o~Ow3fTFQE0)fyVztw zRt%R|{@M_3vN(O#d0Q?mTupu+3$MkQp!1LF%X02QHwWr!-3Kx{QWjB$K9E=IPKv-C zPi02DTTr3e=jT%e%VaD+N_p4;aK_YD=hHBro)y3x1M7IuQ!V*2iX^zv8J3%X#Bv8; z@e4+06d3MjxdXgK4$Ly;>kKksf}vlZ!kUs}SRf|N7hPx7#U@iUWcB? zF=LDwuW>&I;Z_8?1l_Apbgu=F7rx!EaJTp#4X!3lc_Sp!$%;!pipKKeewCX`redl` z-w%ODqGx11N~S!xH8b8O_$H{0flvhBoI(0FteOw;X8I8@l%2@RZe?Z5Bcr&{W_=fI z?LGrkd>H`5-CfMUd7pYu-zUDq^+CJxlO~@Xniix32oZIV_M*C{H1Q^>S~q{M$K2J8kK6#B^@f@jmj(~?o1;~aS>~=DR7Gxsu6+Ct?(PL@R(_(YcQGdK zGw0#5FMIcyTp5zOQ1HM}Bk^T7KBrVOOGFlWgRYZUSG8wgJao}TO4lAw59tW6qpA)I zpa`EHxVvb15?_P~o-MHo>x!^6^tdVyPa9+IVsnY%rsbHWO6_2Maj9Ih;&>rLm&;a^ z9q{hv0rTM`(g>yaJ!OM)Ksp9;EqONr@06Vdo(8<7flq!(b(ae~=Rm%VoAp``!_rgd zCEQ_7#0y(k7fs2jJjL6=9gV83oL>kFTD&g!O9&3WsKbu{cI^U-x$7K2=db7^dbYU> z<_C$7Gv+Qn&6v9excY6bMvJ{d;!}$AjwYQar1P2dE|V6T>GOnp58Ro*egY%nD=E7# zWL{*ZWwr9wm3%SK!8e1{7d{^W^X`klqSge?_xk-q(9K<3VeVoHvK(-yl54w-by!n( zLpZ(LJoo&FYb!_4i7%3FJQ@tN-?&ADf-a4ETLX=2h z@7Bd5hWloOtscJidPdQ>Vkn1eF#?=U9?$N&?BVgR#zQTa2tj zLY!PcZacbZa?`ZQ)27TqCBC%>AEUn@h*x8F)?;D)8I7vj`rJg%mLzk`-AMFx9Qdo( zw$YzItG>5fed5~I1*rQc@QX*GZeEwOiJ9?Z!dKQ+-jb7@59A|b8oxBjy~7`Pub`{& zi;S6YiWPk@6h3>>|KJyX%I}=Zd6?z#qDOOS@5d+nP|C=#@v|Bsg@0`NZP9h(Y>JO! zc&ETqi(=!7=?4hzHnj?+w`k!Qn=Tl|utDG{b*w)~onvO$ zHXU8pP-WBIpxAVZ#kDv4{)+E(HA|0mKBhb|x)ilP5jekW48E^XRdZf-kiJ;UFgwcd zr4r`+Xbf|{H@4J&BDFxbAhk?-D{Rv@%S+K?xP;4-P`2sI0>2sJR>zexe4zZTTAOYa zO(y$TL;q-&TmkvuAH_V^RdDaEB{A3`6lTiIF$_N|nx6tWL3(Zs^JnEUeT~qM$!EG% z$n+0`-1}`+3~vx^e~wz4E|T$vrPZ%0*d`^p3?GD@ZCY%Ov7gn~UFvCZs-%%L5P3M#|qzblYXZc&Scab$3$M%L-j5l}@*m1)%Pc|dD4H;~8oITL9ilRdID8;T0kPiIb*%sO@PtzO zL+EZTfXS!|VKK!N<-Po6MHBg#tfU$`npP#tMKJ(g{^umyI`H8M`-^u_D}c zvXp;}V{8;|VHk@`yAqsraL}gL>#iDmE#5btA$3npV9s)2EM<|#aESrzxhU67pk>6m zbc|+fBCU~jzZ0wm-{t3ad&{}57H^a=c5VSpo^ z3*1-G$o_mcE+GtOgMMZ48a~0Y&Xpm3<%oorDFw~D%g26 zTQFoAsJnpX7=Bpktg(z;h(CbAGQTaHm(c>jevGYQI$cf+GkX6VwHj>$?Rn3bZ39j< z!|pPMUkx$L7B~a2ls>F|##}XUXyP-ttGOZTL7WpV%zhN`xvVDu-xK&?fXlZFJTL2M zlur>D$$mC>3SFQ7TyERIYrbd9DRk@D7jtbp>_3=$(!kW3M*+ii3`3(CE)TNgcLLnk zLs<;3wi#B7gd| z$vzCYUgY$Na0s<04ZK{yaLFWwP9ejoH4H1Iyeo&x69j%4GdQ^I`9Y?%VIDm>ir*Az zU4S#_1z#kulrA+I0Y~HSbCgnursrXYL9K$!b3Ewtjd_3{m`eb2d`n=B7kq0_-bp8e zKUoz6JPo6;WkiUel@I3H^mJ8RIL`p*B4VqS74cjgTg#R_2cBS4OPG&y75Us_2+*Jt ztt8|;QSbz6r%buJu*{Qz=o>^ZiF>f4eXZkr|5Upz(IkJ0D5|E)b_jzIvnpi z8Sv`@ZxO9tvA&eIGK__ZztZto_01UX4T4=mxmDlD^U+VLRNb!1hw`$i3lW1kcaMKE zFNeOSvCAg>JTH&l5$r0u9asVV5HXNByC(b&e*3S93VS*DC%kf8Qll`pWC^~T#P6aq z=hv#=%o|O2XsoLEU1<6fjomZppE!*d)+)|>CViS$PN!=uCua%XB<&UKD*8vMoj;CN zPGZih=>4_` zB%EJM_af_so?}iL7schk8hu@B1M%sZBDXyA5g9*(2$DvVlc zF3dlUCi2mNuAwiNeIfsNI!7?Yc>-ObFnW62m-A1cpJ?oT|84p6=;bEWF1zG(V*xEa zim@x{`ElRLZ=t&dyM|f{@5^6A5AgvScKKELexsG1)YyUYLTaUFHFkOReq%8`ud!>Z z3u!SO)Yxgk{l*eHq_OT`AuXZ5X>3Vh1-{e!k;YCfEHRgoHAVHeF|^-UMmZYe?~N>@ z5{=zZP=W8lRA}suf)aB%)o5%>P6aZNMvZOHDKS^j42``v{?YuEG)H4Ol|KfyNMYjF ztLU5*_N)9=^b^6Zr1wTGp_A#)g6*Xr)+UV&w3O2Tecja66Y7If2;6ox+oLURPWl2+#x7xdCfjrj}46(nh^#`;QY3i|2mI8n1_-RiF| z*hUj^!NXXMJ*8kf4G4A(JzhMkU?+X;SgyMU?+Yy~*iBJRs=@h?e?`Fn&DNODURUrL zI#pp3moA{Kf?b$(dc}8;h4pG|YlR=!PL17-x(jKq#vVl7g|ts&wI$y{w*7gHO)kNc zL%LpLT?L&57t>cYwyPik>{}WeKYG9MS-M+e^`i^vv-E(*KFHp0?4uuPEC)WnkA9}H zS5S8e{Z?adWf#&V^s->D8Ml`?1((uI$Me{qp!>sp1((s7ISRWW_#NbqKNRd5+FiJ_ z;BxxK30$XQ^5^IUg=Ot5-EVx34r=WD(n9(iy`i!0y#2-%^f!%d%PYiv;>Q}hxcuCL zE6JKGGPABKzX({aVAs&R!Yc|sPu~(u>3P+l-oHTSH*>pdvZ^OtQ}6}4TVqX=ZU**4 zjg6hOJa9F$;pYke+r|5gG}f1!Z(c)B38xy-m+1F`?alJl>@WBdy`r&#nmd90MX=Wl zmU1m+&10Dt(ygQKEx3-B3ig`8GOwpC8oQ)!zi}h=XzYy%m)JMbHjT~Ad$8ckG@!9d za|>~Dx>#d-bMGyYyTj`q`>&*XA!Pn_tjkT2& z((QCWW4B`u_y)b9v5N%zyI@yRXX#H0zCi=?c|@-nQ;Y8{*iZX3_H#d;(nRJ9*_LJAdS5c`7n+7&kucC@GFnge}Ad3@YgBK!Jq1R zE`{Ben_Kw2hvnUrTYk7dT5$l~5#piv9B_K7UTSt;0S*@|9bc z4_#iM$r@W09aZ={nyIl^Gz6?!Vc6Bi75<)f2=+M5D)_YEC3;q4H3h!H1N3|g_qUh6 znp0DFkbEaH_Bg$hpIi7R;&00{R$5Sqdxn{U?WJGld|L22?HBAqx<6;1@n?ESFy(cJ z=%C`v`bxB^@DLr+*j>?S!2YH&*7^zJ6~f5!_9^7(2IgSPHc&H>FZ0F zQ;qiT)VEY&Yze+q;h!hOL*7>iFxKpSx>Gn`%VvLhpMIb*_LukRafKP|FCWmqG{*k& zPg<~y1-)jlzkE#RXpH^kU%H3K{XAozq%hX=a0=sD;d?LsdEC!>n#SEC1-BpNiwiB| zpDAp0q2EwDkjiud#*53j-Cmiafbpuvc#Zjz$};|;F`lC=@2J?g6nt;=ixEaxrMbxfyPRF=N3*fN(56wvjIieX4DB-p*VP#db=_**Nz@H$ zS7)rzbw`^Q6xJD!Wb_an#2GbysySCtw?At9S}?YtACJV}5$vEb3D1)24Sp<4bkKOU zwgT9%1=~yaTU_^!s>}Xq&3^o`(|>Bt`iYr!1+@*}#Gyf?{GsBK!g^zc#;V87MO|j@ zR&T7Ay7TB)#uvc(HNljX8U}GT7~j>Luh1oSgK@vc-Y~B#Y&0I!SRuTiX;8bPjAwLR z(%f$xHKguu_fxVdm>yJ}sxPx_lK7~4AEJj&Rr>z)aJ zS}?`9L1T?M`;Do_-CiB?f~kY_oM!w~*JYWv7ET*fceL?GU3aGM68mVQ;1s3Vg}!~p zbYp^G%APX@wVPoyY0eYDIm4Ktu{(hsld|r&VBMKUtFC*?y0ws>-WjxE0zdD2JIGH| zOG=sYvQVz6WXiSU@w8Itek#x7+GG{;bFEiq9dFRM$_#};$#&#RfDT7~nOQjdEklfF2b%bD=p5~kk_Xo%(}J(0^}xhuqDnIWT4 zGXJ-*T{M4G#;e-?N_zi(IrsH4Mr2aSSg&l*A5m+HJqMSc0l!Iy#<5n@iMY&>4R%4#OJ4Cg_?9r8S7auo}=iQ@aOP$lb#1O z=yfS8`I$VALKDm|#%|G_Vjrg9353AuVqpc-bd&g-B8tZ(Z1re+`xvHVN>*i0PoBF> zJwFz$6wiO7XQt$|CZ3*58LWw-r1kVTmCbn-;5m@22#zO~L(n=bOx1R{Z#*dxBUApH(9opWVkQ3jxP!HAmDt7l57u_LZo@hM8=ey|n+i)DjwgmhoByPF+O}%N`DmuZpMS3>&zd*(b7j|1@My7BCgm0J z+!q;x2kwEAVQzu*T(NZ@cSX2==1Z4B0xX>G7^`o0E2i+zH(e4o@6s@7T79qmB5n) z#suCBXyEBD!-IgM>5y?Oa=>>b_sgZG+DRxcMt1kE(S)q7gyxN#K_43P#?2+eI^c%tEyhkdu{vo~ne}x$P(HVMpRt#Ys=gYOf!ga)eq;34jf6bGs52`o_8STF z@PsSq4oEZTKDw*y0pkw(?4-wxv&@_QPZ=*5n{uB;`Kj?QK*BW>UpG#sak$qnGcPK6 z&)94Js_Fy44SpU`TlFW9HnGSupQbCSvdo=yzds-4tHULLpVpO`SDL#EE6rcf?(0Y-h=StpnRj4*3yCfEpn0E}UGgKd&it_M8NjCC&v1Xv zqpkww*XFw@A2KW88-F*~h|fH2UYTDA59Sj@oq1iUWn~)|=kGTRBV1Bq{la{ps)CA) zT~%YP7tA+CS6K(mL!QOcICL^tPjn z37mCOTW8E1z0!Jw<{*Qvf+aUtd&M*Nnpx$&mSH`HdtSo|Phj}$s1kFpc^0(VYj(k_ z_nJ@OW_gxT8Qf*fGT6Ij8DFWp4CTt;=dC*P!m4Xg=JmytZ(8it*tIY_*MqXH{4wy{ zH<2~}G2p4%hM%4El6870Qb7aCE5}U*XASJuDKo;H$NQ=*w_*X{g%yhdugtg1I&1mpjlQ#t zvuX{RWyyN6{#3Qa*KD0x+2fmH#>Xdp;?+L(w3T?*M)CX;JX6f%#EX4rnK^Y=0saO4 z$uh6?b;(%j%o)Ke=qzK@q+daPJJ#}9Mw$JB?@FU@+#h^H%qJgh~r_xT3`1Kf5K`Ue+MA1`h+#H=pK}B9sdCMUmyQtKaaXlBH;`EY;&#s zmj8Aw;ZVtY{_|xNRpw`ki|r}qRV7nxj+wLUD)T^ovwf+qy+)#3qWB}s)TokfyUt7$ z?*aT}$tCs|gy#l#Qs2;`IXWol#fj2(m+1W1$O}E(hmU( zsWU4dy9dKD0>i?yl#*Fl*x|kecq-ipxRGuF?4;WOpQ3Mp|DPh~U&3E#+`)2;2U(8s zd%z0geZa86ubfUaqJRd3S4mjKB1)OVK1h~Ms0dSFV7vNIk zCx9!BgMe#{e*&&Iii277v~dgM|HNnt=F_vrMS#CH{tEcKu`LJvnk-?WnVXA#%@)80 za~t4f^Xgoa-Zg)i+l0R>e`8h?_Vlu%Cj9-d34qmjgR}|X`CJS*jkW?FM+1QK=@P&t z^eSMRz*Femq7IQzWpqGJv%rl8%Zy2RK+1cie3O)Kmh!_=eniTTN%^3Z4LmWuF{?@- zSzHbaoGY+d;6{Nlfdc~f3cN|+%>o}5_=v!l1s)VgK9*?+v;>9)Rtc;YI9K3&fg1&O z2pkZ&SKxU9ZxZ-bfe#COMBrlrUlw>!;41>jFTD%21cn7x39J^_EHEapL*QP4=Lx)7 z;8z7cBJeSR2L-+&(6Ysb0_O|t5O|)zn*}~1@Ss2=Ap8QG1#T1=6F4AnufUrG-YoE8 zfiDZBES3-!I9K3Cfdc|>68NydmjzO`@C%$Pa3IK(n*=V%Jrm`x2_(GPb7Ph-k11g( zZ_H!PPN57)`6hu63w&JYFH4#7r5Ay71#T2LAn+!E4-0%*AQdqG!vbFxNQELn;9P+l z1>OX&2d9E1Njh%S+%l$Y6gVL8CV?-PGo8kY9D#EM(m0_AylFg_9~StsK&q5lfpZ0J z6gVL8;fZ&F|7C%5Yq-2o;DErJ1U@WqA^xKAZS+n0G2&3S@i|1*Mzg~_VCGp()_iN5 z^%?8S)?L=q)*IFb)+*n5zRP@H@x9{vi|>KT`+PB+3v>(M6OFqUsd*MJ+V0~a?U~|BalL!9Z7~(+?f60Fo6(FJ(BBm7K?~fHz z7;np0;k~(uh_E#{57go8(1_Z}$X90Iyf6!wf{P}63%56~*WCelsQUYW#S^iKEp4T{~2)Vq;~+1pY$={#2N!9FID?e z#76mRx!mJdq^#(flz21;JoiKk0aZDZC$p@iWpb+Vs*z@LW|mdITWeU`TWdxanXtOW z=R-gfmgl(|3uwan{8sijKoj$njdCTRiTTPwxeCyv37Aj3VG3ws{`jr!8bA~8Nf)6! z2@rQEm}Bg{fF|~f(J0RbH0gNExj}OPO*#Sn{N4OB0ke#5z-+?- z3>s$vMvWw3gVB$fUT#(bt~9Fv*Wj!95jx4N0bFlR0^DHM0iJ5s!-po*+4w7ozr@?w z-R3THzxj#z3u~*eT?BuyQWs)#&->D*{pY=@{K$S}Ez%FHvgHcMlD@nqjhH;(@gWIUFPOJk`V)>u)| zcqX?!Db|(fL}SlhLLAy=MBx{c|rlT`j*x%E! zaSAQ(@9K(e>WZV-+R}rGb3JT@3*LC=AYyX|PqXlz)ek@F+d1Fq?v23-Gurn#jPW|b z$Lu-X?d=N_J+ZE?oxoN@gXXTTrHP(+a!w~qHkDd?`ld})V}&tL8fy6r18TmR%r@L6 zQ`MlR(t?EO8FP1TOiP~jZzWG-J!TwzWS)OhHJ#cPHBX&BBQ*$={>>m}&=y3WwQCm6 zr?Vd(P77LAwk%)JvV8u@?F(C%w$P&0Ep2O;u4!*sy?Vv!c6712b@_?yC$+9v z+PtQ9#d2!fne2;qH?^*yZLzNYczZj+`(xCd>~P$!#3l&u@Ob7sU0rdpNwVq0cu(9- zbkJrvfN0X%DIfFuT^GxCS*$0vCEmGaD?1CSX3yzrZ%_0j`Vz6O6mdmwyoaZf6or-| z1kj3}w*HQecrv-UKNT0KxwDg+ld`lsse@N|C#{Pm`W8AauWNWlBFQv1No#VA8|#R- z^soz}Suc9&Y)N*+dKpWuiFfxpZp=+|?QGrBgO#sZwRFXLlPJ%R^>oC$up$u?lT6U| z$sBuIZ@dHJNSux8xxmSYfWvB6#`-$84i~$^O>E({d8C@* z^g*F*c=hW3p5er{t)4BOAHG+dk6!-Y~V-#9X+_@V>DK zI^yC+!|O2Do8#^gD(814uvCXPn(y@VjabpLc{8v7ZE<|t99!g;ox|HMM2Oym6>ww@ zY>=CrB!d13jbUfC-d4KKju9Bv#W$^vpVcoZ%Sa5o{$-s}GF4()dQqfnhtgD_ptWvd zNusBdR>zShcEqVQ$(!2>ciq-RU%aiCN$Xq`CCE^sC)vjlLn2ScQkMQR@dfeCvHq^U zOj1vJ<8RS8c z#G|+NY;(>Om0EhXC0wV6Gs%+>^Lb04R+Vk2ayl`gRz4ayNuj5P56g3#F3FQMvcTzQ z8rE`OqC383XD_ngo=#BEiZRY#HN_hco0UfkF;ZNBJwX?j!GuC%!(sdJns@^y$v#uq zR-MbzX7nQM`W*S#km!}qv-Kw{gS}3%=+C822Q*j^=Pfbb(~*cLr5b@nCEKk%!|HlD z_Z6=BPVY`BunL=bK(Y`JEs_q9W(2?POI5yV0eR43xNwml4u>3Rx0-rR^gBp zl1asqV+TwLV-*C!0O4_+$_gGORm%!2#LAV5m}D&;&w_-DFy^>Bg)n>0wDxu$P7iCz z&DxM(u;%Jx0W7u#^DI?MW63_X{F%bbZ!iTq4JLRj&63lI98P&Sbyen*(x%keBJT43 zAVj$7CT3H)3$?{N`Vn}Lm^gh-httKLMm*fMtw^0|-B#q;>1+k%p^n5E@SrIZLVCX! z)N7=VF+!6;@i{S*I6v0g*AIbgFeLfB|9h)Esi^4yD~8HI6FnVW{he`8^s!Ti>KrN1?vWI9KZBun>UrL!UBN{ZRz<{vn?pzsj_3$!N zB^lr#LT5%I#qHGESBs!!N8B^>TDOZADTfzTH-Bp!n`eLbNDR(KQ2?Y zc^g*C4y;ze*`T~#AvxlWpJZ=n$_!pj@g3M;vAOJ6vDpho>U4)A5y@r1yq#=RY(PwD z>FIE!ppRL4#7%lam_@?vx|rL;2%Ki5>lj*#n*cuHAy~)MpF&E7KaKL5(8V>5F0}P; zO3L3&BJ6;)j88XWJUQp6pd~a63f6_EtP`}Y&*|MRr8Q1Jn!tvsyD(WKmQcc(@$ zdrZR!w_x?)uk5K$HW9*1x95SaE1Gx>@rfRj*d)ElwFhnH{Zkcr#+tjfI0$=NyAiSz z-BQbb12^sOronb#bSVUK-b}o&<808Ac`3oS8<_b-PljnT3@fvwY)p$CaADxA80REB zqfUQcDzv41SuYFb^>%{6F zUmP#_&nj=ixJPBgwzb$iLTS%n}H(%S%efY z?q<;1;xV^ltGfTjxH6E|6^Ora*?|yP5vUWL9OTkOh)W~OoxZmIUR-ctcTQ8quN>T# z_2VXNs5JPg8fdx(DX5$W(iC=Z@kmdVcuEXUJMZQF$&Af1W#mj67A+#0>}GBviJ9Q0 zi1;#*{J9y9yT*|aij-DLy*u&2`tvlYP#`5HsfC+DGv<>QNG8f1VXJh7S1auH35M9g z_cjtrg^)TO2zGYdmonQPBSkj0-x^YL88rTNIwvEsX- zl!#DQRw6(bRYY4YjzMeUI}iogN3a{qhq9gAUVylXFB`QewSkBzUDWrJ8iOg)k1o{l zg0D^GZj3gok4^o!*@2dsey^@@S!;J&q9eW%F-l+S3L~HS)MaVQHk_{2dDqoJzP|^z z!+0tHQ#bb}_|^_+rWTqcC%&f43ewZYA&^7wpt|At2DZSoPoWRbb0tlO?y^6~2I7iQ zbrFt+6prTcHA>I6I93a))t!hMfm}zx6Q~ovu%N!a!CI5u6b9s^9u+ARLv5FfMVSdz zVj5WETMz+ya5310W}LMRrRi-`F?6UsR3Rdj?4aUT#Lw@>uUl=hdXMMa$%l-X6V(QV$WfBPDu`7T^Wxz zaWCcFMI+UZAK)Wr|HShe~6No;$mqkx!1-%S&*8m}zwle*MP-Ct`L z^)CC;^zIRO+tb7qo5c=DPSZ`G4Ier%!c>B-rXBaGZSlT7%-XQgXI8~B*jU|>Z_-8M zBUHhmybE{g>_P-k{bNIsGA}r<%*qbAYVmT`j94bk;vChagt?N>7)zc#=jitKzO9KQ zw*A!QWm443#8q&}r102u6v-s(L)-{89U0;!?4W#D9ZCfwp9f_6afRQf<}hUviCkV>NK<*bhEqHB`wMA4UhW>BHU_Vc!3^-q zBi1cAWmZo6K*ET zS}uZoJS(C#-lww`53!NFZsSK7J*ZHrN}8afh}*mcK}&5`nQ@L&Usc88)nh*uvg8RM z&d+fyz&IR2*L5g*8BR1@Q)hNWoid@`CVU${=)Dm28d!1|qi8ye+Bvi{*sML(TS^7C>Tqi7qS&_haB_Rx z(>B$fr4D_>E>ks(=;itPsZrB>cV}-OUyt=}6`KybVI(-YNJ86&d)Z}c*_o?)g67@Tt9c?In@g}O>5~%_PaPz_QpDJ&CS=pT@cqJ!!;ybl=k5i)L(k>_s~;DDN1@dMG=kC^%av zCS0<}V?W)5vl7Ls2r>~vXxzh4zRg2;&|_MO%y$`NSWsgSjU^7HZ6Cseg{&m@%HZ&x zt3k!Rc)$5fyvy8&cW~o)b30Cy(}?%IUA))bLq>L=lt7)b67OU$!CTmC@OJb(ylK4x zr8fMo27M*|wV>3l@%g|gv=VLOv>CrR;zQmRl=_H9FT{K0F5ab%XHv^nrZhQ8S|ss4 zwF4b!w35TJy6_vr+vm_Hl$O{AzJ4u{LapehM|!|>32=ANR^}g@ssBl$Z5!SrUjZF5 z>zZgt-8i;JZ^lR(A>A8`F_vpLr^Yj=&ff@44Zv+=tx?H!X_?$A zJs!Lt4+-G1j)x_b9z!fKHa&;!cq@7`{vV;Kxr{A@71?TGeCy7^XA(V4!YqVQ-hsL# z%1OM39TuB~p)1dpXZtWXaN8#1>xM0{d!XEdznmV{JsHi*K?%#O@QAu;6Z+c;%1}ux zg?*|Mbu87BK&#dQi%C1yvrptHUkRgcPygZaTyS=$Xe?hdq#V?1oVO&BxJ15O7r zx-Fn7&+EYYY9eY*_a25PFz3k9c}}=3uMu8_y}B2&@Li0$mLYwoWrfk|c>F34py_F^ z@Vp_DH_aKww+(g?+YNtA<>I_G;->hYWq44lhk!g%7@0GS+YBY^{@W1=Vz4L-#E3xgA19-tgNk38m`p-RO zw&X?bg)X&ZhtFUbbC3={YN_%Ja^U5qtLAMBv}9fTF(*pHk%QoW){iB!|8U4q%XTC! zGj&q^rAIO}V9rKJUyCmasjaFF^R*UR6K_d#WM)(^?5Y2rQw1Upo0%RShOU`@o#}V@ zAHDoP{X3H091dcz63-bPs6r!N3mhzC`1Jx4Yr=D)?8D)D2mI2j^+MtC7+2zP%VvBWwHyw<5=C?yDMOSuABGx6at~soCB3vsQdRz4WepZKi4fp9;g+qEL zFclj!BV5xFBOL3)@$&!rkM;33es7g=%x1q**6|Xh<3!UgSSW_MWxa=wg|*?D|LZ^A zA~`8hF%J*SWk$JYo>$)1IR!~ah9;DGZ&2w0&mAX^={9tEc>N{4=oPt6P`uX$JrlWj@T> z4}Ez$ys*b6;swt+X#v_IfBX1gXn~LvK^53H% z{{(zHlZuvOTWm)vv>Ko5@jX~7R(azf+PJOImY3AA_;%(|Il;4Iq1PZ zk1Op3Jl8SM*`s)lyycN$+r}fE54^3I0}wADmOu_Wyf?c_W_n8;-hVnD=ggbWYjv2L zu$)$T87awLJN6(Ki&AZ5JHbhHBPFb1aK-U0?S4R&utBqFLxY4Tb#M~H{N4$S>IZwf zccK_k{t5FXgz*{2le`j=)WKn>H>;C|H{K>5NzEE?bLeCHsoLEG z8RO6{V>xpvv{IWok7ckfnKCkiU0Or6ov^j>f0u&J{Fh{^p*e3otP%IviKxTtf$iqP z(>-m{iArX2LB}mXtIXupJOTLs+Pf0CsOoQj@12za z2j;Sb$}*xPq`)1J1OyRr0To4oGy@f3RFp*lF*I`qb1QR6&81AVa!Yf|Ej3fi(tj>3 zR%Y&NnW=4Rg}(2(cP=x7Q1;%x*L$D$M!CyxIluEezjMy-oOAE}{fPeLh>buVQTI== z4Q&XI`&vz^Tky0bO zRR4=qvzlAln73uUgW#ydNPVP&WhEarVo1cvE6z-A~=h>I+% z_J}v+!a5y`uxS|6A2Eei5NOGmAfJ{3XhiGwFg@~ZCI#EbF^6%HVKKRxz=WVmwy(3P zL>3m=eKI#l9y(FqZtTdTFME^JTbdYaCxgba2!x>)QA$#U`3zf@TzgknXfx0%1=ZvU z+0Jcb@lpFk?PBzw`X%{cG`>VpGLQ;Hx)m4=`3kLSu2n!UpF{VcMfozHE3Ru1;$R;xp$Izx@v{oK0nVIcI zwX6;8Eunr{L-qft9$ByCXc5G6h!9~Y&nJ%av^~-+iBJL98R7V+U{BPmPgO`tM{0?zh*U7Dy%+ZW zG8wWE$U@d|ZwLoFf0T+!S*Dvj!w^R?z3nqEDO<_!krdA#K__dM)Hz||D5@Ce$NxIS z2jrl{zUY;sl9794=LCBn>cK4V{_^s;lGVmqW)p$s$b}TKAnksCHMtoQE2`n>T~os( z*OV?r4vK*EP(UFzmUQ2kIvt@-(LB=^wd@@P12?m?8bv_}lSnLh^e9S~BjSb!4X!;Q zAYH*+c-ZACGYB3*x!Mf{rcqZBsuV$G9=AJClB?wyUkwM&G$%!XWyw4xu^0~Mq$$gg zYKIzuJaQi7hh&(GhW=fUBg9!kHg_5Kcwj?xqSo8P!HfrHPALkwop>ZDiz($2wq}%L zEK~kIH1k0&M;lo7V(+PFOp=CRTBl8hnUr_YlxkROhhcZ&ZK#S7#V?*|9o>K5u{$oB6Dt(95qJ=Tb`z58IvTe z5@aP?67ERegJEH>Uj_-u6T3j6jUhHGfGoZHryd)Tvl@2ECBn%QF}Zbi^V|q$Ptpa{ zM~ZVv_AU)8RHJ3-Kh1d!J=Buh))6)@1r- zAfKLJlM7%EXv-#Y!C7MX2PVZKzcm=z0I_KsPW~G?V5D z$IyYZQO00TGiL=-C*NBhh%AR;V4BsfB}-@*QRbmK8b4w4F6kMlWJbw>jQewB?@e;~ zBmdOpmox;KBa-r>*E3{~j=ZlZ+4~yx?`+GFMeJccBaBps7RA|F3OF&19Mv%6@FE2T zbHjl#vGxdP4d=+WWAMzWRG=d~NpCsjCpeFtJ+vkXg>2_I>c9{zf+ye)3p6Ix=ZMIm zv%03CJ$4|4HOb#)U1c8}mO-K;t_=%LgME#Cu=@2-A?(3wN@hI#uS`g}9GsxJnI64E14$6#CC_pX=%@}uhpH=Ji;xpy=_Qjmy7nSxLwaYe3; zJQdhSQ66i%0&0dH|5saL#5dd;ej$NX^@9t=C1M6==hR3x0<9sR?36)L10qG;Fm+Q9l zn%vBzUBuzkGmOH>uu3D#YE?KGyy;S}#(}q7Ll&p@<}FKEz0!!)gmLeu^5$b%y^E0% z(>)oLk>M?Olp0R2S2C<#k9CaodcC_w$$NS8omoBSZAfLc?j9^lw*jaYi=#rv>H!J) zXjSXUxS&DG@nismLl#vcgwO!P0ir^~(w`P6Xmv)8s(Lb76yaDpvYaQQ(J1wLf4vqM zXK{Ltviy8`50;Y~rSt%XLl5;@^v7S}V&wew{tAQDUrmj85FmoeDA1z88m!WAd>XpN z@M$U>tf9#FR}ppmRsJfm9hLqe4-V*{Q(_0GEovozRq8mEUJH_l1QW^Pr_z9|&rsWX z0}zwy*=mS*>BSOLiKteSn@BVw7jLNn)_#8Iz1~%$;veV3_#8c-OBCXB2%bvAu)H$#hUK42B6UBoS7Aeo6*IE;iYjh=zd#SkMo!i_`=* zRb&W*HBGBg@T2%5eiTT6i&0ppnxiw3s7S0ZN(7uGGLSV3@Bz+6qtf#^pd_aehsIy8 z(s39m@y=hb5Askbz)i1n0c?O1NrV4*WAK`RWRmeYcJkp|upvs{Q}#Zkh#y?Wj{oNlldV$3F3l!Lk_yU~$qz^euDwbO}W)fs9n^LOSu*#l$EHbV$+x zH5++=7@tc_s8wkcdacBpu_EvIwbJmsWdRU*A7%7<8lLS2%K<)~kJs|PxDo#!;`n|T z4_h%p)3O~@K|x4NBjVa&^skY|MXaa=3usB+w0degUZ+t(51?f}o)`)$0oZ8uI*7kz z8WB||DkL3Jb$U1SuLIvfOx6($9nt9+x_(?k6;6U3F(B3rN*r@QQ1BinGRJmeA{2v+ zxo)(L$t|pQv#;g?8)M?8h3nIWtYW zK5^g#!!cc4i*%R{auBhhV2aLO$g(^MmKWI%&aY09Sx*)cJ=!D7g)Cm#f)7Usi(Y1R zbZIGiLa!^5Z7f^GRL35AmfohY+cwgpH|ZIH6ke8`bAmzd(vWK?y;nunp*|W16a3Cd zoCT(Zqsw+b_R@=AN-|cIEFCyHfTj#2N@HcoNkm z41DaD8OWADOYyaHfO81It3ET*$I-X7KR{?=|AeLPXDSX^0~zNpSo+m9lK)-L7KZ#? zfSn&LSSJ5{?c`&K9`xCOW$r(VNBsfBn7T+ks0$?2?|(Gx0R_}wL3U^!{^M-fpJ5q= zns2R88(MH`PK`MOQz4x&wJ6oR#Y%^HoLY-C@+VMOaG{w6CL~`(ncI=nLCV#MIpQ>q zM6*(j=>!-3@Ry0d6e@1fpf>py(pe?8GTr8I$esr#XDU0(R#uP7UX-wh4lm;_oi1kM zBAzbRP`lDhiKJop^QGjY5>(7m@J3j^HOFUqF)H$@&__OjPvSGhOIYA6@5LwB&Ph7) zUL=8d*;>4W%>V#6>iJCAY#g7UC(}(nC5d->J{^fHZzdCihsBFy5$stds`9>Y!SIbA z*)**&ivlBD8d}h$p@oLLLExpuorD!7&;&0g;KBv4e8nt+>WlWse4V5vBr;*uU^g2v zS2DvfuWF?$vGbP2T2AbrWibFLI1jC81~X_2pkdO&n#b^pjnRd>Q48CMj77=$gqsI1 z#RHbEIHzNvhy+L|!X$$}Fw_V14pthbe1AW*0Sm{n86BepTu~8tEjaRClm@?Qmm6j$ zSe>m2|2@DH24-uH@FYu~nkiylikO!|d9~w!!j?VyMuOyW1LXh)kphqj z#o(3E6@ZcR4bu)#$d1J&C~E{|bIC0egAKR^X~;c-%|uNSW-y?XA>ck7Fj^rDrwNg` zPCSDVkfx_=VgaR=3Spd)sHJKhY&kk?)F)F@g+i9&lxwC#KRRU6AqBPkv@G@|q+bBb zu-ID1ht}i50vWZ-lVOEPEQrCP92qFsyM|?a>shfU6D!RjLjDlT@b~93*wKekiRlcs z5o9uwjQR39$(6<;aX*7nBi55JhWG58X&i&~sf=aPQfp#r&(Zj_*NBgoX|dumBNiq$ zVsQu~KKG}^&atYXxeS3#Htr z(M?xqR@Y7*h$l)t5fkqvmfWShewRLwpMhW|{p53^cn7}*XQ>ri0#2R8 zw8!AVl>(0R#3L2n3HfpKYa!OkL@xPxW#W?;ip|s08|k-Rc?E(5og&7OrKj5WLwZjv zBfu?_{8$3=1)b|Aba(_Fa2W9XA$tR_6 zpzUs5?}IL?c6QK2ndQm(LiC3~?j1+sl?tqfYJ0bfCNcT>GsN>|@2}6!d`| zy>L_R&>NCJxjzgXeWDdPqxQ0ODOQ(W@%T851$WUaJdR)f|8YGECxAAH6MX9+K-YKd zj!%5DsL)s;t>l^zWC|C8jM#fXT=qF32pbrM#RM74umo3rZedBWIU%UhTo#nrzLBnx zESP=Q54$Y^-5UPj4KjriH&*cNmtDei%#>k5s9bW8}! zEt59GC=D`>E|AtzO9&c*wad-6PKiJw>cK`vJ;Dk1_=s8}pg??tJVJOk@c)1RhbV9Z zwk*0kEcX9UpZ~wBwG;@UJwiE-5vsiX)Gm)qPMLhG5v$>c1;ky}`9>;ccjn2d#{OaX!)W#~M;Gl!XtSs9)C zWcJC*$TZs4&^I*`0x93s({~v56^V<87&B%}_-L%PC#uMBOiLzzp(zznczR`J_6#Es z;(C8!(o%^+z(b8p(Wb~KlOX>3<2F`kE5w>&+6YmP_7|+r$fyGEt{qKHg~kL<>&e?z za<8;roq8FQlZ@i}gywwHBSMIT zSu>u|bX$#nVSc73+?{XLVc^i=B19NjUvQ zTkU~>n2mihIu-@p-0+@SIpUR?s`B*Y@%yWH1ophcje2;)_2e%nPEYy$vitn8i>|(W zYWb`Bc7C0FN6&cj^@j@Xrux2iZbx>{yE7ii9GiaQ*e@T=zPzyVi&K?zzj!g~u72V> zLA&#OTEBWSr0KeZH@={}i!>Sg3a(>UL8_&({+v7X! zte|FxgIXv*Z-oVg3;T(40dPu%&$OPTS;4c`y{yzAKa->`fmEIM`bwZyD6olBc% zM~8k=uy($C`tI8YT{v(r`>ORP!Fp3<3IFCwU%|)X_0_ffa<7-Y;@>#AaMi9SLeid# zKk%jC53>8~l|D+Z86(1?M*I}DV$LSdMX#UH-QuH%PZh_|-<@T#+qi;Lzbm*=aZkGE z;1>AMT`=9b2|BeFGNryd?BvEaa3y(VBc0(nG6qBqjKMN*N44nCVfs@i`YqWsXu-yx-!b*6w)-U3R_FWYF=$R1hqVuu6 zUYh1IVch$<6CR%y8LS)rW|Q_embF~DW#6_bw|tZ-NeS6sezzpeXi^?GFTHlCK$GE< zaPm=3H}z_Vi)z7jn@{(zukXxqxwpSPA6~KP>%$$d->K+(cB@X+VL`t|Iiq~$jGAt? zep~Y6v|GQGt$pkA?&C8`R=f5J{&CycV<$&17-qe_`rVH$d*6F6cG{j_4!lzMMfsiM z^KbXsyGVCvz|7l?zd7^zlJ{=B(CkuJW$=NZJNs_LJ=1q>oX<~rb3OcXj_wz#RBNE1 z=1R)Rqpf=k^Wv6W$4{(|DH=X1>oG@?xk5XQ|J#JTxzG%Z0rk_wCggn()}o!`M9C%z zPfik*5Oj`US3;435EBKp6dfBK3nlcU1Ad)4oAe@2Dh+Nbp^Zt1Ho2oeq?Fv$8M#lE z6j#Ca&u;!{->`)77PFMK=k<7w*#eCnRv zuHB;3lRGZdB>hm9sqT6u;$T75?+Q1~XK$K^9-U#h`g6OABW1}SOes0J(V8$lzk2FB z+M1N$ptp@@JYEh8N?X~l_rVy$2Z>7$C69W(ZDr1t^*57$+LWwId}qY`6HBg*9p-bDoU~r(>_PXQP5brgo#n%~9l3L<`>xc(yo1(D zFppDR`nJZ<_WI^#-xij&zcVN9g0t4sSn6m!PjHBTu#?JD2nMywpvfuh z5RwT_pfX;F6Jn|#t!^_p(m|U_W%F{WQiLQ{kSY=?nk^wy$w{I*EtlH^dc%YvLVNjM z;2hwU+uHs!c;!Ni+WPEd+29b>u_Ho)kx(}%A#hgjTD z_(+egOInTZbm7MO*O!bL@VWo8k7D2GKPmp1iDN6)o^!c#xI8NHRj=sSth7&0oAY#G z?>;g$Wbq+m$7`#5=sPj{pL`Wa`#uxBYPH z*^P;t&h23~t{L;yeqq;wt>%JzC)%WBy*R3iZp-`#bLiOL!cH7%x%s|DNuNGk+<$ynkNCoh=?am;Jo7{H-B}*YMWPS8AfZ zb?f34Hq;nwZu{ib7k}JndK3Ek42;PSZTdR=sVN`n=XC3HcW#Z})lns@J>cP40V+i}M#XX(6rd$+!HcMpHVFEKY)H+|XHzw8rM9}4juowBF0zxL3M z=~>fneO56mE~-m<*@En!CUqO(ZaF#N^IbKoBHj)D`OcGHJU`H5Z>OyIS@EVW{~GzG zW|i*zx;<>ktR~IR4U9RlUz^i))5N43;Y?ev?fmM>7y2BU;y&)n!J)4`E$nK#d3xzv zDLM-?e{SYzB?Wn`I&Gax5b>phr>AsMHB4r&i*Uyfq{RDmx3wLQ-{Nb;9I! zf3E)=d9;>AMMXGDR$NeoW+4x%*=Dyw5k}MkZb%VgL0;@iS5_`+)d$sr4(=ZWR#An{ zbBSE+zVB}zY&Y$cTT$AEn>}CXwQg@rYvo7p=NaB`$y@ivvM;#Ak4hTvOZdErcJ964 zFIP=n(aNLAnU^+bf|~U9i~H>CH!iy`wJ2W~FwVzR-28fG@321HxzSoxkDFV2pY6@; zpYluL_a2=p`VPN&y5ERqt5ZLFs%_6*_qL4A?BM%o-=T&>y|@c^fBfqA(GQ*YZtE?x zOY_vg`pUqOm1~PS8kZe$ zD^yJHai~l)_j3Okamu%sEqyBRUwLufD?amXx}s0l$W=e>&hPs1>cEVikwV$tlC4ix zEzZ8zWygph|EaFGo33uN{P*cUpPXQxKHb#Ubo9~hx-LEPujf`?_w()dzIx2T?l1LT z*F)QF?96ko_Bl6W#zzld*!bnen7u2n?YF)hJz`bA+-|!0Z*}juC2R3J3onl>di-|L zBW@EK4;tvUXlkLbrjN@kpQiU(Ek1G7cyQXcAx}rnXncBHN>soX=G$)`xINKpPR02A zqcaY_6FvT3sVQyAE4u;;BUa9IQ>Xtnz2&Bg13z8*Vqcqc)2B3>oO^e7R{7axV-&h! zg*z@BSas>h%eNL5H?oUoa`{MMJ#HvqvZF3<>f4ZTP{==U>P^wAZ{q z{mS8#CqCQUc21Y1r!*&z{F;3I?V-8%#;2ayA&k$qoWJA~+kJ(pN(o0+SQob z-d=b7%{Iq3JU@H;jMvudDnESKae{+$udKr3@G9ftRJyB`qzJryqXmfdU4goP~*kUXFcwk&PBifquCt#X@|!9EQNb-_{?7%nZ2U3 z+vkt32n<}c>-wV7OL4BJZ|4*bI`YnAA4NTNe!&k-Bfhk*x|s9orj$J^QYu0g&sBXK zaI@=gZ2N%sySTaym|~c)&9GsDa=_@tjW6X!q*v6O81H#%Q3iK%qFbZft_7Z*Es?G% z{392hJ74_zfb?0d2mErt)AR7d#>o#I8PxCVCw7K?@bvsHhx;A1Y;ZIB$ITnzx-&ju zWJI@1?@oW@hwzMlC2rZ3yE^}?58292BL*JZQTh4ovmxsu?|C0T*XG5fyp~I=xMZP< zOSDr@ZK~n~B()YfXx0DJn9}{RFbB@cK|n~3)`5>)Yi~3x*r+x~WpYO(Dn^Kmj1pp^ zBco0I?_;AA51TKKJn?(zRmNq~JM-TTN!c`ITs>?w;GLF(Ki4fkyXM;9nZYY&E^qJs zbjT06#*eRckG#Aww9^Of@vA>&7w)cFuIzVn<@)xkvv)tAW-R~pxwOH_f8~T#&iLa+E-I0@GIM8`>$L&W`LeH!FuDZ5y{E)fa+0>&mx2`H# z{_5UUy(b^MdRx~b_wsuyR}XV7SQ%{9K|L)FvP5Bo4d8x*Dr z_IJ7U*7rLmo^I8&?ZsCXmEXBBrQ4WmH@d%(Ja5ssxoe7=Zis93Va?3y-WAQyT - + true $(MSBuildThisFileDirectory) $(MSBuildThisFileDirectory)..\ + $(PaketRootPath)paket.lock + $(PaketRootPath)paket-files\paket.restore.cached /Library/Frameworks/Mono.framework/Commands/mono mono @@ -43,16 +45,28 @@ - $(PaketCommand) restore --references-files "$(PaketReferences)" + $(PaketCommand) restore --references-file "$(PaketReferences)" RestorePackages; $(BuildDependsOn); - + true + + + + $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) + $([System.IO.File]::ReadAllText('$(PaketLockFilePath)')) + true + false + true + + + diff --git a/.travis.yml b/.travis.yml index e3b57bc20..859d2d8a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,6 @@ env: mono: latest -install: - - dotnet tool install fake-cli -g - script: - mkdir -p build_output - ./install-xamarin-android-ios.sh diff --git a/DEVGUIDE.md b/DEVGUIDE.md index 2c2ad2db7..a6b96d96e 100644 --- a/DEVGUIDE.md +++ b/DEVGUIDE.md @@ -12,7 +12,7 @@ Contributing is easy: ## Dev Notes - Prerequisites -- Visual Studio 2017 / Visual Studio for Mac 7 +- Visual Studio 2017 / Visual Studio for Mac 7 or newer - Xamarin SDK (workload Mobile Development on Visual Studio) - .NET Core SDK 2.1.300 or newer @@ -24,16 +24,10 @@ https://github.com/dotnet/sourcelink#prerequisites ## Dev Notes - Building -Fabulous is built with FAKE 5. -Make sure you have it installed as a global tool before attempting to build -https://fake.build/fake-gettingstarted.html +Fabulous is built with FAKE 5. -``` -dotnet tool install fake-cli -g -``` - -Once done, you can build Fabulous with a single command. -It will take care of every steps: clean, restore, build and pack. +Fabulous can be built with a single command. +It will take care of every steps: install FAKE, clean, restore, build and pack. On OSX: @@ -47,9 +41,8 @@ On Windows: .\build ``` -It is recommended to run this command at least once before working on Fabulous. - -Alternatively, you can run `.paket/paket.exe restore` and `dotnet restore` to ensure that you have all the dependencies before opening Visual Studio. +It is recommended to run this command at least once before working on Fabulous, as some of the code will be generated. +At minimum, you need to run `.\build RunGenerator` to ensure that you have all the dependencies before opening Visual Studio. ## Dev Notes - Running the generator diff --git a/Packages.targets b/Packages.targets index b3ff169e5..d2759339e 100644 --- a/Packages.targets +++ b/Packages.targets @@ -8,8 +8,7 @@ - - + @@ -27,7 +26,6 @@ $(RestoreSources); https://api.nuget.org/v3/index.json; - https://www.myget.org/F/oxyplot; \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index adca5fdb5..9fe4b98ad 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,9 +1,7 @@ image: Visual Studio 2017 -install: - - cinst fake build_script: - - cmd: fake.exe run build.fsx --parallel 3 + - cmd: .\build.cmd test: off version: '{build}' diff --git a/build.cmd b/build.cmd index f7e996fc7..a2ce81400 100644 --- a/build.cmd +++ b/build.cmd @@ -1,3 +1,4 @@ @echo off cls -if "%~1"=="" (fake build) else (fake run build.fsx -t %*) +dotnet restore build.proj +if "%~1"=="" (dotnet fake build) else (dotnet fake run build.fsx -t %*) diff --git a/build.fsx b/build.fsx index 9c7169041..06643f15f 100644 --- a/build.fsx +++ b/build.fsx @@ -1,13 +1,4 @@ -#r "paket: -nuget Fake.Core.ReleaseNotes -nuget Fake.Core.Target -nuget Fake.Core.Xml -nuget Fake.DotNet.Cli -nuget Fake.DotNet.MSBuild -nuget Fake.Dotnet.NuGet -nuget Fake.DotNet.Paket -nuget Fake.IO.FileSystem -nuget Newtonsoft.Json //" +#r "paket: groupref fakebuild //" #load "./.fake/build.fsx/intellisense.fsx" open Fake.Core diff --git a/build.fsx.lock b/build.fsx.lock deleted file mode 100644 index 5648e99ec..000000000 --- a/build.fsx.lock +++ /dev/null @@ -1,686 +0,0 @@ -STORAGE: NONE -RESTRICTION: == netstandard2.0 -NUGET - remote: https://api.nuget.org/v3/index.json - BlackFox.VsWhere (1.0) - FSharp.Core (>= 4.2.3) - Fake.Core.CommandLineParsing (5.12) - FParsec (>= 1.0.3) - FSharp.Core (>= 4.3.4) - Fake.Core.Context (5.12) - FSharp.Core (>= 4.3.4) - Fake.Core.Environment (5.12) - FSharp.Core (>= 4.3.4) - Fake.Core.FakeVar (5.12) - Fake.Core.Context (>= 5.12) - FSharp.Core (>= 4.3.4) - Fake.Core.Process (5.12) - Fake.Core.Environment (>= 5.12) - Fake.Core.FakeVar (>= 5.12) - Fake.Core.String (>= 5.12) - Fake.Core.Trace (>= 5.12) - Fake.IO.FileSystem (>= 5.12) - FSharp.Core (>= 4.3.4) - System.Diagnostics.Process (>= 4.3) - Fake.Core.ReleaseNotes (5.12) - Fake.Core.SemVer (>= 5.12) - Fake.Core.String (>= 5.12) - FSharp.Core (>= 4.3.4) - Fake.Core.SemVer (5.12) - FSharp.Core (>= 4.3.4) - System.Runtime.Numerics (>= 4.3) - Fake.Core.String (5.12) - FSharp.Core (>= 4.3.4) - Fake.Core.Target (5.12) - Fake.Core.CommandLineParsing (>= 5.12) - Fake.Core.Context (>= 5.12) - Fake.Core.Environment (>= 5.12) - Fake.Core.FakeVar (>= 5.12) - Fake.Core.Process (>= 5.12) - Fake.Core.String (>= 5.12) - Fake.Core.Trace (>= 5.12) - FSharp.Control.Reactive (>= 4.1) - FSharp.Core (>= 4.3.4) - System.Reactive.Compatibility (>= 4.1.2) - Fake.Core.Tasks (5.12) - Fake.Core.Trace (>= 5.12) - FSharp.Core (>= 4.3.4) - Fake.Core.Trace (5.12) - Fake.Core.Environment (>= 5.12) - Fake.Core.FakeVar (>= 5.12) - FSharp.Core (>= 4.3.4) - Fake.Core.Xml (5.12) - Fake.Core.String (>= 5.12) - FSharp.Core (>= 4.3.4) - System.Xml.ReaderWriter (>= 4.3.1) - System.Xml.XDocument (>= 4.3) - System.Xml.XPath (>= 4.3) - System.Xml.XPath.XDocument (>= 4.3) - System.Xml.XPath.XmlDocument (>= 4.3) - Fake.DotNet.Cli (5.12) - Fake.Core.Environment (>= 5.12) - Fake.Core.Process (>= 5.12) - Fake.Core.String (>= 5.12) - Fake.Core.Trace (>= 5.12) - Fake.DotNet.MSBuild (>= 5.12) - Fake.IO.FileSystem (>= 5.12) - FSharp.Core (>= 4.3.4) - Newtonsoft.Json (>= 12.0.1) - Fake.DotNet.MSBuild (5.12) - BlackFox.VsWhere (>= 1.0) - Fake.Core.Environment (>= 5.12) - Fake.Core.Process (>= 5.12) - Fake.Core.String (>= 5.12) - Fake.Core.Trace (>= 5.12) - Fake.IO.FileSystem (>= 5.12) - FSharp.Core (>= 4.3.4) - MSBuild.StructuredLogger (>= 2.0.61) - Fake.Dotnet.NuGet (5.12) - Fake.Core.Environment (>= 5.12) - Fake.Core.Process (>= 5.12) - Fake.Core.SemVer (>= 5.12) - Fake.Core.String (>= 5.12) - Fake.Core.Tasks (>= 5.12) - Fake.Core.Trace (>= 5.12) - Fake.Core.Xml (>= 5.12) - Fake.IO.FileSystem (>= 5.12) - Fake.Net.Http (>= 5.12) - FSharp.Core (>= 4.3.4) - Newtonsoft.Json (>= 12.0.1) - System.Net.Http (>= 4.3.4) - Fake.DotNet.Paket (5.12) - Fake.Core.Process (>= 5.12) - Fake.Core.String (>= 5.12) - Fake.Core.Trace (>= 5.12) - Fake.IO.FileSystem (>= 5.12) - FSharp.Core (>= 4.3.4) - Fake.IO.FileSystem (5.12) - Fake.Core.String (>= 5.12) - FSharp.Core (>= 4.3.4) - System.Diagnostics.FileVersionInfo (>= 4.3) - System.IO.FileSystem.Watcher (>= 4.3) - Fake.Net.Http (5.12) - Fake.Core.Trace (>= 5.12) - FSharp.Core (>= 4.3.4) - System.Net.Http (>= 4.3.4) - FParsec (1.0.3) - FSharp.Core (>= 4.2.3) - NETStandard.Library (>= 1.6.1) - FSharp.Control.Reactive (4.1) - FSharp.Core (>= 4.2.3) - System.Reactive (>= 4.0) - FSharp.Core (4.5.4) - Microsoft.Build (15.9.20) - Microsoft.Build.Framework (>= 15.9.20) - Microsoft.Win32.Registry (>= 4.3) - System.Collections.Immutable (>= 1.5) - System.Diagnostics.TraceSource (>= 4.0) - System.IO.Compression (>= 4.3) - System.Reflection.Metadata (>= 1.6) - System.Reflection.TypeExtensions (>= 4.1) - System.Runtime.InteropServices.RuntimeInformation (>= 4.3) - System.Runtime.Loader (>= 4.0) - System.Text.Encoding.CodePages (>= 4.0.1) - System.Threading.Tasks.Dataflow (>= 4.6) - Microsoft.Build.Framework (15.9.20) - System.Runtime.Serialization.Primitives (>= 4.1.1) - System.Threading.Thread (>= 4.0) - Microsoft.Build.Tasks.Core (15.9.20) - Microsoft.Build.Framework (>= 15.9.20) - Microsoft.Build.Utilities.Core (>= 15.9.20) - Microsoft.Win32.Registry (>= 4.3) - System.CodeDom (>= 4.4) - System.Collections.Immutable (>= 1.5) - System.Linq.Parallel (>= 4.0.1) - System.Net.Http (>= 4.3) - System.Reflection.Metadata (>= 1.6) - System.Reflection.TypeExtensions (>= 4.1) - System.Resources.Writer (>= 4.0) - System.Threading.Tasks.Dataflow (>= 4.6) - Microsoft.Build.Utilities.Core (15.9.20) - Microsoft.Build.Framework (>= 15.9.20) - Microsoft.Win32.Registry (>= 4.3) - System.Collections.Immutable (>= 1.5) - System.Runtime.InteropServices.RuntimeInformation (>= 4.3) - System.Text.Encoding.CodePages (>= 4.4) - Microsoft.NETCore.Platforms (2.2) - Microsoft.NETCore.Targets (2.1) - Microsoft.Win32.Primitives (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - Microsoft.Win32.Registry (4.5) - System.Buffers (>= 4.4) - System.Memory (>= 4.5) - System.Security.AccessControl (>= 4.5) - System.Security.Principal.Windows (>= 4.5) - MSBuild.StructuredLogger (2.0.64) - Microsoft.Build (>= 15.8.166) - Microsoft.Build.Framework (>= 15.8.166) - Microsoft.Build.Tasks.Core (>= 15.8.166) - Microsoft.Build.Utilities.Core (>= 15.8.166) - NETStandard.Library (2.0.3) - Microsoft.NETCore.Platforms (>= 1.1) - Newtonsoft.Json (12.0.1) - runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.native.System (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - runtime.native.System.IO.Compression (4.3.2) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - runtime.native.System.Net.Http (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - runtime.native.System.Security.Cryptography.Apple (4.3.1) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (4.3.1) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - System.Buffers (4.5) - System.CodeDom (4.5) - System.Collections (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Collections.Concurrent (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Diagnostics.Tracing (>= 4.3) - System.Globalization (>= 4.3) - System.Reflection (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Collections.Immutable (1.5) - System.Diagnostics.Debug (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Diagnostics.DiagnosticSource (4.5.1) - System.Diagnostics.FileVersionInfo (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.IO.FileSystem (>= 4.3) - System.IO.FileSystem.Primitives (>= 4.3) - System.Reflection.Metadata (>= 1.4.1) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Diagnostics.Process (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.Win32.Primitives (>= 4.3) - Microsoft.Win32.Registry (>= 4.3) - runtime.native.System (>= 4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.IO.FileSystem (>= 4.3) - System.IO.FileSystem.Primitives (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Text.Encoding.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Threading.Thread (>= 4.3) - System.Threading.ThreadPool (>= 4.3) - System.Diagnostics.Tools (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Diagnostics.TraceSource (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - runtime.native.System (>= 4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Diagnostics.Tracing (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Globalization (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Globalization.Calendars (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Globalization (>= 4.3) - System.Runtime (>= 4.3) - System.Globalization.Extensions (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - System.Globalization (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.IO (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.IO.Compression (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - runtime.native.System (>= 4.3) - runtime.native.System.IO.Compression (>= 4.3) - System.Buffers (>= 4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.IO.FileSystem (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.IO (>= 4.3) - System.IO.FileSystem.Primitives (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.IO.FileSystem.Primitives (4.3) - System.Runtime (>= 4.3) - System.IO.FileSystem.Watcher (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.Win32.Primitives (>= 4.3) - runtime.native.System (>= 4.3) - System.Collections (>= 4.3) - System.IO.FileSystem (>= 4.3) - System.IO.FileSystem.Primitives (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Overlapped (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Threading.Thread (>= 4.3) - System.Linq (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Linq.Parallel (4.3) - System.Collections (>= 4.3) - System.Collections.Concurrent (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Diagnostics.Tracing (>= 4.3) - System.Linq (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Memory (4.5.2) - System.Buffers (>= 4.4) - System.Numerics.Vectors (>= 4.4) - System.Runtime.CompilerServices.Unsafe (>= 4.5.2) - System.Net.Http (4.3.4) - Microsoft.NETCore.Platforms (>= 1.1.1) - runtime.native.System (>= 4.3) - runtime.native.System.Net.Http (>= 4.3) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Diagnostics.DiagnosticSource (>= 4.3) - System.Diagnostics.Tracing (>= 4.3) - System.Globalization (>= 4.3) - System.Globalization.Extensions (>= 4.3) - System.IO (>= 4.3) - System.IO.FileSystem (>= 4.3) - System.Net.Primitives (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Security.Cryptography.Algorithms (>= 4.3) - System.Security.Cryptography.Encoding (>= 4.3) - System.Security.Cryptography.OpenSsl (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Security.Cryptography.X509Certificates (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Net.Primitives (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Numerics.Vectors (4.5) - System.Reactive (4.1.2) - System.Runtime.InteropServices.WindowsRuntime (>= 4.3) - System.Threading.Tasks.Extensions (>= 4.5.1) - System.Reactive.Compatibility (4.1.2) - System.Reactive.Core (>= 4.1.2) - System.Reactive.Interfaces (>= 4.1.2) - System.Reactive.Linq (>= 4.1.2) - System.Reactive.PlatformServices (>= 4.1.2) - System.Reactive.Providers (>= 4.1.2) - System.Reactive.Core (4.1.2) - System.Reactive (>= 4.1.2) - System.Threading.Tasks.Extensions (>= 4.5.1) - System.Reactive.Interfaces (4.1.2) - System.Reactive (>= 4.1.2) - System.Threading.Tasks.Extensions (>= 4.5.1) - System.Reactive.Linq (4.1.2) - System.Reactive (>= 4.1.2) - System.Threading.Tasks.Extensions (>= 4.5.1) - System.Reactive.PlatformServices (4.1.2) - System.Reactive (>= 4.1.2) - System.Threading.Tasks.Extensions (>= 4.5.1) - System.Reactive.Providers (4.1.2) - System.Reactive (>= 4.1.2) - System.Threading.Tasks.Extensions (>= 4.5.1) - System.Reflection (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.IO (>= 4.3) - System.Reflection.Primitives (>= 4.3) - System.Runtime (>= 4.3) - System.Reflection.Extensions (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Reflection (>= 4.3) - System.Runtime (>= 4.3) - System.Reflection.Metadata (1.6) - System.Collections.Immutable (>= 1.5) - System.Reflection.Primitives (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Reflection.TypeExtensions (4.5.1) - System.Resources.ResourceManager (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Globalization (>= 4.3) - System.Reflection (>= 4.3) - System.Runtime (>= 4.3) - System.Resources.Writer (4.3) - System.Collections (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Runtime (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime.CompilerServices.Unsafe (4.5.2) - System.Runtime.Extensions (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Runtime.Handles (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Runtime.InteropServices (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Reflection (>= 4.3) - System.Reflection.Primitives (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices.RuntimeInformation (4.3) - runtime.native.System (>= 4.3) - System.Reflection (>= 4.3) - System.Reflection.Extensions (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Threading (>= 4.3) - System.Runtime.InteropServices.WindowsRuntime (4.3) - System.Runtime (>= 4.3) - System.Runtime.Loader (4.3) - System.IO (>= 4.3) - System.Reflection (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Numerics (4.3) - System.Globalization (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Serialization.Primitives (4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Security.AccessControl (4.5) - System.Security.Principal.Windows (>= 4.5) - System.Security.Cryptography.Algorithms (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1) - runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - System.Collections (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Runtime.Numerics (>= 4.3) - System.Security.Cryptography.Encoding (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Security.Cryptography.Cng (4.5) - System.Security.Cryptography.Csp (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - System.IO (>= 4.3) - System.Reflection (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Security.Cryptography.Algorithms (>= 4.3) - System.Security.Cryptography.Encoding (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Security.Cryptography.Encoding (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - System.Collections (>= 4.3) - System.Collections.Concurrent (>= 4.3) - System.Linq (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Security.Cryptography.OpenSsl (4.5) - System.Security.Cryptography.Primitives (4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Security.Cryptography.X509Certificates (4.3.2) - Microsoft.NETCore.Platforms (>= 1.1) - runtime.native.System (>= 4.3) - runtime.native.System.Net.Http (>= 4.3) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.Globalization.Calendars (>= 4.3) - System.IO (>= 4.3) - System.IO.FileSystem (>= 4.3) - System.IO.FileSystem.Primitives (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Runtime.Numerics (>= 4.3) - System.Security.Cryptography.Algorithms (>= 4.3) - System.Security.Cryptography.Cng (>= 4.3) - System.Security.Cryptography.Csp (>= 4.3) - System.Security.Cryptography.Encoding (>= 4.3) - System.Security.Cryptography.OpenSsl (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Security.Principal.Windows (4.5.1) - System.Text.Encoding (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Text.Encoding.CodePages (4.5.1) - System.Runtime.CompilerServices.Unsafe (>= 4.5.2) - System.Text.Encoding.Extensions (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Text.RegularExpressions (4.3) - System.Collections (>= 4.3) - System.Globalization (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Threading (4.3) - System.Runtime (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Threading.Overlapped (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Threading.Tasks (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Threading.Tasks.Dataflow (4.9) - System.Threading.Tasks.Extensions (4.5.2) - System.Runtime.CompilerServices.Unsafe (>= 4.5.2) - System.Threading.Thread (4.3) - System.Runtime (>= 4.3) - System.Threading.ThreadPool (4.3) - System.Runtime (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Xml.ReaderWriter (4.3.1) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.IO.FileSystem (>= 4.3) - System.IO.FileSystem.Primitives (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Text.Encoding.Extensions (>= 4.3) - System.Text.RegularExpressions (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Threading.Tasks.Extensions (>= 4.3) - System.Xml.XDocument (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Diagnostics.Tools (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Reflection (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Xml.ReaderWriter (>= 4.3) - System.Xml.XmlDocument (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Xml.ReaderWriter (>= 4.3) - System.Xml.XPath (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Xml.ReaderWriter (>= 4.3) - System.Xml.XPath.XDocument (4.3) - System.Diagnostics.Debug (>= 4.3) - System.Linq (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Xml.ReaderWriter (>= 4.3) - System.Xml.XDocument (>= 4.3) - System.Xml.XPath (>= 4.3) - System.Xml.XPath.XmlDocument (4.3) - System.Collections (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Xml.ReaderWriter (>= 4.3) - System.Xml.XmlDocument (>= 4.3) - System.Xml.XPath (>= 4.3) diff --git a/build.proj b/build.proj new file mode 100644 index 000000000..19fd9f79d --- /dev/null +++ b/build.proj @@ -0,0 +1,18 @@ + + + + + + netstandard2.0 + + + + $([System.IO.Path]::GetFullPath("$(MSBuildThisFileDirectory)")) + + + + + + + \ No newline at end of file diff --git a/build.sh b/build.sh index 68737098d..88ecc0b45 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,7 @@ #!/bin/bash +dotnet restore build.proj if [ $# -eq 0 ]; then - fake build + dotnet fake build else - fake run build.fsx -t $@ + dotnet fake run build.fsx -t $@ fi \ No newline at end of file diff --git a/docs/tools.md b/docs/tools.md index 078f93c6b..44bb74115 100644 --- a/docs/tools.md +++ b/docs/tools.md @@ -13,6 +13,7 @@ At the time of writing this has been trialled with * Visual Studio + Android (USB Device or Emulator) * Visual Studio for Mac + Android (USB Device or Emulator) * Visual Studio for Mac + iOS (USB Device or Emulator) +* Visual Studio + WPF Some manual set-up is required. The following assumes your app is called `SqueakyApp`: @@ -46,6 +47,8 @@ Some manual set-up is required. The following assumes your app is called `Squea cd SqueakyApp\SqueakyApp fabulous --watch --send + +7. It may be necessary to launch Visual Studio with elevated permissions ("Run as administrator"); otherwise, "runner.EnableLiveUpdate()" may fail to start the HttpListener, which will cause LiveUpdate to fail. Now, whenever you save a file in your core project directory, the `fabulous` watcher will attempt to recompile your changed file and send a representation of its contents to your app via a PUT request to the given webhook. The app then deserializes this representation and @@ -124,6 +127,10 @@ The LiveUpdate mechanism is very experimental. - Debug output is printed to console by `fabulous` - Debug output is printed to app-output by the on-device web server +**ERROR SENDING TO WEBHOOK: "System.Net.WebException: No connection could be made because the target machine actively refused it."** + +If the LiveUpdate console displays this error, it is because Visual Studio needs elevated permissions to execute "EnableLiveUpdate()". The solution is to launch Visual Studio using the "Run as Administrator" option. + ### Design The fabulous watcher does this: diff --git a/extensions/OxyPlot/Fabulous.OxyPlot.fsproj b/extensions/OxyPlot/Fabulous.OxyPlot.fsproj index 492411c8a..c29dde2ef 100644 --- a/extensions/OxyPlot/Fabulous.OxyPlot.fsproj +++ b/extensions/OxyPlot/Fabulous.OxyPlot.fsproj @@ -15,7 +15,6 @@ - diff --git a/paket.dependencies b/paket.dependencies index 9d59a26af..02cdf47a9 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -1,8 +1,26 @@ +version 5.198.0 + +# dependencies used for retrieving FAKE and its modules +group fakebuild + source https://api.nuget.org/v3/index.json + framework: netstandard2.0 + storage: none + + clitool dotnet-fake + nuget Fake.Core.ReleaseNotes + nuget Fake.Core.Target + nuget Fake.Core.Xml + nuget Fake.DotNet.Cli + nuget Fake.DotNet.MSBuild + nuget Fake.Dotnet.NuGet + nuget Fake.DotNet.Paket + nuget Fake.IO.FileSystem + nuget Newtonsoft.Json + # dependencies used when compiling and running the library and neutral parts of samples group neutral framework: netstandard2.0 source https://api.nuget.org/v3/index.json - source https://www.myget.org/F/oxyplot github fsprojects/FSharp.Compiler.PortaCode:master src/ProjectCracker.fs github fsprojects/FSharp.Compiler.PortaCode:master src/CodeModel.fs github fsprojects/FSharp.Compiler.PortaCode:master src/Interpreter.fs @@ -15,8 +33,7 @@ group neutral nuget Xamarin.Forms.Maps 3.5.0.129452 nuget SkiaSharp nuget SkiaSharp.Views.Forms - nuget OxyPlot.Core 2.0.0-unstable0956 # version matching last updated version of OxyPlot.Xamarin.Forms - nuget OxyPlot.Xamarin.Forms 1.1.0-unstable0013 # last version seen on myget + nuget OxyPlot.Xamarin.Forms 1.0.0 nuget Newtonsoft.Json 11.0.2 # Dependencies used when compiling and running Android samples. We can normally use the latest FSharp.Core and diff --git a/paket.lock b/paket.lock index 4c453c735..39c37afa1 100644 --- a/paket.lock +++ b/paket.lock @@ -31,7 +31,6 @@ NUGET FSharp.Data (3.0) Microsoft.CSharp (4.5) Microsoft.NETCore.Platforms (2.2) - Microsoft.NETCore.Targets (2.1) Microsoft.Win32.Primitives (4.3) NETStandard.Library (2.0.3) Microsoft.NETCore.Platforms (>= 1.1) @@ -85,6 +84,234 @@ NUGET System.Runtime.Serialization.Formatters (>= 4.3) System.Runtime.Serialization.Primitives (>= 4.3) System.Xml.XmlDocument (>= 4.3) + System.AppContext (4.3) + System.Collections (4.3) + System.Collections.Concurrent (4.3) + System.ComponentModel.TypeConverter (4.3) + System.Console (4.3.1) + System.Diagnostics.Debug (4.3) + System.Diagnostics.Tools (4.3) + System.Diagnostics.Tracing (4.3) + System.Globalization (4.3) + System.Globalization.Calendars (4.3) + System.IO (4.3) + System.IO.Compression (4.3) + System.IO.Compression.ZipFile (4.3) + System.IO.FileSystem (4.3) + System.IO.FileSystem.Primitives (4.3) + System.Linq (4.3) + System.Linq.Expressions (4.3) + System.Linq.Queryable (4.3) + System.Net.Http (4.3.4) + System.Net.Primitives (4.3) + System.Net.Requests (4.3) + System.Net.Sockets (4.3) + System.ObjectModel (4.3) + System.Reflection (4.3) + System.Reflection.Extensions (4.3) + System.Reflection.Primitives (4.3) + System.Resources.ResourceManager (4.3) + System.Runtime (4.3.1) + System.Runtime.Extensions (4.3.1) + System.Runtime.Handles (4.3) + System.Runtime.InteropServices (4.3) + System.Runtime.InteropServices.RuntimeInformation (4.3) + System.Runtime.Numerics (4.3) + System.Runtime.Serialization.Formatters (4.3) + System.Runtime.Serialization.Primitives (4.3) + System.Security.Cryptography.Algorithms (4.3.1) + System.Security.Cryptography.Encoding (4.3) + System.Security.Cryptography.Primitives (4.3) + System.Security.Cryptography.X509Certificates (4.3.2) + System.Text.Encoding (4.3) + System.Text.Encoding.Extensions (4.3) + System.Text.RegularExpressions (4.3) + System.Threading (4.3) + System.Threading.Tasks (4.3) + System.Threading.Tasks.Parallel (4.3) + System.Threading.Thread (4.3) + System.Threading.ThreadPool (4.3) + System.Threading.Timer (4.3) + System.Xml.ReaderWriter (4.3.1) + System.Xml.XDocument (4.3) + System.Xml.XmlDocument (4.3) + Xamarin.Android.Arch.Core.Common (1.0.0.1) + Xamarin.Android.Arch.Core.Runtime (1.0.0.1) + Xamarin.Android.Arch.Lifecycle.Common (1.0.3.1) + Xamarin.Android.Arch.Lifecycle.Runtime (1.0.3.1) + Xamarin.Android.FSharp.ResourceProvider (1.0.0.25) + Xamarin.Android.Support.Animated.Vector.Drawable (27.0.2.1) + Xamarin.Android.Support.Annotations (27.0.2.1) + Xamarin.Android.Support.Compat (27.0.2.1) + Xamarin.Android.Support.Core.UI (27.0.2.1) + Xamarin.Android.Support.Core.Utils (27.0.2.1) + Xamarin.Android.Support.Design (27.0.2.1) + Xamarin.Android.Support.Fragment (27.0.2.1) + Xamarin.Android.Support.Media.Compat (27.0.2.1) + Xamarin.Android.Support.Transition (27.0.2.1) + Xamarin.Android.Support.v4 (27.0.2.1) + Xamarin.Android.Support.v7.AppCompat (27.0.2.1) + Xamarin.Android.Support.v7.CardView (27.0.2.1) + Xamarin.Android.Support.v7.MediaRouter (27.0.2.1) + Xamarin.Android.Support.v7.Palette (27.0.2.1) + Xamarin.Android.Support.v7.RecyclerView (27.0.2.1) + Xamarin.Android.Support.Vector.Drawable (27.0.2.1) + Xamarin.Forms (3.5.0.129452) + +GROUP fakebuild +STORAGE: NONE +RESTRICTION: == netstandard2.0 +NUGET + remote: https://api.nuget.org/v3/index.json + BlackFox.VsWhere (1.0) + FSharp.Core (>= 4.2.3) + dotnet-fake (5.12.6) - clitool: true + Fake.Core.CommandLineParsing (5.12.6) + FParsec (>= 1.0.3) + FSharp.Core (>= 4.3.4) + Fake.Core.Context (5.12.6) + FSharp.Core (>= 4.3.4) + Fake.Core.Environment (5.12.6) + FSharp.Core (>= 4.3.4) + Fake.Core.FakeVar (5.12.6) + Fake.Core.Context (>= 5.12.6) + FSharp.Core (>= 4.3.4) + Fake.Core.Process (5.12.6) + Fake.Core.Environment (>= 5.12.6) + Fake.Core.FakeVar (>= 5.12.6) + Fake.Core.String (>= 5.12.6) + Fake.Core.Trace (>= 5.12.6) + Fake.IO.FileSystem (>= 5.12.6) + FSharp.Core (>= 4.3.4) + System.Diagnostics.Process (>= 4.3) + Fake.Core.ReleaseNotes (5.12.6) + Fake.Core.SemVer (>= 5.12.6) + Fake.Core.String (>= 5.12.6) + FSharp.Core (>= 4.3.4) + Fake.Core.SemVer (5.12.6) + FSharp.Core (>= 4.3.4) + System.Runtime.Numerics (>= 4.3) + Fake.Core.String (5.12.6) + FSharp.Core (>= 4.3.4) + Fake.Core.Target (5.12.6) + Fake.Core.CommandLineParsing (>= 5.12.6) + Fake.Core.Context (>= 5.12.6) + Fake.Core.Environment (>= 5.12.6) + Fake.Core.FakeVar (>= 5.12.6) + Fake.Core.Process (>= 5.12.6) + Fake.Core.String (>= 5.12.6) + Fake.Core.Trace (>= 5.12.6) + FSharp.Control.Reactive (>= 4.1) + FSharp.Core (>= 4.3.4) + System.Reactive.Compatibility (>= 4.1.3) + Fake.Core.Tasks (5.12.6) + Fake.Core.Trace (>= 5.12.6) + FSharp.Core (>= 4.3.4) + Fake.Core.Trace (5.12.6) + Fake.Core.Environment (>= 5.12.6) + Fake.Core.FakeVar (>= 5.12.6) + FSharp.Core (>= 4.3.4) + Fake.Core.Xml (5.12.6) + Fake.Core.String (>= 5.12.6) + FSharp.Core (>= 4.3.4) + System.Xml.ReaderWriter (>= 4.3.1) + System.Xml.XDocument (>= 4.3) + System.Xml.XPath (>= 4.3) + System.Xml.XPath.XDocument (>= 4.3) + System.Xml.XPath.XmlDocument (>= 4.3) + Fake.DotNet.Cli (5.12.6) + Fake.Core.Environment (>= 5.12.6) + Fake.Core.Process (>= 5.12.6) + Fake.Core.String (>= 5.12.6) + Fake.Core.Trace (>= 5.12.6) + Fake.DotNet.MSBuild (>= 5.12.6) + Fake.IO.FileSystem (>= 5.12.6) + FSharp.Core (>= 4.3.4) + Newtonsoft.Json (>= 12.0.1) + Fake.DotNet.MSBuild (5.12.6) + BlackFox.VsWhere (>= 1.0) + Fake.Core.Environment (>= 5.12.6) + Fake.Core.Process (>= 5.12.6) + Fake.Core.String (>= 5.12.6) + Fake.Core.Trace (>= 5.12.6) + Fake.IO.FileSystem (>= 5.12.6) + FSharp.Core (>= 4.3.4) + MSBuild.StructuredLogger (>= 2.0.68) + Fake.Dotnet.NuGet (5.12.6) + Fake.Core.Environment (>= 5.12.6) + Fake.Core.Process (>= 5.12.6) + Fake.Core.SemVer (>= 5.12.6) + Fake.Core.String (>= 5.12.6) + Fake.Core.Tasks (>= 5.12.6) + Fake.Core.Trace (>= 5.12.6) + Fake.Core.Xml (>= 5.12.6) + Fake.IO.FileSystem (>= 5.12.6) + Fake.Net.Http (>= 5.12.6) + FSharp.Core (>= 4.3.4) + Newtonsoft.Json (>= 12.0.1) + System.Net.Http (>= 4.3.4) + Fake.DotNet.Paket (5.12.6) + Fake.Core.Process (>= 5.12.6) + Fake.Core.String (>= 5.12.6) + Fake.Core.Trace (>= 5.12.6) + Fake.IO.FileSystem (>= 5.12.6) + FSharp.Core (>= 4.3.4) + Fake.IO.FileSystem (5.12.6) + Fake.Core.String (>= 5.12.6) + FSharp.Core (>= 4.3.4) + System.Diagnostics.FileVersionInfo (>= 4.3) + System.IO.FileSystem.Watcher (>= 4.3) + Fake.Net.Http (5.12.6) + Fake.Core.Trace (>= 5.12.6) + FSharp.Core (>= 4.3.4) + System.Net.Http (>= 4.3.4) + FParsec (1.0.3) + FSharp.Core (>= 4.2.3) + NETStandard.Library (>= 1.6.1) + FSharp.Control.Reactive (4.2) + FSharp.Core (>= 4.2.3) + System.Reactive (>= 4.0) + FSharp.Core (4.6.2) + Microsoft.Build (16.0.461) + Microsoft.Build.Framework (16.0.461) + System.Runtime.Serialization.Primitives (>= 4.1.1) + System.Threading.Thread (>= 4.0) + Microsoft.Build.Tasks.Core (16.0.461) + Microsoft.Build.Framework (>= 16.0.461) + Microsoft.Build.Utilities.Core (>= 16.0.461) + Microsoft.Win32.Registry (>= 4.3) + System.CodeDom (>= 4.4) + System.Collections.Immutable (>= 1.5) + System.Linq.Parallel (>= 4.0.1) + System.Net.Http (>= 4.3) + System.Reflection.Metadata (>= 1.6) + System.Reflection.TypeExtensions (>= 4.1) + System.Resources.Writer (>= 4.0) + System.Threading.Tasks.Dataflow (>= 4.6) + Microsoft.Build.Utilities.Core (16.0.461) + Microsoft.Build.Framework (>= 16.0.461) + Microsoft.Win32.Registry (>= 4.3) + System.Collections.Immutable (>= 1.5) + System.Text.Encoding.CodePages (>= 4.0.1) + Microsoft.NETCore.Platforms (2.2) + Microsoft.NETCore.Targets (2.1) + Microsoft.Win32.Primitives (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + Microsoft.Win32.Registry (4.5) + System.Buffers (>= 4.4) + System.Memory (>= 4.5) + System.Security.AccessControl (>= 4.5) + System.Security.Principal.Windows (>= 4.5) + MSBuild.StructuredLogger (2.0.88) + Microsoft.Build (>= 15.8.166) + Microsoft.Build.Framework (>= 15.8.166) + Microsoft.Build.Tasks.Core (>= 15.8.166) + Microsoft.Build.Utilities.Core (>= 15.8.166) + NETStandard.Library (2.0.3) + Microsoft.NETCore.Platforms (>= 1.1) + Newtonsoft.Json (12.0.1) runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) @@ -125,41 +352,254 @@ NUGET runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - System.AppContext (4.3) + System.Buffers (4.5) + System.CodeDom (4.5) System.Collections (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) System.Collections.Concurrent (4.3) - System.ComponentModel.TypeConverter (4.3) - System.Console (4.3.1) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Diagnostics.Tracing (>= 4.3) + System.Globalization (>= 4.3) + System.Reflection (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Collections.Immutable (1.5) System.Diagnostics.Debug (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Diagnostics.DiagnosticSource (4.5.1) + System.Diagnostics.FileVersionInfo (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Reflection.Metadata (>= 1.4.1) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Diagnostics.Process (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.Win32.Primitives (>= 4.3) + Microsoft.Win32.Registry (>= 4.3) + runtime.native.System (>= 4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Text.Encoding.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Thread (>= 4.3) + System.Threading.ThreadPool (>= 4.3) System.Diagnostics.Tools (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) System.Diagnostics.Tracing (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) System.Globalization (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) System.Globalization.Calendars (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Globalization (>= 4.3) + System.Runtime (>= 4.3) + System.Globalization.Extensions (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + System.Globalization (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.InteropServices (>= 4.3) System.IO (4.3) - System.IO.Compression (4.3) - System.IO.Compression.ZipFile (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading.Tasks (>= 4.3) System.IO.FileSystem (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.IO (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading.Tasks (>= 4.3) System.IO.FileSystem.Primitives (4.3) + System.Runtime (>= 4.3) + System.IO.FileSystem.Watcher (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.Win32.Primitives (>= 4.3) + runtime.native.System (>= 4.3) + System.Collections (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Overlapped (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Thread (>= 4.3) System.Linq (4.3) - System.Linq.Expressions (4.3) - System.Linq.Queryable (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Linq.Parallel (4.3) + System.Collections (>= 4.3) + System.Collections.Concurrent (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Diagnostics.Tracing (>= 4.3) + System.Linq (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Memory (4.5.2) + System.Buffers (>= 4.4) + System.Numerics.Vectors (>= 4.4) + System.Runtime.CompilerServices.Unsafe (>= 4.5.2) System.Net.Http (4.3.4) + Microsoft.NETCore.Platforms (>= 1.1.1) + runtime.native.System (>= 4.3) + runtime.native.System.Net.Http (>= 4.3) + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Diagnostics.DiagnosticSource (>= 4.3) + System.Diagnostics.Tracing (>= 4.3) + System.Globalization (>= 4.3) + System.Globalization.Extensions (>= 4.3) + System.IO (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.Net.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Security.Cryptography.Algorithms (>= 4.3) + System.Security.Cryptography.Encoding (>= 4.3) + System.Security.Cryptography.OpenSsl (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Security.Cryptography.X509Certificates (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) System.Net.Primitives (4.3) - System.Net.Requests (4.3) - System.Net.Sockets (4.3) - System.ObjectModel (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Numerics.Vectors (4.5) + System.Reactive (4.1.4) + System.Runtime.InteropServices.WindowsRuntime (>= 4.3) + System.Threading.Tasks.Extensions (>= 4.5.2) + System.Reactive.Compatibility (4.1.4) + System.Reactive.Core (>= 4.1.4) + System.Reactive.Interfaces (>= 4.1.4) + System.Reactive.Linq (>= 4.1.4) + System.Reactive.PlatformServices (>= 4.1.4) + System.Reactive.Providers (>= 4.1.4) + System.Reactive.Core (4.1.4) + System.Reactive (>= 4.1.4) + System.Threading.Tasks.Extensions (>= 4.5.2) + System.Reactive.Interfaces (4.1.4) + System.Reactive (>= 4.1.4) + System.Threading.Tasks.Extensions (>= 4.5.2) + System.Reactive.Linq (4.1.4) + System.Reactive (>= 4.1.4) + System.Threading.Tasks.Extensions (>= 4.5.2) + System.Reactive.PlatformServices (4.1.4) + System.Reactive (>= 4.1.4) + System.Threading.Tasks.Extensions (>= 4.5.2) + System.Reactive.Providers (4.1.4) + System.Reactive (>= 4.1.4) + System.Threading.Tasks.Extensions (>= 4.5.2) System.Reflection (4.3) - System.Reflection.Extensions (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.IO (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Reflection.Metadata (1.6) + System.Collections.Immutable (>= 1.5) System.Reflection.Primitives (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Reflection.TypeExtensions (4.5.1) System.Resources.ResourceManager (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Globalization (>= 4.3) + System.Reflection (>= 4.3) + System.Runtime (>= 4.3) + System.Resources.Writer (4.3) + System.Collections (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Text.Encoding (>= 4.3) System.Runtime (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + System.Runtime.CompilerServices.Unsafe (4.5.2) System.Runtime.Extensions (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + System.Runtime (>= 4.3.1) System.Runtime.Handles (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) System.Runtime.InteropServices (4.3) - System.Runtime.InteropServices.RuntimeInformation (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Reflection (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices.WindowsRuntime (4.3) + System.Runtime (>= 4.3) System.Runtime.Numerics (4.3) - System.Runtime.Serialization.Formatters (4.3) + System.Globalization (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) System.Runtime.Serialization.Primitives (4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Security.AccessControl (4.5) + System.Security.Principal.Windows (>= 4.5) System.Security.Cryptography.Algorithms (4.3.1) Microsoft.NETCore.Platforms (>= 1.1) runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) @@ -177,21 +617,41 @@ NUGET System.Text.Encoding (>= 4.3) System.Security.Cryptography.Cng (4.5) System.Security.Cryptography.Csp (4.3) - System.Security.Cryptography.Encoding (4.3) - System.Security.Cryptography.OpenSsl (4.5) - System.Collections (>= 4.3) + Microsoft.NETCore.Platforms (>= 1.1) System.IO (>= 4.3) + System.Reflection (>= 4.3) System.Resources.ResourceManager (>= 4.3) System.Runtime (>= 4.3) System.Runtime.Extensions (>= 4.3) System.Runtime.Handles (>= 4.3) System.Runtime.InteropServices (>= 4.3) - System.Runtime.Numerics (>= 4.3) System.Security.Cryptography.Algorithms (>= 4.3) System.Security.Cryptography.Encoding (>= 4.3) System.Security.Cryptography.Primitives (>= 4.3) System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Security.Cryptography.Encoding (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + System.Collections (>= 4.3) + System.Collections.Concurrent (>= 4.3) + System.Linq (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Security.Cryptography.OpenSsl (4.5.1) System.Security.Cryptography.Primitives (4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) System.Security.Cryptography.X509Certificates (4.3.2) Microsoft.NETCore.Platforms (>= 1.1) runtime.native.System (>= 4.3) @@ -218,40 +678,116 @@ NUGET System.Security.Cryptography.Primitives (>= 4.3) System.Text.Encoding (>= 4.3) System.Threading (>= 4.3) + System.Security.Principal.Windows (4.5.1) System.Text.Encoding (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Text.Encoding.CodePages (4.5.1) + System.Runtime.CompilerServices.Unsafe (>= 4.5.2) System.Text.Encoding.Extensions (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Text.Encoding (>= 4.3) System.Text.RegularExpressions (4.3) + System.Collections (>= 4.3) + System.Globalization (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) System.Threading (4.3) + System.Runtime (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Overlapped (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) System.Threading.Tasks (4.3) - System.Threading.Tasks.Parallel (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Threading.Tasks.Dataflow (4.9) + System.Threading.Tasks.Extensions (4.5.2) + System.Runtime.CompilerServices.Unsafe (>= 4.5.2) System.Threading.Thread (4.3) + System.Runtime (>= 4.3) System.Threading.ThreadPool (4.3) - System.Threading.Timer (4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) System.Xml.ReaderWriter (4.3.1) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Text.Encoding.Extensions (>= 4.3) + System.Text.RegularExpressions (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Tasks.Extensions (>= 4.3) System.Xml.XDocument (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Diagnostics.Tools (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Reflection (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Xml.ReaderWriter (>= 4.3) System.Xml.XmlDocument (4.3) - Xamarin.Android.Arch.Core.Common (1.0.0.1) - Xamarin.Android.Arch.Core.Runtime (1.0.0.1) - Xamarin.Android.Arch.Lifecycle.Common (1.0.3.1) - Xamarin.Android.Arch.Lifecycle.Runtime (1.0.3.1) - Xamarin.Android.FSharp.ResourceProvider (1.0.0.25) - Xamarin.Android.Support.Animated.Vector.Drawable (27.0.2.1) - Xamarin.Android.Support.Annotations (27.0.2.1) - Xamarin.Android.Support.Compat (27.0.2.1) - Xamarin.Android.Support.Core.UI (27.0.2.1) - Xamarin.Android.Support.Core.Utils (27.0.2.1) - Xamarin.Android.Support.Design (27.0.2.1) - Xamarin.Android.Support.Fragment (27.0.2.1) - Xamarin.Android.Support.Media.Compat (27.0.2.1) - Xamarin.Android.Support.Transition (27.0.2.1) - Xamarin.Android.Support.v4 (27.0.2.1) - Xamarin.Android.Support.v7.AppCompat (27.0.2.1) - Xamarin.Android.Support.v7.CardView (27.0.2.1) - Xamarin.Android.Support.v7.MediaRouter (27.0.2.1) - Xamarin.Android.Support.v7.Palette (27.0.2.1) - Xamarin.Android.Support.v7.RecyclerView (27.0.2.1) - Xamarin.Android.Support.Vector.Drawable (27.0.2.1) - Xamarin.Forms (3.5.0.129452) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Xml.ReaderWriter (>= 4.3) + System.Xml.XPath (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Xml.ReaderWriter (>= 4.3) + System.Xml.XPath.XDocument (4.3) + System.Diagnostics.Debug (>= 4.3) + System.Linq (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Xml.ReaderWriter (>= 4.3) + System.Xml.XDocument (>= 4.3) + System.Xml.XPath (>= 4.3) + System.Xml.XPath.XmlDocument (4.3) + System.Collections (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Xml.ReaderWriter (>= 4.3) + System.Xml.XmlDocument (>= 4.3) + System.Xml.XPath (>= 4.3) GROUP gtkapp RESTRICTION: == net471 @@ -545,7 +1081,10 @@ NUGET remote: https://api.nuget.org/v3/index.json FSharp.Core (4.5.2) Newtonsoft.Json (11.0.2) - OxyPlot.Core (2.0.0-unstable0956) + OxyPlot.Core (1.0) + OxyPlot.Xamarin.Forms (1.0) + OxyPlot.Core (>= 1.0) + Xamarin.Forms (>= 2.3.3.180) SkiaSharp (1.68) SkiaSharp.Views.Forms (1.68) SkiaSharp (>= 1.68) @@ -553,10 +1092,6 @@ NUGET Xamarin.Forms (3.5.0.129452) Xamarin.Forms.Maps (3.5.0.129452) Xamarin.Forms (>= 3.5.0.129452) - remote: https://www.myget.org/F/oxyplot - OxyPlot.Xamarin.Forms (1.1.0-unstable0013) - OxyPlot.Core (>= 2.0.0-unstable0956) - Xamarin.Forms (>= 2.3.3.180) GITHUB remote: fsprojects/FSharp.Compiler.PortaCode src/CodeModel.fs (0c6686bcc518246d879bb3d0e3cd4cdbbc72d5ad) diff --git a/paket.references b/paket.references new file mode 100644 index 000000000..146123280 --- /dev/null +++ b/paket.references @@ -0,0 +1,2 @@ +group FakeBuild + dotnet-fake \ No newline at end of file diff --git a/samples/paket.dependencies b/samples/paket.dependencies new file mode 100644 index 000000000..f288f1ee5 --- /dev/null +++ b/samples/paket.dependencies @@ -0,0 +1 @@ +# This file is here to prevent `paket install` to try add dependencies to the samples \ No newline at end of file diff --git a/src/Fabulous.Core/ViewConverters.fs b/src/Fabulous.Core/ViewConverters.fs index c8a77281c..a24569329 100644 --- a/src/Fabulous.Core/ViewConverters.fs +++ b/src/Fabulous.Core/ViewConverters.fs @@ -301,7 +301,7 @@ module Converters = /// Checks whether an underlying control can be reused given the previous and new view elements let rec canReuseChild (prevChild:ViewElement) (newChild:ViewElement) = - if prevChild.TargetType = newChild.TargetType then + if prevChild.TargetType = newChild.TargetType && canReuseAutomationId prevChild newChild then if newChild.TargetType.IsAssignableFrom(typeof) then canReuseNavigationPage prevChild newChild else @@ -321,6 +321,16 @@ module Converters = | ValueSome prevPages, ValueSome newPages -> (prevPages, newPages) ||> Seq.forall2 canReuseChild | _, _ -> true + /// Checks whether the control can be reused given the previous and the new AutomationId. + /// Xamarin.Forms can't change an already setted AutomationId + and internal canReuseAutomationId (prevChild: ViewElement) (newChild: ViewElement) = + let prevAutomationId = prevChild.TryGetAttribute("AutomationId") + let newAutomationId = newChild.TryGetAttribute("AutomationId") + + match prevAutomationId with + | ValueSome _ when prevAutomationId <> newAutomationId -> false + | _ -> true + /// Update a control given the previous and new view elements let inline updateChild (prevChild:ViewElement) (newChild:ViewElement) targetChild = newChild.UpdateIncremental(prevChild, targetChild) diff --git a/src/Fabulous.Core/ViewHelpers.fs b/src/Fabulous.Core/ViewHelpers.fs index 5a9d9438e..0ed8affcb 100644 --- a/src/Fabulous.Core/ViewHelpers.fs +++ b/src/Fabulous.Core/ViewHelpers.fs @@ -4,6 +4,7 @@ namespace Fabulous.DynamicViews open Fabulous.DynamicViews open System open System.Collections.Generic +open System.Collections.Concurrent open System.Threading open Xamarin.Forms @@ -72,7 +73,7 @@ module SimplerHelpers = /// Debounce multiple calls to a single function let debounce<'T> = - let memoizations = Dictionary(HashIdentity.Structural) + let memoizations = ConcurrentDictionary(HashIdentity.Structural) fun (timeout: int) (fn: 'T -> unit) value -> let key = fn.GetType() match memoizations.TryGetValue(key) with @@ -86,7 +87,7 @@ module SimplerHelpers = match cts.IsCancellationRequested with | true -> () | false -> - memoizations.Remove(key) |> ignore + memoizations.TryRemove(key) |> ignore fn value false // Do not let the timer trigger a second time )) diff --git a/src/Fabulous.Core/Xamarin.Forms.Core.fs b/src/Fabulous.Core/Xamarin.Forms.Core.fs deleted file mode 100644 index 2723a0b26..000000000 --- a/src/Fabulous.Core/Xamarin.Forms.Core.fs +++ /dev/null @@ -1,21943 +0,0 @@ -// Copyright 2018 Fabulous contributors. See LICENSE.md for license. -namespace Fabulous.DynamicViews - -#nowarn "59" // cast always holds -#nowarn "66" // cast always holds -#nowarn "67" // cast always holds - -module ViewAttributes = - let ClassIdAttribKey : AttributeKey<_> = AttributeKey<_>("ClassId") - let StyleIdAttribKey : AttributeKey<_> = AttributeKey<_>("StyleId") - let AutomationIdAttribKey : AttributeKey<_> = AttributeKey<_>("AutomationId") - let ElementCreatedAttribKey : AttributeKey<(obj -> unit)> = AttributeKey<(obj -> unit)>("ElementCreated") - let ElementViewRefAttribKey : AttributeKey<_> = AttributeKey<_>("ElementViewRef") - let AnchorXAttribKey : AttributeKey<_> = AttributeKey<_>("AnchorX") - let AnchorYAttribKey : AttributeKey<_> = AttributeKey<_>("AnchorY") - let BackgroundColorAttribKey : AttributeKey<_> = AttributeKey<_>("BackgroundColor") - let HeightRequestAttribKey : AttributeKey<_> = AttributeKey<_>("HeightRequest") - let InputTransparentAttribKey : AttributeKey<_> = AttributeKey<_>("InputTransparent") - let IsEnabledAttribKey : AttributeKey<_> = AttributeKey<_>("IsEnabled") - let IsVisibleAttribKey : AttributeKey<_> = AttributeKey<_>("IsVisible") - let MinimumHeightRequestAttribKey : AttributeKey<_> = AttributeKey<_>("MinimumHeightRequest") - let MinimumWidthRequestAttribKey : AttributeKey<_> = AttributeKey<_>("MinimumWidthRequest") - let OpacityAttribKey : AttributeKey<_> = AttributeKey<_>("Opacity") - let RotationAttribKey : AttributeKey<_> = AttributeKey<_>("Rotation") - let RotationXAttribKey : AttributeKey<_> = AttributeKey<_>("RotationX") - let RotationYAttribKey : AttributeKey<_> = AttributeKey<_>("RotationY") - let ScaleAttribKey : AttributeKey<_> = AttributeKey<_>("Scale") - let StyleAttribKey : AttributeKey<_> = AttributeKey<_>("Style") - let StyleClassAttribKey : AttributeKey<_> = AttributeKey<_>("StyleClass") - let TranslationXAttribKey : AttributeKey<_> = AttributeKey<_>("TranslationX") - let TranslationYAttribKey : AttributeKey<_> = AttributeKey<_>("TranslationY") - let WidthRequestAttribKey : AttributeKey<_> = AttributeKey<_>("WidthRequest") - let ResourcesAttribKey : AttributeKey<_> = AttributeKey<_>("Resources") - let StylesAttribKey : AttributeKey<_> = AttributeKey<_>("Styles") - let StyleSheetsAttribKey : AttributeKey<_> = AttributeKey<_>("StyleSheets") - let IsTabStopAttribKey : AttributeKey<_> = AttributeKey<_>("IsTabStop") - let ScaleXAttribKey : AttributeKey<_> = AttributeKey<_>("ScaleX") - let ScaleYAttribKey : AttributeKey<_> = AttributeKey<_>("ScaleY") - let TabIndexAttribKey : AttributeKey<_> = AttributeKey<_>("TabIndex") - let ChildrenReorderedAttribKey : AttributeKey<_> = AttributeKey<_>("ChildrenReordered") - let MeasureInvalidatedAttribKey : AttributeKey<_> = AttributeKey<_>("MeasureInvalidated") - let FocusedAttribKey : AttributeKey<_> = AttributeKey<_>("Focused") - let SizeChangedAttribKey : AttributeKey<_> = AttributeKey<_>("SizeChanged") - let UnfocusedAttribKey : AttributeKey<_> = AttributeKey<_>("Unfocused") - let HorizontalOptionsAttribKey : AttributeKey<_> = AttributeKey<_>("HorizontalOptions") - let VerticalOptionsAttribKey : AttributeKey<_> = AttributeKey<_>("VerticalOptions") - let MarginAttribKey : AttributeKey<_> = AttributeKey<_>("Margin") - let GestureRecognizersAttribKey : AttributeKey<_> = AttributeKey<_>("GestureRecognizers") - let TouchPointsAttribKey : AttributeKey<_> = AttributeKey<_>("TouchPoints") - let PanUpdatedAttribKey : AttributeKey<_> = AttributeKey<_>("PanUpdated") - let CommandAttribKey : AttributeKey<_> = AttributeKey<_>("Command") - let NumberOfTapsRequiredAttribKey : AttributeKey<_> = AttributeKey<_>("NumberOfTapsRequired") - let NumberOfClicksRequiredAttribKey : AttributeKey<_> = AttributeKey<_>("NumberOfClicksRequired") - let ButtonsAttribKey : AttributeKey<_> = AttributeKey<_>("Buttons") - let IsPinchingAttribKey : AttributeKey<_> = AttributeKey<_>("IsPinching") - let PinchUpdatedAttribKey : AttributeKey<_> = AttributeKey<_>("PinchUpdated") - let SwipeGestureRecognizerDirectionAttribKey : AttributeKey<_> = AttributeKey<_>("SwipeGestureRecognizerDirection") - let ThresholdAttribKey : AttributeKey<_> = AttributeKey<_>("Threshold") - let SwipedAttribKey : AttributeKey<_> = AttributeKey<_>("Swiped") - let ColorAttribKey : AttributeKey<_> = AttributeKey<_>("Color") - let IsRunningAttribKey : AttributeKey<_> = AttributeKey<_>("IsRunning") - let BoxViewCornerRadiusAttribKey : AttributeKey<_> = AttributeKey<_>("BoxViewCornerRadius") - let ProgressAttribKey : AttributeKey<_> = AttributeKey<_>("Progress") - let IsClippedToBoundsAttribKey : AttributeKey<_> = AttributeKey<_>("IsClippedToBounds") - let PaddingAttribKey : AttributeKey<_> = AttributeKey<_>("Padding") - let ContentAttribKey : AttributeKey<_> = AttributeKey<_>("Content") - let ScrollOrientationAttribKey : AttributeKey<_> = AttributeKey<_>("ScrollOrientation") - let HorizontalScrollBarVisibilityAttribKey : AttributeKey<_> = AttributeKey<_>("HorizontalScrollBarVisibility") - let VerticalScrollBarVisibilityAttribKey : AttributeKey<_> = AttributeKey<_>("VerticalScrollBarVisibility") - let ScrollToAttribKey : AttributeKey<_> = AttributeKey<_>("ScrollTo") - let ScrolledAttribKey : AttributeKey<_> = AttributeKey<_>("Scrolled") - let LayoutAreaOverrideAttribKey : AttributeKey<_> = AttributeKey<_>("LayoutAreaOverride") - let CancelButtonColorAttribKey : AttributeKey<_> = AttributeKey<_>("CancelButtonColor") - let FontFamilyAttribKey : AttributeKey<_> = AttributeKey<_>("FontFamily") - let FontAttributesAttribKey : AttributeKey<_> = AttributeKey<_>("FontAttributes") - let FontSizeAttribKey : AttributeKey<_> = AttributeKey<_>("FontSize") - let HorizontalTextAlignmentAttribKey : AttributeKey<_> = AttributeKey<_>("HorizontalTextAlignment") - let PlaceholderAttribKey : AttributeKey<_> = AttributeKey<_>("Placeholder") - let PlaceholderColorAttribKey : AttributeKey<_> = AttributeKey<_>("PlaceholderColor") - let SearchBarCommandAttribKey : AttributeKey<_> = AttributeKey<_>("SearchBarCommand") - let SearchBarCanExecuteAttribKey : AttributeKey<_> = AttributeKey<_>("SearchBarCanExecute") - let TextAttribKey : AttributeKey<_> = AttributeKey<_>("Text") - let TextColorAttribKey : AttributeKey<_> = AttributeKey<_>("TextColor") - let SearchBarTextChangedAttribKey : AttributeKey<_> = AttributeKey<_>("SearchBarTextChanged") - let ButtonCommandAttribKey : AttributeKey<_> = AttributeKey<_>("ButtonCommand") - let ButtonCanExecuteAttribKey : AttributeKey<_> = AttributeKey<_>("ButtonCanExecute") - let BorderColorAttribKey : AttributeKey<_> = AttributeKey<_>("BorderColor") - let BorderWidthAttribKey : AttributeKey<_> = AttributeKey<_>("BorderWidth") - let ContentLayoutAttribKey : AttributeKey<_> = AttributeKey<_>("ContentLayout") - let ButtonCornerRadiusAttribKey : AttributeKey<_> = AttributeKey<_>("ButtonCornerRadius") - let ButtonImageSourceAttribKey : AttributeKey<_> = AttributeKey<_>("ButtonImageSource") - let MinimumMaximumAttribKey : AttributeKey<_> = AttributeKey<_>("MinimumMaximum") - let ValueAttribKey : AttributeKey<_> = AttributeKey<_>("Value") - let ValueChangedAttribKey : AttributeKey<_> = AttributeKey<_>("ValueChanged") - let IncrementAttribKey : AttributeKey<_> = AttributeKey<_>("Increment") - let IsToggledAttribKey : AttributeKey<_> = AttributeKey<_>("IsToggled") - let ToggledAttribKey : AttributeKey<_> = AttributeKey<_>("Toggled") - let OnColorAttribKey : AttributeKey<_> = AttributeKey<_>("OnColor") - let HeightAttribKey : AttributeKey<_> = AttributeKey<_>("Height") - let OnAttribKey : AttributeKey<_> = AttributeKey<_>("On") - let OnChangedAttribKey : AttributeKey<_> = AttributeKey<_>("OnChanged") - let IntentAttribKey : AttributeKey<_> = AttributeKey<_>("Intent") - let HasUnevenRowsAttribKey : AttributeKey<_> = AttributeKey<_>("HasUnevenRows") - let RowHeightAttribKey : AttributeKey<_> = AttributeKey<_>("RowHeight") - let TableRootAttribKey : AttributeKey<_> = AttributeKey<_>("TableRoot") - let RowDefinitionHeightAttribKey : AttributeKey<_> = AttributeKey<_>("RowDefinitionHeight") - let ColumnDefinitionWidthAttribKey : AttributeKey<_> = AttributeKey<_>("ColumnDefinitionWidth") - let GridRowDefinitionsAttribKey : AttributeKey<_> = AttributeKey<_>("GridRowDefinitions") - let GridColumnDefinitionsAttribKey : AttributeKey<_> = AttributeKey<_>("GridColumnDefinitions") - let RowSpacingAttribKey : AttributeKey<_> = AttributeKey<_>("RowSpacing") - let ColumnSpacingAttribKey : AttributeKey<_> = AttributeKey<_>("ColumnSpacing") - let ChildrenAttribKey : AttributeKey<_> = AttributeKey<_>("Children") - let GridRowAttribKey : AttributeKey<_> = AttributeKey<_>("GridRow") - let GridRowSpanAttribKey : AttributeKey<_> = AttributeKey<_>("GridRowSpan") - let GridColumnAttribKey : AttributeKey<_> = AttributeKey<_>("GridColumn") - let GridColumnSpanAttribKey : AttributeKey<_> = AttributeKey<_>("GridColumnSpan") - let LayoutBoundsAttribKey : AttributeKey<_> = AttributeKey<_>("LayoutBounds") - let LayoutFlagsAttribKey : AttributeKey<_> = AttributeKey<_>("LayoutFlags") - let BoundsConstraintAttribKey : AttributeKey<_> = AttributeKey<_>("BoundsConstraint") - let HeightConstraintAttribKey : AttributeKey<_> = AttributeKey<_>("HeightConstraint") - let WidthConstraintAttribKey : AttributeKey<_> = AttributeKey<_>("WidthConstraint") - let XConstraintAttribKey : AttributeKey<_> = AttributeKey<_>("XConstraint") - let YConstraintAttribKey : AttributeKey<_> = AttributeKey<_>("YConstraint") - let AlignContentAttribKey : AttributeKey<_> = AttributeKey<_>("AlignContent") - let AlignItemsAttribKey : AttributeKey<_> = AttributeKey<_>("AlignItems") - let FlexLayoutDirectionAttribKey : AttributeKey<_> = AttributeKey<_>("FlexLayoutDirection") - let PositionAttribKey : AttributeKey<_> = AttributeKey<_>("Position") - let WrapAttribKey : AttributeKey<_> = AttributeKey<_>("Wrap") - let JustifyContentAttribKey : AttributeKey<_> = AttributeKey<_>("JustifyContent") - let FlexAlignSelfAttribKey : AttributeKey<_> = AttributeKey<_>("FlexAlignSelf") - let FlexOrderAttribKey : AttributeKey<_> = AttributeKey<_>("FlexOrder") - let FlexBasisAttribKey : AttributeKey<_> = AttributeKey<_>("FlexBasis") - let FlexGrowAttribKey : AttributeKey<_> = AttributeKey<_>("FlexGrow") - let FlexShrinkAttribKey : AttributeKey<_> = AttributeKey<_>("FlexShrink") - let DateAttribKey : AttributeKey<_> = AttributeKey<_>("Date") - let FormatAttribKey : AttributeKey<_> = AttributeKey<_>("Format") - let MinimumDateAttribKey : AttributeKey<_> = AttributeKey<_>("MinimumDate") - let MaximumDateAttribKey : AttributeKey<_> = AttributeKey<_>("MaximumDate") - let DateSelectedAttribKey : AttributeKey<_> = AttributeKey<_>("DateSelected") - let PickerItemsSourceAttribKey : AttributeKey<_> = AttributeKey<_>("PickerItemsSource") - let SelectedIndexAttribKey : AttributeKey<_> = AttributeKey<_>("SelectedIndex") - let TitleAttribKey : AttributeKey<_> = AttributeKey<_>("Title") - let SelectedIndexChangedAttribKey : AttributeKey<_> = AttributeKey<_>("SelectedIndexChanged") - let FrameCornerRadiusAttribKey : AttributeKey<_> = AttributeKey<_>("FrameCornerRadius") - let HasShadowAttribKey : AttributeKey<_> = AttributeKey<_>("HasShadow") - let ImageSourceAttribKey : AttributeKey<_> = AttributeKey<_>("ImageSource") - let AspectAttribKey : AttributeKey<_> = AttributeKey<_>("Aspect") - let IsOpaqueAttribKey : AttributeKey<_> = AttributeKey<_>("IsOpaque") - let ImageButtonCommandAttribKey : AttributeKey<_> = AttributeKey<_>("ImageButtonCommand") - let ImageButtonCornerRadiusAttribKey : AttributeKey<_> = AttributeKey<_>("ImageButtonCornerRadius") - let ClickedAttribKey : AttributeKey<_> = AttributeKey<_>("Clicked") - let PressedAttribKey : AttributeKey<_> = AttributeKey<_>("Pressed") - let ReleasedAttribKey : AttributeKey<_> = AttributeKey<_>("Released") - let KeyboardAttribKey : AttributeKey<_> = AttributeKey<_>("Keyboard") - let EditorCompletedAttribKey : AttributeKey<_> = AttributeKey<_>("EditorCompleted") - let TextChangedAttribKey : AttributeKey<_> = AttributeKey<_>("TextChanged") - let AutoSizeAttribKey : AttributeKey<_> = AttributeKey<_>("AutoSize") - let IsTextPredictionEnabledAttribKey : AttributeKey<_> = AttributeKey<_>("IsTextPredictionEnabled") - let IsPasswordAttribKey : AttributeKey<_> = AttributeKey<_>("IsPassword") - let EntryCompletedAttribKey : AttributeKey<_> = AttributeKey<_>("EntryCompleted") - let ReturnTypeAttribKey : AttributeKey<_> = AttributeKey<_>("ReturnType") - let ReturnCommandAttribKey : AttributeKey<_> = AttributeKey<_>("ReturnCommand") - let CursorPositionAttribKey : AttributeKey<_> = AttributeKey<_>("CursorPosition") - let SelectionLengthAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionLength") - let LabelAttribKey : AttributeKey<_> = AttributeKey<_>("Label") - let EntryCellTextChangedAttribKey : AttributeKey<_> = AttributeKey<_>("EntryCellTextChanged") - let VerticalTextAlignmentAttribKey : AttributeKey<_> = AttributeKey<_>("VerticalTextAlignment") - let FormattedTextAttribKey : AttributeKey<_> = AttributeKey<_>("FormattedText") - let LineBreakModeAttribKey : AttributeKey<_> = AttributeKey<_>("LineBreakMode") - let LineHeightAttribKey : AttributeKey<_> = AttributeKey<_>("LineHeight") - let MaxLinesAttribKey : AttributeKey<_> = AttributeKey<_>("MaxLines") - let TextDecorationsAttribKey : AttributeKey<_> = AttributeKey<_>("TextDecorations") - let StackOrientationAttribKey : AttributeKey<_> = AttributeKey<_>("StackOrientation") - let SpacingAttribKey : AttributeKey<_> = AttributeKey<_>("Spacing") - let ForegroundColorAttribKey : AttributeKey<_> = AttributeKey<_>("ForegroundColor") - let PropertyChangedAttribKey : AttributeKey<_> = AttributeKey<_>("PropertyChanged") - let SpansAttribKey : AttributeKey<_> = AttributeKey<_>("Spans") - let TimeAttribKey : AttributeKey<_> = AttributeKey<_>("Time") - let WebSourceAttribKey : AttributeKey<_> = AttributeKey<_>("WebSource") - let ReloadAttribKey : AttributeKey<_> = AttributeKey<_>("Reload") - let NavigatedAttribKey : AttributeKey<_> = AttributeKey<_>("Navigated") - let NavigatingAttribKey : AttributeKey<_> = AttributeKey<_>("Navigating") - let ReloadRequestedAttribKey : AttributeKey<_> = AttributeKey<_>("ReloadRequested") - let BackgroundImageAttribKey : AttributeKey<_> = AttributeKey<_>("BackgroundImage") - let IconAttribKey : AttributeKey<_> = AttributeKey<_>("Icon") - let IsBusyAttribKey : AttributeKey<_> = AttributeKey<_>("IsBusy") - let ToolbarItemsAttribKey : AttributeKey<_> = AttributeKey<_>("ToolbarItems") - let UseSafeAreaAttribKey : AttributeKey<_> = AttributeKey<_>("UseSafeArea") - let Page_AppearingAttribKey : AttributeKey<_> = AttributeKey<_>("Page_Appearing") - let Page_DisappearingAttribKey : AttributeKey<_> = AttributeKey<_>("Page_Disappearing") - let Page_LayoutChangedAttribKey : AttributeKey<_> = AttributeKey<_>("Page_LayoutChanged") - let CarouselPage_CurrentPageAttribKey : AttributeKey<_> = AttributeKey<_>("CarouselPage_CurrentPage") - let CarouselPage_CurrentPageChangedAttribKey : AttributeKey<_> = AttributeKey<_>("CarouselPage_CurrentPageChanged") - let PagesAttribKey : AttributeKey<_> = AttributeKey<_>("Pages") - let BackButtonTitleAttribKey : AttributeKey<_> = AttributeKey<_>("BackButtonTitle") - let HasBackButtonAttribKey : AttributeKey<_> = AttributeKey<_>("HasBackButton") - let HasNavigationBarAttribKey : AttributeKey<_> = AttributeKey<_>("HasNavigationBar") - let TitleIconAttribKey : AttributeKey<_> = AttributeKey<_>("TitleIcon") - let TitleViewAttribKey : AttributeKey<_> = AttributeKey<_>("TitleView") - let BarBackgroundColorAttribKey : AttributeKey<_> = AttributeKey<_>("BarBackgroundColor") - let BarTextColorAttribKey : AttributeKey<_> = AttributeKey<_>("BarTextColor") - let PoppedAttribKey : AttributeKey<_> = AttributeKey<_>("Popped") - let PoppedToRootAttribKey : AttributeKey<_> = AttributeKey<_>("PoppedToRoot") - let PushedAttribKey : AttributeKey<_> = AttributeKey<_>("Pushed") - let TabbedPage_CurrentPageAttribKey : AttributeKey<_> = AttributeKey<_>("TabbedPage_CurrentPage") - let TabbedPage_CurrentPageChangedAttribKey : AttributeKey<_> = AttributeKey<_>("TabbedPage_CurrentPageChanged") - let OnSizeAllocatedCallbackAttribKey : AttributeKey<_> = AttributeKey<_>("OnSizeAllocatedCallback") - let MasterAttribKey : AttributeKey<_> = AttributeKey<_>("Master") - let DetailAttribKey : AttributeKey<_> = AttributeKey<_>("Detail") - let IsGestureEnabledAttribKey : AttributeKey<_> = AttributeKey<_>("IsGestureEnabled") - let IsPresentedAttribKey : AttributeKey<_> = AttributeKey<_>("IsPresented") - let MasterBehaviorAttribKey : AttributeKey<_> = AttributeKey<_>("MasterBehavior") - let IsPresentedChangedAttribKey : AttributeKey<_> = AttributeKey<_>("IsPresentedChanged") - let AcceleratorAttribKey : AttributeKey<_> = AttributeKey<_>("Accelerator") - let TextDetailAttribKey : AttributeKey<_> = AttributeKey<_>("TextDetail") - let TextDetailColorAttribKey : AttributeKey<_> = AttributeKey<_>("TextDetailColor") - let TextCellCommandAttribKey : AttributeKey<_> = AttributeKey<_>("TextCellCommand") - let TextCellCanExecuteAttribKey : AttributeKey<_> = AttributeKey<_>("TextCellCanExecute") - let OrderAttribKey : AttributeKey<_> = AttributeKey<_>("Order") - let PriorityAttribKey : AttributeKey<_> = AttributeKey<_>("Priority") - let ViewAttribKey : AttributeKey<_> = AttributeKey<_>("View") - let ListViewItemsAttribKey : AttributeKey<_> = AttributeKey<_>("ListViewItems") - let FooterAttribKey : AttributeKey<_> = AttributeKey<_>("Footer") - let HeaderAttribKey : AttributeKey<_> = AttributeKey<_>("Header") - let HeaderTemplateAttribKey : AttributeKey<_> = AttributeKey<_>("HeaderTemplate") - let IsGroupingEnabledAttribKey : AttributeKey<_> = AttributeKey<_>("IsGroupingEnabled") - let IsPullToRefreshEnabledAttribKey : AttributeKey<_> = AttributeKey<_>("IsPullToRefreshEnabled") - let IsRefreshingAttribKey : AttributeKey<_> = AttributeKey<_>("IsRefreshing") - let RefreshCommandAttribKey : AttributeKey<_> = AttributeKey<_>("RefreshCommand") - let ListView_SelectedItemAttribKey : AttributeKey<_> = AttributeKey<_>("ListView_SelectedItem") - let ListView_SeparatorVisibilityAttribKey : AttributeKey<_> = AttributeKey<_>("ListView_SeparatorVisibility") - let ListView_SeparatorColorAttribKey : AttributeKey<_> = AttributeKey<_>("ListView_SeparatorColor") - let ListView_ItemAppearingAttribKey : AttributeKey<_> = AttributeKey<_>("ListView_ItemAppearing") - let ListView_ItemDisappearingAttribKey : AttributeKey<_> = AttributeKey<_>("ListView_ItemDisappearing") - let ListView_ItemSelectedAttribKey : AttributeKey<_> = AttributeKey<_>("ListView_ItemSelected") - let ListView_ItemTappedAttribKey : AttributeKey<_> = AttributeKey<_>("ListView_ItemTapped") - let ListView_RefreshingAttribKey : AttributeKey<_> = AttributeKey<_>("ListView_Refreshing") - let SelectionModeAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionMode") - let RefreshControlColorAttribKey : AttributeKey<_> = AttributeKey<_>("RefreshControlColor") - let ListViewGrouped_ItemsSourceAttribKey : AttributeKey<_> = AttributeKey<_>("ListViewGrouped_ItemsSource") - let ListViewGrouped_ShowJumpListAttribKey : AttributeKey<_> = AttributeKey<_>("ListViewGrouped_ShowJumpList") - let ListViewGrouped_SelectedItemAttribKey : AttributeKey<_> = AttributeKey<_>("ListViewGrouped_SelectedItem") - let SeparatorVisibilityAttribKey : AttributeKey<_> = AttributeKey<_>("SeparatorVisibility") - let SeparatorColorAttribKey : AttributeKey<_> = AttributeKey<_>("SeparatorColor") - let ListViewGrouped_ItemAppearingAttribKey : AttributeKey<_> = AttributeKey<_>("ListViewGrouped_ItemAppearing") - let ListViewGrouped_ItemDisappearingAttribKey : AttributeKey<_> = AttributeKey<_>("ListViewGrouped_ItemDisappearing") - let ListViewGrouped_ItemSelectedAttribKey : AttributeKey<_> = AttributeKey<_>("ListViewGrouped_ItemSelected") - let ListViewGrouped_ItemTappedAttribKey : AttributeKey<_> = AttributeKey<_>("ListViewGrouped_ItemTapped") - let RefreshingAttribKey : AttributeKey<_> = AttributeKey<_>("Refreshing") - let TextOverrideAttribKey : AttributeKey<_> = AttributeKey<_>("TextOverride") - let CommandParameterAttribKey : AttributeKey<_> = AttributeKey<_>("CommandParameter") - let IconOverrideAttribKey : AttributeKey<_> = AttributeKey<_>("IconOverride") - let SpanAttribKey : AttributeKey<_> = AttributeKey<_>("Span") - let EmptyViewAttribKey : AttributeKey<_> = AttributeKey<_>("EmptyView") - let ItemsLayoutAttribKey : AttributeKey<_> = AttributeKey<_>("ItemsLayout") - let ItemsSourceAttribKey : AttributeKey<_> = AttributeKey<_>("ItemsSource") - let ScrollToRequestedAttribKey : AttributeKey<_> = AttributeKey<_>("ScrollToRequested") - let iScrollToAttribKey : AttributeKey<_> = AttributeKey<_>("iScrollTo") - let ClearIconAttribKey : AttributeKey<_> = AttributeKey<_>("ClearIcon") - let ClearIconHelpTextAttribKey : AttributeKey<_> = AttributeKey<_>("ClearIconHelpText") - let ClearIconNameAttribKey : AttributeKey<_> = AttributeKey<_>("ClearIconName") - let ClearPlaceholderCommandAttribKey : AttributeKey<_> = AttributeKey<_>("ClearPlaceholderCommand") - let ClearPlaceholderCommandParameterAttribKey : AttributeKey<_> = AttributeKey<_>("ClearPlaceholderCommandParameter") - let ClearPlaceholderEnabledAttribKey : AttributeKey<_> = AttributeKey<_>("ClearPlaceholderEnabled") - let ClearPlaceholderHelpTextAttribKey : AttributeKey<_> = AttributeKey<_>("ClearPlaceholderHelpText") - let ClearPlaceholderIconAttribKey : AttributeKey<_> = AttributeKey<_>("ClearPlaceholderIcon") - let ClearPlaceholderNameAttribKey : AttributeKey<_> = AttributeKey<_>("ClearPlaceholderName") - let DisplayMemberNameAttribKey : AttributeKey<_> = AttributeKey<_>("DisplayMemberName") - let IsSearchEnabledAttribKey : AttributeKey<_> = AttributeKey<_>("IsSearchEnabled") - let QueryAttribKey : AttributeKey<_> = AttributeKey<_>("Query") - let QueryIconAttribKey : AttributeKey<_> = AttributeKey<_>("QueryIcon") - let QueryIconHelpTextAttribKey : AttributeKey<_> = AttributeKey<_>("QueryIconHelpText") - let QueryIconNameAttribKey : AttributeKey<_> = AttributeKey<_>("QueryIconName") - let SearchBoxVisibilityAttribKey : AttributeKey<_> = AttributeKey<_>("SearchBoxVisibility") - let ShowsResultsAttribKey : AttributeKey<_> = AttributeKey<_>("ShowsResults") - let ItemsAttribKey : AttributeKey<_> = AttributeKey<_>("Items") - let MenuItemsAttribKey : AttributeKey<_> = AttributeKey<_>("MenuItems") - let CurrentItemAttribKey : AttributeKey<_> = AttributeKey<_>("CurrentItem") - let FlyoutBackgroundColorAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutBackgroundColor") - let FlyoutBehaviorAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutBehavior") - let FlyoutHeaderAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutHeader") - let FlyoutHeaderBehaviorAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutHeaderBehavior") - let FlyoutIsPresentedAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutIsPresented") - let RouteAttribKey : AttributeKey<_> = AttributeKey<_>("Route") - let RouteHostAttribKey : AttributeKey<_> = AttributeKey<_>("RouteHost") - let RouteSchemeAttribKey : AttributeKey<_> = AttributeKey<_>("RouteScheme") - let OnNavigatedAttribKey : AttributeKey<_> = AttributeKey<_>("OnNavigated") - let OnNavigatingAttribKey : AttributeKey<_> = AttributeKey<_>("OnNavigating") - let GoToAsyncAttribKey : AttributeKey<_> = AttributeKey<_>("GoToAsync") - let FlyoutDisplayOptionsAttribKey : AttributeKey<_> = AttributeKey<_>("FlyoutDisplayOptions") - let SelectedItemAttribKey : AttributeKey<_> = AttributeKey<_>("SelectedItem") - let SelectionChangedCommandAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionChangedCommand") - let SelectionChangedCommandParameterAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionChangedCommandParameter") - let selectableItemsModeAttribKey : AttributeKey<_> = AttributeKey<_>("selectableItemsMode") - let SelectionChangedAttribKey : AttributeKey<_> = AttributeKey<_>("SelectionChanged") - let LocationAttribKey : AttributeKey<_> = AttributeKey<_>("Location") - let ssGoToAsyncAttribKey : AttributeKey<_> = AttributeKey<_>("ssGoToAsync") - let CarouselViewItemsAttribKey : AttributeKey<_> = AttributeKey<_>("CarouselViewItems") - let CollectionViewItemsAttribKey : AttributeKey<_> = AttributeKey<_>("CollectionViewItems") - -type ViewProto() = - static member val ProtoElement : ViewElement option = None with get, set - static member val ProtoVisualElement : ViewElement option = None with get, set - static member val ProtoView : ViewElement option = None with get, set - static member val ProtoIGestureRecognizer : ViewElement option = None with get, set - static member val ProtoPanGestureRecognizer : ViewElement option = None with get, set - static member val ProtoTapGestureRecognizer : ViewElement option = None with get, set - static member val ProtoClickGestureRecognizer : ViewElement option = None with get, set - static member val ProtoPinchGestureRecognizer : ViewElement option = None with get, set - static member val ProtoSwipeGestureRecognizer : ViewElement option = None with get, set - static member val ProtoActivityIndicator : ViewElement option = None with get, set - static member val ProtoBoxView : ViewElement option = None with get, set - static member val ProtoProgressBar : ViewElement option = None with get, set - static member val ProtoLayout : ViewElement option = None with get, set - static member val ProtoScrollView : ViewElement option = None with get, set - static member val ProtoSearchBar : ViewElement option = None with get, set - static member val ProtoButton : ViewElement option = None with get, set - static member val ProtoSlider : ViewElement option = None with get, set - static member val ProtoStepper : ViewElement option = None with get, set - static member val ProtoSwitch : ViewElement option = None with get, set - static member val ProtoCell : ViewElement option = None with get, set - static member val ProtoSwitchCell : ViewElement option = None with get, set - static member val ProtoTableView : ViewElement option = None with get, set - static member val ProtoRowDefinition : ViewElement option = None with get, set - static member val ProtoColumnDefinition : ViewElement option = None with get, set - static member val ProtoGrid : ViewElement option = None with get, set - static member val ProtoAbsoluteLayout : ViewElement option = None with get, set - static member val ProtoRelativeLayout : ViewElement option = None with get, set - static member val ProtoFlexLayout : ViewElement option = None with get, set - static member val ProtoTemplatedView : ViewElement option = None with get, set - static member val ProtoContentView : ViewElement option = None with get, set - static member val ProtoDatePicker : ViewElement option = None with get, set - static member val ProtoPicker : ViewElement option = None with get, set - static member val ProtoFrame : ViewElement option = None with get, set - static member val ProtoImage : ViewElement option = None with get, set - static member val ProtoImageButton : ViewElement option = None with get, set - static member val ProtoInputView : ViewElement option = None with get, set - static member val ProtoEditor : ViewElement option = None with get, set - static member val ProtoEntry : ViewElement option = None with get, set - static member val ProtoEntryCell : ViewElement option = None with get, set - static member val ProtoLabel : ViewElement option = None with get, set - static member val ProtoStackLayout : ViewElement option = None with get, set - static member val ProtoSpan : ViewElement option = None with get, set - static member val ProtoFormattedString : ViewElement option = None with get, set - static member val ProtoTimePicker : ViewElement option = None with get, set - static member val ProtoWebView : ViewElement option = None with get, set - static member val ProtoPage : ViewElement option = None with get, set - static member val ProtoCarouselPage : ViewElement option = None with get, set - static member val ProtoNavigationPage : ViewElement option = None with get, set - static member val ProtoTabbedPage : ViewElement option = None with get, set - static member val ProtoContentPage : ViewElement option = None with get, set - static member val ProtoMasterDetailPage : ViewElement option = None with get, set - static member val ProtoMenuItem : ViewElement option = None with get, set - static member val ProtoTextCell : ViewElement option = None with get, set - static member val ProtoToolbarItem : ViewElement option = None with get, set - static member val ProtoImageCell : ViewElement option = None with get, set - static member val ProtoViewCell : ViewElement option = None with get, set - static member val ProtoListView : ViewElement option = None with get, set - static member val ProtoListViewGrouped : ViewElement option = None with get, set - static member val ProtoBackButtonBehavior : ViewElement option = None with get, set - static member val ProtoGridItemsLayout : ViewElement option = None with get, set - static member val ProtoItemsView : ViewElement option = None with get, set - static member val ProtoSearchHandler : ViewElement option = None with get, set - static member val ProtoShell : ViewElement option = None with get, set - static member val ProtoShellGroupItem : ViewElement option = None with get, set - static member val ProtoSelectableItemsView : ViewElement option = None with get, set - static member val ProtoShellNavigationState : ViewElement option = None with get, set - static member val ProtoShellContent : ViewElement option = None with get, set - static member val ProtoShellItem : ViewElement option = None with get, set - static member val ProtoShellSection : ViewElement option = None with get, set - static member val ProtoCarouselView : ViewElement option = None with get, set - static member val ProtoCollectionView : ViewElement option = None with get, set - -type ViewBuilders() = - /// Builds the attributes for a Element in the view - static member inline BuildElement(attribCount: int, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match classId with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match styleId with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match automationId with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match created with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match ref with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = new AttributesBuilder(attribCount) - match classId with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClassIdAttribKey, (v)) - match styleId with None -> () | Some v -> attribBuilder.Add(ViewAttributes.StyleIdAttribKey, (v)) - match automationId with None -> () | Some v -> attribBuilder.Add(ViewAttributes.AutomationIdAttribKey, (v)) - match created with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ElementCreatedAttribKey, (v)) - match ref with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ElementViewRefAttribKey, (v)) - attribBuilder - - static member val CreateFuncElement : (unit -> Xamarin.Forms.Element) = (fun () -> ViewBuilders.CreateElement()) with get, set - - static member CreateElement () : Xamarin.Forms.Element = - failwith "can't create Xamarin.Forms.Element" - - static member val UpdateFuncElement = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Element) -> ViewBuilders.UpdateElement (prevOpt, curr, target)) - - static member UpdateElement (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Element) = - let mutable prevClassIdOpt = ValueNone - let mutable currClassIdOpt = ValueNone - let mutable prevStyleIdOpt = ValueNone - let mutable currStyleIdOpt = ValueNone - let mutable prevAutomationIdOpt = ValueNone - let mutable currAutomationIdOpt = ValueNone - let mutable prevElementCreatedOpt = ValueNone - let mutable currElementCreatedOpt = ValueNone - let mutable prevElementViewRefOpt = ValueNone - let mutable currElementViewRefOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ClassIdAttribKey.KeyValue then - currClassIdOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.StyleIdAttribKey.KeyValue then - currStyleIdOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.AutomationIdAttribKey.KeyValue then - currAutomationIdOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.ElementCreatedAttribKey.KeyValue then - currElementCreatedOpt <- ValueSome (kvp.Value :?> obj -> unit) - if kvp.Key = ViewAttributes.ElementViewRefAttribKey.KeyValue then - currElementViewRefOpt <- ValueSome (kvp.Value :?> ViewRef) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ClassIdAttribKey.KeyValue then - prevClassIdOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.StyleIdAttribKey.KeyValue then - prevStyleIdOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.AutomationIdAttribKey.KeyValue then - prevAutomationIdOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.ElementCreatedAttribKey.KeyValue then - prevElementCreatedOpt <- ValueSome (kvp.Value :?> obj -> unit) - if kvp.Key = ViewAttributes.ElementViewRefAttribKey.KeyValue then - prevElementViewRefOpt <- ValueSome (kvp.Value :?> ViewRef) - match prevClassIdOpt, currClassIdOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ClassId <- currValue - | ValueSome _, ValueNone -> target.ClassId <- null - | ValueNone, ValueNone -> () - match prevStyleIdOpt, currStyleIdOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.StyleId <- currValue - | ValueSome _, ValueNone -> target.StyleId <- null - | ValueNone, ValueNone -> () - match prevAutomationIdOpt, currAutomationIdOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.AutomationId <- currValue - | ValueSome _, ValueNone -> target.AutomationId <- null - | ValueNone, ValueNone -> () - (fun _ _ _ -> ()) prevElementCreatedOpt currElementCreatedOpt target - (fun _ _ _ -> ()) prevElementViewRefOpt currElementViewRefOpt target - - static member inline ConstructElement(?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Element -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildElement(0, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncElement, ViewBuilders.UpdateFuncElement, attribBuilder) - - /// Builds the attributes for a VisualElement in the view - static member inline BuildVisualElement(attribCount: int, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match anchorX with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match anchorY with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match backgroundColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match heightRequest with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match inputTransparent with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isEnabled with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isVisible with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match minimumHeightRequest with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match minimumWidthRequest with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match opacity with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match rotation with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match rotationX with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match rotationY with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match scale with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match style with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match styleClass with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match translationX with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match translationY with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match widthRequest with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match resources with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match styles with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match styleSheets with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isTabStop with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match scaleX with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match scaleY with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match tabIndex with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match childrenReordered with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match measureInvalidated with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match focused with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match sizeChanged with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match unfocused with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match anchorX with None -> () | Some v -> attribBuilder.Add(ViewAttributes.AnchorXAttribKey, (v)) - match anchorY with None -> () | Some v -> attribBuilder.Add(ViewAttributes.AnchorYAttribKey, (v)) - match backgroundColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.BackgroundColorAttribKey, (v)) - match heightRequest with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HeightRequestAttribKey, (v)) - match inputTransparent with None -> () | Some v -> attribBuilder.Add(ViewAttributes.InputTransparentAttribKey, (v)) - match isEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsEnabledAttribKey, (v)) - match isVisible with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsVisibleAttribKey, (v)) - match minimumHeightRequest with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MinimumHeightRequestAttribKey, (v)) - match minimumWidthRequest with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MinimumWidthRequestAttribKey, (v)) - match opacity with None -> () | Some v -> attribBuilder.Add(ViewAttributes.OpacityAttribKey, (v)) - match rotation with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RotationAttribKey, (v)) - match rotationX with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RotationXAttribKey, (v)) - match rotationY with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RotationYAttribKey, (v)) - match scale with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ScaleAttribKey, (v)) - match style with None -> () | Some v -> attribBuilder.Add(ViewAttributes.StyleAttribKey, (v)) - match styleClass with None -> () | Some v -> attribBuilder.Add(ViewAttributes.StyleClassAttribKey, makeStyleClass(v)) - match translationX with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TranslationXAttribKey, (v)) - match translationY with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TranslationYAttribKey, (v)) - match widthRequest with None -> () | Some v -> attribBuilder.Add(ViewAttributes.WidthRequestAttribKey, (v)) - match resources with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ResourcesAttribKey, (v)) - match styles with None -> () | Some v -> attribBuilder.Add(ViewAttributes.StylesAttribKey, (v)) - match styleSheets with None -> () | Some v -> attribBuilder.Add(ViewAttributes.StyleSheetsAttribKey, (v)) - match isTabStop with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsTabStopAttribKey, (v)) - match scaleX with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ScaleXAttribKey, (v)) - match scaleY with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ScaleYAttribKey, (v)) - match tabIndex with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TabIndexAttribKey, (v)) - match childrenReordered with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ChildrenReorderedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match measureInvalidated with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MeasureInvalidatedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match focused with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FocusedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match sizeChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SizeChangedAttribKey, (fun f -> System.EventHandler(fun sender _args -> let visualElement = sender :?> Xamarin.Forms.VisualElement in f (Fabulous.CustomControls.SizeChangedEventArgs(visualElement.Width, visualElement.Height))))(v)) - match unfocused with None -> () | Some v -> attribBuilder.Add(ViewAttributes.UnfocusedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - attribBuilder - - static member val CreateFuncVisualElement : (unit -> Xamarin.Forms.VisualElement) = (fun () -> ViewBuilders.CreateVisualElement()) with get, set - - static member CreateVisualElement () : Xamarin.Forms.VisualElement = - failwith "can't create Xamarin.Forms.VisualElement" - - static member val UpdateFuncVisualElement = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.VisualElement) -> ViewBuilders.UpdateVisualElement (prevOpt, curr, target)) - - static member UpdateVisualElement (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.VisualElement) = - // update the inherited Element element - let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevAnchorXOpt = ValueNone - let mutable currAnchorXOpt = ValueNone - let mutable prevAnchorYOpt = ValueNone - let mutable currAnchorYOpt = ValueNone - let mutable prevBackgroundColorOpt = ValueNone - let mutable currBackgroundColorOpt = ValueNone - let mutable prevHeightRequestOpt = ValueNone - let mutable currHeightRequestOpt = ValueNone - let mutable prevInputTransparentOpt = ValueNone - let mutable currInputTransparentOpt = ValueNone - let mutable prevIsEnabledOpt = ValueNone - let mutable currIsEnabledOpt = ValueNone - let mutable prevIsVisibleOpt = ValueNone - let mutable currIsVisibleOpt = ValueNone - let mutable prevMinimumHeightRequestOpt = ValueNone - let mutable currMinimumHeightRequestOpt = ValueNone - let mutable prevMinimumWidthRequestOpt = ValueNone - let mutable currMinimumWidthRequestOpt = ValueNone - let mutable prevOpacityOpt = ValueNone - let mutable currOpacityOpt = ValueNone - let mutable prevRotationOpt = ValueNone - let mutable currRotationOpt = ValueNone - let mutable prevRotationXOpt = ValueNone - let mutable currRotationXOpt = ValueNone - let mutable prevRotationYOpt = ValueNone - let mutable currRotationYOpt = ValueNone - let mutable prevScaleOpt = ValueNone - let mutable currScaleOpt = ValueNone - let mutable prevStyleOpt = ValueNone - let mutable currStyleOpt = ValueNone - let mutable prevStyleClassOpt = ValueNone - let mutable currStyleClassOpt = ValueNone - let mutable prevTranslationXOpt = ValueNone - let mutable currTranslationXOpt = ValueNone - let mutable prevTranslationYOpt = ValueNone - let mutable currTranslationYOpt = ValueNone - let mutable prevWidthRequestOpt = ValueNone - let mutable currWidthRequestOpt = ValueNone - let mutable prevResourcesOpt = ValueNone - let mutable currResourcesOpt = ValueNone - let mutable prevStylesOpt = ValueNone - let mutable currStylesOpt = ValueNone - let mutable prevStyleSheetsOpt = ValueNone - let mutable currStyleSheetsOpt = ValueNone - let mutable prevIsTabStopOpt = ValueNone - let mutable currIsTabStopOpt = ValueNone - let mutable prevScaleXOpt = ValueNone - let mutable currScaleXOpt = ValueNone - let mutable prevScaleYOpt = ValueNone - let mutable currScaleYOpt = ValueNone - let mutable prevTabIndexOpt = ValueNone - let mutable currTabIndexOpt = ValueNone - let mutable prevChildrenReorderedOpt = ValueNone - let mutable currChildrenReorderedOpt = ValueNone - let mutable prevMeasureInvalidatedOpt = ValueNone - let mutable currMeasureInvalidatedOpt = ValueNone - let mutable prevFocusedOpt = ValueNone - let mutable currFocusedOpt = ValueNone - let mutable prevSizeChangedOpt = ValueNone - let mutable currSizeChangedOpt = ValueNone - let mutable prevUnfocusedOpt = ValueNone - let mutable currUnfocusedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.AnchorXAttribKey.KeyValue then - currAnchorXOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.AnchorYAttribKey.KeyValue then - currAnchorYOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.BackgroundColorAttribKey.KeyValue then - currBackgroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.HeightRequestAttribKey.KeyValue then - currHeightRequestOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.InputTransparentAttribKey.KeyValue then - currInputTransparentOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.IsEnabledAttribKey.KeyValue then - currIsEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.IsVisibleAttribKey.KeyValue then - currIsVisibleOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.MinimumHeightRequestAttribKey.KeyValue then - currMinimumHeightRequestOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.MinimumWidthRequestAttribKey.KeyValue then - currMinimumWidthRequestOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.OpacityAttribKey.KeyValue then - currOpacityOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.RotationAttribKey.KeyValue then - currRotationOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.RotationXAttribKey.KeyValue then - currRotationXOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.RotationYAttribKey.KeyValue then - currRotationYOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ScaleAttribKey.KeyValue then - currScaleOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.StyleAttribKey.KeyValue then - currStyleOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Style) - if kvp.Key = ViewAttributes.StyleClassAttribKey.KeyValue then - currStyleClassOpt <- ValueSome (kvp.Value :?> System.Collections.Generic.IList) - if kvp.Key = ViewAttributes.TranslationXAttribKey.KeyValue then - currTranslationXOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.TranslationYAttribKey.KeyValue then - currTranslationYOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.WidthRequestAttribKey.KeyValue then - currWidthRequestOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ResourcesAttribKey.KeyValue then - currResourcesOpt <- ValueSome (kvp.Value :?> (string * obj) list) - if kvp.Key = ViewAttributes.StylesAttribKey.KeyValue then - currStylesOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Style list) - if kvp.Key = ViewAttributes.StyleSheetsAttribKey.KeyValue then - currStyleSheetsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.StyleSheets.StyleSheet list) - if kvp.Key = ViewAttributes.IsTabStopAttribKey.KeyValue then - currIsTabStopOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.ScaleXAttribKey.KeyValue then - currScaleXOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ScaleYAttribKey.KeyValue then - currScaleYOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.TabIndexAttribKey.KeyValue then - currTabIndexOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.ChildrenReorderedAttribKey.KeyValue then - currChildrenReorderedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.MeasureInvalidatedAttribKey.KeyValue then - currMeasureInvalidatedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.FocusedAttribKey.KeyValue then - currFocusedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.SizeChangedAttribKey.KeyValue then - currSizeChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.UnfocusedAttribKey.KeyValue then - currUnfocusedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.AnchorXAttribKey.KeyValue then - prevAnchorXOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.AnchorYAttribKey.KeyValue then - prevAnchorYOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.BackgroundColorAttribKey.KeyValue then - prevBackgroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.HeightRequestAttribKey.KeyValue then - prevHeightRequestOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.InputTransparentAttribKey.KeyValue then - prevInputTransparentOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.IsEnabledAttribKey.KeyValue then - prevIsEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.IsVisibleAttribKey.KeyValue then - prevIsVisibleOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.MinimumHeightRequestAttribKey.KeyValue then - prevMinimumHeightRequestOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.MinimumWidthRequestAttribKey.KeyValue then - prevMinimumWidthRequestOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.OpacityAttribKey.KeyValue then - prevOpacityOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.RotationAttribKey.KeyValue then - prevRotationOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.RotationXAttribKey.KeyValue then - prevRotationXOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.RotationYAttribKey.KeyValue then - prevRotationYOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ScaleAttribKey.KeyValue then - prevScaleOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.StyleAttribKey.KeyValue then - prevStyleOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Style) - if kvp.Key = ViewAttributes.StyleClassAttribKey.KeyValue then - prevStyleClassOpt <- ValueSome (kvp.Value :?> System.Collections.Generic.IList) - if kvp.Key = ViewAttributes.TranslationXAttribKey.KeyValue then - prevTranslationXOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.TranslationYAttribKey.KeyValue then - prevTranslationYOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.WidthRequestAttribKey.KeyValue then - prevWidthRequestOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ResourcesAttribKey.KeyValue then - prevResourcesOpt <- ValueSome (kvp.Value :?> (string * obj) list) - if kvp.Key = ViewAttributes.StylesAttribKey.KeyValue then - prevStylesOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Style list) - if kvp.Key = ViewAttributes.StyleSheetsAttribKey.KeyValue then - prevStyleSheetsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.StyleSheets.StyleSheet list) - if kvp.Key = ViewAttributes.IsTabStopAttribKey.KeyValue then - prevIsTabStopOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.ScaleXAttribKey.KeyValue then - prevScaleXOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ScaleYAttribKey.KeyValue then - prevScaleYOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.TabIndexAttribKey.KeyValue then - prevTabIndexOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.ChildrenReorderedAttribKey.KeyValue then - prevChildrenReorderedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.MeasureInvalidatedAttribKey.KeyValue then - prevMeasureInvalidatedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.FocusedAttribKey.KeyValue then - prevFocusedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.SizeChangedAttribKey.KeyValue then - prevSizeChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.UnfocusedAttribKey.KeyValue then - prevUnfocusedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevAnchorXOpt, currAnchorXOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.AnchorX <- currValue - | ValueSome _, ValueNone -> target.AnchorX <- 0.0 - | ValueNone, ValueNone -> () - match prevAnchorYOpt, currAnchorYOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.AnchorY <- currValue - | ValueSome _, ValueNone -> target.AnchorY <- 0.0 - | ValueNone, ValueNone -> () - match prevBackgroundColorOpt, currBackgroundColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.BackgroundColor <- currValue - | ValueSome _, ValueNone -> target.BackgroundColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevHeightRequestOpt, currHeightRequestOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.HeightRequest <- currValue - | ValueSome _, ValueNone -> target.HeightRequest <- -1.0 - | ValueNone, ValueNone -> () - match prevInputTransparentOpt, currInputTransparentOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.InputTransparent <- currValue - | ValueSome _, ValueNone -> target.InputTransparent <- false - | ValueNone, ValueNone -> () - match prevIsEnabledOpt, currIsEnabledOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsEnabled <- currValue - | ValueSome _, ValueNone -> target.IsEnabled <- true - | ValueNone, ValueNone -> () - match prevIsVisibleOpt, currIsVisibleOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsVisible <- currValue - | ValueSome _, ValueNone -> target.IsVisible <- true - | ValueNone, ValueNone -> () - match prevMinimumHeightRequestOpt, currMinimumHeightRequestOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.MinimumHeightRequest <- currValue - | ValueSome _, ValueNone -> target.MinimumHeightRequest <- -1.0 - | ValueNone, ValueNone -> () - match prevMinimumWidthRequestOpt, currMinimumWidthRequestOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.MinimumWidthRequest <- currValue - | ValueSome _, ValueNone -> target.MinimumWidthRequest <- -1.0 - | ValueNone, ValueNone -> () - match prevOpacityOpt, currOpacityOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Opacity <- currValue - | ValueSome _, ValueNone -> target.Opacity <- 1.0 - | ValueNone, ValueNone -> () - match prevRotationOpt, currRotationOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Rotation <- currValue - | ValueSome _, ValueNone -> target.Rotation <- 0.0 - | ValueNone, ValueNone -> () - match prevRotationXOpt, currRotationXOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.RotationX <- currValue - | ValueSome _, ValueNone -> target.RotationX <- 0.0 - | ValueNone, ValueNone -> () - match prevRotationYOpt, currRotationYOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.RotationY <- currValue - | ValueSome _, ValueNone -> target.RotationY <- 0.0 - | ValueNone, ValueNone -> () - match prevScaleOpt, currScaleOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Scale <- currValue - | ValueSome _, ValueNone -> target.Scale <- 1.0 - | ValueNone, ValueNone -> () - match prevStyleOpt, currStyleOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Style <- currValue - | ValueSome _, ValueNone -> target.Style <- null - | ValueNone, ValueNone -> () - updateStyleClass prevStyleClassOpt currStyleClassOpt target - match prevTranslationXOpt, currTranslationXOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.TranslationX <- currValue - | ValueSome _, ValueNone -> target.TranslationX <- 0.0 - | ValueNone, ValueNone -> () - match prevTranslationYOpt, currTranslationYOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.TranslationY <- currValue - | ValueSome _, ValueNone -> target.TranslationY <- 0.0 - | ValueNone, ValueNone -> () - match prevWidthRequestOpt, currWidthRequestOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.WidthRequest <- currValue - | ValueSome _, ValueNone -> target.WidthRequest <- -1.0 - | ValueNone, ValueNone -> () - updateResources prevResourcesOpt currResourcesOpt target - updateStyles prevStylesOpt currStylesOpt target - updateStyleSheets prevStyleSheetsOpt currStyleSheetsOpt target - match prevIsTabStopOpt, currIsTabStopOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsTabStop <- currValue - | ValueSome _, ValueNone -> target.IsTabStop <- true - | ValueNone, ValueNone -> () - match prevScaleXOpt, currScaleXOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ScaleX <- currValue - | ValueSome _, ValueNone -> target.ScaleX <- 0.0 - | ValueNone, ValueNone -> () - match prevScaleYOpt, currScaleYOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ScaleY <- currValue - | ValueSome _, ValueNone -> target.ScaleY <- 0.0 - | ValueNone, ValueNone -> () - match prevTabIndexOpt, currTabIndexOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.TabIndex <- currValue - | ValueSome _, ValueNone -> target.TabIndex <- 0 - | ValueNone, ValueNone -> () - match prevChildrenReorderedOpt, currChildrenReorderedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.ChildrenReordered.RemoveHandler(prevValue); target.ChildrenReordered.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.ChildrenReordered.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.ChildrenReordered.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevMeasureInvalidatedOpt, currMeasureInvalidatedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.MeasureInvalidated.RemoveHandler(prevValue); target.MeasureInvalidated.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.MeasureInvalidated.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.MeasureInvalidated.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevFocusedOpt, currFocusedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Focused.RemoveHandler(prevValue); target.Focused.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Focused.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Focused.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevSizeChangedOpt, currSizeChangedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.SizeChanged.RemoveHandler(prevValue); target.SizeChanged.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.SizeChanged.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.SizeChanged.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevUnfocusedOpt, currUnfocusedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Unfocused.RemoveHandler(prevValue); target.Unfocused.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Unfocused.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Unfocused.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructVisualElement(?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.VisualElement -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildVisualElement(0, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncVisualElement, ViewBuilders.UpdateFuncVisualElement, attribBuilder) - - /// Builds the attributes for a View in the view - static member inline BuildView(attribCount: int, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match horizontalOptions with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match verticalOptions with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match margin with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match gestureRecognizers with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildVisualElement(attribCount, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match horizontalOptions with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HorizontalOptionsAttribKey, (v)) - match verticalOptions with None -> () | Some v -> attribBuilder.Add(ViewAttributes.VerticalOptionsAttribKey, (v)) - match margin with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MarginAttribKey, makeThickness(v)) - match gestureRecognizers with None -> () | Some v -> attribBuilder.Add(ViewAttributes.GestureRecognizersAttribKey, Array.ofList(v)) - attribBuilder - - static member val CreateFuncView : (unit -> Xamarin.Forms.View) = (fun () -> ViewBuilders.CreateView()) with get, set - - static member CreateView () : Xamarin.Forms.View = - failwith "can't create Xamarin.Forms.View" - - static member val UpdateFuncView = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.View) -> ViewBuilders.UpdateView (prevOpt, curr, target)) - - static member UpdateView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.View) = - // update the inherited VisualElement element - let baseElement = (if ViewProto.ProtoVisualElement.IsNone then ViewProto.ProtoVisualElement <- Some (ViewBuilders.ConstructVisualElement())); ViewProto.ProtoVisualElement.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevHorizontalOptionsOpt = ValueNone - let mutable currHorizontalOptionsOpt = ValueNone - let mutable prevVerticalOptionsOpt = ValueNone - let mutable currVerticalOptionsOpt = ValueNone - let mutable prevMarginOpt = ValueNone - let mutable currMarginOpt = ValueNone - let mutable prevGestureRecognizersOpt = ValueNone - let mutable currGestureRecognizersOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.HorizontalOptionsAttribKey.KeyValue then - currHorizontalOptionsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.LayoutOptions) - if kvp.Key = ViewAttributes.VerticalOptionsAttribKey.KeyValue then - currVerticalOptionsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.LayoutOptions) - if kvp.Key = ViewAttributes.MarginAttribKey.KeyValue then - currMarginOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Thickness) - if kvp.Key = ViewAttributes.GestureRecognizersAttribKey.KeyValue then - currGestureRecognizersOpt <- ValueSome (kvp.Value :?> ViewElement[]) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.HorizontalOptionsAttribKey.KeyValue then - prevHorizontalOptionsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.LayoutOptions) - if kvp.Key = ViewAttributes.VerticalOptionsAttribKey.KeyValue then - prevVerticalOptionsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.LayoutOptions) - if kvp.Key = ViewAttributes.MarginAttribKey.KeyValue then - prevMarginOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Thickness) - if kvp.Key = ViewAttributes.GestureRecognizersAttribKey.KeyValue then - prevGestureRecognizersOpt <- ValueSome (kvp.Value :?> ViewElement[]) - match prevHorizontalOptionsOpt, currHorizontalOptionsOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.HorizontalOptions <- currValue - | ValueSome _, ValueNone -> target.HorizontalOptions <- Xamarin.Forms.LayoutOptions.Fill - | ValueNone, ValueNone -> () - match prevVerticalOptionsOpt, currVerticalOptionsOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.VerticalOptions <- currValue - | ValueSome _, ValueNone -> target.VerticalOptions <- Xamarin.Forms.LayoutOptions.Fill - | ValueNone, ValueNone -> () - match prevMarginOpt, currMarginOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Margin <- currValue - | ValueSome _, ValueNone -> target.Margin <- Unchecked.defaultof - | ValueNone, ValueNone -> () - updateCollectionGeneric prevGestureRecognizersOpt currGestureRecognizersOpt target.GestureRecognizers - (fun (x:ViewElement) -> x.Create() :?> Xamarin.Forms.IGestureRecognizer) - (fun _ _ _ -> ()) - canReuseChild - updateChild - - static member inline ConstructView(?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.View -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildView(0, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncView, ViewBuilders.UpdateFuncView, attribBuilder) - - /// Builds the attributes for a IGestureRecognizer in the view - static member inline BuildIGestureRecognizer(attribCount: int) = - let attribBuilder = new AttributesBuilder(attribCount) - attribBuilder - - static member val CreateFuncIGestureRecognizer : (unit -> Xamarin.Forms.IGestureRecognizer) = (fun () -> ViewBuilders.CreateIGestureRecognizer()) with get, set - - static member CreateIGestureRecognizer () : Xamarin.Forms.IGestureRecognizer = - failwith "can't create Xamarin.Forms.IGestureRecognizer" - - static member val UpdateFuncIGestureRecognizer = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.IGestureRecognizer) -> ViewBuilders.UpdateIGestureRecognizer (prevOpt, curr, target)) - - static member UpdateIGestureRecognizer (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.IGestureRecognizer) = - ignore prevOpt - ignore curr - ignore target - - static member inline ConstructIGestureRecognizer() = - - let attribBuilder = ViewBuilders.BuildIGestureRecognizer(0) - - ViewElement.Create(ViewBuilders.CreateFuncIGestureRecognizer, ViewBuilders.UpdateFuncIGestureRecognizer, attribBuilder) - - /// Builds the attributes for a PanGestureRecognizer in the view - static member inline BuildPanGestureRecognizer(attribCount: int, - ?touchPoints: int, - ?panUpdated: Xamarin.Forms.PanUpdatedEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match touchPoints with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match panUpdated with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match touchPoints with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TouchPointsAttribKey, (v)) - match panUpdated with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PanUpdatedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - attribBuilder - - static member val CreateFuncPanGestureRecognizer : (unit -> Xamarin.Forms.PanGestureRecognizer) = (fun () -> ViewBuilders.CreatePanGestureRecognizer()) with get, set - - static member CreatePanGestureRecognizer () : Xamarin.Forms.PanGestureRecognizer = - upcast (new Xamarin.Forms.PanGestureRecognizer()) - - static member val UpdateFuncPanGestureRecognizer = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.PanGestureRecognizer) -> ViewBuilders.UpdatePanGestureRecognizer (prevOpt, curr, target)) - - static member UpdatePanGestureRecognizer (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.PanGestureRecognizer) = - // update the inherited Element element - let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevTouchPointsOpt = ValueNone - let mutable currTouchPointsOpt = ValueNone - let mutable prevPanUpdatedOpt = ValueNone - let mutable currPanUpdatedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.TouchPointsAttribKey.KeyValue then - currTouchPointsOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.PanUpdatedAttribKey.KeyValue then - currPanUpdatedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.TouchPointsAttribKey.KeyValue then - prevTouchPointsOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.PanUpdatedAttribKey.KeyValue then - prevPanUpdatedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevTouchPointsOpt, currTouchPointsOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.TouchPoints <- currValue - | ValueSome _, ValueNone -> target.TouchPoints <- 1 - | ValueNone, ValueNone -> () - match prevPanUpdatedOpt, currPanUpdatedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.PanUpdated.RemoveHandler(prevValue); target.PanUpdated.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.PanUpdated.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.PanUpdated.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructPanGestureRecognizer(?touchPoints: int, - ?panUpdated: Xamarin.Forms.PanUpdatedEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.PanGestureRecognizer -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildPanGestureRecognizer(0, - ?touchPoints=touchPoints, - ?panUpdated=panUpdated, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncPanGestureRecognizer, ViewBuilders.UpdateFuncPanGestureRecognizer, attribBuilder) - - /// Builds the attributes for a TapGestureRecognizer in the view - static member inline BuildTapGestureRecognizer(attribCount: int, - ?command: unit -> unit, - ?numberOfTapsRequired: int, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match command with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match numberOfTapsRequired with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match command with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CommandAttribKey, makeCommand(v)) - match numberOfTapsRequired with None -> () | Some v -> attribBuilder.Add(ViewAttributes.NumberOfTapsRequiredAttribKey, (v)) - attribBuilder - - static member val CreateFuncTapGestureRecognizer : (unit -> Xamarin.Forms.TapGestureRecognizer) = (fun () -> ViewBuilders.CreateTapGestureRecognizer()) with get, set - - static member CreateTapGestureRecognizer () : Xamarin.Forms.TapGestureRecognizer = - upcast (new Xamarin.Forms.TapGestureRecognizer()) - - static member val UpdateFuncTapGestureRecognizer = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.TapGestureRecognizer) -> ViewBuilders.UpdateTapGestureRecognizer (prevOpt, curr, target)) - - static member UpdateTapGestureRecognizer (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.TapGestureRecognizer) = - // update the inherited Element element - let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevCommandOpt = ValueNone - let mutable currCommandOpt = ValueNone - let mutable prevNumberOfTapsRequiredOpt = ValueNone - let mutable currNumberOfTapsRequiredOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then - currCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.NumberOfTapsRequiredAttribKey.KeyValue then - currNumberOfTapsRequiredOpt <- ValueSome (kvp.Value :?> int) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then - prevCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.NumberOfTapsRequiredAttribKey.KeyValue then - prevNumberOfTapsRequiredOpt <- ValueSome (kvp.Value :?> int) - match prevCommandOpt, currCommandOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Command <- currValue - | ValueSome _, ValueNone -> target.Command <- null - | ValueNone, ValueNone -> () - match prevNumberOfTapsRequiredOpt, currNumberOfTapsRequiredOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.NumberOfTapsRequired <- currValue - | ValueSome _, ValueNone -> target.NumberOfTapsRequired <- 1 - | ValueNone, ValueNone -> () - - static member inline ConstructTapGestureRecognizer(?command: unit -> unit, - ?numberOfTapsRequired: int, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.TapGestureRecognizer -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildTapGestureRecognizer(0, - ?command=command, - ?numberOfTapsRequired=numberOfTapsRequired, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncTapGestureRecognizer, ViewBuilders.UpdateFuncTapGestureRecognizer, attribBuilder) - - /// Builds the attributes for a ClickGestureRecognizer in the view - static member inline BuildClickGestureRecognizer(attribCount: int, - ?command: unit -> unit, - ?numberOfClicksRequired: int, - ?buttons: Xamarin.Forms.ButtonsMask, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match command with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match numberOfClicksRequired with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match buttons with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match command with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CommandAttribKey, makeCommand(v)) - match numberOfClicksRequired with None -> () | Some v -> attribBuilder.Add(ViewAttributes.NumberOfClicksRequiredAttribKey, (v)) - match buttons with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ButtonsAttribKey, (v)) - attribBuilder - - static member val CreateFuncClickGestureRecognizer : (unit -> Xamarin.Forms.ClickGestureRecognizer) = (fun () -> ViewBuilders.CreateClickGestureRecognizer()) with get, set - - static member CreateClickGestureRecognizer () : Xamarin.Forms.ClickGestureRecognizer = - upcast (new Xamarin.Forms.ClickGestureRecognizer()) - - static member val UpdateFuncClickGestureRecognizer = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ClickGestureRecognizer) -> ViewBuilders.UpdateClickGestureRecognizer (prevOpt, curr, target)) - - static member UpdateClickGestureRecognizer (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ClickGestureRecognizer) = - // update the inherited Element element - let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevCommandOpt = ValueNone - let mutable currCommandOpt = ValueNone - let mutable prevNumberOfClicksRequiredOpt = ValueNone - let mutable currNumberOfClicksRequiredOpt = ValueNone - let mutable prevButtonsOpt = ValueNone - let mutable currButtonsOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then - currCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.NumberOfClicksRequiredAttribKey.KeyValue then - currNumberOfClicksRequiredOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.ButtonsAttribKey.KeyValue then - currButtonsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ButtonsMask) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then - prevCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.NumberOfClicksRequiredAttribKey.KeyValue then - prevNumberOfClicksRequiredOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.ButtonsAttribKey.KeyValue then - prevButtonsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ButtonsMask) - match prevCommandOpt, currCommandOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Command <- currValue - | ValueSome _, ValueNone -> target.Command <- null - | ValueNone, ValueNone -> () - match prevNumberOfClicksRequiredOpt, currNumberOfClicksRequiredOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.NumberOfClicksRequired <- currValue - | ValueSome _, ValueNone -> target.NumberOfClicksRequired <- 1 - | ValueNone, ValueNone -> () - match prevButtonsOpt, currButtonsOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Buttons <- currValue - | ValueSome _, ValueNone -> target.Buttons <- Xamarin.Forms.ButtonsMask.Primary - | ValueNone, ValueNone -> () - - static member inline ConstructClickGestureRecognizer(?command: unit -> unit, - ?numberOfClicksRequired: int, - ?buttons: Xamarin.Forms.ButtonsMask, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ClickGestureRecognizer -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildClickGestureRecognizer(0, - ?command=command, - ?numberOfClicksRequired=numberOfClicksRequired, - ?buttons=buttons, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncClickGestureRecognizer, ViewBuilders.UpdateFuncClickGestureRecognizer, attribBuilder) - - /// Builds the attributes for a PinchGestureRecognizer in the view - static member inline BuildPinchGestureRecognizer(attribCount: int, - ?isPinching: bool, - ?pinchUpdated: Xamarin.Forms.PinchGestureUpdatedEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match isPinching with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match pinchUpdated with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match isPinching with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsPinchingAttribKey, (v)) - match pinchUpdated with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PinchUpdatedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - attribBuilder - - static member val CreateFuncPinchGestureRecognizer : (unit -> Xamarin.Forms.PinchGestureRecognizer) = (fun () -> ViewBuilders.CreatePinchGestureRecognizer()) with get, set - - static member CreatePinchGestureRecognizer () : Xamarin.Forms.PinchGestureRecognizer = - upcast (new Xamarin.Forms.PinchGestureRecognizer()) - - static member val UpdateFuncPinchGestureRecognizer = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.PinchGestureRecognizer) -> ViewBuilders.UpdatePinchGestureRecognizer (prevOpt, curr, target)) - - static member UpdatePinchGestureRecognizer (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.PinchGestureRecognizer) = - // update the inherited Element element - let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevIsPinchingOpt = ValueNone - let mutable currIsPinchingOpt = ValueNone - let mutable prevPinchUpdatedOpt = ValueNone - let mutable currPinchUpdatedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.IsPinchingAttribKey.KeyValue then - currIsPinchingOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.PinchUpdatedAttribKey.KeyValue then - currPinchUpdatedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.IsPinchingAttribKey.KeyValue then - prevIsPinchingOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.PinchUpdatedAttribKey.KeyValue then - prevPinchUpdatedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevIsPinchingOpt, currIsPinchingOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsPinching <- currValue - | ValueSome _, ValueNone -> target.IsPinching <- false - | ValueNone, ValueNone -> () - match prevPinchUpdatedOpt, currPinchUpdatedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.PinchUpdated.RemoveHandler(prevValue); target.PinchUpdated.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.PinchUpdated.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.PinchUpdated.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructPinchGestureRecognizer(?isPinching: bool, - ?pinchUpdated: Xamarin.Forms.PinchGestureUpdatedEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.PinchGestureRecognizer -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildPinchGestureRecognizer(0, - ?isPinching=isPinching, - ?pinchUpdated=pinchUpdated, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncPinchGestureRecognizer, ViewBuilders.UpdateFuncPinchGestureRecognizer, attribBuilder) - - /// Builds the attributes for a SwipeGestureRecognizer in the view - static member inline BuildSwipeGestureRecognizer(attribCount: int, - ?command: unit -> unit, - ?direction: Xamarin.Forms.SwipeDirection, - ?threshold: System.UInt32, - ?swiped: Xamarin.Forms.SwipedEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match command with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match direction with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match threshold with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match swiped with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match command with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CommandAttribKey, makeCommand(v)) - match direction with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SwipeGestureRecognizerDirectionAttribKey, (v)) - match threshold with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ThresholdAttribKey, (v)) - match swiped with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SwipedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - attribBuilder - - static member val CreateFuncSwipeGestureRecognizer : (unit -> Xamarin.Forms.SwipeGestureRecognizer) = (fun () -> ViewBuilders.CreateSwipeGestureRecognizer()) with get, set - - static member CreateSwipeGestureRecognizer () : Xamarin.Forms.SwipeGestureRecognizer = - upcast (new Xamarin.Forms.SwipeGestureRecognizer()) - - static member val UpdateFuncSwipeGestureRecognizer = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.SwipeGestureRecognizer) -> ViewBuilders.UpdateSwipeGestureRecognizer (prevOpt, curr, target)) - - static member UpdateSwipeGestureRecognizer (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.SwipeGestureRecognizer) = - // update the inherited Element element - let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevCommandOpt = ValueNone - let mutable currCommandOpt = ValueNone - let mutable prevSwipeGestureRecognizerDirectionOpt = ValueNone - let mutable currSwipeGestureRecognizerDirectionOpt = ValueNone - let mutable prevThresholdOpt = ValueNone - let mutable currThresholdOpt = ValueNone - let mutable prevSwipedOpt = ValueNone - let mutable currSwipedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then - currCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.SwipeGestureRecognizerDirectionAttribKey.KeyValue then - currSwipeGestureRecognizerDirectionOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SwipeDirection) - if kvp.Key = ViewAttributes.ThresholdAttribKey.KeyValue then - currThresholdOpt <- ValueSome (kvp.Value :?> System.UInt32) - if kvp.Key = ViewAttributes.SwipedAttribKey.KeyValue then - currSwipedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then - prevCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.SwipeGestureRecognizerDirectionAttribKey.KeyValue then - prevSwipeGestureRecognizerDirectionOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SwipeDirection) - if kvp.Key = ViewAttributes.ThresholdAttribKey.KeyValue then - prevThresholdOpt <- ValueSome (kvp.Value :?> System.UInt32) - if kvp.Key = ViewAttributes.SwipedAttribKey.KeyValue then - prevSwipedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevCommandOpt, currCommandOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Command <- currValue - | ValueSome _, ValueNone -> target.Command <- null - | ValueNone, ValueNone -> () - match prevSwipeGestureRecognizerDirectionOpt, currSwipeGestureRecognizerDirectionOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Direction <- currValue - | ValueSome _, ValueNone -> target.Direction <- enum(0) - | ValueNone, ValueNone -> () - match prevThresholdOpt, currThresholdOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Threshold <- currValue - | ValueSome _, ValueNone -> target.Threshold <- 100u - | ValueNone, ValueNone -> () - match prevSwipedOpt, currSwipedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Swiped.RemoveHandler(prevValue); target.Swiped.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Swiped.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Swiped.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructSwipeGestureRecognizer(?command: unit -> unit, - ?direction: Xamarin.Forms.SwipeDirection, - ?threshold: System.UInt32, - ?swiped: Xamarin.Forms.SwipedEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.SwipeGestureRecognizer -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildSwipeGestureRecognizer(0, - ?command=command, - ?direction=direction, - ?threshold=threshold, - ?swiped=swiped, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncSwipeGestureRecognizer, ViewBuilders.UpdateFuncSwipeGestureRecognizer, attribBuilder) - - /// Builds the attributes for a ActivityIndicator in the view - static member inline BuildActivityIndicator(attribCount: int, - ?color: Xamarin.Forms.Color, - ?isRunning: bool, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match color with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isRunning with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match color with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ColorAttribKey, (v)) - match isRunning with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsRunningAttribKey, (v)) - attribBuilder - - static member val CreateFuncActivityIndicator : (unit -> Xamarin.Forms.ActivityIndicator) = (fun () -> ViewBuilders.CreateActivityIndicator()) with get, set - - static member CreateActivityIndicator () : Xamarin.Forms.ActivityIndicator = - upcast (new Xamarin.Forms.ActivityIndicator()) - - static member val UpdateFuncActivityIndicator = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ActivityIndicator) -> ViewBuilders.UpdateActivityIndicator (prevOpt, curr, target)) - - static member UpdateActivityIndicator (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ActivityIndicator) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevColorOpt = ValueNone - let mutable currColorOpt = ValueNone - let mutable prevIsRunningOpt = ValueNone - let mutable currIsRunningOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ColorAttribKey.KeyValue then - currColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.IsRunningAttribKey.KeyValue then - currIsRunningOpt <- ValueSome (kvp.Value :?> bool) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ColorAttribKey.KeyValue then - prevColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.IsRunningAttribKey.KeyValue then - prevIsRunningOpt <- ValueSome (kvp.Value :?> bool) - match prevColorOpt, currColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Color <- currValue - | ValueSome _, ValueNone -> target.Color <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevIsRunningOpt, currIsRunningOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsRunning <- currValue - | ValueSome _, ValueNone -> target.IsRunning <- false - | ValueNone, ValueNone -> () - - static member inline ConstructActivityIndicator(?color: Xamarin.Forms.Color, - ?isRunning: bool, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ActivityIndicator -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildActivityIndicator(0, - ?color=color, - ?isRunning=isRunning, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncActivityIndicator, ViewBuilders.UpdateFuncActivityIndicator, attribBuilder) - - /// Builds the attributes for a BoxView in the view - static member inline BuildBoxView(attribCount: int, - ?color: Xamarin.Forms.Color, - ?cornerRadius: Xamarin.Forms.CornerRadius, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match color with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match cornerRadius with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match color with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ColorAttribKey, (v)) - match cornerRadius with None -> () | Some v -> attribBuilder.Add(ViewAttributes.BoxViewCornerRadiusAttribKey, (v)) - attribBuilder - - static member val CreateFuncBoxView : (unit -> Xamarin.Forms.BoxView) = (fun () -> ViewBuilders.CreateBoxView()) with get, set - - static member CreateBoxView () : Xamarin.Forms.BoxView = - upcast (new Xamarin.Forms.BoxView()) - - static member val UpdateFuncBoxView = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.BoxView) -> ViewBuilders.UpdateBoxView (prevOpt, curr, target)) - - static member UpdateBoxView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.BoxView) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevColorOpt = ValueNone - let mutable currColorOpt = ValueNone - let mutable prevBoxViewCornerRadiusOpt = ValueNone - let mutable currBoxViewCornerRadiusOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ColorAttribKey.KeyValue then - currColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.BoxViewCornerRadiusAttribKey.KeyValue then - currBoxViewCornerRadiusOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.CornerRadius) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ColorAttribKey.KeyValue then - prevColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.BoxViewCornerRadiusAttribKey.KeyValue then - prevBoxViewCornerRadiusOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.CornerRadius) - match prevColorOpt, currColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Color <- currValue - | ValueSome _, ValueNone -> target.Color <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevBoxViewCornerRadiusOpt, currBoxViewCornerRadiusOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.CornerRadius <- currValue - | ValueSome _, ValueNone -> target.CornerRadius <- Unchecked.defaultof - | ValueNone, ValueNone -> () - - static member inline ConstructBoxView(?color: Xamarin.Forms.Color, - ?cornerRadius: Xamarin.Forms.CornerRadius, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.BoxView -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildBoxView(0, - ?color=color, - ?cornerRadius=cornerRadius, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncBoxView, ViewBuilders.UpdateFuncBoxView, attribBuilder) - - /// Builds the attributes for a ProgressBar in the view - static member inline BuildProgressBar(attribCount: int, - ?progress: double, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match progress with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match progress with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ProgressAttribKey, (v)) - attribBuilder - - static member val CreateFuncProgressBar : (unit -> Xamarin.Forms.ProgressBar) = (fun () -> ViewBuilders.CreateProgressBar()) with get, set - - static member CreateProgressBar () : Xamarin.Forms.ProgressBar = - upcast (new Xamarin.Forms.ProgressBar()) - - static member val UpdateFuncProgressBar = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ProgressBar) -> ViewBuilders.UpdateProgressBar (prevOpt, curr, target)) - - static member UpdateProgressBar (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ProgressBar) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevProgressOpt = ValueNone - let mutable currProgressOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ProgressAttribKey.KeyValue then - currProgressOpt <- ValueSome (kvp.Value :?> double) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ProgressAttribKey.KeyValue then - prevProgressOpt <- ValueSome (kvp.Value :?> double) - match prevProgressOpt, currProgressOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Progress <- currValue - | ValueSome _, ValueNone -> target.Progress <- 0.0 - | ValueNone, ValueNone -> () - - static member inline ConstructProgressBar(?progress: double, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ProgressBar -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildProgressBar(0, - ?progress=progress, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncProgressBar, ViewBuilders.UpdateFuncProgressBar, attribBuilder) - - /// Builds the attributes for a Layout in the view - static member inline BuildLayout(attribCount: int, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match isClippedToBounds with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match padding with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match isClippedToBounds with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsClippedToBoundsAttribKey, (v)) - match padding with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PaddingAttribKey, makeThickness(v)) - attribBuilder - - static member val CreateFuncLayout : (unit -> Xamarin.Forms.Layout) = (fun () -> ViewBuilders.CreateLayout()) with get, set - - static member CreateLayout () : Xamarin.Forms.Layout = - failwith "can't create Xamarin.Forms.Layout" - - static member val UpdateFuncLayout = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Layout) -> ViewBuilders.UpdateLayout (prevOpt, curr, target)) - - static member UpdateLayout (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Layout) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevIsClippedToBoundsOpt = ValueNone - let mutable currIsClippedToBoundsOpt = ValueNone - let mutable prevPaddingOpt = ValueNone - let mutable currPaddingOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.IsClippedToBoundsAttribKey.KeyValue then - currIsClippedToBoundsOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.PaddingAttribKey.KeyValue then - currPaddingOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Thickness) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.IsClippedToBoundsAttribKey.KeyValue then - prevIsClippedToBoundsOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.PaddingAttribKey.KeyValue then - prevPaddingOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Thickness) - match prevIsClippedToBoundsOpt, currIsClippedToBoundsOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsClippedToBounds <- currValue - | ValueSome _, ValueNone -> target.IsClippedToBounds <- false - | ValueNone, ValueNone -> () - match prevPaddingOpt, currPaddingOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Padding <- currValue - | ValueSome _, ValueNone -> target.Padding <- Unchecked.defaultof - | ValueNone, ValueNone -> () - - static member inline ConstructLayout(?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Layout -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildLayout(0, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncLayout, ViewBuilders.UpdateFuncLayout, attribBuilder) - - /// Builds the attributes for a ScrollView in the view - static member inline BuildScrollView(attribCount: int, - ?content: ViewElement, - ?orientation: Xamarin.Forms.ScrollOrientation, - ?horizontalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, - ?verticalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, - ?scrollTo: float * float * Fabulous.DynamicViews.AnimationKind, - ?scrolled: Xamarin.Forms.ScrolledEventArgs -> unit, - ?layoutAreaOverride: Xamarin.Forms.Rectangle, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match content with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match orientation with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match horizontalScrollBarVisibility with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match verticalScrollBarVisibility with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match scrollTo with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match scrolled with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match layoutAreaOverride with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildLayout(attribCount, ?isClippedToBounds=isClippedToBounds, ?padding=padding, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match content with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ContentAttribKey, (v)) - match orientation with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ScrollOrientationAttribKey, (v)) - match horizontalScrollBarVisibility with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HorizontalScrollBarVisibilityAttribKey, (v)) - match verticalScrollBarVisibility with None -> () | Some v -> attribBuilder.Add(ViewAttributes.VerticalScrollBarVisibilityAttribKey, (v)) - match scrollTo with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ScrollToAttribKey, (v)) - match scrolled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ScrolledAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match layoutAreaOverride with None -> () | Some v -> attribBuilder.Add(ViewAttributes.LayoutAreaOverrideAttribKey, (v)) - attribBuilder - - static member val CreateFuncScrollView : (unit -> Xamarin.Forms.ScrollView) = (fun () -> ViewBuilders.CreateScrollView()) with get, set - - static member CreateScrollView () : Xamarin.Forms.ScrollView = - upcast (new Xamarin.Forms.ScrollView()) - - static member val UpdateFuncScrollView = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ScrollView) -> ViewBuilders.UpdateScrollView (prevOpt, curr, target)) - - static member UpdateScrollView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ScrollView) = - // update the inherited Layout element - let baseElement = (if ViewProto.ProtoLayout.IsNone then ViewProto.ProtoLayout <- Some (ViewBuilders.ConstructLayout())); ViewProto.ProtoLayout.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevContentOpt = ValueNone - let mutable currContentOpt = ValueNone - let mutable prevScrollOrientationOpt = ValueNone - let mutable currScrollOrientationOpt = ValueNone - let mutable prevHorizontalScrollBarVisibilityOpt = ValueNone - let mutable currHorizontalScrollBarVisibilityOpt = ValueNone - let mutable prevVerticalScrollBarVisibilityOpt = ValueNone - let mutable currVerticalScrollBarVisibilityOpt = ValueNone - let mutable prevScrollToOpt = ValueNone - let mutable currScrollToOpt = ValueNone - let mutable prevScrolledOpt = ValueNone - let mutable currScrolledOpt = ValueNone - let mutable prevLayoutAreaOverrideOpt = ValueNone - let mutable currLayoutAreaOverrideOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ContentAttribKey.KeyValue then - currContentOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.ScrollOrientationAttribKey.KeyValue then - currScrollOrientationOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ScrollOrientation) - if kvp.Key = ViewAttributes.HorizontalScrollBarVisibilityAttribKey.KeyValue then - currHorizontalScrollBarVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ScrollBarVisibility) - if kvp.Key = ViewAttributes.VerticalScrollBarVisibilityAttribKey.KeyValue then - currVerticalScrollBarVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ScrollBarVisibility) - if kvp.Key = ViewAttributes.ScrollToAttribKey.KeyValue then - currScrollToOpt <- ValueSome (kvp.Value :?> float * float * Fabulous.DynamicViews.AnimationKind) - if kvp.Key = ViewAttributes.ScrolledAttribKey.KeyValue then - currScrolledOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.LayoutAreaOverrideAttribKey.KeyValue then - currLayoutAreaOverrideOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Rectangle) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ContentAttribKey.KeyValue then - prevContentOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.ScrollOrientationAttribKey.KeyValue then - prevScrollOrientationOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ScrollOrientation) - if kvp.Key = ViewAttributes.HorizontalScrollBarVisibilityAttribKey.KeyValue then - prevHorizontalScrollBarVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ScrollBarVisibility) - if kvp.Key = ViewAttributes.VerticalScrollBarVisibilityAttribKey.KeyValue then - prevVerticalScrollBarVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ScrollBarVisibility) - if kvp.Key = ViewAttributes.ScrollToAttribKey.KeyValue then - prevScrollToOpt <- ValueSome (kvp.Value :?> float * float * Fabulous.DynamicViews.AnimationKind) - if kvp.Key = ViewAttributes.ScrolledAttribKey.KeyValue then - prevScrolledOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.LayoutAreaOverrideAttribKey.KeyValue then - prevLayoutAreaOverrideOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Rectangle) - match prevContentOpt, currContentOpt with - // For structured objects, dependsOn on reference equality - | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () - | ValueSome prevValue, ValueSome newValue when canReuseChild prevValue newValue -> - newValue.UpdateIncremental(prevValue, target.Content) - | _, ValueSome newValue -> - target.Content <- (newValue.Create() :?> Xamarin.Forms.View) - | ValueSome _, ValueNone -> - target.Content <- null - | ValueNone, ValueNone -> () - match prevScrollOrientationOpt, currScrollOrientationOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Orientation <- currValue - | ValueSome _, ValueNone -> target.Orientation <- Unchecked.defaultof - | ValueNone, ValueNone -> () - match prevHorizontalScrollBarVisibilityOpt, currHorizontalScrollBarVisibilityOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.HorizontalScrollBarVisibility <- currValue - | ValueSome _, ValueNone -> target.HorizontalScrollBarVisibility <- Xamarin.Forms.ScrollBarVisibility.Default - | ValueNone, ValueNone -> () - match prevVerticalScrollBarVisibilityOpt, currVerticalScrollBarVisibilityOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.VerticalScrollBarVisibility <- currValue - | ValueSome _, ValueNone -> target.VerticalScrollBarVisibility <- Xamarin.Forms.ScrollBarVisibility.Default - | ValueNone, ValueNone -> () - (fun _ curr target -> triggerScrollToAsync curr target) prevScrollToOpt currScrollToOpt target - match prevScrolledOpt, currScrolledOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Scrolled.RemoveHandler(prevValue); target.Scrolled.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Scrolled.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Scrolled.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevLayoutAreaOverrideOpt, currLayoutAreaOverrideOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.LayoutAreaOverride <- currValue - | ValueSome _, ValueNone -> target.LayoutAreaOverride <- Xamarin.Forms.Rectangle.Zero - | ValueNone, ValueNone -> () - - static member inline ConstructScrollView(?content: ViewElement, - ?orientation: Xamarin.Forms.ScrollOrientation, - ?horizontalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, - ?verticalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, - ?scrollTo: float * float * Fabulous.DynamicViews.AnimationKind, - ?scrolled: Xamarin.Forms.ScrolledEventArgs -> unit, - ?layoutAreaOverride: Xamarin.Forms.Rectangle, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ScrollView -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildScrollView(0, - ?content=content, - ?orientation=orientation, - ?horizontalScrollBarVisibility=horizontalScrollBarVisibility, - ?verticalScrollBarVisibility=verticalScrollBarVisibility, - ?scrollTo=scrollTo, - ?scrolled=scrolled, - ?layoutAreaOverride=layoutAreaOverride, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncScrollView, ViewBuilders.UpdateFuncScrollView, attribBuilder) - - /// Builds the attributes for a SearchBar in the view - static member inline BuildSearchBar(attribCount: int, - ?cancelButtonColor: Xamarin.Forms.Color, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?fontSize: obj, - ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, - ?placeholder: string, - ?placeholderColor: Xamarin.Forms.Color, - ?searchCommand: string -> unit, - ?canExecute: bool, - ?text: string, - ?textColor: Xamarin.Forms.Color, - ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match cancelButtonColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontFamily with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontAttributes with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontSize with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match horizontalTextAlignment with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match placeholder with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match placeholderColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match searchCommand with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match canExecute with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match text with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match textColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match textChanged with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match cancelButtonColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CancelButtonColorAttribKey, (v)) - match fontFamily with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontFamilyAttribKey, (v)) - match fontAttributes with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontAttributesAttribKey, (v)) - match fontSize with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontSizeAttribKey, makeFontSize(v)) - match horizontalTextAlignment with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HorizontalTextAlignmentAttribKey, (v)) - match placeholder with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PlaceholderAttribKey, (v)) - match placeholderColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PlaceholderColorAttribKey, (v)) - match searchCommand with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SearchBarCommandAttribKey, (v)) - match canExecute with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SearchBarCanExecuteAttribKey, (v)) - match text with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextAttribKey, (v)) - match textColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextColorAttribKey, (v)) - match textChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SearchBarTextChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - attribBuilder - - static member val CreateFuncSearchBar : (unit -> Xamarin.Forms.SearchBar) = (fun () -> ViewBuilders.CreateSearchBar()) with get, set - - static member CreateSearchBar () : Xamarin.Forms.SearchBar = - upcast (new Xamarin.Forms.SearchBar()) - - static member val UpdateFuncSearchBar = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.SearchBar) -> ViewBuilders.UpdateSearchBar (prevOpt, curr, target)) - - static member UpdateSearchBar (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.SearchBar) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevCancelButtonColorOpt = ValueNone - let mutable currCancelButtonColorOpt = ValueNone - let mutable prevFontFamilyOpt = ValueNone - let mutable currFontFamilyOpt = ValueNone - let mutable prevFontAttributesOpt = ValueNone - let mutable currFontAttributesOpt = ValueNone - let mutable prevFontSizeOpt = ValueNone - let mutable currFontSizeOpt = ValueNone - let mutable prevHorizontalTextAlignmentOpt = ValueNone - let mutable currHorizontalTextAlignmentOpt = ValueNone - let mutable prevPlaceholderOpt = ValueNone - let mutable currPlaceholderOpt = ValueNone - let mutable prevPlaceholderColorOpt = ValueNone - let mutable currPlaceholderColorOpt = ValueNone - let mutable prevSearchBarCommandOpt = ValueNone - let mutable currSearchBarCommandOpt = ValueNone - let mutable prevSearchBarCanExecuteOpt = ValueNone - let mutable currSearchBarCanExecuteOpt = ValueNone - let mutable prevTextOpt = ValueNone - let mutable currTextOpt = ValueNone - let mutable prevTextColorOpt = ValueNone - let mutable currTextColorOpt = ValueNone - let mutable prevSearchBarTextChangedOpt = ValueNone - let mutable currSearchBarTextChangedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.CancelButtonColorAttribKey.KeyValue then - currCancelButtonColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.FontFamilyAttribKey.KeyValue then - currFontFamilyOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FontAttributesAttribKey.KeyValue then - currFontAttributesOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FontAttributes) - if kvp.Key = ViewAttributes.FontSizeAttribKey.KeyValue then - currFontSizeOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.HorizontalTextAlignmentAttribKey.KeyValue then - currHorizontalTextAlignmentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TextAlignment) - if kvp.Key = ViewAttributes.PlaceholderAttribKey.KeyValue then - currPlaceholderOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.PlaceholderColorAttribKey.KeyValue then - currPlaceholderColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.SearchBarCommandAttribKey.KeyValue then - currSearchBarCommandOpt <- ValueSome (kvp.Value :?> string -> unit) - if kvp.Key = ViewAttributes.SearchBarCanExecuteAttribKey.KeyValue then - currSearchBarCanExecuteOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - currTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - currTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.SearchBarTextChangedAttribKey.KeyValue then - currSearchBarTextChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.CancelButtonColorAttribKey.KeyValue then - prevCancelButtonColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.FontFamilyAttribKey.KeyValue then - prevFontFamilyOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FontAttributesAttribKey.KeyValue then - prevFontAttributesOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FontAttributes) - if kvp.Key = ViewAttributes.FontSizeAttribKey.KeyValue then - prevFontSizeOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.HorizontalTextAlignmentAttribKey.KeyValue then - prevHorizontalTextAlignmentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TextAlignment) - if kvp.Key = ViewAttributes.PlaceholderAttribKey.KeyValue then - prevPlaceholderOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.PlaceholderColorAttribKey.KeyValue then - prevPlaceholderColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.SearchBarCommandAttribKey.KeyValue then - prevSearchBarCommandOpt <- ValueSome (kvp.Value :?> string -> unit) - if kvp.Key = ViewAttributes.SearchBarCanExecuteAttribKey.KeyValue then - prevSearchBarCanExecuteOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - prevTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - prevTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.SearchBarTextChangedAttribKey.KeyValue then - prevSearchBarTextChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevCancelButtonColorOpt, currCancelButtonColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.CancelButtonColor <- currValue - | ValueSome _, ValueNone -> target.CancelButtonColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevFontFamilyOpt, currFontFamilyOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontFamily <- currValue - | ValueSome _, ValueNone -> target.FontFamily <- null - | ValueNone, ValueNone -> () - match prevFontAttributesOpt, currFontAttributesOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontAttributes <- currValue - | ValueSome _, ValueNone -> target.FontAttributes <- Xamarin.Forms.FontAttributes.None - | ValueNone, ValueNone -> () - match prevFontSizeOpt, currFontSizeOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontSize <- currValue - | ValueSome _, ValueNone -> target.FontSize <- -1.0 - | ValueNone, ValueNone -> () - match prevHorizontalTextAlignmentOpt, currHorizontalTextAlignmentOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.HorizontalTextAlignment <- currValue - | ValueSome _, ValueNone -> target.HorizontalTextAlignment <- Xamarin.Forms.TextAlignment.Start - | ValueNone, ValueNone -> () - match prevPlaceholderOpt, currPlaceholderOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Placeholder <- currValue - | ValueSome _, ValueNone -> target.Placeholder <- null - | ValueNone, ValueNone -> () - match prevPlaceholderColorOpt, currPlaceholderColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.PlaceholderColor <- currValue - | ValueSome _, ValueNone -> target.PlaceholderColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - (fun _ _ _ -> ()) prevSearchBarCommandOpt currSearchBarCommandOpt target - updateCommand prevSearchBarCommandOpt currSearchBarCommandOpt (fun (target: Xamarin.Forms.SearchBar) -> target.Text) (fun (target: Xamarin.Forms.SearchBar) cmd -> target.SearchCommand <- cmd) prevSearchBarCanExecuteOpt currSearchBarCanExecuteOpt target - match prevTextOpt, currTextOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Text <- currValue - | ValueSome _, ValueNone -> target.Text <- null - | ValueNone, ValueNone -> () - match prevTextColorOpt, currTextColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.TextColor <- currValue - | ValueSome _, ValueNone -> target.TextColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevSearchBarTextChangedOpt, currSearchBarTextChangedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.TextChanged.RemoveHandler(prevValue); target.TextChanged.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.TextChanged.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.TextChanged.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructSearchBar(?cancelButtonColor: Xamarin.Forms.Color, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?fontSize: obj, - ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, - ?placeholder: string, - ?placeholderColor: Xamarin.Forms.Color, - ?searchCommand: string -> unit, - ?canExecute: bool, - ?text: string, - ?textColor: Xamarin.Forms.Color, - ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.SearchBar -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildSearchBar(0, - ?cancelButtonColor=cancelButtonColor, - ?fontFamily=fontFamily, - ?fontAttributes=fontAttributes, - ?fontSize=fontSize, - ?horizontalTextAlignment=horizontalTextAlignment, - ?placeholder=placeholder, - ?placeholderColor=placeholderColor, - ?searchCommand=searchCommand, - ?canExecute=canExecute, - ?text=text, - ?textColor=textColor, - ?textChanged=textChanged, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncSearchBar, ViewBuilders.UpdateFuncSearchBar, attribBuilder) - - /// Builds the attributes for a Button in the view - static member inline BuildButton(attribCount: int, - ?text: string, - ?command: unit -> unit, - ?canExecute: bool, - ?borderColor: Xamarin.Forms.Color, - ?borderWidth: double, - ?contentLayout: Xamarin.Forms.Button.ButtonContentLayout, - ?cornerRadius: int, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?fontSize: obj, - ?image: string, - ?textColor: Xamarin.Forms.Color, - ?padding: Xamarin.Forms.Thickness, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match text with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match command with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match canExecute with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match borderColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match borderWidth with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match contentLayout with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match cornerRadius with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontFamily with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontAttributes with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontSize with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match image with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match textColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match padding with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match text with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextAttribKey, (v)) - match command with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ButtonCommandAttribKey, (v)) - match canExecute with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ButtonCanExecuteAttribKey, (v)) - match borderColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.BorderColorAttribKey, (v)) - match borderWidth with None -> () | Some v -> attribBuilder.Add(ViewAttributes.BorderWidthAttribKey, (v)) - match contentLayout with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ContentLayoutAttribKey, (v)) - match cornerRadius with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ButtonCornerRadiusAttribKey, (v)) - match fontFamily with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontFamilyAttribKey, (v)) - match fontAttributes with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontAttributesAttribKey, (v)) - match fontSize with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontSizeAttribKey, makeFontSize(v)) - match image with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ButtonImageSourceAttribKey, (v)) - match textColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextColorAttribKey, (v)) - match padding with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PaddingAttribKey, (v)) - attribBuilder - - static member val CreateFuncButton : (unit -> Xamarin.Forms.Button) = (fun () -> ViewBuilders.CreateButton()) with get, set - - static member CreateButton () : Xamarin.Forms.Button = - upcast (new Xamarin.Forms.Button()) - - static member val UpdateFuncButton = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Button) -> ViewBuilders.UpdateButton (prevOpt, curr, target)) - - static member UpdateButton (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Button) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevTextOpt = ValueNone - let mutable currTextOpt = ValueNone - let mutable prevButtonCommandOpt = ValueNone - let mutable currButtonCommandOpt = ValueNone - let mutable prevButtonCanExecuteOpt = ValueNone - let mutable currButtonCanExecuteOpt = ValueNone - let mutable prevBorderColorOpt = ValueNone - let mutable currBorderColorOpt = ValueNone - let mutable prevBorderWidthOpt = ValueNone - let mutable currBorderWidthOpt = ValueNone - let mutable prevContentLayoutOpt = ValueNone - let mutable currContentLayoutOpt = ValueNone - let mutable prevButtonCornerRadiusOpt = ValueNone - let mutable currButtonCornerRadiusOpt = ValueNone - let mutable prevFontFamilyOpt = ValueNone - let mutable currFontFamilyOpt = ValueNone - let mutable prevFontAttributesOpt = ValueNone - let mutable currFontAttributesOpt = ValueNone - let mutable prevFontSizeOpt = ValueNone - let mutable currFontSizeOpt = ValueNone - let mutable prevButtonImageSourceOpt = ValueNone - let mutable currButtonImageSourceOpt = ValueNone - let mutable prevTextColorOpt = ValueNone - let mutable currTextColorOpt = ValueNone - let mutable prevPaddingOpt = ValueNone - let mutable currPaddingOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - currTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.ButtonCommandAttribKey.KeyValue then - currButtonCommandOpt <- ValueSome (kvp.Value :?> unit -> unit) - if kvp.Key = ViewAttributes.ButtonCanExecuteAttribKey.KeyValue then - currButtonCanExecuteOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.BorderColorAttribKey.KeyValue then - currBorderColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.BorderWidthAttribKey.KeyValue then - currBorderWidthOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ContentLayoutAttribKey.KeyValue then - currContentLayoutOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Button.ButtonContentLayout) - if kvp.Key = ViewAttributes.ButtonCornerRadiusAttribKey.KeyValue then - currButtonCornerRadiusOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.FontFamilyAttribKey.KeyValue then - currFontFamilyOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FontAttributesAttribKey.KeyValue then - currFontAttributesOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FontAttributes) - if kvp.Key = ViewAttributes.FontSizeAttribKey.KeyValue then - currFontSizeOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ButtonImageSourceAttribKey.KeyValue then - currButtonImageSourceOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - currTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.PaddingAttribKey.KeyValue then - currPaddingOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Thickness) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - prevTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.ButtonCommandAttribKey.KeyValue then - prevButtonCommandOpt <- ValueSome (kvp.Value :?> unit -> unit) - if kvp.Key = ViewAttributes.ButtonCanExecuteAttribKey.KeyValue then - prevButtonCanExecuteOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.BorderColorAttribKey.KeyValue then - prevBorderColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.BorderWidthAttribKey.KeyValue then - prevBorderWidthOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ContentLayoutAttribKey.KeyValue then - prevContentLayoutOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Button.ButtonContentLayout) - if kvp.Key = ViewAttributes.ButtonCornerRadiusAttribKey.KeyValue then - prevButtonCornerRadiusOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.FontFamilyAttribKey.KeyValue then - prevFontFamilyOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FontAttributesAttribKey.KeyValue then - prevFontAttributesOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FontAttributes) - if kvp.Key = ViewAttributes.FontSizeAttribKey.KeyValue then - prevFontSizeOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ButtonImageSourceAttribKey.KeyValue then - prevButtonImageSourceOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - prevTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.PaddingAttribKey.KeyValue then - prevPaddingOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Thickness) - match prevTextOpt, currTextOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Text <- currValue - | ValueSome _, ValueNone -> target.Text <- null - | ValueNone, ValueNone -> () - (fun _ _ _ -> ()) prevButtonCommandOpt currButtonCommandOpt target - updateCommand prevButtonCommandOpt currButtonCommandOpt (fun _target -> ()) (fun (target: Xamarin.Forms.Button) cmd -> target.Command <- cmd) prevButtonCanExecuteOpt currButtonCanExecuteOpt target - match prevBorderColorOpt, currBorderColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.BorderColor <- currValue - | ValueSome _, ValueNone -> target.BorderColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevBorderWidthOpt, currBorderWidthOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.BorderWidth <- currValue - | ValueSome _, ValueNone -> target.BorderWidth <- -1.0 - | ValueNone, ValueNone -> () - match prevContentLayoutOpt, currContentLayoutOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ContentLayout <- currValue - | ValueSome _, ValueNone -> target.ContentLayout <- null - | ValueNone, ValueNone -> () - match prevButtonCornerRadiusOpt, currButtonCornerRadiusOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.CornerRadius <- currValue - | ValueSome _, ValueNone -> target.CornerRadius <- 0 - | ValueNone, ValueNone -> () - match prevFontFamilyOpt, currFontFamilyOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontFamily <- currValue - | ValueSome _, ValueNone -> target.FontFamily <- null - | ValueNone, ValueNone -> () - match prevFontAttributesOpt, currFontAttributesOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontAttributes <- currValue - | ValueSome _, ValueNone -> target.FontAttributes <- Xamarin.Forms.FontAttributes.None - | ValueNone, ValueNone -> () - match prevFontSizeOpt, currFontSizeOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontSize <- currValue - | ValueSome _, ValueNone -> target.FontSize <- -1.0 - | ValueNone, ValueNone -> () - match prevButtonImageSourceOpt, currButtonImageSourceOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Image <- makeFileImageSource currValue - | ValueSome _, ValueNone -> target.Image <- null - | ValueNone, ValueNone -> () - match prevTextColorOpt, currTextColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.TextColor <- currValue - | ValueSome _, ValueNone -> target.TextColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevPaddingOpt, currPaddingOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Padding <- currValue - | ValueSome _, ValueNone -> target.Padding <- Unchecked.defaultof - | ValueNone, ValueNone -> () - - static member inline ConstructButton(?text: string, - ?command: unit -> unit, - ?canExecute: bool, - ?borderColor: Xamarin.Forms.Color, - ?borderWidth: double, - ?contentLayout: Xamarin.Forms.Button.ButtonContentLayout, - ?cornerRadius: int, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?fontSize: obj, - ?image: string, - ?textColor: Xamarin.Forms.Color, - ?padding: Xamarin.Forms.Thickness, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Button -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildButton(0, - ?text=text, - ?command=command, - ?canExecute=canExecute, - ?borderColor=borderColor, - ?borderWidth=borderWidth, - ?contentLayout=contentLayout, - ?cornerRadius=cornerRadius, - ?fontFamily=fontFamily, - ?fontAttributes=fontAttributes, - ?fontSize=fontSize, - ?image=image, - ?textColor=textColor, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncButton, ViewBuilders.UpdateFuncButton, attribBuilder) - - /// Builds the attributes for a Slider in the view - static member inline BuildSlider(attribCount: int, - ?minimumMaximum: float * float, - ?value: double, - ?valueChanged: Xamarin.Forms.ValueChangedEventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match minimumMaximum with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match value with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match valueChanged with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match minimumMaximum with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MinimumMaximumAttribKey, (v)) - match value with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ValueAttribKey, (v)) - match valueChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ValueChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - attribBuilder - - static member val CreateFuncSlider : (unit -> Xamarin.Forms.Slider) = (fun () -> ViewBuilders.CreateSlider()) with get, set - - static member CreateSlider () : Xamarin.Forms.Slider = - upcast (new Xamarin.Forms.Slider()) - - static member val UpdateFuncSlider = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Slider) -> ViewBuilders.UpdateSlider (prevOpt, curr, target)) - - static member UpdateSlider (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Slider) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevMinimumMaximumOpt = ValueNone - let mutable currMinimumMaximumOpt = ValueNone - let mutable prevValueOpt = ValueNone - let mutable currValueOpt = ValueNone - let mutable prevValueChangedOpt = ValueNone - let mutable currValueChangedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.MinimumMaximumAttribKey.KeyValue then - currMinimumMaximumOpt <- ValueSome (kvp.Value :?> float * float) - if kvp.Key = ViewAttributes.ValueAttribKey.KeyValue then - currValueOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ValueChangedAttribKey.KeyValue then - currValueChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.MinimumMaximumAttribKey.KeyValue then - prevMinimumMaximumOpt <- ValueSome (kvp.Value :?> float * float) - if kvp.Key = ViewAttributes.ValueAttribKey.KeyValue then - prevValueOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ValueChangedAttribKey.KeyValue then - prevValueChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - updateSliderMinimumMaximum prevMinimumMaximumOpt currMinimumMaximumOpt target - match prevValueOpt, currValueOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Value <- currValue - | ValueSome _, ValueNone -> target.Value <- 0.0 - | ValueNone, ValueNone -> () - match prevValueChangedOpt, currValueChangedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.ValueChanged.RemoveHandler(prevValue); target.ValueChanged.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.ValueChanged.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.ValueChanged.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructSlider(?minimumMaximum: float * float, - ?value: double, - ?valueChanged: Xamarin.Forms.ValueChangedEventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Slider -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildSlider(0, - ?minimumMaximum=minimumMaximum, - ?value=value, - ?valueChanged=valueChanged, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncSlider, ViewBuilders.UpdateFuncSlider, attribBuilder) - - /// Builds the attributes for a Stepper in the view - static member inline BuildStepper(attribCount: int, - ?minimumMaximum: float * float, - ?value: double, - ?increment: double, - ?valueChanged: Xamarin.Forms.ValueChangedEventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match minimumMaximum with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match value with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match increment with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match valueChanged with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match minimumMaximum with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MinimumMaximumAttribKey, (v)) - match value with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ValueAttribKey, (v)) - match increment with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IncrementAttribKey, (v)) - match valueChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ValueChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - attribBuilder - - static member val CreateFuncStepper : (unit -> Xamarin.Forms.Stepper) = (fun () -> ViewBuilders.CreateStepper()) with get, set - - static member CreateStepper () : Xamarin.Forms.Stepper = - upcast (new Xamarin.Forms.Stepper()) - - static member val UpdateFuncStepper = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Stepper) -> ViewBuilders.UpdateStepper (prevOpt, curr, target)) - - static member UpdateStepper (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Stepper) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevMinimumMaximumOpt = ValueNone - let mutable currMinimumMaximumOpt = ValueNone - let mutable prevValueOpt = ValueNone - let mutable currValueOpt = ValueNone - let mutable prevIncrementOpt = ValueNone - let mutable currIncrementOpt = ValueNone - let mutable prevValueChangedOpt = ValueNone - let mutable currValueChangedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.MinimumMaximumAttribKey.KeyValue then - currMinimumMaximumOpt <- ValueSome (kvp.Value :?> float * float) - if kvp.Key = ViewAttributes.ValueAttribKey.KeyValue then - currValueOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.IncrementAttribKey.KeyValue then - currIncrementOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ValueChangedAttribKey.KeyValue then - currValueChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.MinimumMaximumAttribKey.KeyValue then - prevMinimumMaximumOpt <- ValueSome (kvp.Value :?> float * float) - if kvp.Key = ViewAttributes.ValueAttribKey.KeyValue then - prevValueOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.IncrementAttribKey.KeyValue then - prevIncrementOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ValueChangedAttribKey.KeyValue then - prevValueChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - updateStepperMinimumMaximum prevMinimumMaximumOpt currMinimumMaximumOpt target - match prevValueOpt, currValueOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Value <- currValue - | ValueSome _, ValueNone -> target.Value <- 0.0 - | ValueNone, ValueNone -> () - match prevIncrementOpt, currIncrementOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Increment <- currValue - | ValueSome _, ValueNone -> target.Increment <- 1.0 - | ValueNone, ValueNone -> () - match prevValueChangedOpt, currValueChangedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.ValueChanged.RemoveHandler(prevValue); target.ValueChanged.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.ValueChanged.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.ValueChanged.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructStepper(?minimumMaximum: float * float, - ?value: double, - ?increment: double, - ?valueChanged: Xamarin.Forms.ValueChangedEventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Stepper -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildStepper(0, - ?minimumMaximum=minimumMaximum, - ?value=value, - ?increment=increment, - ?valueChanged=valueChanged, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncStepper, ViewBuilders.UpdateFuncStepper, attribBuilder) - - /// Builds the attributes for a Switch in the view - static member inline BuildSwitch(attribCount: int, - ?isToggled: bool, - ?toggled: Xamarin.Forms.ToggledEventArgs -> unit, - ?onColor: Xamarin.Forms.Color, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match isToggled with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match toggled with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match onColor with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match isToggled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsToggledAttribKey, (v)) - match toggled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ToggledAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match onColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.OnColorAttribKey, (v)) - attribBuilder - - static member val CreateFuncSwitch : (unit -> Xamarin.Forms.Switch) = (fun () -> ViewBuilders.CreateSwitch()) with get, set - - static member CreateSwitch () : Xamarin.Forms.Switch = - upcast (new Xamarin.Forms.Switch()) - - static member val UpdateFuncSwitch = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Switch) -> ViewBuilders.UpdateSwitch (prevOpt, curr, target)) - - static member UpdateSwitch (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Switch) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevIsToggledOpt = ValueNone - let mutable currIsToggledOpt = ValueNone - let mutable prevToggledOpt = ValueNone - let mutable currToggledOpt = ValueNone - let mutable prevOnColorOpt = ValueNone - let mutable currOnColorOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.IsToggledAttribKey.KeyValue then - currIsToggledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.ToggledAttribKey.KeyValue then - currToggledOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.OnColorAttribKey.KeyValue then - currOnColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.IsToggledAttribKey.KeyValue then - prevIsToggledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.ToggledAttribKey.KeyValue then - prevToggledOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.OnColorAttribKey.KeyValue then - prevOnColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - match prevIsToggledOpt, currIsToggledOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsToggled <- currValue - | ValueSome _, ValueNone -> target.IsToggled <- false - | ValueNone, ValueNone -> () - match prevToggledOpt, currToggledOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Toggled.RemoveHandler(prevValue); target.Toggled.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Toggled.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Toggled.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevOnColorOpt, currOnColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.OnColor <- currValue - | ValueSome _, ValueNone -> target.OnColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - - static member inline ConstructSwitch(?isToggled: bool, - ?toggled: Xamarin.Forms.ToggledEventArgs -> unit, - ?onColor: Xamarin.Forms.Color, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Switch -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildSwitch(0, - ?isToggled=isToggled, - ?toggled=toggled, - ?onColor=onColor, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncSwitch, ViewBuilders.UpdateFuncSwitch, attribBuilder) - - /// Builds the attributes for a Cell in the view - static member inline BuildCell(attribCount: int, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match height with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isEnabled with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match height with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HeightAttribKey, (v)) - match isEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsEnabledAttribKey, (v)) - attribBuilder - - static member val CreateFuncCell : (unit -> Xamarin.Forms.Cell) = (fun () -> ViewBuilders.CreateCell()) with get, set - - static member CreateCell () : Xamarin.Forms.Cell = - failwith "can't create Xamarin.Forms.Cell" - - static member val UpdateFuncCell = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Cell) -> ViewBuilders.UpdateCell (prevOpt, curr, target)) - - static member UpdateCell (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Cell) = - // update the inherited Element element - let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevHeightOpt = ValueNone - let mutable currHeightOpt = ValueNone - let mutable prevIsEnabledOpt = ValueNone - let mutable currIsEnabledOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.HeightAttribKey.KeyValue then - currHeightOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.IsEnabledAttribKey.KeyValue then - currIsEnabledOpt <- ValueSome (kvp.Value :?> bool) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.HeightAttribKey.KeyValue then - prevHeightOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.IsEnabledAttribKey.KeyValue then - prevIsEnabledOpt <- ValueSome (kvp.Value :?> bool) - match prevHeightOpt, currHeightOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Height <- currValue - | ValueSome _, ValueNone -> target.Height <- -1.0 - | ValueNone, ValueNone -> () - match prevIsEnabledOpt, currIsEnabledOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsEnabled <- currValue - | ValueSome _, ValueNone -> target.IsEnabled <- true - | ValueNone, ValueNone -> () - - static member inline ConstructCell(?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Cell -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildCell(0, - ?height=height, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncCell, ViewBuilders.UpdateFuncCell, attribBuilder) - - /// Builds the attributes for a SwitchCell in the view - static member inline BuildSwitchCell(attribCount: int, - ?on: bool, - ?text: string, - ?onChanged: Xamarin.Forms.ToggledEventArgs -> unit, - ?onColor: Xamarin.Forms.Color, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match on with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match text with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match onChanged with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match onColor with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildCell(attribCount, ?height=height, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match on with None -> () | Some v -> attribBuilder.Add(ViewAttributes.OnAttribKey, (v)) - match text with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextAttribKey, (v)) - match onChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.OnChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match onColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.OnColorAttribKey, (v)) - attribBuilder - - static member val CreateFuncSwitchCell : (unit -> Xamarin.Forms.SwitchCell) = (fun () -> ViewBuilders.CreateSwitchCell()) with get, set - - static member CreateSwitchCell () : Xamarin.Forms.SwitchCell = - upcast (new Xamarin.Forms.SwitchCell()) - - static member val UpdateFuncSwitchCell = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.SwitchCell) -> ViewBuilders.UpdateSwitchCell (prevOpt, curr, target)) - - static member UpdateSwitchCell (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.SwitchCell) = - // update the inherited Cell element - let baseElement = (if ViewProto.ProtoCell.IsNone then ViewProto.ProtoCell <- Some (ViewBuilders.ConstructCell())); ViewProto.ProtoCell.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevOnOpt = ValueNone - let mutable currOnOpt = ValueNone - let mutable prevTextOpt = ValueNone - let mutable currTextOpt = ValueNone - let mutable prevOnChangedOpt = ValueNone - let mutable currOnChangedOpt = ValueNone - let mutable prevOnColorOpt = ValueNone - let mutable currOnColorOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.OnAttribKey.KeyValue then - currOnOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - currTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.OnChangedAttribKey.KeyValue then - currOnChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.OnColorAttribKey.KeyValue then - currOnColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.OnAttribKey.KeyValue then - prevOnOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - prevTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.OnChangedAttribKey.KeyValue then - prevOnChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.OnColorAttribKey.KeyValue then - prevOnColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - match prevOnOpt, currOnOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.On <- currValue - | ValueSome _, ValueNone -> target.On <- false - | ValueNone, ValueNone -> () - match prevTextOpt, currTextOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Text <- currValue - | ValueSome _, ValueNone -> target.Text <- null - | ValueNone, ValueNone -> () - match prevOnChangedOpt, currOnChangedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.OnChanged.RemoveHandler(prevValue); target.OnChanged.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.OnChanged.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.OnChanged.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevOnColorOpt, currOnColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.OnColor <- currValue - | ValueSome _, ValueNone -> target.OnColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - - static member inline ConstructSwitchCell(?on: bool, - ?text: string, - ?onChanged: Xamarin.Forms.ToggledEventArgs -> unit, - ?onColor: Xamarin.Forms.Color, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.SwitchCell -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildSwitchCell(0, - ?on=on, - ?text=text, - ?onChanged=onChanged, - ?onColor=onColor, - ?height=height, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncSwitchCell, ViewBuilders.UpdateFuncSwitchCell, attribBuilder) - - /// Builds the attributes for a TableView in the view - static member inline BuildTableView(attribCount: int, - ?intent: Xamarin.Forms.TableIntent, - ?hasUnevenRows: bool, - ?rowHeight: int, - ?items: (string * ViewElement list) list, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match intent with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match hasUnevenRows with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match rowHeight with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match items with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match intent with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IntentAttribKey, (v)) - match hasUnevenRows with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HasUnevenRowsAttribKey, (v)) - match rowHeight with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RowHeightAttribKey, (v)) - match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TableRootAttribKey, (fun es -> es |> Array.ofList |> Array.map (fun (title, es) -> (title, Array.ofList es)))(v)) - attribBuilder - - static member val CreateFuncTableView : (unit -> Xamarin.Forms.TableView) = (fun () -> ViewBuilders.CreateTableView()) with get, set - - static member CreateTableView () : Xamarin.Forms.TableView = - upcast (new Xamarin.Forms.TableView()) - - static member val UpdateFuncTableView = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.TableView) -> ViewBuilders.UpdateTableView (prevOpt, curr, target)) - - static member UpdateTableView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.TableView) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevIntentOpt = ValueNone - let mutable currIntentOpt = ValueNone - let mutable prevHasUnevenRowsOpt = ValueNone - let mutable currHasUnevenRowsOpt = ValueNone - let mutable prevRowHeightOpt = ValueNone - let mutable currRowHeightOpt = ValueNone - let mutable prevTableRootOpt = ValueNone - let mutable currTableRootOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.IntentAttribKey.KeyValue then - currIntentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TableIntent) - if kvp.Key = ViewAttributes.HasUnevenRowsAttribKey.KeyValue then - currHasUnevenRowsOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.RowHeightAttribKey.KeyValue then - currRowHeightOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.TableRootAttribKey.KeyValue then - currTableRootOpt <- ValueSome (kvp.Value :?> (string * ViewElement[])[]) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.IntentAttribKey.KeyValue then - prevIntentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TableIntent) - if kvp.Key = ViewAttributes.HasUnevenRowsAttribKey.KeyValue then - prevHasUnevenRowsOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.RowHeightAttribKey.KeyValue then - prevRowHeightOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.TableRootAttribKey.KeyValue then - prevTableRootOpt <- ValueSome (kvp.Value :?> (string * ViewElement[])[]) - match prevIntentOpt, currIntentOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Intent <- currValue - | ValueSome _, ValueNone -> target.Intent <- Unchecked.defaultof - | ValueNone, ValueNone -> () - match prevHasUnevenRowsOpt, currHasUnevenRowsOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.HasUnevenRows <- currValue - | ValueSome _, ValueNone -> target.HasUnevenRows <- false - | ValueNone, ValueNone -> () - match prevRowHeightOpt, currRowHeightOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.RowHeight <- currValue - | ValueSome _, ValueNone -> target.RowHeight <- -1 - | ValueNone, ValueNone -> () - updateTableViewItems prevTableRootOpt currTableRootOpt target - - static member inline ConstructTableView(?intent: Xamarin.Forms.TableIntent, - ?hasUnevenRows: bool, - ?rowHeight: int, - ?items: (string * ViewElement list) list, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.TableView -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildTableView(0, - ?intent=intent, - ?hasUnevenRows=hasUnevenRows, - ?rowHeight=rowHeight, - ?items=items, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncTableView, ViewBuilders.UpdateFuncTableView, attribBuilder) - - /// Builds the attributes for a RowDefinition in the view - static member inline BuildRowDefinition(attribCount: int, - ?height: obj) = - - let attribCount = match height with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = new AttributesBuilder(attribCount) - match height with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RowDefinitionHeightAttribKey, makeGridLength(v)) - attribBuilder - - static member val CreateFuncRowDefinition : (unit -> Xamarin.Forms.RowDefinition) = (fun () -> ViewBuilders.CreateRowDefinition()) with get, set - - static member CreateRowDefinition () : Xamarin.Forms.RowDefinition = - upcast (new Xamarin.Forms.RowDefinition()) - - static member val UpdateFuncRowDefinition = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.RowDefinition) -> ViewBuilders.UpdateRowDefinition (prevOpt, curr, target)) - - static member UpdateRowDefinition (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.RowDefinition) = - let mutable prevRowDefinitionHeightOpt = ValueNone - let mutable currRowDefinitionHeightOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.RowDefinitionHeightAttribKey.KeyValue then - currRowDefinitionHeightOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.GridLength) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.RowDefinitionHeightAttribKey.KeyValue then - prevRowDefinitionHeightOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.GridLength) - match prevRowDefinitionHeightOpt, currRowDefinitionHeightOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Height <- currValue - | ValueSome _, ValueNone -> target.Height <- Xamarin.Forms.GridLength.Auto - | ValueNone, ValueNone -> () - - static member inline ConstructRowDefinition(?height: obj) = - - let attribBuilder = ViewBuilders.BuildRowDefinition(0, - ?height=height) - - ViewElement.Create(ViewBuilders.CreateFuncRowDefinition, ViewBuilders.UpdateFuncRowDefinition, attribBuilder) - - /// Builds the attributes for a ColumnDefinition in the view - static member inline BuildColumnDefinition(attribCount: int, - ?width: obj) = - - let attribCount = match width with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = new AttributesBuilder(attribCount) - match width with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ColumnDefinitionWidthAttribKey, makeGridLength(v)) - attribBuilder - - static member val CreateFuncColumnDefinition : (unit -> Xamarin.Forms.ColumnDefinition) = (fun () -> ViewBuilders.CreateColumnDefinition()) with get, set - - static member CreateColumnDefinition () : Xamarin.Forms.ColumnDefinition = - upcast (new Xamarin.Forms.ColumnDefinition()) - - static member val UpdateFuncColumnDefinition = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ColumnDefinition) -> ViewBuilders.UpdateColumnDefinition (prevOpt, curr, target)) - - static member UpdateColumnDefinition (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ColumnDefinition) = - let mutable prevColumnDefinitionWidthOpt = ValueNone - let mutable currColumnDefinitionWidthOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ColumnDefinitionWidthAttribKey.KeyValue then - currColumnDefinitionWidthOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.GridLength) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ColumnDefinitionWidthAttribKey.KeyValue then - prevColumnDefinitionWidthOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.GridLength) - match prevColumnDefinitionWidthOpt, currColumnDefinitionWidthOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Width <- currValue - | ValueSome _, ValueNone -> target.Width <- Xamarin.Forms.GridLength.Auto - | ValueNone, ValueNone -> () - - static member inline ConstructColumnDefinition(?width: obj) = - - let attribBuilder = ViewBuilders.BuildColumnDefinition(0, - ?width=width) - - ViewElement.Create(ViewBuilders.CreateFuncColumnDefinition, ViewBuilders.UpdateFuncColumnDefinition, attribBuilder) - - /// Builds the attributes for a Grid in the view - static member inline BuildGrid(attribCount: int, - ?rowdefs: obj list, - ?coldefs: obj list, - ?rowSpacing: double, - ?columnSpacing: double, - ?children: ViewElement list, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match rowdefs with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match coldefs with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match rowSpacing with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match columnSpacing with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match children with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildLayout(attribCount, ?isClippedToBounds=isClippedToBounds, ?padding=padding, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match rowdefs with None -> () | Some v -> attribBuilder.Add(ViewAttributes.GridRowDefinitionsAttribKey, (fun es -> es |> Array.ofList |> Array.map (fun h -> ViewBuilders.ConstructRowDefinition(height=h)))(v)) - match coldefs with None -> () | Some v -> attribBuilder.Add(ViewAttributes.GridColumnDefinitionsAttribKey, (fun es -> es |> Array.ofList |> Array.map (fun h -> ViewBuilders.ConstructColumnDefinition(width=h)))(v)) - match rowSpacing with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RowSpacingAttribKey, (v)) - match columnSpacing with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ColumnSpacingAttribKey, (v)) - match children with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ChildrenAttribKey, Array.ofList(v)) - attribBuilder - - static member val CreateFuncGrid : (unit -> Xamarin.Forms.Grid) = (fun () -> ViewBuilders.CreateGrid()) with get, set - - static member CreateGrid () : Xamarin.Forms.Grid = - upcast (new Xamarin.Forms.Grid()) - - static member val UpdateFuncGrid = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Grid) -> ViewBuilders.UpdateGrid (prevOpt, curr, target)) - - static member UpdateGrid (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Grid) = - // update the inherited Layout element - let baseElement = (if ViewProto.ProtoLayout.IsNone then ViewProto.ProtoLayout <- Some (ViewBuilders.ConstructLayout())); ViewProto.ProtoLayout.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevGridRowDefinitionsOpt = ValueNone - let mutable currGridRowDefinitionsOpt = ValueNone - let mutable prevGridColumnDefinitionsOpt = ValueNone - let mutable currGridColumnDefinitionsOpt = ValueNone - let mutable prevRowSpacingOpt = ValueNone - let mutable currRowSpacingOpt = ValueNone - let mutable prevColumnSpacingOpt = ValueNone - let mutable currColumnSpacingOpt = ValueNone - let mutable prevChildrenOpt = ValueNone - let mutable currChildrenOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.GridRowDefinitionsAttribKey.KeyValue then - currGridRowDefinitionsOpt <- ValueSome (kvp.Value :?> ViewElement[]) - if kvp.Key = ViewAttributes.GridColumnDefinitionsAttribKey.KeyValue then - currGridColumnDefinitionsOpt <- ValueSome (kvp.Value :?> ViewElement[]) - if kvp.Key = ViewAttributes.RowSpacingAttribKey.KeyValue then - currRowSpacingOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ColumnSpacingAttribKey.KeyValue then - currColumnSpacingOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ChildrenAttribKey.KeyValue then - currChildrenOpt <- ValueSome (kvp.Value :?> ViewElement[]) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.GridRowDefinitionsAttribKey.KeyValue then - prevGridRowDefinitionsOpt <- ValueSome (kvp.Value :?> ViewElement[]) - if kvp.Key = ViewAttributes.GridColumnDefinitionsAttribKey.KeyValue then - prevGridColumnDefinitionsOpt <- ValueSome (kvp.Value :?> ViewElement[]) - if kvp.Key = ViewAttributes.RowSpacingAttribKey.KeyValue then - prevRowSpacingOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ColumnSpacingAttribKey.KeyValue then - prevColumnSpacingOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ChildrenAttribKey.KeyValue then - prevChildrenOpt <- ValueSome (kvp.Value :?> ViewElement[]) - updateCollectionGeneric prevGridRowDefinitionsOpt currGridRowDefinitionsOpt target.RowDefinitions - (fun (x:ViewElement) -> x.Create() :?> Xamarin.Forms.RowDefinition) - (fun _ _ _ -> ()) - canReuseChild - updateChild - updateCollectionGeneric prevGridColumnDefinitionsOpt currGridColumnDefinitionsOpt target.ColumnDefinitions - (fun (x:ViewElement) -> x.Create() :?> Xamarin.Forms.ColumnDefinition) - (fun _ _ _ -> ()) - canReuseChild - updateChild - match prevRowSpacingOpt, currRowSpacingOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.RowSpacing <- currValue - | ValueSome _, ValueNone -> target.RowSpacing <- 0.0 - | ValueNone, ValueNone -> () - match prevColumnSpacingOpt, currColumnSpacingOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ColumnSpacing <- currValue - | ValueSome _, ValueNone -> target.ColumnSpacing <- 0.0 - | ValueNone, ValueNone -> () - updateCollectionGeneric prevChildrenOpt currChildrenOpt target.Children - (fun (x:ViewElement) -> x.Create() :?> Xamarin.Forms.View) - (fun prevChildOpt newChild targetChild -> - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.GridRowAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.GridRowAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.Grid.SetRow(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.Grid.SetRow(targetChild, 0) - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.GridRowSpanAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.GridRowSpanAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.Grid.SetRowSpan(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.Grid.SetRowSpan(targetChild, 0) - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.GridColumnAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.GridColumnAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.Grid.SetColumn(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.Grid.SetColumn(targetChild, 0) - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.GridColumnSpanAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.GridColumnSpanAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.Grid.SetColumnSpan(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.Grid.SetColumnSpan(targetChild, 0) - | _ -> () - ()) - canReuseChild - updateChild - - static member inline ConstructGrid(?rowdefs: obj list, - ?coldefs: obj list, - ?rowSpacing: double, - ?columnSpacing: double, - ?children: ViewElement list, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Grid -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildGrid(0, - ?rowdefs=rowdefs, - ?coldefs=coldefs, - ?rowSpacing=rowSpacing, - ?columnSpacing=columnSpacing, - ?children=children, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncGrid, ViewBuilders.UpdateFuncGrid, attribBuilder) - - /// Builds the attributes for a AbsoluteLayout in the view - static member inline BuildAbsoluteLayout(attribCount: int, - ?children: ViewElement list, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match children with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildLayout(attribCount, ?isClippedToBounds=isClippedToBounds, ?padding=padding, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match children with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ChildrenAttribKey, Array.ofList(v)) - attribBuilder - - static member val CreateFuncAbsoluteLayout : (unit -> Xamarin.Forms.AbsoluteLayout) = (fun () -> ViewBuilders.CreateAbsoluteLayout()) with get, set - - static member CreateAbsoluteLayout () : Xamarin.Forms.AbsoluteLayout = - upcast (new Xamarin.Forms.AbsoluteLayout()) - - static member val UpdateFuncAbsoluteLayout = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.AbsoluteLayout) -> ViewBuilders.UpdateAbsoluteLayout (prevOpt, curr, target)) - - static member UpdateAbsoluteLayout (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.AbsoluteLayout) = - // update the inherited Layout element - let baseElement = (if ViewProto.ProtoLayout.IsNone then ViewProto.ProtoLayout <- Some (ViewBuilders.ConstructLayout())); ViewProto.ProtoLayout.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevChildrenOpt = ValueNone - let mutable currChildrenOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ChildrenAttribKey.KeyValue then - currChildrenOpt <- ValueSome (kvp.Value :?> ViewElement[]) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ChildrenAttribKey.KeyValue then - prevChildrenOpt <- ValueSome (kvp.Value :?> ViewElement[]) - updateCollectionGeneric prevChildrenOpt currChildrenOpt target.Children - (fun (x:ViewElement) -> x.Create() :?> Xamarin.Forms.View) - (fun prevChildOpt newChild targetChild -> - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.LayoutBoundsAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.LayoutBoundsAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.AbsoluteLayout.SetLayoutBounds(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.AbsoluteLayout.SetLayoutBounds(targetChild, Xamarin.Forms.Rectangle.Zero) - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.LayoutFlagsAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.LayoutFlagsAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.AbsoluteLayout.SetLayoutFlags(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.AbsoluteLayout.SetLayoutFlags(targetChild, Xamarin.Forms.AbsoluteLayoutFlags.None) - | _ -> () - ()) - canReuseChild - updateChild - - static member inline ConstructAbsoluteLayout(?children: ViewElement list, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.AbsoluteLayout -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildAbsoluteLayout(0, - ?children=children, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncAbsoluteLayout, ViewBuilders.UpdateFuncAbsoluteLayout, attribBuilder) - - /// Builds the attributes for a RelativeLayout in the view - static member inline BuildRelativeLayout(attribCount: int, - ?children: ViewElement list, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match children with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildLayout(attribCount, ?isClippedToBounds=isClippedToBounds, ?padding=padding, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match children with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ChildrenAttribKey, Array.ofList(v)) - attribBuilder - - static member val CreateFuncRelativeLayout : (unit -> Xamarin.Forms.RelativeLayout) = (fun () -> ViewBuilders.CreateRelativeLayout()) with get, set - - static member CreateRelativeLayout () : Xamarin.Forms.RelativeLayout = - upcast (new Xamarin.Forms.RelativeLayout()) - - static member val UpdateFuncRelativeLayout = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.RelativeLayout) -> ViewBuilders.UpdateRelativeLayout (prevOpt, curr, target)) - - static member UpdateRelativeLayout (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.RelativeLayout) = - // update the inherited Layout element - let baseElement = (if ViewProto.ProtoLayout.IsNone then ViewProto.ProtoLayout <- Some (ViewBuilders.ConstructLayout())); ViewProto.ProtoLayout.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevChildrenOpt = ValueNone - let mutable currChildrenOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ChildrenAttribKey.KeyValue then - currChildrenOpt <- ValueSome (kvp.Value :?> ViewElement[]) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ChildrenAttribKey.KeyValue then - prevChildrenOpt <- ValueSome (kvp.Value :?> ViewElement[]) - updateCollectionGeneric prevChildrenOpt currChildrenOpt target.Children - (fun (x:ViewElement) -> x.Create() :?> Xamarin.Forms.View) - (fun prevChildOpt newChild targetChild -> - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.BoundsConstraintAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.BoundsConstraintAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.RelativeLayout.SetBoundsConstraint(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.RelativeLayout.SetBoundsConstraint(targetChild, null) - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.HeightConstraintAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.HeightConstraintAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.RelativeLayout.SetHeightConstraint(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.RelativeLayout.SetHeightConstraint(targetChild, null) - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.WidthConstraintAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.WidthConstraintAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.RelativeLayout.SetWidthConstraint(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.RelativeLayout.SetWidthConstraint(targetChild, null) - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.XConstraintAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.XConstraintAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.RelativeLayout.SetXConstraint(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.RelativeLayout.SetXConstraint(targetChild, null) - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.YConstraintAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.YConstraintAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.RelativeLayout.SetYConstraint(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.RelativeLayout.SetYConstraint(targetChild, null) - | _ -> () - ()) - canReuseChild - updateChild - - static member inline ConstructRelativeLayout(?children: ViewElement list, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.RelativeLayout -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildRelativeLayout(0, - ?children=children, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncRelativeLayout, ViewBuilders.UpdateFuncRelativeLayout, attribBuilder) - - /// Builds the attributes for a FlexLayout in the view - static member inline BuildFlexLayout(attribCount: int, - ?alignContent: Xamarin.Forms.FlexAlignContent, - ?alignItems: Xamarin.Forms.FlexAlignItems, - ?direction: Xamarin.Forms.FlexDirection, - ?position: Xamarin.Forms.FlexPosition, - ?wrap: Xamarin.Forms.FlexWrap, - ?justifyContent: Xamarin.Forms.FlexJustify, - ?children: ViewElement list, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match alignContent with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match alignItems with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match direction with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match position with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match wrap with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match justifyContent with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match children with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildLayout(attribCount, ?isClippedToBounds=isClippedToBounds, ?padding=padding, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match alignContent with None -> () | Some v -> attribBuilder.Add(ViewAttributes.AlignContentAttribKey, (v)) - match alignItems with None -> () | Some v -> attribBuilder.Add(ViewAttributes.AlignItemsAttribKey, (v)) - match direction with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlexLayoutDirectionAttribKey, (v)) - match position with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PositionAttribKey, (v)) - match wrap with None -> () | Some v -> attribBuilder.Add(ViewAttributes.WrapAttribKey, (v)) - match justifyContent with None -> () | Some v -> attribBuilder.Add(ViewAttributes.JustifyContentAttribKey, (v)) - match children with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ChildrenAttribKey, Array.ofList(v)) - attribBuilder - - static member val CreateFuncFlexLayout : (unit -> Xamarin.Forms.FlexLayout) = (fun () -> ViewBuilders.CreateFlexLayout()) with get, set - - static member CreateFlexLayout () : Xamarin.Forms.FlexLayout = - upcast (new Xamarin.Forms.FlexLayout()) - - static member val UpdateFuncFlexLayout = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.FlexLayout) -> ViewBuilders.UpdateFlexLayout (prevOpt, curr, target)) - - static member UpdateFlexLayout (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.FlexLayout) = - // update the inherited Layout element - let baseElement = (if ViewProto.ProtoLayout.IsNone then ViewProto.ProtoLayout <- Some (ViewBuilders.ConstructLayout())); ViewProto.ProtoLayout.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevAlignContentOpt = ValueNone - let mutable currAlignContentOpt = ValueNone - let mutable prevAlignItemsOpt = ValueNone - let mutable currAlignItemsOpt = ValueNone - let mutable prevFlexLayoutDirectionOpt = ValueNone - let mutable currFlexLayoutDirectionOpt = ValueNone - let mutable prevPositionOpt = ValueNone - let mutable currPositionOpt = ValueNone - let mutable prevWrapOpt = ValueNone - let mutable currWrapOpt = ValueNone - let mutable prevJustifyContentOpt = ValueNone - let mutable currJustifyContentOpt = ValueNone - let mutable prevChildrenOpt = ValueNone - let mutable currChildrenOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.AlignContentAttribKey.KeyValue then - currAlignContentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlexAlignContent) - if kvp.Key = ViewAttributes.AlignItemsAttribKey.KeyValue then - currAlignItemsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlexAlignItems) - if kvp.Key = ViewAttributes.FlexLayoutDirectionAttribKey.KeyValue then - currFlexLayoutDirectionOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlexDirection) - if kvp.Key = ViewAttributes.PositionAttribKey.KeyValue then - currPositionOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlexPosition) - if kvp.Key = ViewAttributes.WrapAttribKey.KeyValue then - currWrapOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlexWrap) - if kvp.Key = ViewAttributes.JustifyContentAttribKey.KeyValue then - currJustifyContentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlexJustify) - if kvp.Key = ViewAttributes.ChildrenAttribKey.KeyValue then - currChildrenOpt <- ValueSome (kvp.Value :?> ViewElement[]) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.AlignContentAttribKey.KeyValue then - prevAlignContentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlexAlignContent) - if kvp.Key = ViewAttributes.AlignItemsAttribKey.KeyValue then - prevAlignItemsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlexAlignItems) - if kvp.Key = ViewAttributes.FlexLayoutDirectionAttribKey.KeyValue then - prevFlexLayoutDirectionOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlexDirection) - if kvp.Key = ViewAttributes.PositionAttribKey.KeyValue then - prevPositionOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlexPosition) - if kvp.Key = ViewAttributes.WrapAttribKey.KeyValue then - prevWrapOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlexWrap) - if kvp.Key = ViewAttributes.JustifyContentAttribKey.KeyValue then - prevJustifyContentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlexJustify) - if kvp.Key = ViewAttributes.ChildrenAttribKey.KeyValue then - prevChildrenOpt <- ValueSome (kvp.Value :?> ViewElement[]) - match prevAlignContentOpt, currAlignContentOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.AlignContent <- currValue - | ValueSome _, ValueNone -> target.AlignContent <- Unchecked.defaultof - | ValueNone, ValueNone -> () - match prevAlignItemsOpt, currAlignItemsOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.AlignItems <- currValue - | ValueSome _, ValueNone -> target.AlignItems <- Unchecked.defaultof - | ValueNone, ValueNone -> () - match prevFlexLayoutDirectionOpt, currFlexLayoutDirectionOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Direction <- currValue - | ValueSome _, ValueNone -> target.Direction <- Unchecked.defaultof - | ValueNone, ValueNone -> () - match prevPositionOpt, currPositionOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Position <- currValue - | ValueSome _, ValueNone -> target.Position <- Unchecked.defaultof - | ValueNone, ValueNone -> () - match prevWrapOpt, currWrapOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Wrap <- currValue - | ValueSome _, ValueNone -> target.Wrap <- Unchecked.defaultof - | ValueNone, ValueNone -> () - match prevJustifyContentOpt, currJustifyContentOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.JustifyContent <- currValue - | ValueSome _, ValueNone -> target.JustifyContent <- Unchecked.defaultof - | ValueNone, ValueNone -> () - updateCollectionGeneric prevChildrenOpt currChildrenOpt target.Children - (fun (x:ViewElement) -> x.Create() :?> Xamarin.Forms.View) - (fun prevChildOpt newChild targetChild -> - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.FlexAlignSelfAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.FlexAlignSelfAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.FlexLayout.SetAlignSelf(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.FlexLayout.SetAlignSelf(targetChild, Unchecked.defaultof) - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.FlexOrderAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.FlexOrderAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.FlexLayout.SetOrder(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.FlexLayout.SetOrder(targetChild, 0) - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.FlexBasisAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.FlexBasisAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.FlexLayout.SetBasis(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.FlexLayout.SetBasis(targetChild, Unchecked.defaultof) - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.FlexGrowAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.FlexGrowAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.FlexLayout.SetGrow(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.FlexLayout.SetGrow(targetChild, 0.0f) - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.FlexShrinkAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.FlexShrinkAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> () - | _, ValueSome currChildValue -> Xamarin.Forms.FlexLayout.SetShrink(targetChild, currChildValue) - | ValueSome _, ValueNone -> Xamarin.Forms.FlexLayout.SetShrink(targetChild, 1.0f) - | _ -> () - ()) - canReuseChild - updateChild - - static member inline ConstructFlexLayout(?alignContent: Xamarin.Forms.FlexAlignContent, - ?alignItems: Xamarin.Forms.FlexAlignItems, - ?direction: Xamarin.Forms.FlexDirection, - ?position: Xamarin.Forms.FlexPosition, - ?wrap: Xamarin.Forms.FlexWrap, - ?justifyContent: Xamarin.Forms.FlexJustify, - ?children: ViewElement list, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.FlexLayout -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildFlexLayout(0, - ?alignContent=alignContent, - ?alignItems=alignItems, - ?direction=direction, - ?position=position, - ?wrap=wrap, - ?justifyContent=justifyContent, - ?children=children, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncFlexLayout, ViewBuilders.UpdateFuncFlexLayout, attribBuilder) - - /// Builds the attributes for a TemplatedView in the view - static member inline BuildTemplatedView(attribCount: int, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - let attribBuilder = ViewBuilders.BuildLayout(attribCount, ?isClippedToBounds=isClippedToBounds, ?padding=padding, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - attribBuilder - - static member val CreateFuncTemplatedView : (unit -> Xamarin.Forms.TemplatedView) = (fun () -> ViewBuilders.CreateTemplatedView()) with get, set - - static member CreateTemplatedView () : Xamarin.Forms.TemplatedView = - upcast (new Xamarin.Forms.TemplatedView()) - - static member val UpdateFuncTemplatedView = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.TemplatedView) -> ViewBuilders.UpdateTemplatedView (prevOpt, curr, target)) - - static member UpdateTemplatedView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.TemplatedView) = - // update the inherited Layout element - let baseElement = (if ViewProto.ProtoLayout.IsNone then ViewProto.ProtoLayout <- Some (ViewBuilders.ConstructLayout())); ViewProto.ProtoLayout.Value - baseElement.UpdateInherited (prevOpt, curr, target) - ignore prevOpt - ignore curr - ignore target - - static member inline ConstructTemplatedView(?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.TemplatedView -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildTemplatedView(0, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncTemplatedView, ViewBuilders.UpdateFuncTemplatedView, attribBuilder) - - /// Builds the attributes for a ContentView in the view - static member inline BuildContentView(attribCount: int, - ?content: ViewElement, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match content with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildTemplatedView(attribCount, ?isClippedToBounds=isClippedToBounds, ?padding=padding, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match content with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ContentAttribKey, (v)) - attribBuilder - - static member val CreateFuncContentView : (unit -> Xamarin.Forms.ContentView) = (fun () -> ViewBuilders.CreateContentView()) with get, set - - static member CreateContentView () : Xamarin.Forms.ContentView = - upcast (new Xamarin.Forms.ContentView()) - - static member val UpdateFuncContentView = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ContentView) -> ViewBuilders.UpdateContentView (prevOpt, curr, target)) - - static member UpdateContentView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ContentView) = - // update the inherited TemplatedView element - let baseElement = (if ViewProto.ProtoTemplatedView.IsNone then ViewProto.ProtoTemplatedView <- Some (ViewBuilders.ConstructTemplatedView())); ViewProto.ProtoTemplatedView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevContentOpt = ValueNone - let mutable currContentOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ContentAttribKey.KeyValue then - currContentOpt <- ValueSome (kvp.Value :?> ViewElement) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ContentAttribKey.KeyValue then - prevContentOpt <- ValueSome (kvp.Value :?> ViewElement) - match prevContentOpt, currContentOpt with - // For structured objects, dependsOn on reference equality - | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () - | ValueSome prevValue, ValueSome newValue when canReuseChild prevValue newValue -> - newValue.UpdateIncremental(prevValue, target.Content) - | _, ValueSome newValue -> - target.Content <- (newValue.Create() :?> Xamarin.Forms.View) - | ValueSome _, ValueNone -> - target.Content <- null - | ValueNone, ValueNone -> () - - static member inline ConstructContentView(?content: ViewElement, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ContentView -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildContentView(0, - ?content=content, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncContentView, ViewBuilders.UpdateFuncContentView, attribBuilder) - - /// Builds the attributes for a DatePicker in the view - static member inline BuildDatePicker(attribCount: int, - ?date: System.DateTime, - ?format: string, - ?minimumDate: System.DateTime, - ?maximumDate: System.DateTime, - ?dateSelected: Xamarin.Forms.DateChangedEventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match date with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match format with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match minimumDate with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match maximumDate with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match dateSelected with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match date with None -> () | Some v -> attribBuilder.Add(ViewAttributes.DateAttribKey, (v)) - match format with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FormatAttribKey, (v)) - match minimumDate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MinimumDateAttribKey, (v)) - match maximumDate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MaximumDateAttribKey, (v)) - match dateSelected with None -> () | Some v -> attribBuilder.Add(ViewAttributes.DateSelectedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - attribBuilder - - static member val CreateFuncDatePicker : (unit -> Xamarin.Forms.DatePicker) = (fun () -> ViewBuilders.CreateDatePicker()) with get, set - - static member CreateDatePicker () : Xamarin.Forms.DatePicker = - upcast (new Xamarin.Forms.DatePicker()) - - static member val UpdateFuncDatePicker = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.DatePicker) -> ViewBuilders.UpdateDatePicker (prevOpt, curr, target)) - - static member UpdateDatePicker (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.DatePicker) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevDateOpt = ValueNone - let mutable currDateOpt = ValueNone - let mutable prevFormatOpt = ValueNone - let mutable currFormatOpt = ValueNone - let mutable prevMinimumDateOpt = ValueNone - let mutable currMinimumDateOpt = ValueNone - let mutable prevMaximumDateOpt = ValueNone - let mutable currMaximumDateOpt = ValueNone - let mutable prevDateSelectedOpt = ValueNone - let mutable currDateSelectedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.DateAttribKey.KeyValue then - currDateOpt <- ValueSome (kvp.Value :?> System.DateTime) - if kvp.Key = ViewAttributes.FormatAttribKey.KeyValue then - currFormatOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.MinimumDateAttribKey.KeyValue then - currMinimumDateOpt <- ValueSome (kvp.Value :?> System.DateTime) - if kvp.Key = ViewAttributes.MaximumDateAttribKey.KeyValue then - currMaximumDateOpt <- ValueSome (kvp.Value :?> System.DateTime) - if kvp.Key = ViewAttributes.DateSelectedAttribKey.KeyValue then - currDateSelectedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.DateAttribKey.KeyValue then - prevDateOpt <- ValueSome (kvp.Value :?> System.DateTime) - if kvp.Key = ViewAttributes.FormatAttribKey.KeyValue then - prevFormatOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.MinimumDateAttribKey.KeyValue then - prevMinimumDateOpt <- ValueSome (kvp.Value :?> System.DateTime) - if kvp.Key = ViewAttributes.MaximumDateAttribKey.KeyValue then - prevMaximumDateOpt <- ValueSome (kvp.Value :?> System.DateTime) - if kvp.Key = ViewAttributes.DateSelectedAttribKey.KeyValue then - prevDateSelectedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevDateOpt, currDateOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Date <- currValue - | ValueSome _, ValueNone -> target.Date <- Unchecked.defaultof - | ValueNone, ValueNone -> () - match prevFormatOpt, currFormatOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Format <- currValue - | ValueSome _, ValueNone -> target.Format <- "d" - | ValueNone, ValueNone -> () - match prevMinimumDateOpt, currMinimumDateOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.MinimumDate <- currValue - | ValueSome _, ValueNone -> target.MinimumDate <- new System.DateTime(1900, 1, 1) - | ValueNone, ValueNone -> () - match prevMaximumDateOpt, currMaximumDateOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.MaximumDate <- currValue - | ValueSome _, ValueNone -> target.MaximumDate <- new System.DateTime(2100, 12, 31) - | ValueNone, ValueNone -> () - match prevDateSelectedOpt, currDateSelectedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.DateSelected.RemoveHandler(prevValue); target.DateSelected.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.DateSelected.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.DateSelected.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructDatePicker(?date: System.DateTime, - ?format: string, - ?minimumDate: System.DateTime, - ?maximumDate: System.DateTime, - ?dateSelected: Xamarin.Forms.DateChangedEventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.DatePicker -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildDatePicker(0, - ?date=date, - ?format=format, - ?minimumDate=minimumDate, - ?maximumDate=maximumDate, - ?dateSelected=dateSelected, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncDatePicker, ViewBuilders.UpdateFuncDatePicker, attribBuilder) - - /// Builds the attributes for a Picker in the view - static member inline BuildPicker(attribCount: int, - ?itemsSource: seq<'T>, - ?selectedIndex: int, - ?title: string, - ?textColor: Xamarin.Forms.Color, - ?selectedIndexChanged: (int * 'T option) -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match itemsSource with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match selectedIndex with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match title with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match textColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match selectedIndexChanged with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match itemsSource with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PickerItemsSourceAttribKey, seqToIListUntyped(v)) - match selectedIndex with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectedIndexAttribKey, (v)) - match title with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TitleAttribKey, (v)) - match textColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextColorAttribKey, (v)) - match selectedIndexChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectedIndexChangedAttribKey, (fun f -> System.EventHandler(fun sender args -> let picker = (sender :?> Xamarin.Forms.Picker) in f (picker.SelectedIndex, (picker.SelectedItem |> Option.ofObj |> Option.map unbox<'T>))))(v)) - attribBuilder - - static member val CreateFuncPicker : (unit -> Xamarin.Forms.Picker) = (fun () -> ViewBuilders.CreatePicker()) with get, set - - static member CreatePicker () : Xamarin.Forms.Picker = - upcast (new Xamarin.Forms.Picker()) - - static member val UpdateFuncPicker = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Picker) -> ViewBuilders.UpdatePicker (prevOpt, curr, target)) - - static member UpdatePicker (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Picker) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevPickerItemsSourceOpt = ValueNone - let mutable currPickerItemsSourceOpt = ValueNone - let mutable prevSelectedIndexOpt = ValueNone - let mutable currSelectedIndexOpt = ValueNone - let mutable prevTitleOpt = ValueNone - let mutable currTitleOpt = ValueNone - let mutable prevTextColorOpt = ValueNone - let mutable currTextColorOpt = ValueNone - let mutable prevSelectedIndexChangedOpt = ValueNone - let mutable currSelectedIndexChangedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.PickerItemsSourceAttribKey.KeyValue then - currPickerItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IList) - if kvp.Key = ViewAttributes.SelectedIndexAttribKey.KeyValue then - currSelectedIndexOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.TitleAttribKey.KeyValue then - currTitleOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - currTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.SelectedIndexChangedAttribKey.KeyValue then - currSelectedIndexChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.PickerItemsSourceAttribKey.KeyValue then - prevPickerItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IList) - if kvp.Key = ViewAttributes.SelectedIndexAttribKey.KeyValue then - prevSelectedIndexOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.TitleAttribKey.KeyValue then - prevTitleOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - prevTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.SelectedIndexChangedAttribKey.KeyValue then - prevSelectedIndexChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevPickerItemsSourceOpt, currPickerItemsSourceOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ItemsSource <- currValue - | ValueSome _, ValueNone -> target.ItemsSource <- null - | ValueNone, ValueNone -> () - match prevSelectedIndexOpt, currSelectedIndexOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.SelectedIndex <- currValue - | ValueSome _, ValueNone -> target.SelectedIndex <- 0 - | ValueNone, ValueNone -> () - match prevTitleOpt, currTitleOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Title <- currValue - | ValueSome _, ValueNone -> target.Title <- null - | ValueNone, ValueNone -> () - match prevTextColorOpt, currTextColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.TextColor <- currValue - | ValueSome _, ValueNone -> target.TextColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevSelectedIndexChangedOpt, currSelectedIndexChangedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.SelectedIndexChanged.RemoveHandler(prevValue); target.SelectedIndexChanged.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.SelectedIndexChanged.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.SelectedIndexChanged.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructPicker(?itemsSource: seq<'T>, - ?selectedIndex: int, - ?title: string, - ?textColor: Xamarin.Forms.Color, - ?selectedIndexChanged: (int * 'T option) -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Picker -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildPicker(0, - ?itemsSource=itemsSource, - ?selectedIndex=selectedIndex, - ?title=title, - ?textColor=textColor, - ?selectedIndexChanged=selectedIndexChanged, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncPicker, ViewBuilders.UpdateFuncPicker, attribBuilder) - - /// Builds the attributes for a Frame in the view - static member inline BuildFrame(attribCount: int, - ?borderColor: Xamarin.Forms.Color, - ?cornerRadius: double, - ?hasShadow: bool, - ?content: ViewElement, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match borderColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match cornerRadius with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match hasShadow with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildContentView(attribCount, ?content=content, ?isClippedToBounds=isClippedToBounds, ?padding=padding, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match borderColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.BorderColorAttribKey, (v)) - match cornerRadius with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FrameCornerRadiusAttribKey, single(v)) - match hasShadow with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HasShadowAttribKey, (v)) - attribBuilder - - static member val CreateFuncFrame : (unit -> Xamarin.Forms.Frame) = (fun () -> ViewBuilders.CreateFrame()) with get, set - - static member CreateFrame () : Xamarin.Forms.Frame = - upcast (new Xamarin.Forms.Frame()) - - static member val UpdateFuncFrame = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Frame) -> ViewBuilders.UpdateFrame (prevOpt, curr, target)) - - static member UpdateFrame (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Frame) = - // update the inherited ContentView element - let baseElement = (if ViewProto.ProtoContentView.IsNone then ViewProto.ProtoContentView <- Some (ViewBuilders.ConstructContentView())); ViewProto.ProtoContentView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevBorderColorOpt = ValueNone - let mutable currBorderColorOpt = ValueNone - let mutable prevFrameCornerRadiusOpt = ValueNone - let mutable currFrameCornerRadiusOpt = ValueNone - let mutable prevHasShadowOpt = ValueNone - let mutable currHasShadowOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.BorderColorAttribKey.KeyValue then - currBorderColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.FrameCornerRadiusAttribKey.KeyValue then - currFrameCornerRadiusOpt <- ValueSome (kvp.Value :?> single) - if kvp.Key = ViewAttributes.HasShadowAttribKey.KeyValue then - currHasShadowOpt <- ValueSome (kvp.Value :?> bool) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.BorderColorAttribKey.KeyValue then - prevBorderColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.FrameCornerRadiusAttribKey.KeyValue then - prevFrameCornerRadiusOpt <- ValueSome (kvp.Value :?> single) - if kvp.Key = ViewAttributes.HasShadowAttribKey.KeyValue then - prevHasShadowOpt <- ValueSome (kvp.Value :?> bool) - match prevBorderColorOpt, currBorderColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.BorderColor <- currValue - | ValueSome _, ValueNone -> target.BorderColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevFrameCornerRadiusOpt, currFrameCornerRadiusOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.CornerRadius <- currValue - | ValueSome _, ValueNone -> target.CornerRadius <- -1.0f - | ValueNone, ValueNone -> () - match prevHasShadowOpt, currHasShadowOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.HasShadow <- currValue - | ValueSome _, ValueNone -> target.HasShadow <- true - | ValueNone, ValueNone -> () - - static member inline ConstructFrame(?borderColor: Xamarin.Forms.Color, - ?cornerRadius: double, - ?hasShadow: bool, - ?content: ViewElement, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Frame -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildFrame(0, - ?borderColor=borderColor, - ?cornerRadius=cornerRadius, - ?hasShadow=hasShadow, - ?content=content, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncFrame, ViewBuilders.UpdateFuncFrame, attribBuilder) - - /// Builds the attributes for a Image in the view - static member inline BuildImage(attribCount: int, - ?source: obj, - ?aspect: Xamarin.Forms.Aspect, - ?isOpaque: bool, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match source with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match aspect with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isOpaque with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match source with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ImageSourceAttribKey, (v)) - match aspect with None -> () | Some v -> attribBuilder.Add(ViewAttributes.AspectAttribKey, (v)) - match isOpaque with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsOpaqueAttribKey, (v)) - attribBuilder - - static member val CreateFuncImage : (unit -> Xamarin.Forms.Image) = (fun () -> ViewBuilders.CreateImage()) with get, set - - static member CreateImage () : Xamarin.Forms.Image = - upcast (new Xamarin.Forms.Image()) - - static member val UpdateFuncImage = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Image) -> ViewBuilders.UpdateImage (prevOpt, curr, target)) - - static member UpdateImage (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Image) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevImageSourceOpt = ValueNone - let mutable currImageSourceOpt = ValueNone - let mutable prevAspectOpt = ValueNone - let mutable currAspectOpt = ValueNone - let mutable prevIsOpaqueOpt = ValueNone - let mutable currIsOpaqueOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ImageSourceAttribKey.KeyValue then - currImageSourceOpt <- ValueSome (kvp.Value :?> obj) - if kvp.Key = ViewAttributes.AspectAttribKey.KeyValue then - currAspectOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Aspect) - if kvp.Key = ViewAttributes.IsOpaqueAttribKey.KeyValue then - currIsOpaqueOpt <- ValueSome (kvp.Value :?> bool) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ImageSourceAttribKey.KeyValue then - prevImageSourceOpt <- ValueSome (kvp.Value :?> obj) - if kvp.Key = ViewAttributes.AspectAttribKey.KeyValue then - prevAspectOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Aspect) - if kvp.Key = ViewAttributes.IsOpaqueAttribKey.KeyValue then - prevIsOpaqueOpt <- ValueSome (kvp.Value :?> bool) - match prevImageSourceOpt, currImageSourceOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Source <- makeImageSource currValue - | ValueSome _, ValueNone -> target.Source <- null - | ValueNone, ValueNone -> () - match prevAspectOpt, currAspectOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Aspect <- currValue - | ValueSome _, ValueNone -> target.Aspect <- Xamarin.Forms.Aspect.AspectFit - | ValueNone, ValueNone -> () - match prevIsOpaqueOpt, currIsOpaqueOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsOpaque <- currValue - | ValueSome _, ValueNone -> target.IsOpaque <- true - | ValueNone, ValueNone -> () - - static member inline ConstructImage(?source: obj, - ?aspect: Xamarin.Forms.Aspect, - ?isOpaque: bool, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Image -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildImage(0, - ?source=source, - ?aspect=aspect, - ?isOpaque=isOpaque, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncImage, ViewBuilders.UpdateFuncImage, attribBuilder) - - /// Builds the attributes for a ImageButton in the view - static member inline BuildImageButton(attribCount: int, - ?command: unit -> unit, - ?source: obj, - ?aspect: Xamarin.Forms.Aspect, - ?borderColor: Xamarin.Forms.Color, - ?borderWidth: double, - ?cornerRadius: int, - ?isOpaque: bool, - ?padding: Xamarin.Forms.Thickness, - ?clicked: System.EventArgs -> unit, - ?pressed: System.EventArgs -> unit, - ?released: System.EventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match command with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match source with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match aspect with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match borderColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match borderWidth with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match cornerRadius with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isOpaque with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match padding with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match clicked with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match pressed with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match released with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match command with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ImageButtonCommandAttribKey, (v)) - match source with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ImageSourceAttribKey, (v)) - match aspect with None -> () | Some v -> attribBuilder.Add(ViewAttributes.AspectAttribKey, (v)) - match borderColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.BorderColorAttribKey, (v)) - match borderWidth with None -> () | Some v -> attribBuilder.Add(ViewAttributes.BorderWidthAttribKey, (v)) - match cornerRadius with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ImageButtonCornerRadiusAttribKey, (v)) - match isOpaque with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsOpaqueAttribKey, (v)) - match padding with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PaddingAttribKey, (v)) - match clicked with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClickedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match pressed with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PressedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match released with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ReleasedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - attribBuilder - - static member val CreateFuncImageButton : (unit -> Xamarin.Forms.ImageButton) = (fun () -> ViewBuilders.CreateImageButton()) with get, set - - static member CreateImageButton () : Xamarin.Forms.ImageButton = - upcast (new Xamarin.Forms.ImageButton()) - - static member val UpdateFuncImageButton = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ImageButton) -> ViewBuilders.UpdateImageButton (prevOpt, curr, target)) - - static member UpdateImageButton (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ImageButton) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevImageButtonCommandOpt = ValueNone - let mutable currImageButtonCommandOpt = ValueNone - let mutable prevImageSourceOpt = ValueNone - let mutable currImageSourceOpt = ValueNone - let mutable prevAspectOpt = ValueNone - let mutable currAspectOpt = ValueNone - let mutable prevBorderColorOpt = ValueNone - let mutable currBorderColorOpt = ValueNone - let mutable prevBorderWidthOpt = ValueNone - let mutable currBorderWidthOpt = ValueNone - let mutable prevImageButtonCornerRadiusOpt = ValueNone - let mutable currImageButtonCornerRadiusOpt = ValueNone - let mutable prevIsOpaqueOpt = ValueNone - let mutable currIsOpaqueOpt = ValueNone - let mutable prevPaddingOpt = ValueNone - let mutable currPaddingOpt = ValueNone - let mutable prevClickedOpt = ValueNone - let mutable currClickedOpt = ValueNone - let mutable prevPressedOpt = ValueNone - let mutable currPressedOpt = ValueNone - let mutable prevReleasedOpt = ValueNone - let mutable currReleasedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ImageButtonCommandAttribKey.KeyValue then - currImageButtonCommandOpt <- ValueSome (kvp.Value :?> unit -> unit) - if kvp.Key = ViewAttributes.ImageSourceAttribKey.KeyValue then - currImageSourceOpt <- ValueSome (kvp.Value :?> obj) - if kvp.Key = ViewAttributes.AspectAttribKey.KeyValue then - currAspectOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Aspect) - if kvp.Key = ViewAttributes.BorderColorAttribKey.KeyValue then - currBorderColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.BorderWidthAttribKey.KeyValue then - currBorderWidthOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ImageButtonCornerRadiusAttribKey.KeyValue then - currImageButtonCornerRadiusOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.IsOpaqueAttribKey.KeyValue then - currIsOpaqueOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.PaddingAttribKey.KeyValue then - currPaddingOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Thickness) - if kvp.Key = ViewAttributes.ClickedAttribKey.KeyValue then - currClickedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.PressedAttribKey.KeyValue then - currPressedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ReleasedAttribKey.KeyValue then - currReleasedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ImageButtonCommandAttribKey.KeyValue then - prevImageButtonCommandOpt <- ValueSome (kvp.Value :?> unit -> unit) - if kvp.Key = ViewAttributes.ImageSourceAttribKey.KeyValue then - prevImageSourceOpt <- ValueSome (kvp.Value :?> obj) - if kvp.Key = ViewAttributes.AspectAttribKey.KeyValue then - prevAspectOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Aspect) - if kvp.Key = ViewAttributes.BorderColorAttribKey.KeyValue then - prevBorderColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.BorderWidthAttribKey.KeyValue then - prevBorderWidthOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.ImageButtonCornerRadiusAttribKey.KeyValue then - prevImageButtonCornerRadiusOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.IsOpaqueAttribKey.KeyValue then - prevIsOpaqueOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.PaddingAttribKey.KeyValue then - prevPaddingOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Thickness) - if kvp.Key = ViewAttributes.ClickedAttribKey.KeyValue then - prevClickedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.PressedAttribKey.KeyValue then - prevPressedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ReleasedAttribKey.KeyValue then - prevReleasedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - (fun _ _ _ -> ()) prevImageButtonCommandOpt currImageButtonCommandOpt target - match prevImageSourceOpt, currImageSourceOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Source <- makeImageSource currValue - | ValueSome _, ValueNone -> target.Source <- null - | ValueNone, ValueNone -> () - match prevAspectOpt, currAspectOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Aspect <- currValue - | ValueSome _, ValueNone -> target.Aspect <- Xamarin.Forms.Aspect.AspectFit - | ValueNone, ValueNone -> () - match prevBorderColorOpt, currBorderColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.BorderColor <- currValue - | ValueSome _, ValueNone -> target.BorderColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevBorderWidthOpt, currBorderWidthOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.BorderWidth <- currValue - | ValueSome _, ValueNone -> target.BorderWidth <- -1.0 - | ValueNone, ValueNone -> () - match prevImageButtonCornerRadiusOpt, currImageButtonCornerRadiusOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.CornerRadius <- currValue - | ValueSome _, ValueNone -> target.CornerRadius <- -1 - | ValueNone, ValueNone -> () - match prevIsOpaqueOpt, currIsOpaqueOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsOpaque <- currValue - | ValueSome _, ValueNone -> target.IsOpaque <- true - | ValueNone, ValueNone -> () - match prevPaddingOpt, currPaddingOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Padding <- currValue - | ValueSome _, ValueNone -> target.Padding <- Unchecked.defaultof - | ValueNone, ValueNone -> () - match prevClickedOpt, currClickedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Clicked.RemoveHandler(prevValue); target.Clicked.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Clicked.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Clicked.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevPressedOpt, currPressedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Pressed.RemoveHandler(prevValue); target.Pressed.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Pressed.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Pressed.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevReleasedOpt, currReleasedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Released.RemoveHandler(prevValue); target.Released.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Released.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Released.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructImageButton(?command: unit -> unit, - ?source: obj, - ?aspect: Xamarin.Forms.Aspect, - ?borderColor: Xamarin.Forms.Color, - ?borderWidth: double, - ?cornerRadius: int, - ?isOpaque: bool, - ?padding: Xamarin.Forms.Thickness, - ?clicked: System.EventArgs -> unit, - ?pressed: System.EventArgs -> unit, - ?released: System.EventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ImageButton -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildImageButton(0, - ?command=command, - ?source=source, - ?aspect=aspect, - ?borderColor=borderColor, - ?borderWidth=borderWidth, - ?cornerRadius=cornerRadius, - ?isOpaque=isOpaque, - ?padding=padding, - ?clicked=clicked, - ?pressed=pressed, - ?released=released, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncImageButton, ViewBuilders.UpdateFuncImageButton, attribBuilder) - - /// Builds the attributes for a InputView in the view - static member inline BuildInputView(attribCount: int, - ?keyboard: Xamarin.Forms.Keyboard, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match keyboard with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match keyboard with None -> () | Some v -> attribBuilder.Add(ViewAttributes.KeyboardAttribKey, (v)) - attribBuilder - - static member val CreateFuncInputView : (unit -> Xamarin.Forms.InputView) = (fun () -> ViewBuilders.CreateInputView()) with get, set - - static member CreateInputView () : Xamarin.Forms.InputView = - failwith "can't create Xamarin.Forms.InputView" - - static member val UpdateFuncInputView = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.InputView) -> ViewBuilders.UpdateInputView (prevOpt, curr, target)) - - static member UpdateInputView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.InputView) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevKeyboardOpt = ValueNone - let mutable currKeyboardOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.KeyboardAttribKey.KeyValue then - currKeyboardOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Keyboard) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.KeyboardAttribKey.KeyValue then - prevKeyboardOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Keyboard) - match prevKeyboardOpt, currKeyboardOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Keyboard <- currValue - | ValueSome _, ValueNone -> target.Keyboard <- Xamarin.Forms.Keyboard.Default - | ValueNone, ValueNone -> () - - static member inline ConstructInputView(?keyboard: Xamarin.Forms.Keyboard, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.InputView -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildInputView(0, - ?keyboard=keyboard, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncInputView, ViewBuilders.UpdateFuncInputView, attribBuilder) - - /// Builds the attributes for a Editor in the view - static member inline BuildEditor(attribCount: int, - ?text: string, - ?fontSize: obj, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?textColor: Xamarin.Forms.Color, - ?completed: string -> unit, - ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, - ?autoSize: Xamarin.Forms.EditorAutoSizeOption, - ?placeholder: string, - ?placeholderColor: Xamarin.Forms.Color, - ?isTextPredictionEnabled: bool, - ?keyboard: Xamarin.Forms.Keyboard, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match text with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontSize with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontFamily with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontAttributes with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match textColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match completed with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match textChanged with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match autoSize with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match placeholder with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match placeholderColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isTextPredictionEnabled with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildInputView(attribCount, ?keyboard=keyboard, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match text with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextAttribKey, (v)) - match fontSize with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontSizeAttribKey, makeFontSize(v)) - match fontFamily with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontFamilyAttribKey, (v)) - match fontAttributes with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontAttributesAttribKey, (v)) - match textColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextColorAttribKey, (v)) - match completed with None -> () | Some v -> attribBuilder.Add(ViewAttributes.EditorCompletedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (sender :?> Xamarin.Forms.Editor).Text))(v)) - match textChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match autoSize with None -> () | Some v -> attribBuilder.Add(ViewAttributes.AutoSizeAttribKey, (v)) - match placeholder with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PlaceholderAttribKey, (v)) - match placeholderColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PlaceholderColorAttribKey, (v)) - match isTextPredictionEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsTextPredictionEnabledAttribKey, (v)) - attribBuilder - - static member val CreateFuncEditor : (unit -> Xamarin.Forms.Editor) = (fun () -> ViewBuilders.CreateEditor()) with get, set - - static member CreateEditor () : Xamarin.Forms.Editor = - upcast (new Xamarin.Forms.Editor()) - - static member val UpdateFuncEditor = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Editor) -> ViewBuilders.UpdateEditor (prevOpt, curr, target)) - - static member UpdateEditor (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Editor) = - // update the inherited InputView element - let baseElement = (if ViewProto.ProtoInputView.IsNone then ViewProto.ProtoInputView <- Some (ViewBuilders.ConstructInputView())); ViewProto.ProtoInputView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevTextOpt = ValueNone - let mutable currTextOpt = ValueNone - let mutable prevFontSizeOpt = ValueNone - let mutable currFontSizeOpt = ValueNone - let mutable prevFontFamilyOpt = ValueNone - let mutable currFontFamilyOpt = ValueNone - let mutable prevFontAttributesOpt = ValueNone - let mutable currFontAttributesOpt = ValueNone - let mutable prevTextColorOpt = ValueNone - let mutable currTextColorOpt = ValueNone - let mutable prevEditorCompletedOpt = ValueNone - let mutable currEditorCompletedOpt = ValueNone - let mutable prevTextChangedOpt = ValueNone - let mutable currTextChangedOpt = ValueNone - let mutable prevAutoSizeOpt = ValueNone - let mutable currAutoSizeOpt = ValueNone - let mutable prevPlaceholderOpt = ValueNone - let mutable currPlaceholderOpt = ValueNone - let mutable prevPlaceholderColorOpt = ValueNone - let mutable currPlaceholderColorOpt = ValueNone - let mutable prevIsTextPredictionEnabledOpt = ValueNone - let mutable currIsTextPredictionEnabledOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - currTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FontSizeAttribKey.KeyValue then - currFontSizeOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.FontFamilyAttribKey.KeyValue then - currFontFamilyOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FontAttributesAttribKey.KeyValue then - currFontAttributesOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FontAttributes) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - currTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.EditorCompletedAttribKey.KeyValue then - currEditorCompletedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.TextChangedAttribKey.KeyValue then - currTextChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.AutoSizeAttribKey.KeyValue then - currAutoSizeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.EditorAutoSizeOption) - if kvp.Key = ViewAttributes.PlaceholderAttribKey.KeyValue then - currPlaceholderOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.PlaceholderColorAttribKey.KeyValue then - currPlaceholderColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.IsTextPredictionEnabledAttribKey.KeyValue then - currIsTextPredictionEnabledOpt <- ValueSome (kvp.Value :?> bool) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - prevTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FontSizeAttribKey.KeyValue then - prevFontSizeOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.FontFamilyAttribKey.KeyValue then - prevFontFamilyOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FontAttributesAttribKey.KeyValue then - prevFontAttributesOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FontAttributes) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - prevTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.EditorCompletedAttribKey.KeyValue then - prevEditorCompletedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.TextChangedAttribKey.KeyValue then - prevTextChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.AutoSizeAttribKey.KeyValue then - prevAutoSizeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.EditorAutoSizeOption) - if kvp.Key = ViewAttributes.PlaceholderAttribKey.KeyValue then - prevPlaceholderOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.PlaceholderColorAttribKey.KeyValue then - prevPlaceholderColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.IsTextPredictionEnabledAttribKey.KeyValue then - prevIsTextPredictionEnabledOpt <- ValueSome (kvp.Value :?> bool) - match prevTextOpt, currTextOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Text <- currValue - | ValueSome _, ValueNone -> target.Text <- null - | ValueNone, ValueNone -> () - match prevFontSizeOpt, currFontSizeOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontSize <- currValue - | ValueSome _, ValueNone -> target.FontSize <- -1.0 - | ValueNone, ValueNone -> () - match prevFontFamilyOpt, currFontFamilyOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontFamily <- currValue - | ValueSome _, ValueNone -> target.FontFamily <- null - | ValueNone, ValueNone -> () - match prevFontAttributesOpt, currFontAttributesOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontAttributes <- currValue - | ValueSome _, ValueNone -> target.FontAttributes <- Xamarin.Forms.FontAttributes.None - | ValueNone, ValueNone -> () - match prevTextColorOpt, currTextColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.TextColor <- currValue - | ValueSome _, ValueNone -> target.TextColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevEditorCompletedOpt, currEditorCompletedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Completed.RemoveHandler(prevValue); target.Completed.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Completed.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Completed.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevTextChangedOpt, currTextChangedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.TextChanged.RemoveHandler(prevValue); target.TextChanged.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.TextChanged.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.TextChanged.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevAutoSizeOpt, currAutoSizeOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.AutoSize <- currValue - | ValueSome _, ValueNone -> target.AutoSize <- Xamarin.Forms.EditorAutoSizeOption.Disabled - | ValueNone, ValueNone -> () - match prevPlaceholderOpt, currPlaceholderOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Placeholder <- currValue - | ValueSome _, ValueNone -> target.Placeholder <- null - | ValueNone, ValueNone -> () - match prevPlaceholderColorOpt, currPlaceholderColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.PlaceholderColor <- currValue - | ValueSome _, ValueNone -> target.PlaceholderColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevIsTextPredictionEnabledOpt, currIsTextPredictionEnabledOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsTextPredictionEnabled <- currValue - | ValueSome _, ValueNone -> target.IsTextPredictionEnabled <- false - | ValueNone, ValueNone -> () - - static member inline ConstructEditor(?text: string, - ?fontSize: obj, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?textColor: Xamarin.Forms.Color, - ?completed: string -> unit, - ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, - ?autoSize: Xamarin.Forms.EditorAutoSizeOption, - ?placeholder: string, - ?placeholderColor: Xamarin.Forms.Color, - ?isTextPredictionEnabled: bool, - ?keyboard: Xamarin.Forms.Keyboard, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Editor -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildEditor(0, - ?text=text, - ?fontSize=fontSize, - ?fontFamily=fontFamily, - ?fontAttributes=fontAttributes, - ?textColor=textColor, - ?completed=completed, - ?textChanged=textChanged, - ?autoSize=autoSize, - ?placeholder=placeholder, - ?placeholderColor=placeholderColor, - ?isTextPredictionEnabled=isTextPredictionEnabled, - ?keyboard=keyboard, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncEditor, ViewBuilders.UpdateFuncEditor, attribBuilder) - - /// Builds the attributes for a Entry in the view - static member inline BuildEntry(attribCount: int, - ?text: string, - ?placeholder: string, - ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, - ?fontSize: obj, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?textColor: Xamarin.Forms.Color, - ?placeholderColor: Xamarin.Forms.Color, - ?isPassword: bool, - ?completed: string -> unit, - ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, - ?isTextPredictionEnabled: bool, - ?returnType: Xamarin.Forms.ReturnType, - ?returnCommand: unit -> unit, - ?cursorPosition: int, - ?selectionLength: int, - ?keyboard: Xamarin.Forms.Keyboard, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match text with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match placeholder with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match horizontalTextAlignment with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontSize with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontFamily with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontAttributes with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match textColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match placeholderColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isPassword with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match completed with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match textChanged with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isTextPredictionEnabled with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match returnType with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match returnCommand with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match cursorPosition with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match selectionLength with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildInputView(attribCount, ?keyboard=keyboard, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match text with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextAttribKey, (v)) - match placeholder with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PlaceholderAttribKey, (v)) - match horizontalTextAlignment with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HorizontalTextAlignmentAttribKey, (v)) - match fontSize with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontSizeAttribKey, makeFontSize(v)) - match fontFamily with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontFamilyAttribKey, (v)) - match fontAttributes with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontAttributesAttribKey, (v)) - match textColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextColorAttribKey, (v)) - match placeholderColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PlaceholderColorAttribKey, (v)) - match isPassword with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsPasswordAttribKey, (v)) - match completed with None -> () | Some v -> attribBuilder.Add(ViewAttributes.EntryCompletedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (sender :?> Xamarin.Forms.Entry).Text))(v)) - match textChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match isTextPredictionEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsTextPredictionEnabledAttribKey, (v)) - match returnType with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ReturnTypeAttribKey, (v)) - match returnCommand with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ReturnCommandAttribKey, makeCommand(v)) - match cursorPosition with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CursorPositionAttribKey, (v)) - match selectionLength with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionLengthAttribKey, (v)) - attribBuilder - - static member val CreateFuncEntry : (unit -> Xamarin.Forms.Entry) = (fun () -> ViewBuilders.CreateEntry()) with get, set - - static member CreateEntry () : Xamarin.Forms.Entry = - upcast (new Xamarin.Forms.Entry()) - - static member val UpdateFuncEntry = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Entry) -> ViewBuilders.UpdateEntry (prevOpt, curr, target)) - - static member UpdateEntry (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Entry) = - // update the inherited InputView element - let baseElement = (if ViewProto.ProtoInputView.IsNone then ViewProto.ProtoInputView <- Some (ViewBuilders.ConstructInputView())); ViewProto.ProtoInputView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevTextOpt = ValueNone - let mutable currTextOpt = ValueNone - let mutable prevPlaceholderOpt = ValueNone - let mutable currPlaceholderOpt = ValueNone - let mutable prevHorizontalTextAlignmentOpt = ValueNone - let mutable currHorizontalTextAlignmentOpt = ValueNone - let mutable prevFontSizeOpt = ValueNone - let mutable currFontSizeOpt = ValueNone - let mutable prevFontFamilyOpt = ValueNone - let mutable currFontFamilyOpt = ValueNone - let mutable prevFontAttributesOpt = ValueNone - let mutable currFontAttributesOpt = ValueNone - let mutable prevTextColorOpt = ValueNone - let mutable currTextColorOpt = ValueNone - let mutable prevPlaceholderColorOpt = ValueNone - let mutable currPlaceholderColorOpt = ValueNone - let mutable prevIsPasswordOpt = ValueNone - let mutable currIsPasswordOpt = ValueNone - let mutable prevEntryCompletedOpt = ValueNone - let mutable currEntryCompletedOpt = ValueNone - let mutable prevTextChangedOpt = ValueNone - let mutable currTextChangedOpt = ValueNone - let mutable prevIsTextPredictionEnabledOpt = ValueNone - let mutable currIsTextPredictionEnabledOpt = ValueNone - let mutable prevReturnTypeOpt = ValueNone - let mutable currReturnTypeOpt = ValueNone - let mutable prevReturnCommandOpt = ValueNone - let mutable currReturnCommandOpt = ValueNone - let mutable prevCursorPositionOpt = ValueNone - let mutable currCursorPositionOpt = ValueNone - let mutable prevSelectionLengthOpt = ValueNone - let mutable currSelectionLengthOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - currTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.PlaceholderAttribKey.KeyValue then - currPlaceholderOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.HorizontalTextAlignmentAttribKey.KeyValue then - currHorizontalTextAlignmentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TextAlignment) - if kvp.Key = ViewAttributes.FontSizeAttribKey.KeyValue then - currFontSizeOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.FontFamilyAttribKey.KeyValue then - currFontFamilyOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FontAttributesAttribKey.KeyValue then - currFontAttributesOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FontAttributes) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - currTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.PlaceholderColorAttribKey.KeyValue then - currPlaceholderColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.IsPasswordAttribKey.KeyValue then - currIsPasswordOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.EntryCompletedAttribKey.KeyValue then - currEntryCompletedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.TextChangedAttribKey.KeyValue then - currTextChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.IsTextPredictionEnabledAttribKey.KeyValue then - currIsTextPredictionEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.ReturnTypeAttribKey.KeyValue then - currReturnTypeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ReturnType) - if kvp.Key = ViewAttributes.ReturnCommandAttribKey.KeyValue then - currReturnCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.CursorPositionAttribKey.KeyValue then - currCursorPositionOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.SelectionLengthAttribKey.KeyValue then - currSelectionLengthOpt <- ValueSome (kvp.Value :?> int) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - prevTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.PlaceholderAttribKey.KeyValue then - prevPlaceholderOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.HorizontalTextAlignmentAttribKey.KeyValue then - prevHorizontalTextAlignmentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TextAlignment) - if kvp.Key = ViewAttributes.FontSizeAttribKey.KeyValue then - prevFontSizeOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.FontFamilyAttribKey.KeyValue then - prevFontFamilyOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FontAttributesAttribKey.KeyValue then - prevFontAttributesOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FontAttributes) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - prevTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.PlaceholderColorAttribKey.KeyValue then - prevPlaceholderColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.IsPasswordAttribKey.KeyValue then - prevIsPasswordOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.EntryCompletedAttribKey.KeyValue then - prevEntryCompletedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.TextChangedAttribKey.KeyValue then - prevTextChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.IsTextPredictionEnabledAttribKey.KeyValue then - prevIsTextPredictionEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.ReturnTypeAttribKey.KeyValue then - prevReturnTypeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ReturnType) - if kvp.Key = ViewAttributes.ReturnCommandAttribKey.KeyValue then - prevReturnCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.CursorPositionAttribKey.KeyValue then - prevCursorPositionOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.SelectionLengthAttribKey.KeyValue then - prevSelectionLengthOpt <- ValueSome (kvp.Value :?> int) - match prevTextOpt, currTextOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Text <- currValue - | ValueSome _, ValueNone -> target.Text <- null - | ValueNone, ValueNone -> () - match prevPlaceholderOpt, currPlaceholderOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Placeholder <- currValue - | ValueSome _, ValueNone -> target.Placeholder <- null - | ValueNone, ValueNone -> () - match prevHorizontalTextAlignmentOpt, currHorizontalTextAlignmentOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.HorizontalTextAlignment <- currValue - | ValueSome _, ValueNone -> target.HorizontalTextAlignment <- Xamarin.Forms.TextAlignment.Start - | ValueNone, ValueNone -> () - match prevFontSizeOpt, currFontSizeOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontSize <- currValue - | ValueSome _, ValueNone -> target.FontSize <- -1.0 - | ValueNone, ValueNone -> () - match prevFontFamilyOpt, currFontFamilyOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontFamily <- currValue - | ValueSome _, ValueNone -> target.FontFamily <- null - | ValueNone, ValueNone -> () - match prevFontAttributesOpt, currFontAttributesOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontAttributes <- currValue - | ValueSome _, ValueNone -> target.FontAttributes <- Xamarin.Forms.FontAttributes.None - | ValueNone, ValueNone -> () - match prevTextColorOpt, currTextColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.TextColor <- currValue - | ValueSome _, ValueNone -> target.TextColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevPlaceholderColorOpt, currPlaceholderColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.PlaceholderColor <- currValue - | ValueSome _, ValueNone -> target.PlaceholderColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevIsPasswordOpt, currIsPasswordOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsPassword <- currValue - | ValueSome _, ValueNone -> target.IsPassword <- false - | ValueNone, ValueNone -> () - match prevEntryCompletedOpt, currEntryCompletedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Completed.RemoveHandler(prevValue); target.Completed.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Completed.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Completed.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevTextChangedOpt, currTextChangedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.TextChanged.RemoveHandler(prevValue); target.TextChanged.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.TextChanged.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.TextChanged.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevIsTextPredictionEnabledOpt, currIsTextPredictionEnabledOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsTextPredictionEnabled <- currValue - | ValueSome _, ValueNone -> target.IsTextPredictionEnabled <- true - | ValueNone, ValueNone -> () - match prevReturnTypeOpt, currReturnTypeOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ReturnType <- currValue - | ValueSome _, ValueNone -> target.ReturnType <- Xamarin.Forms.ReturnType.Default - | ValueNone, ValueNone -> () - match prevReturnCommandOpt, currReturnCommandOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ReturnCommand <- currValue - | ValueSome _, ValueNone -> target.ReturnCommand <- null - | ValueNone, ValueNone -> () - (fun _ curr (target: Xamarin.Forms.Entry) -> match curr with ValueSome value -> target.CursorPosition <- value | ValueNone -> ()) prevCursorPositionOpt currCursorPositionOpt target - (fun _ curr (target: Xamarin.Forms.Entry) -> match curr with ValueSome value -> target.SelectionLength <- value | ValueNone -> ()) prevSelectionLengthOpt currSelectionLengthOpt target - - static member inline ConstructEntry(?text: string, - ?placeholder: string, - ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, - ?fontSize: obj, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?textColor: Xamarin.Forms.Color, - ?placeholderColor: Xamarin.Forms.Color, - ?isPassword: bool, - ?completed: string -> unit, - ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, - ?isTextPredictionEnabled: bool, - ?returnType: Xamarin.Forms.ReturnType, - ?returnCommand: unit -> unit, - ?cursorPosition: int, - ?selectionLength: int, - ?keyboard: Xamarin.Forms.Keyboard, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Entry -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildEntry(0, - ?text=text, - ?placeholder=placeholder, - ?horizontalTextAlignment=horizontalTextAlignment, - ?fontSize=fontSize, - ?fontFamily=fontFamily, - ?fontAttributes=fontAttributes, - ?textColor=textColor, - ?placeholderColor=placeholderColor, - ?isPassword=isPassword, - ?completed=completed, - ?textChanged=textChanged, - ?isTextPredictionEnabled=isTextPredictionEnabled, - ?returnType=returnType, - ?returnCommand=returnCommand, - ?cursorPosition=cursorPosition, - ?selectionLength=selectionLength, - ?keyboard=keyboard, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncEntry, ViewBuilders.UpdateFuncEntry, attribBuilder) - - /// Builds the attributes for a EntryCell in the view - static member inline BuildEntryCell(attribCount: int, - ?label: string, - ?text: string, - ?keyboard: Xamarin.Forms.Keyboard, - ?placeholder: string, - ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, - ?completed: string -> unit, - ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match label with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match text with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match keyboard with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match placeholder with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match horizontalTextAlignment with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match completed with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match textChanged with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildCell(attribCount, ?height=height, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match label with None -> () | Some v -> attribBuilder.Add(ViewAttributes.LabelAttribKey, (v)) - match text with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextAttribKey, (v)) - match keyboard with None -> () | Some v -> attribBuilder.Add(ViewAttributes.KeyboardAttribKey, (v)) - match placeholder with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PlaceholderAttribKey, (v)) - match horizontalTextAlignment with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HorizontalTextAlignmentAttribKey, (v)) - match completed with None -> () | Some v -> attribBuilder.Add(ViewAttributes.EntryCompletedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (sender :?> Xamarin.Forms.EntryCell).Text))(v)) - match textChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.EntryCellTextChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - attribBuilder - - static member val CreateFuncEntryCell : (unit -> Fabulous.CustomControls.CustomEntryCell) = (fun () -> ViewBuilders.CreateEntryCell()) with get, set - - static member CreateEntryCell () : Fabulous.CustomControls.CustomEntryCell = - upcast (new Fabulous.CustomControls.CustomEntryCell()) - - static member val UpdateFuncEntryCell = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Fabulous.CustomControls.CustomEntryCell) -> ViewBuilders.UpdateEntryCell (prevOpt, curr, target)) - - static member UpdateEntryCell (prevOpt: ViewElement voption, curr: ViewElement, target: Fabulous.CustomControls.CustomEntryCell) = - // update the inherited Cell element - let baseElement = (if ViewProto.ProtoCell.IsNone then ViewProto.ProtoCell <- Some (ViewBuilders.ConstructCell())); ViewProto.ProtoCell.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevLabelOpt = ValueNone - let mutable currLabelOpt = ValueNone - let mutable prevTextOpt = ValueNone - let mutable currTextOpt = ValueNone - let mutable prevKeyboardOpt = ValueNone - let mutable currKeyboardOpt = ValueNone - let mutable prevPlaceholderOpt = ValueNone - let mutable currPlaceholderOpt = ValueNone - let mutable prevHorizontalTextAlignmentOpt = ValueNone - let mutable currHorizontalTextAlignmentOpt = ValueNone - let mutable prevEntryCompletedOpt = ValueNone - let mutable currEntryCompletedOpt = ValueNone - let mutable prevEntryCellTextChangedOpt = ValueNone - let mutable currEntryCellTextChangedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.LabelAttribKey.KeyValue then - currLabelOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - currTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.KeyboardAttribKey.KeyValue then - currKeyboardOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Keyboard) - if kvp.Key = ViewAttributes.PlaceholderAttribKey.KeyValue then - currPlaceholderOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.HorizontalTextAlignmentAttribKey.KeyValue then - currHorizontalTextAlignmentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TextAlignment) - if kvp.Key = ViewAttributes.EntryCompletedAttribKey.KeyValue then - currEntryCompletedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.EntryCellTextChangedAttribKey.KeyValue then - currEntryCellTextChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.LabelAttribKey.KeyValue then - prevLabelOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - prevTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.KeyboardAttribKey.KeyValue then - prevKeyboardOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Keyboard) - if kvp.Key = ViewAttributes.PlaceholderAttribKey.KeyValue then - prevPlaceholderOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.HorizontalTextAlignmentAttribKey.KeyValue then - prevHorizontalTextAlignmentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TextAlignment) - if kvp.Key = ViewAttributes.EntryCompletedAttribKey.KeyValue then - prevEntryCompletedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.EntryCellTextChangedAttribKey.KeyValue then - prevEntryCellTextChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevLabelOpt, currLabelOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Label <- currValue - | ValueSome _, ValueNone -> target.Label <- null - | ValueNone, ValueNone -> () - match prevTextOpt, currTextOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Text <- currValue - | ValueSome _, ValueNone -> target.Text <- null - | ValueNone, ValueNone -> () - match prevKeyboardOpt, currKeyboardOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Keyboard <- currValue - | ValueSome _, ValueNone -> target.Keyboard <- Xamarin.Forms.Keyboard.Default - | ValueNone, ValueNone -> () - match prevPlaceholderOpt, currPlaceholderOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Placeholder <- currValue - | ValueSome _, ValueNone -> target.Placeholder <- null - | ValueNone, ValueNone -> () - match prevHorizontalTextAlignmentOpt, currHorizontalTextAlignmentOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.HorizontalTextAlignment <- currValue - | ValueSome _, ValueNone -> target.HorizontalTextAlignment <- Xamarin.Forms.TextAlignment.Start - | ValueNone, ValueNone -> () - match prevEntryCompletedOpt, currEntryCompletedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Completed.RemoveHandler(prevValue); target.Completed.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Completed.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Completed.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevEntryCellTextChangedOpt, currEntryCellTextChangedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.TextChanged.RemoveHandler(prevValue); target.TextChanged.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.TextChanged.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.TextChanged.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructEntryCell(?label: string, - ?text: string, - ?keyboard: Xamarin.Forms.Keyboard, - ?placeholder: string, - ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, - ?completed: string -> unit, - ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Fabulous.CustomControls.CustomEntryCell -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildEntryCell(0, - ?label=label, - ?text=text, - ?keyboard=keyboard, - ?placeholder=placeholder, - ?horizontalTextAlignment=horizontalTextAlignment, - ?completed=completed, - ?textChanged=textChanged, - ?height=height, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncEntryCell, ViewBuilders.UpdateFuncEntryCell, attribBuilder) - - /// Builds the attributes for a Label in the view - static member inline BuildLabel(attribCount: int, - ?text: string, - ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, - ?verticalTextAlignment: Xamarin.Forms.TextAlignment, - ?fontSize: obj, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?textColor: Xamarin.Forms.Color, - ?formattedText: ViewElement, - ?lineBreakMode: Xamarin.Forms.LineBreakMode, - ?lineHeight: double, - ?maxLines: int, - ?textDecorations: Xamarin.Forms.TextDecorations, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match text with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match horizontalTextAlignment with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match verticalTextAlignment with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontSize with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontFamily with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontAttributes with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match textColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match formattedText with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match lineBreakMode with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match lineHeight with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match maxLines with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match textDecorations with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match text with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextAttribKey, (v)) - match horizontalTextAlignment with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HorizontalTextAlignmentAttribKey, (v)) - match verticalTextAlignment with None -> () | Some v -> attribBuilder.Add(ViewAttributes.VerticalTextAlignmentAttribKey, (v)) - match fontSize with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontSizeAttribKey, makeFontSize(v)) - match fontFamily with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontFamilyAttribKey, (v)) - match fontAttributes with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontAttributesAttribKey, (v)) - match textColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextColorAttribKey, (v)) - match formattedText with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FormattedTextAttribKey, (v)) - match lineBreakMode with None -> () | Some v -> attribBuilder.Add(ViewAttributes.LineBreakModeAttribKey, (v)) - match lineHeight with None -> () | Some v -> attribBuilder.Add(ViewAttributes.LineHeightAttribKey, (v)) - match maxLines with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MaxLinesAttribKey, (v)) - match textDecorations with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextDecorationsAttribKey, (v)) - attribBuilder - - static member val CreateFuncLabel : (unit -> Xamarin.Forms.Label) = (fun () -> ViewBuilders.CreateLabel()) with get, set - - static member CreateLabel () : Xamarin.Forms.Label = - upcast (new Xamarin.Forms.Label()) - - static member val UpdateFuncLabel = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Label) -> ViewBuilders.UpdateLabel (prevOpt, curr, target)) - - static member UpdateLabel (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Label) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevTextOpt = ValueNone - let mutable currTextOpt = ValueNone - let mutable prevHorizontalTextAlignmentOpt = ValueNone - let mutable currHorizontalTextAlignmentOpt = ValueNone - let mutable prevVerticalTextAlignmentOpt = ValueNone - let mutable currVerticalTextAlignmentOpt = ValueNone - let mutable prevFontSizeOpt = ValueNone - let mutable currFontSizeOpt = ValueNone - let mutable prevFontFamilyOpt = ValueNone - let mutable currFontFamilyOpt = ValueNone - let mutable prevFontAttributesOpt = ValueNone - let mutable currFontAttributesOpt = ValueNone - let mutable prevTextColorOpt = ValueNone - let mutable currTextColorOpt = ValueNone - let mutable prevFormattedTextOpt = ValueNone - let mutable currFormattedTextOpt = ValueNone - let mutable prevLineBreakModeOpt = ValueNone - let mutable currLineBreakModeOpt = ValueNone - let mutable prevLineHeightOpt = ValueNone - let mutable currLineHeightOpt = ValueNone - let mutable prevMaxLinesOpt = ValueNone - let mutable currMaxLinesOpt = ValueNone - let mutable prevTextDecorationsOpt = ValueNone - let mutable currTextDecorationsOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - currTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.HorizontalTextAlignmentAttribKey.KeyValue then - currHorizontalTextAlignmentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TextAlignment) - if kvp.Key = ViewAttributes.VerticalTextAlignmentAttribKey.KeyValue then - currVerticalTextAlignmentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TextAlignment) - if kvp.Key = ViewAttributes.FontSizeAttribKey.KeyValue then - currFontSizeOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.FontFamilyAttribKey.KeyValue then - currFontFamilyOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FontAttributesAttribKey.KeyValue then - currFontAttributesOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FontAttributes) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - currTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.FormattedTextAttribKey.KeyValue then - currFormattedTextOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.LineBreakModeAttribKey.KeyValue then - currLineBreakModeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.LineBreakMode) - if kvp.Key = ViewAttributes.LineHeightAttribKey.KeyValue then - currLineHeightOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.MaxLinesAttribKey.KeyValue then - currMaxLinesOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.TextDecorationsAttribKey.KeyValue then - currTextDecorationsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TextDecorations) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - prevTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.HorizontalTextAlignmentAttribKey.KeyValue then - prevHorizontalTextAlignmentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TextAlignment) - if kvp.Key = ViewAttributes.VerticalTextAlignmentAttribKey.KeyValue then - prevVerticalTextAlignmentOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TextAlignment) - if kvp.Key = ViewAttributes.FontSizeAttribKey.KeyValue then - prevFontSizeOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.FontFamilyAttribKey.KeyValue then - prevFontFamilyOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FontAttributesAttribKey.KeyValue then - prevFontAttributesOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FontAttributes) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - prevTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.FormattedTextAttribKey.KeyValue then - prevFormattedTextOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.LineBreakModeAttribKey.KeyValue then - prevLineBreakModeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.LineBreakMode) - if kvp.Key = ViewAttributes.LineHeightAttribKey.KeyValue then - prevLineHeightOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.MaxLinesAttribKey.KeyValue then - prevMaxLinesOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.TextDecorationsAttribKey.KeyValue then - prevTextDecorationsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TextDecorations) - match prevTextOpt, currTextOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Text <- currValue - | ValueSome _, ValueNone -> target.Text <- null - | ValueNone, ValueNone -> () - match prevHorizontalTextAlignmentOpt, currHorizontalTextAlignmentOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.HorizontalTextAlignment <- currValue - | ValueSome _, ValueNone -> target.HorizontalTextAlignment <- Xamarin.Forms.TextAlignment.Start - | ValueNone, ValueNone -> () - match prevVerticalTextAlignmentOpt, currVerticalTextAlignmentOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.VerticalTextAlignment <- currValue - | ValueSome _, ValueNone -> target.VerticalTextAlignment <- Xamarin.Forms.TextAlignment.Start - | ValueNone, ValueNone -> () - match prevFontSizeOpt, currFontSizeOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontSize <- currValue - | ValueSome _, ValueNone -> target.FontSize <- -1.0 - | ValueNone, ValueNone -> () - match prevFontFamilyOpt, currFontFamilyOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontFamily <- currValue - | ValueSome _, ValueNone -> target.FontFamily <- null - | ValueNone, ValueNone -> () - match prevFontAttributesOpt, currFontAttributesOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontAttributes <- currValue - | ValueSome _, ValueNone -> target.FontAttributes <- Xamarin.Forms.FontAttributes.None - | ValueNone, ValueNone -> () - match prevTextColorOpt, currTextColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.TextColor <- currValue - | ValueSome _, ValueNone -> target.TextColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevFormattedTextOpt, currFormattedTextOpt with - // For structured objects, dependsOn on reference equality - | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () - | ValueSome prevValue, ValueSome newValue when canReuseChild prevValue newValue -> - newValue.UpdateIncremental(prevValue, target.FormattedText) - | _, ValueSome newValue -> - target.FormattedText <- (newValue.Create() :?> Xamarin.Forms.FormattedString) - | ValueSome _, ValueNone -> - target.FormattedText <- null - | ValueNone, ValueNone -> () - match prevLineBreakModeOpt, currLineBreakModeOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.LineBreakMode <- currValue - | ValueSome _, ValueNone -> target.LineBreakMode <- Xamarin.Forms.LineBreakMode.WordWrap - | ValueNone, ValueNone -> () - match prevLineHeightOpt, currLineHeightOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.LineHeight <- currValue - | ValueSome _, ValueNone -> target.LineHeight <- -1.0 - | ValueNone, ValueNone -> () - match prevMaxLinesOpt, currMaxLinesOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.MaxLines <- currValue - | ValueSome _, ValueNone -> target.MaxLines <- -1 - | ValueNone, ValueNone -> () - match prevTextDecorationsOpt, currTextDecorationsOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.TextDecorations <- currValue - | ValueSome _, ValueNone -> target.TextDecorations <- Xamarin.Forms.TextDecorations.None - | ValueNone, ValueNone -> () - - static member inline ConstructLabel(?text: string, - ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, - ?verticalTextAlignment: Xamarin.Forms.TextAlignment, - ?fontSize: obj, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?textColor: Xamarin.Forms.Color, - ?formattedText: ViewElement, - ?lineBreakMode: Xamarin.Forms.LineBreakMode, - ?lineHeight: double, - ?maxLines: int, - ?textDecorations: Xamarin.Forms.TextDecorations, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Label -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildLabel(0, - ?text=text, - ?horizontalTextAlignment=horizontalTextAlignment, - ?verticalTextAlignment=verticalTextAlignment, - ?fontSize=fontSize, - ?fontFamily=fontFamily, - ?fontAttributes=fontAttributes, - ?textColor=textColor, - ?formattedText=formattedText, - ?lineBreakMode=lineBreakMode, - ?lineHeight=lineHeight, - ?maxLines=maxLines, - ?textDecorations=textDecorations, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncLabel, ViewBuilders.UpdateFuncLabel, attribBuilder) - - /// Builds the attributes for a StackLayout in the view - static member inline BuildStackLayout(attribCount: int, - ?children: ViewElement list, - ?orientation: Xamarin.Forms.StackOrientation, - ?spacing: double, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match children with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match orientation with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match spacing with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildLayout(attribCount, ?isClippedToBounds=isClippedToBounds, ?padding=padding, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match children with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ChildrenAttribKey, Array.ofList(v)) - match orientation with None -> () | Some v -> attribBuilder.Add(ViewAttributes.StackOrientationAttribKey, (v)) - match spacing with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SpacingAttribKey, (v)) - attribBuilder - - static member val CreateFuncStackLayout : (unit -> Xamarin.Forms.StackLayout) = (fun () -> ViewBuilders.CreateStackLayout()) with get, set - - static member CreateStackLayout () : Xamarin.Forms.StackLayout = - upcast (new Xamarin.Forms.StackLayout()) - - static member val UpdateFuncStackLayout = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.StackLayout) -> ViewBuilders.UpdateStackLayout (prevOpt, curr, target)) - - static member UpdateStackLayout (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.StackLayout) = - // update the inherited Layout element - let baseElement = (if ViewProto.ProtoLayout.IsNone then ViewProto.ProtoLayout <- Some (ViewBuilders.ConstructLayout())); ViewProto.ProtoLayout.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevChildrenOpt = ValueNone - let mutable currChildrenOpt = ValueNone - let mutable prevStackOrientationOpt = ValueNone - let mutable currStackOrientationOpt = ValueNone - let mutable prevSpacingOpt = ValueNone - let mutable currSpacingOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ChildrenAttribKey.KeyValue then - currChildrenOpt <- ValueSome (kvp.Value :?> ViewElement[]) - if kvp.Key = ViewAttributes.StackOrientationAttribKey.KeyValue then - currStackOrientationOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.StackOrientation) - if kvp.Key = ViewAttributes.SpacingAttribKey.KeyValue then - currSpacingOpt <- ValueSome (kvp.Value :?> double) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ChildrenAttribKey.KeyValue then - prevChildrenOpt <- ValueSome (kvp.Value :?> ViewElement[]) - if kvp.Key = ViewAttributes.StackOrientationAttribKey.KeyValue then - prevStackOrientationOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.StackOrientation) - if kvp.Key = ViewAttributes.SpacingAttribKey.KeyValue then - prevSpacingOpt <- ValueSome (kvp.Value :?> double) - updateCollectionGeneric prevChildrenOpt currChildrenOpt target.Children - (fun (x:ViewElement) -> x.Create() :?> Xamarin.Forms.View) - (fun _ _ _ -> ()) - canReuseChild - updateChild - match prevStackOrientationOpt, currStackOrientationOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Orientation <- currValue - | ValueSome _, ValueNone -> target.Orientation <- Xamarin.Forms.StackOrientation.Vertical - | ValueNone, ValueNone -> () - match prevSpacingOpt, currSpacingOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Spacing <- currValue - | ValueSome _, ValueNone -> target.Spacing <- 6.0 - | ValueNone, ValueNone -> () - - static member inline ConstructStackLayout(?children: ViewElement list, - ?orientation: Xamarin.Forms.StackOrientation, - ?spacing: double, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.StackLayout -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildStackLayout(0, - ?children=children, - ?orientation=orientation, - ?spacing=spacing, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncStackLayout, ViewBuilders.UpdateFuncStackLayout, attribBuilder) - - /// Builds the attributes for a Span in the view - static member inline BuildSpan(attribCount: int, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?fontSize: obj, - ?backgroundColor: Xamarin.Forms.Color, - ?foregroundColor: Xamarin.Forms.Color, - ?text: string, - ?propertyChanged: System.ComponentModel.PropertyChangedEventArgs -> unit, - ?lineHeight: double, - ?textDecorations: Xamarin.Forms.TextDecorations, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match fontFamily with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontAttributes with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match fontSize with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match backgroundColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match foregroundColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match text with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match propertyChanged with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match lineHeight with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match textDecorations with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match fontFamily with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontFamilyAttribKey, (v)) - match fontAttributes with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontAttributesAttribKey, (v)) - match fontSize with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FontSizeAttribKey, makeFontSize(v)) - match backgroundColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.BackgroundColorAttribKey, (v)) - match foregroundColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ForegroundColorAttribKey, (v)) - match text with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextAttribKey, (v)) - match propertyChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PropertyChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match lineHeight with None -> () | Some v -> attribBuilder.Add(ViewAttributes.LineHeightAttribKey, (v)) - match textDecorations with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextDecorationsAttribKey, (v)) - attribBuilder - - static member val CreateFuncSpan : (unit -> Xamarin.Forms.Span) = (fun () -> ViewBuilders.CreateSpan()) with get, set - - static member CreateSpan () : Xamarin.Forms.Span = - upcast (new Xamarin.Forms.Span()) - - static member val UpdateFuncSpan = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Span) -> ViewBuilders.UpdateSpan (prevOpt, curr, target)) - - static member UpdateSpan (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Span) = - // update the inherited Element element - let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevFontFamilyOpt = ValueNone - let mutable currFontFamilyOpt = ValueNone - let mutable prevFontAttributesOpt = ValueNone - let mutable currFontAttributesOpt = ValueNone - let mutable prevFontSizeOpt = ValueNone - let mutable currFontSizeOpt = ValueNone - let mutable prevBackgroundColorOpt = ValueNone - let mutable currBackgroundColorOpt = ValueNone - let mutable prevForegroundColorOpt = ValueNone - let mutable currForegroundColorOpt = ValueNone - let mutable prevTextOpt = ValueNone - let mutable currTextOpt = ValueNone - let mutable prevPropertyChangedOpt = ValueNone - let mutable currPropertyChangedOpt = ValueNone - let mutable prevLineHeightOpt = ValueNone - let mutable currLineHeightOpt = ValueNone - let mutable prevTextDecorationsOpt = ValueNone - let mutable currTextDecorationsOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.FontFamilyAttribKey.KeyValue then - currFontFamilyOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FontAttributesAttribKey.KeyValue then - currFontAttributesOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FontAttributes) - if kvp.Key = ViewAttributes.FontSizeAttribKey.KeyValue then - currFontSizeOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.BackgroundColorAttribKey.KeyValue then - currBackgroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.ForegroundColorAttribKey.KeyValue then - currForegroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - currTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.PropertyChangedAttribKey.KeyValue then - currPropertyChangedOpt <- ValueSome (kvp.Value :?> System.ComponentModel.PropertyChangedEventHandler) - if kvp.Key = ViewAttributes.LineHeightAttribKey.KeyValue then - currLineHeightOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.TextDecorationsAttribKey.KeyValue then - currTextDecorationsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TextDecorations) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.FontFamilyAttribKey.KeyValue then - prevFontFamilyOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.FontAttributesAttribKey.KeyValue then - prevFontAttributesOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FontAttributes) - if kvp.Key = ViewAttributes.FontSizeAttribKey.KeyValue then - prevFontSizeOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.BackgroundColorAttribKey.KeyValue then - prevBackgroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.ForegroundColorAttribKey.KeyValue then - prevForegroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - prevTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.PropertyChangedAttribKey.KeyValue then - prevPropertyChangedOpt <- ValueSome (kvp.Value :?> System.ComponentModel.PropertyChangedEventHandler) - if kvp.Key = ViewAttributes.LineHeightAttribKey.KeyValue then - prevLineHeightOpt <- ValueSome (kvp.Value :?> double) - if kvp.Key = ViewAttributes.TextDecorationsAttribKey.KeyValue then - prevTextDecorationsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.TextDecorations) - match prevFontFamilyOpt, currFontFamilyOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontFamily <- currValue - | ValueSome _, ValueNone -> target.FontFamily <- null - | ValueNone, ValueNone -> () - match prevFontAttributesOpt, currFontAttributesOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontAttributes <- currValue - | ValueSome _, ValueNone -> target.FontAttributes <- Xamarin.Forms.FontAttributes.None - | ValueNone, ValueNone -> () - match prevFontSizeOpt, currFontSizeOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FontSize <- currValue - | ValueSome _, ValueNone -> target.FontSize <- -1.0 - | ValueNone, ValueNone -> () - match prevBackgroundColorOpt, currBackgroundColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.BackgroundColor <- currValue - | ValueSome _, ValueNone -> target.BackgroundColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevForegroundColorOpt, currForegroundColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ForegroundColor <- currValue - | ValueSome _, ValueNone -> target.ForegroundColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevTextOpt, currTextOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Text <- currValue - | ValueSome _, ValueNone -> target.Text <- null - | ValueNone, ValueNone -> () - match prevPropertyChangedOpt, currPropertyChangedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.PropertyChanged.RemoveHandler(prevValue); target.PropertyChanged.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.PropertyChanged.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.PropertyChanged.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevLineHeightOpt, currLineHeightOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.LineHeight <- currValue - | ValueSome _, ValueNone -> target.LineHeight <- -1.0 - | ValueNone, ValueNone -> () - match prevTextDecorationsOpt, currTextDecorationsOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.TextDecorations <- currValue - | ValueSome _, ValueNone -> target.TextDecorations <- Xamarin.Forms.TextDecorations.None - | ValueNone, ValueNone -> () - - static member inline ConstructSpan(?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?fontSize: obj, - ?backgroundColor: Xamarin.Forms.Color, - ?foregroundColor: Xamarin.Forms.Color, - ?text: string, - ?propertyChanged: System.ComponentModel.PropertyChangedEventArgs -> unit, - ?lineHeight: double, - ?textDecorations: Xamarin.Forms.TextDecorations, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Span -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildSpan(0, - ?fontFamily=fontFamily, - ?fontAttributes=fontAttributes, - ?fontSize=fontSize, - ?backgroundColor=backgroundColor, - ?foregroundColor=foregroundColor, - ?text=text, - ?propertyChanged=propertyChanged, - ?lineHeight=lineHeight, - ?textDecorations=textDecorations, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncSpan, ViewBuilders.UpdateFuncSpan, attribBuilder) - - /// Builds the attributes for a FormattedString in the view - static member inline BuildFormattedString(attribCount: int, - ?spans: ViewElement[], - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match spans with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match spans with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SpansAttribKey, (v)) - attribBuilder - - static member val CreateFuncFormattedString : (unit -> Xamarin.Forms.FormattedString) = (fun () -> ViewBuilders.CreateFormattedString()) with get, set - - static member CreateFormattedString () : Xamarin.Forms.FormattedString = - upcast (new Xamarin.Forms.FormattedString()) - - static member val UpdateFuncFormattedString = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.FormattedString) -> ViewBuilders.UpdateFormattedString (prevOpt, curr, target)) - - static member UpdateFormattedString (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.FormattedString) = - // update the inherited Element element - let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevSpansOpt = ValueNone - let mutable currSpansOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.SpansAttribKey.KeyValue then - currSpansOpt <- ValueSome (kvp.Value :?> ViewElement[]) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.SpansAttribKey.KeyValue then - prevSpansOpt <- ValueSome (kvp.Value :?> ViewElement[]) - updateCollectionGeneric prevSpansOpt currSpansOpt target.Spans - (fun (x:ViewElement) -> x.Create() :?> Xamarin.Forms.Span) - (fun _ _ _ -> ()) - canReuseChild - updateChild - - static member inline ConstructFormattedString(?spans: ViewElement[], - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.FormattedString -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildFormattedString(0, - ?spans=spans, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncFormattedString, ViewBuilders.UpdateFuncFormattedString, attribBuilder) - - /// Builds the attributes for a TimePicker in the view - static member inline BuildTimePicker(attribCount: int, - ?time: System.TimeSpan, - ?format: string, - ?textColor: Xamarin.Forms.Color, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match time with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match format with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match textColor with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match time with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TimeAttribKey, (v)) - match format with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FormatAttribKey, (v)) - match textColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextColorAttribKey, (v)) - attribBuilder - - static member val CreateFuncTimePicker : (unit -> Xamarin.Forms.TimePicker) = (fun () -> ViewBuilders.CreateTimePicker()) with get, set - - static member CreateTimePicker () : Xamarin.Forms.TimePicker = - upcast (new Xamarin.Forms.TimePicker()) - - static member val UpdateFuncTimePicker = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.TimePicker) -> ViewBuilders.UpdateTimePicker (prevOpt, curr, target)) - - static member UpdateTimePicker (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.TimePicker) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevTimeOpt = ValueNone - let mutable currTimeOpt = ValueNone - let mutable prevFormatOpt = ValueNone - let mutable currFormatOpt = ValueNone - let mutable prevTextColorOpt = ValueNone - let mutable currTextColorOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.TimeAttribKey.KeyValue then - currTimeOpt <- ValueSome (kvp.Value :?> System.TimeSpan) - if kvp.Key = ViewAttributes.FormatAttribKey.KeyValue then - currFormatOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - currTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.TimeAttribKey.KeyValue then - prevTimeOpt <- ValueSome (kvp.Value :?> System.TimeSpan) - if kvp.Key = ViewAttributes.FormatAttribKey.KeyValue then - prevFormatOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - prevTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - match prevTimeOpt, currTimeOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Time <- currValue - | ValueSome _, ValueNone -> target.Time <- new System.TimeSpan() - | ValueNone, ValueNone -> () - match prevFormatOpt, currFormatOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Format <- currValue - | ValueSome _, ValueNone -> target.Format <- "t" - | ValueNone, ValueNone -> () - match prevTextColorOpt, currTextColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.TextColor <- currValue - | ValueSome _, ValueNone -> target.TextColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - - static member inline ConstructTimePicker(?time: System.TimeSpan, - ?format: string, - ?textColor: Xamarin.Forms.Color, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.TimePicker -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildTimePicker(0, - ?time=time, - ?format=format, - ?textColor=textColor, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncTimePicker, ViewBuilders.UpdateFuncTimePicker, attribBuilder) - - /// Builds the attributes for a WebView in the view - static member inline BuildWebView(attribCount: int, - ?source: Xamarin.Forms.WebViewSource, - ?reload: bool, - ?navigated: Xamarin.Forms.WebNavigatedEventArgs -> unit, - ?navigating: Xamarin.Forms.WebNavigatingEventArgs -> unit, - ?reloadRequested: System.EventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match source with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match reload with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match navigated with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match navigating with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match reloadRequested with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match source with None -> () | Some v -> attribBuilder.Add(ViewAttributes.WebSourceAttribKey, (v)) - match reload with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ReloadAttribKey, (v)) - match navigated with None -> () | Some v -> attribBuilder.Add(ViewAttributes.NavigatedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match navigating with None -> () | Some v -> attribBuilder.Add(ViewAttributes.NavigatingAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match reloadRequested with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ReloadRequestedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - attribBuilder - - static member val CreateFuncWebView : (unit -> Xamarin.Forms.WebView) = (fun () -> ViewBuilders.CreateWebView()) with get, set - - static member CreateWebView () : Xamarin.Forms.WebView = - upcast (new Xamarin.Forms.WebView()) - - static member val UpdateFuncWebView = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.WebView) -> ViewBuilders.UpdateWebView (prevOpt, curr, target)) - - static member UpdateWebView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.WebView) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevWebSourceOpt = ValueNone - let mutable currWebSourceOpt = ValueNone - let mutable prevReloadOpt = ValueNone - let mutable currReloadOpt = ValueNone - let mutable prevNavigatedOpt = ValueNone - let mutable currNavigatedOpt = ValueNone - let mutable prevNavigatingOpt = ValueNone - let mutable currNavigatingOpt = ValueNone - let mutable prevReloadRequestedOpt = ValueNone - let mutable currReloadRequestedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.WebSourceAttribKey.KeyValue then - currWebSourceOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.WebViewSource) - if kvp.Key = ViewAttributes.ReloadAttribKey.KeyValue then - currReloadOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.NavigatedAttribKey.KeyValue then - currNavigatedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.NavigatingAttribKey.KeyValue then - currNavigatingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ReloadRequestedAttribKey.KeyValue then - currReloadRequestedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.WebSourceAttribKey.KeyValue then - prevWebSourceOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.WebViewSource) - if kvp.Key = ViewAttributes.ReloadAttribKey.KeyValue then - prevReloadOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.NavigatedAttribKey.KeyValue then - prevNavigatedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.NavigatingAttribKey.KeyValue then - prevNavigatingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ReloadRequestedAttribKey.KeyValue then - prevReloadRequestedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevWebSourceOpt, currWebSourceOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Source <- currValue - | ValueSome _, ValueNone -> target.Source <- null - | ValueNone, ValueNone -> () - (fun _ curr (target: Xamarin.Forms.WebView) -> if curr = ValueSome true then target.Reload()) prevReloadOpt currReloadOpt target - match prevNavigatedOpt, currNavigatedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Navigated.RemoveHandler(prevValue); target.Navigated.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Navigated.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Navigated.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevNavigatingOpt, currNavigatingOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Navigating.RemoveHandler(prevValue); target.Navigating.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Navigating.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Navigating.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevReloadRequestedOpt, currReloadRequestedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.ReloadRequested.RemoveHandler(prevValue); target.ReloadRequested.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.ReloadRequested.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.ReloadRequested.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructWebView(?source: Xamarin.Forms.WebViewSource, - ?reload: bool, - ?navigated: Xamarin.Forms.WebNavigatedEventArgs -> unit, - ?navigating: Xamarin.Forms.WebNavigatingEventArgs -> unit, - ?reloadRequested: System.EventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.WebView -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildWebView(0, - ?source=source, - ?reload=reload, - ?navigated=navigated, - ?navigating=navigating, - ?reloadRequested=reloadRequested, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncWebView, ViewBuilders.UpdateFuncWebView, attribBuilder) - - /// Builds the attributes for a Page in the view - static member inline BuildPage(attribCount: int, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match title with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match backgroundImage with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match icon with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isBusy with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match padding with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match toolbarItems with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match useSafeArea with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match appearing with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match disappearing with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match layoutChanged with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildVisualElement(attribCount, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match title with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TitleAttribKey, (v)) - match backgroundImage with None -> () | Some v -> attribBuilder.Add(ViewAttributes.BackgroundImageAttribKey, (v)) - match icon with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IconAttribKey, (v)) - match isBusy with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsBusyAttribKey, (v)) - match padding with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PaddingAttribKey, makeThickness(v)) - match toolbarItems with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ToolbarItemsAttribKey, Array.ofList(v)) - match useSafeArea with None -> () | Some v -> attribBuilder.Add(ViewAttributes.UseSafeAreaAttribKey, (v)) - match appearing with None -> () | Some v -> attribBuilder.Add(ViewAttributes.Page_AppearingAttribKey, (fun f -> System.EventHandler(fun _sender _args -> f ()))(v)) - match disappearing with None -> () | Some v -> attribBuilder.Add(ViewAttributes.Page_DisappearingAttribKey, (fun f -> System.EventHandler(fun _sender _args -> f ()))(v)) - match layoutChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.Page_LayoutChangedAttribKey, (fun f -> System.EventHandler(fun _sender _args -> f ()))(v)) - attribBuilder - - static member val CreateFuncPage : (unit -> Xamarin.Forms.Page) = (fun () -> ViewBuilders.CreatePage()) with get, set - - static member CreatePage () : Xamarin.Forms.Page = - upcast (new Xamarin.Forms.Page()) - - static member val UpdateFuncPage = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Page) -> ViewBuilders.UpdatePage (prevOpt, curr, target)) - - static member UpdatePage (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Page) = - // update the inherited VisualElement element - let baseElement = (if ViewProto.ProtoVisualElement.IsNone then ViewProto.ProtoVisualElement <- Some (ViewBuilders.ConstructVisualElement())); ViewProto.ProtoVisualElement.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevTitleOpt = ValueNone - let mutable currTitleOpt = ValueNone - let mutable prevBackgroundImageOpt = ValueNone - let mutable currBackgroundImageOpt = ValueNone - let mutable prevIconOpt = ValueNone - let mutable currIconOpt = ValueNone - let mutable prevIsBusyOpt = ValueNone - let mutable currIsBusyOpt = ValueNone - let mutable prevPaddingOpt = ValueNone - let mutable currPaddingOpt = ValueNone - let mutable prevToolbarItemsOpt = ValueNone - let mutable currToolbarItemsOpt = ValueNone - let mutable prevUseSafeAreaOpt = ValueNone - let mutable currUseSafeAreaOpt = ValueNone - let mutable prevPage_AppearingOpt = ValueNone - let mutable currPage_AppearingOpt = ValueNone - let mutable prevPage_DisappearingOpt = ValueNone - let mutable currPage_DisappearingOpt = ValueNone - let mutable prevPage_LayoutChangedOpt = ValueNone - let mutable currPage_LayoutChangedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.TitleAttribKey.KeyValue then - currTitleOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.BackgroundImageAttribKey.KeyValue then - currBackgroundImageOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.IconAttribKey.KeyValue then - currIconOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.IsBusyAttribKey.KeyValue then - currIsBusyOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.PaddingAttribKey.KeyValue then - currPaddingOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Thickness) - if kvp.Key = ViewAttributes.ToolbarItemsAttribKey.KeyValue then - currToolbarItemsOpt <- ValueSome (kvp.Value :?> ViewElement[]) - if kvp.Key = ViewAttributes.UseSafeAreaAttribKey.KeyValue then - currUseSafeAreaOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.Page_AppearingAttribKey.KeyValue then - currPage_AppearingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.Page_DisappearingAttribKey.KeyValue then - currPage_DisappearingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.Page_LayoutChangedAttribKey.KeyValue then - currPage_LayoutChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.TitleAttribKey.KeyValue then - prevTitleOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.BackgroundImageAttribKey.KeyValue then - prevBackgroundImageOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.IconAttribKey.KeyValue then - prevIconOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.IsBusyAttribKey.KeyValue then - prevIsBusyOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.PaddingAttribKey.KeyValue then - prevPaddingOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Thickness) - if kvp.Key = ViewAttributes.ToolbarItemsAttribKey.KeyValue then - prevToolbarItemsOpt <- ValueSome (kvp.Value :?> ViewElement[]) - if kvp.Key = ViewAttributes.UseSafeAreaAttribKey.KeyValue then - prevUseSafeAreaOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.Page_AppearingAttribKey.KeyValue then - prevPage_AppearingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.Page_DisappearingAttribKey.KeyValue then - prevPage_DisappearingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.Page_LayoutChangedAttribKey.KeyValue then - prevPage_LayoutChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevTitleOpt, currTitleOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Title <- currValue - | ValueSome _, ValueNone -> target.Title <- "" - | ValueNone, ValueNone -> () - match prevBackgroundImageOpt, currBackgroundImageOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.BackgroundImage <- currValue - | ValueSome _, ValueNone -> target.BackgroundImage <- null - | ValueNone, ValueNone -> () - match prevIconOpt, currIconOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Icon <- makeFileImageSource currValue - | ValueSome _, ValueNone -> target.Icon <- null - | ValueNone, ValueNone -> () - match prevIsBusyOpt, currIsBusyOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsBusy <- currValue - | ValueSome _, ValueNone -> target.IsBusy <- false - | ValueNone, ValueNone -> () - match prevPaddingOpt, currPaddingOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Padding <- currValue - | ValueSome _, ValueNone -> target.Padding <- Unchecked.defaultof - | ValueNone, ValueNone -> () - updateCollectionGeneric prevToolbarItemsOpt currToolbarItemsOpt target.ToolbarItems - (fun (x:ViewElement) -> x.Create() :?> Xamarin.Forms.ToolbarItem) - (fun _ _ _ -> ()) - canReuseChild - updateChild - (fun _ _ target -> Xamarin.Forms.PlatformConfiguration.iOSSpecific.Page.SetUseSafeArea((target : Xamarin.Forms.Page).On(), true) |> ignore) prevUseSafeAreaOpt currUseSafeAreaOpt target - match prevPage_AppearingOpt, currPage_AppearingOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Appearing.RemoveHandler(prevValue); target.Appearing.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Appearing.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Appearing.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevPage_DisappearingOpt, currPage_DisappearingOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Disappearing.RemoveHandler(prevValue); target.Disappearing.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Disappearing.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Disappearing.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevPage_LayoutChangedOpt, currPage_LayoutChangedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.LayoutChanged.RemoveHandler(prevValue); target.LayoutChanged.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.LayoutChanged.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.LayoutChanged.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructPage(?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Page -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildPage(0, - ?title=title, - ?backgroundImage=backgroundImage, - ?icon=icon, - ?isBusy=isBusy, - ?padding=padding, - ?toolbarItems=toolbarItems, - ?useSafeArea=useSafeArea, - ?appearing=appearing, - ?disappearing=disappearing, - ?layoutChanged=layoutChanged, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncPage, ViewBuilders.UpdateFuncPage, attribBuilder) - - /// Builds the attributes for a CarouselPage in the view - static member inline BuildCarouselPage(attribCount: int, - ?children: ViewElement list, - ?currentPage: int, - ?currentPageChanged: int option -> unit, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match children with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match currentPage with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match currentPageChanged with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildPage(attribCount, ?title=title, ?backgroundImage=backgroundImage, ?icon=icon, ?isBusy=isBusy, ?padding=padding, ?toolbarItems=toolbarItems, ?useSafeArea=useSafeArea, ?appearing=appearing, ?disappearing=disappearing, ?layoutChanged=layoutChanged, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match children with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ChildrenAttribKey, Array.ofList(v)) - match currentPage with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CarouselPage_CurrentPageAttribKey, (v)) - match currentPageChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CarouselPage_CurrentPageChangedAttribKey, makeCurrentPageChanged(v)) - attribBuilder - - static member val CreateFuncCarouselPage : (unit -> Xamarin.Forms.CarouselPage) = (fun () -> ViewBuilders.CreateCarouselPage()) with get, set - - static member CreateCarouselPage () : Xamarin.Forms.CarouselPage = - upcast (new Xamarin.Forms.CarouselPage()) - - static member val UpdateFuncCarouselPage = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.CarouselPage) -> ViewBuilders.UpdateCarouselPage (prevOpt, curr, target)) - - static member UpdateCarouselPage (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.CarouselPage) = - // update the inherited Page element - let baseElement = (if ViewProto.ProtoPage.IsNone then ViewProto.ProtoPage <- Some (ViewBuilders.ConstructPage())); ViewProto.ProtoPage.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevChildrenOpt = ValueNone - let mutable currChildrenOpt = ValueNone - let mutable prevCarouselPage_CurrentPageOpt = ValueNone - let mutable currCarouselPage_CurrentPageOpt = ValueNone - let mutable prevCarouselPage_CurrentPageChangedOpt = ValueNone - let mutable currCarouselPage_CurrentPageChangedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ChildrenAttribKey.KeyValue then - currChildrenOpt <- ValueSome (kvp.Value :?> ViewElement[]) - if kvp.Key = ViewAttributes.CarouselPage_CurrentPageAttribKey.KeyValue then - currCarouselPage_CurrentPageOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.CarouselPage_CurrentPageChangedAttribKey.KeyValue then - currCarouselPage_CurrentPageChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ChildrenAttribKey.KeyValue then - prevChildrenOpt <- ValueSome (kvp.Value :?> ViewElement[]) - if kvp.Key = ViewAttributes.CarouselPage_CurrentPageAttribKey.KeyValue then - prevCarouselPage_CurrentPageOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.CarouselPage_CurrentPageChangedAttribKey.KeyValue then - prevCarouselPage_CurrentPageChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - updateCollectionGeneric prevChildrenOpt currChildrenOpt target.Children - (fun (x:ViewElement) -> x.Create() :?> Xamarin.Forms.ContentPage) - (fun _ _ _ -> ()) - canReuseChild - updateChild - updateCurrentPage prevCarouselPage_CurrentPageOpt currCarouselPage_CurrentPageOpt target - match prevCarouselPage_CurrentPageChangedOpt, currCarouselPage_CurrentPageChangedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.CurrentPageChanged.RemoveHandler(prevValue); target.CurrentPageChanged.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.CurrentPageChanged.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.CurrentPageChanged.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructCarouselPage(?children: ViewElement list, - ?currentPage: int, - ?currentPageChanged: int option -> unit, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.CarouselPage -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildCarouselPage(0, - ?children=children, - ?currentPage=currentPage, - ?currentPageChanged=currentPageChanged, - ?title=title, - ?backgroundImage=backgroundImage, - ?icon=icon, - ?isBusy=isBusy, - ?padding=padding, - ?toolbarItems=toolbarItems, - ?useSafeArea=useSafeArea, - ?appearing=appearing, - ?disappearing=disappearing, - ?layoutChanged=layoutChanged, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncCarouselPage, ViewBuilders.UpdateFuncCarouselPage, attribBuilder) - - /// Builds the attributes for a NavigationPage in the view - static member inline BuildNavigationPage(attribCount: int, - ?pages: ViewElement list, - ?barBackgroundColor: Xamarin.Forms.Color, - ?barTextColor: Xamarin.Forms.Color, - ?popped: Xamarin.Forms.NavigationEventArgs -> unit, - ?poppedToRoot: Xamarin.Forms.NavigationEventArgs -> unit, - ?pushed: Xamarin.Forms.NavigationEventArgs -> unit, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match pages with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match barBackgroundColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match barTextColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match popped with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match poppedToRoot with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match pushed with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildPage(attribCount, ?title=title, ?backgroundImage=backgroundImage, ?icon=icon, ?isBusy=isBusy, ?padding=padding, ?toolbarItems=toolbarItems, ?useSafeArea=useSafeArea, ?appearing=appearing, ?disappearing=disappearing, ?layoutChanged=layoutChanged, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match pages with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PagesAttribKey, Array.ofList(v)) - match barBackgroundColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.BarBackgroundColorAttribKey, (v)) - match barTextColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.BarTextColorAttribKey, (v)) - match popped with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PoppedAttribKey, (fun f -> System.EventHandler(fun sender args -> f args))(v)) - match poppedToRoot with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PoppedToRootAttribKey, (fun f -> System.EventHandler(fun sender args -> f args))(v)) - match pushed with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PushedAttribKey, (fun f -> System.EventHandler(fun sender args -> f args))(v)) - attribBuilder - - static member val CreateFuncNavigationPage : (unit -> Xamarin.Forms.NavigationPage) = (fun () -> ViewBuilders.CreateNavigationPage()) with get, set - - static member CreateNavigationPage () : Xamarin.Forms.NavigationPage = - upcast (new Xamarin.Forms.NavigationPage()) - - static member val UpdateFuncNavigationPage = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.NavigationPage) -> ViewBuilders.UpdateNavigationPage (prevOpt, curr, target)) - - static member UpdateNavigationPage (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.NavigationPage) = - // update the inherited Page element - let baseElement = (if ViewProto.ProtoPage.IsNone then ViewProto.ProtoPage <- Some (ViewBuilders.ConstructPage())); ViewProto.ProtoPage.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevPagesOpt = ValueNone - let mutable currPagesOpt = ValueNone - let mutable prevBarBackgroundColorOpt = ValueNone - let mutable currBarBackgroundColorOpt = ValueNone - let mutable prevBarTextColorOpt = ValueNone - let mutable currBarTextColorOpt = ValueNone - let mutable prevPoppedOpt = ValueNone - let mutable currPoppedOpt = ValueNone - let mutable prevPoppedToRootOpt = ValueNone - let mutable currPoppedToRootOpt = ValueNone - let mutable prevPushedOpt = ValueNone - let mutable currPushedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.PagesAttribKey.KeyValue then - currPagesOpt <- ValueSome (kvp.Value :?> ViewElement[]) - if kvp.Key = ViewAttributes.BarBackgroundColorAttribKey.KeyValue then - currBarBackgroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.BarTextColorAttribKey.KeyValue then - currBarTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.PoppedAttribKey.KeyValue then - currPoppedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.PoppedToRootAttribKey.KeyValue then - currPoppedToRootOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.PushedAttribKey.KeyValue then - currPushedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.PagesAttribKey.KeyValue then - prevPagesOpt <- ValueSome (kvp.Value :?> ViewElement[]) - if kvp.Key = ViewAttributes.BarBackgroundColorAttribKey.KeyValue then - prevBarBackgroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.BarTextColorAttribKey.KeyValue then - prevBarTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.PoppedAttribKey.KeyValue then - prevPoppedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.PoppedToRootAttribKey.KeyValue then - prevPoppedToRootOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.PushedAttribKey.KeyValue then - prevPushedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - updateNavigationPages prevPagesOpt currPagesOpt target - (fun prevChildOpt newChild targetChild -> - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.BackButtonTitleAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.BackButtonTitleAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currValue when prevChildValue = currValue -> () - | _, ValueSome currValue -> Xamarin.Forms.NavigationPage.SetBackButtonTitle(targetChild, currValue) - | ValueSome _, ValueNone -> Xamarin.Forms.NavigationPage.SetBackButtonTitle(targetChild, null) // TODO: not always perfect, should set back to original default? - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.HasBackButtonAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.HasBackButtonAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currValue when prevChildValue = currValue -> () - | _, ValueSome currValue -> Xamarin.Forms.NavigationPage.SetHasBackButton(targetChild, currValue) - | ValueSome _, ValueNone -> Xamarin.Forms.NavigationPage.SetHasBackButton(targetChild, true) // TODO: not always perfect, should set back to original default? - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.HasNavigationBarAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.HasNavigationBarAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currValue when prevChildValue = currValue -> () - | _, ValueSome currValue -> Xamarin.Forms.NavigationPage.SetHasNavigationBar(targetChild, currValue) - | ValueSome _, ValueNone -> Xamarin.Forms.NavigationPage.SetHasNavigationBar(targetChild, true) // TODO: not always perfect, should set back to original default? - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.TitleIconAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.TitleIconAttribKey) - match prevChildValueOpt, childValueOpt with - | ValueSome prevChildValue, ValueSome currValue when prevChildValue = currValue -> () - | _, ValueSome currValue -> Xamarin.Forms.NavigationPage.SetTitleIcon(targetChild, makeFileImageSource currValue) - | ValueSome _, ValueNone -> Xamarin.Forms.NavigationPage.SetTitleIcon(targetChild, null) // TODO: not always perfect, should set back to original default? - | _ -> () - // Adjust the attached properties - let prevChildValueOpt = match prevChildOpt with ValueNone -> ValueNone | ValueSome prevChild -> prevChild.TryGetAttributeKeyed(ViewAttributes.TitleViewAttribKey) - let childValueOpt = newChild.TryGetAttributeKeyed(ViewAttributes.TitleViewAttribKey) - updatePageTitleView prevChildValueOpt childValueOpt targetChild - ()) - match prevBarBackgroundColorOpt, currBarBackgroundColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.BarBackgroundColor <- currValue - | ValueSome _, ValueNone -> target.BarBackgroundColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevBarTextColorOpt, currBarTextColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.BarTextColor <- currValue - | ValueSome _, ValueNone -> target.BarTextColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevPoppedOpt, currPoppedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Popped.RemoveHandler(prevValue); target.Popped.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Popped.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Popped.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevPoppedToRootOpt, currPoppedToRootOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.PoppedToRoot.RemoveHandler(prevValue); target.PoppedToRoot.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.PoppedToRoot.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.PoppedToRoot.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevPushedOpt, currPushedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Pushed.RemoveHandler(prevValue); target.Pushed.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Pushed.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Pushed.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructNavigationPage(?pages: ViewElement list, - ?barBackgroundColor: Xamarin.Forms.Color, - ?barTextColor: Xamarin.Forms.Color, - ?popped: Xamarin.Forms.NavigationEventArgs -> unit, - ?poppedToRoot: Xamarin.Forms.NavigationEventArgs -> unit, - ?pushed: Xamarin.Forms.NavigationEventArgs -> unit, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.NavigationPage -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildNavigationPage(0, - ?pages=pages, - ?barBackgroundColor=barBackgroundColor, - ?barTextColor=barTextColor, - ?popped=popped, - ?poppedToRoot=poppedToRoot, - ?pushed=pushed, - ?title=title, - ?backgroundImage=backgroundImage, - ?icon=icon, - ?isBusy=isBusy, - ?padding=padding, - ?toolbarItems=toolbarItems, - ?useSafeArea=useSafeArea, - ?appearing=appearing, - ?disappearing=disappearing, - ?layoutChanged=layoutChanged, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncNavigationPage, ViewBuilders.UpdateFuncNavigationPage, attribBuilder) - - /// Builds the attributes for a TabbedPage in the view - static member inline BuildTabbedPage(attribCount: int, - ?children: ViewElement list, - ?barBackgroundColor: Xamarin.Forms.Color, - ?barTextColor: Xamarin.Forms.Color, - ?currentPage: int, - ?currentPageChanged: int option -> unit, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match children with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match barBackgroundColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match barTextColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match currentPage with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match currentPageChanged with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildPage(attribCount, ?title=title, ?backgroundImage=backgroundImage, ?icon=icon, ?isBusy=isBusy, ?padding=padding, ?toolbarItems=toolbarItems, ?useSafeArea=useSafeArea, ?appearing=appearing, ?disappearing=disappearing, ?layoutChanged=layoutChanged, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match children with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ChildrenAttribKey, Array.ofList(v)) - match barBackgroundColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.BarBackgroundColorAttribKey, (v)) - match barTextColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.BarTextColorAttribKey, (v)) - match currentPage with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TabbedPage_CurrentPageAttribKey, (v)) - match currentPageChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TabbedPage_CurrentPageChangedAttribKey, makeCurrentPageChanged(v)) - attribBuilder - - static member val CreateFuncTabbedPage : (unit -> Xamarin.Forms.TabbedPage) = (fun () -> ViewBuilders.CreateTabbedPage()) with get, set - - static member CreateTabbedPage () : Xamarin.Forms.TabbedPage = - upcast (new Xamarin.Forms.TabbedPage()) - - static member val UpdateFuncTabbedPage = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.TabbedPage) -> ViewBuilders.UpdateTabbedPage (prevOpt, curr, target)) - - static member UpdateTabbedPage (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.TabbedPage) = - // update the inherited Page element - let baseElement = (if ViewProto.ProtoPage.IsNone then ViewProto.ProtoPage <- Some (ViewBuilders.ConstructPage())); ViewProto.ProtoPage.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevChildrenOpt = ValueNone - let mutable currChildrenOpt = ValueNone - let mutable prevBarBackgroundColorOpt = ValueNone - let mutable currBarBackgroundColorOpt = ValueNone - let mutable prevBarTextColorOpt = ValueNone - let mutable currBarTextColorOpt = ValueNone - let mutable prevTabbedPage_CurrentPageOpt = ValueNone - let mutable currTabbedPage_CurrentPageOpt = ValueNone - let mutable prevTabbedPage_CurrentPageChangedOpt = ValueNone - let mutable currTabbedPage_CurrentPageChangedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ChildrenAttribKey.KeyValue then - currChildrenOpt <- ValueSome (kvp.Value :?> ViewElement[]) - if kvp.Key = ViewAttributes.BarBackgroundColorAttribKey.KeyValue then - currBarBackgroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.BarTextColorAttribKey.KeyValue then - currBarTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.TabbedPage_CurrentPageAttribKey.KeyValue then - currTabbedPage_CurrentPageOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.TabbedPage_CurrentPageChangedAttribKey.KeyValue then - currTabbedPage_CurrentPageChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ChildrenAttribKey.KeyValue then - prevChildrenOpt <- ValueSome (kvp.Value :?> ViewElement[]) - if kvp.Key = ViewAttributes.BarBackgroundColorAttribKey.KeyValue then - prevBarBackgroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.BarTextColorAttribKey.KeyValue then - prevBarTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.TabbedPage_CurrentPageAttribKey.KeyValue then - prevTabbedPage_CurrentPageOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.TabbedPage_CurrentPageChangedAttribKey.KeyValue then - prevTabbedPage_CurrentPageChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - updateCollectionGeneric prevChildrenOpt currChildrenOpt target.Children - (fun (x:ViewElement) -> x.Create() :?> Xamarin.Forms.Page) - (fun _ _ _ -> ()) - canReuseChild - updateChild - match prevBarBackgroundColorOpt, currBarBackgroundColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.BarBackgroundColor <- currValue - | ValueSome _, ValueNone -> target.BarBackgroundColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevBarTextColorOpt, currBarTextColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.BarTextColor <- currValue - | ValueSome _, ValueNone -> target.BarTextColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - updateCurrentPage prevTabbedPage_CurrentPageOpt currTabbedPage_CurrentPageOpt target - match prevTabbedPage_CurrentPageChangedOpt, currTabbedPage_CurrentPageChangedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.CurrentPageChanged.RemoveHandler(prevValue); target.CurrentPageChanged.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.CurrentPageChanged.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.CurrentPageChanged.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructTabbedPage(?children: ViewElement list, - ?barBackgroundColor: Xamarin.Forms.Color, - ?barTextColor: Xamarin.Forms.Color, - ?currentPage: int, - ?currentPageChanged: int option -> unit, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.TabbedPage -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildTabbedPage(0, - ?children=children, - ?barBackgroundColor=barBackgroundColor, - ?barTextColor=barTextColor, - ?currentPage=currentPage, - ?currentPageChanged=currentPageChanged, - ?title=title, - ?backgroundImage=backgroundImage, - ?icon=icon, - ?isBusy=isBusy, - ?padding=padding, - ?toolbarItems=toolbarItems, - ?useSafeArea=useSafeArea, - ?appearing=appearing, - ?disappearing=disappearing, - ?layoutChanged=layoutChanged, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncTabbedPage, ViewBuilders.UpdateFuncTabbedPage, attribBuilder) - - /// Builds the attributes for a ContentPage in the view - static member inline BuildContentPage(attribCount: int, - ?content: ViewElement, - ?onSizeAllocated: (double * double) -> unit, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match content with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match onSizeAllocated with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildPage(attribCount, ?title=title, ?backgroundImage=backgroundImage, ?icon=icon, ?isBusy=isBusy, ?padding=padding, ?toolbarItems=toolbarItems, ?useSafeArea=useSafeArea, ?appearing=appearing, ?disappearing=disappearing, ?layoutChanged=layoutChanged, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match content with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ContentAttribKey, (v)) - match onSizeAllocated with None -> () | Some v -> attribBuilder.Add(ViewAttributes.OnSizeAllocatedCallbackAttribKey, (fun f -> FSharp.Control.Handler<_>(fun _sender args -> f args))(v)) - attribBuilder - - static member val CreateFuncContentPage : (unit -> Xamarin.Forms.ContentPage) = (fun () -> ViewBuilders.CreateContentPage()) with get, set - - static member CreateContentPage () : Xamarin.Forms.ContentPage = - upcast (new Fabulous.DynamicViews.CustomContentPage()) - - static member val UpdateFuncContentPage = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ContentPage) -> ViewBuilders.UpdateContentPage (prevOpt, curr, target)) - - static member UpdateContentPage (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ContentPage) = - // update the inherited Page element - let baseElement = (if ViewProto.ProtoPage.IsNone then ViewProto.ProtoPage <- Some (ViewBuilders.ConstructPage())); ViewProto.ProtoPage.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevContentOpt = ValueNone - let mutable currContentOpt = ValueNone - let mutable prevOnSizeAllocatedCallbackOpt = ValueNone - let mutable currOnSizeAllocatedCallbackOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ContentAttribKey.KeyValue then - currContentOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.OnSizeAllocatedCallbackAttribKey.KeyValue then - currOnSizeAllocatedCallbackOpt <- ValueSome (kvp.Value :?> FSharp.Control.Handler<(double * double)>) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ContentAttribKey.KeyValue then - prevContentOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.OnSizeAllocatedCallbackAttribKey.KeyValue then - prevOnSizeAllocatedCallbackOpt <- ValueSome (kvp.Value :?> FSharp.Control.Handler<(double * double)>) - match prevContentOpt, currContentOpt with - // For structured objects, dependsOn on reference equality - | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () - | ValueSome prevValue, ValueSome newValue when canReuseChild prevValue newValue -> - newValue.UpdateIncremental(prevValue, target.Content) - | _, ValueSome newValue -> - target.Content <- (newValue.Create() :?> Xamarin.Forms.View) - | ValueSome _, ValueNone -> - target.Content <- null - | ValueNone, ValueNone -> () - updateOnSizeAllocated prevOnSizeAllocatedCallbackOpt currOnSizeAllocatedCallbackOpt target - - static member inline ConstructContentPage(?content: ViewElement, - ?onSizeAllocated: (double * double) -> unit, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ContentPage -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildContentPage(0, - ?content=content, - ?onSizeAllocated=onSizeAllocated, - ?title=title, - ?backgroundImage=backgroundImage, - ?icon=icon, - ?isBusy=isBusy, - ?padding=padding, - ?toolbarItems=toolbarItems, - ?useSafeArea=useSafeArea, - ?appearing=appearing, - ?disappearing=disappearing, - ?layoutChanged=layoutChanged, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncContentPage, ViewBuilders.UpdateFuncContentPage, attribBuilder) - - /// Builds the attributes for a MasterDetailPage in the view - static member inline BuildMasterDetailPage(attribCount: int, - ?master: ViewElement, - ?detail: ViewElement, - ?isGestureEnabled: bool, - ?isPresented: bool, - ?masterBehavior: Xamarin.Forms.MasterBehavior, - ?isPresentedChanged: bool -> unit, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match master with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match detail with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isGestureEnabled with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isPresented with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match masterBehavior with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isPresentedChanged with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildPage(attribCount, ?title=title, ?backgroundImage=backgroundImage, ?icon=icon, ?isBusy=isBusy, ?padding=padding, ?toolbarItems=toolbarItems, ?useSafeArea=useSafeArea, ?appearing=appearing, ?disappearing=disappearing, ?layoutChanged=layoutChanged, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match master with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MasterAttribKey, (v)) - match detail with None -> () | Some v -> attribBuilder.Add(ViewAttributes.DetailAttribKey, (v)) - match isGestureEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsGestureEnabledAttribKey, (v)) - match isPresented with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsPresentedAttribKey, (v)) - match masterBehavior with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MasterBehaviorAttribKey, (v)) - match isPresentedChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsPresentedChangedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (sender :?> Xamarin.Forms.MasterDetailPage).IsPresented))(v)) - attribBuilder - - static member val CreateFuncMasterDetailPage : (unit -> Xamarin.Forms.MasterDetailPage) = (fun () -> ViewBuilders.CreateMasterDetailPage()) with get, set - - static member CreateMasterDetailPage () : Xamarin.Forms.MasterDetailPage = - upcast (new Xamarin.Forms.MasterDetailPage()) - - static member val UpdateFuncMasterDetailPage = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.MasterDetailPage) -> ViewBuilders.UpdateMasterDetailPage (prevOpt, curr, target)) - - static member UpdateMasterDetailPage (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.MasterDetailPage) = - // update the inherited Page element - let baseElement = (if ViewProto.ProtoPage.IsNone then ViewProto.ProtoPage <- Some (ViewBuilders.ConstructPage())); ViewProto.ProtoPage.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevMasterOpt = ValueNone - let mutable currMasterOpt = ValueNone - let mutable prevDetailOpt = ValueNone - let mutable currDetailOpt = ValueNone - let mutable prevIsGestureEnabledOpt = ValueNone - let mutable currIsGestureEnabledOpt = ValueNone - let mutable prevIsPresentedOpt = ValueNone - let mutable currIsPresentedOpt = ValueNone - let mutable prevMasterBehaviorOpt = ValueNone - let mutable currMasterBehaviorOpt = ValueNone - let mutable prevIsPresentedChangedOpt = ValueNone - let mutable currIsPresentedChangedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.MasterAttribKey.KeyValue then - currMasterOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.DetailAttribKey.KeyValue then - currDetailOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.IsGestureEnabledAttribKey.KeyValue then - currIsGestureEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.IsPresentedAttribKey.KeyValue then - currIsPresentedOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.MasterBehaviorAttribKey.KeyValue then - currMasterBehaviorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.MasterBehavior) - if kvp.Key = ViewAttributes.IsPresentedChangedAttribKey.KeyValue then - currIsPresentedChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.MasterAttribKey.KeyValue then - prevMasterOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.DetailAttribKey.KeyValue then - prevDetailOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.IsGestureEnabledAttribKey.KeyValue then - prevIsGestureEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.IsPresentedAttribKey.KeyValue then - prevIsPresentedOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.MasterBehaviorAttribKey.KeyValue then - prevMasterBehaviorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.MasterBehavior) - if kvp.Key = ViewAttributes.IsPresentedChangedAttribKey.KeyValue then - prevIsPresentedChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevMasterOpt, currMasterOpt with - // For structured objects, dependsOn on reference equality - | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () - | ValueSome prevValue, ValueSome newValue when canReuseChild prevValue newValue -> - newValue.UpdateIncremental(prevValue, target.Master) - | _, ValueSome newValue -> - target.Master <- (newValue.Create() :?> Xamarin.Forms.Page) - | ValueSome _, ValueNone -> - target.Master <- null - | ValueNone, ValueNone -> () - match prevDetailOpt, currDetailOpt with - // For structured objects, dependsOn on reference equality - | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () - | ValueSome prevValue, ValueSome newValue when canReuseChild prevValue newValue -> - newValue.UpdateIncremental(prevValue, target.Detail) - | _, ValueSome newValue -> - target.Detail <- (newValue.Create() :?> Xamarin.Forms.Page) - | ValueSome _, ValueNone -> - target.Detail <- null - | ValueNone, ValueNone -> () - match prevIsGestureEnabledOpt, currIsGestureEnabledOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsGestureEnabled <- currValue - | ValueSome _, ValueNone -> target.IsGestureEnabled <- true - | ValueNone, ValueNone -> () - match prevIsPresentedOpt, currIsPresentedOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsPresented <- currValue - | ValueSome _, ValueNone -> target.IsPresented <- true - | ValueNone, ValueNone -> () - match prevMasterBehaviorOpt, currMasterBehaviorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.MasterBehavior <- currValue - | ValueSome _, ValueNone -> target.MasterBehavior <- Xamarin.Forms.MasterBehavior.Default - | ValueNone, ValueNone -> () - match prevIsPresentedChangedOpt, currIsPresentedChangedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.IsPresentedChanged.RemoveHandler(prevValue); target.IsPresentedChanged.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.IsPresentedChanged.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.IsPresentedChanged.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructMasterDetailPage(?master: ViewElement, - ?detail: ViewElement, - ?isGestureEnabled: bool, - ?isPresented: bool, - ?masterBehavior: Xamarin.Forms.MasterBehavior, - ?isPresentedChanged: bool -> unit, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.MasterDetailPage -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildMasterDetailPage(0, - ?master=master, - ?detail=detail, - ?isGestureEnabled=isGestureEnabled, - ?isPresented=isPresented, - ?masterBehavior=masterBehavior, - ?isPresentedChanged=isPresentedChanged, - ?title=title, - ?backgroundImage=backgroundImage, - ?icon=icon, - ?isBusy=isBusy, - ?padding=padding, - ?toolbarItems=toolbarItems, - ?useSafeArea=useSafeArea, - ?appearing=appearing, - ?disappearing=disappearing, - ?layoutChanged=layoutChanged, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncMasterDetailPage, ViewBuilders.UpdateFuncMasterDetailPage, attribBuilder) - - /// Builds the attributes for a MenuItem in the view - static member inline BuildMenuItem(attribCount: int, - ?text: string, - ?command: unit -> unit, - ?icon: string, - ?accelerator: string, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match text with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match command with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match icon with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match accelerator with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match text with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextAttribKey, (v)) - match command with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CommandAttribKey, makeCommand(v)) - match icon with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IconAttribKey, (v)) - match accelerator with None -> () | Some v -> attribBuilder.Add(ViewAttributes.AcceleratorAttribKey, (v)) - attribBuilder - - static member val CreateFuncMenuItem : (unit -> Xamarin.Forms.MenuItem) = (fun () -> ViewBuilders.CreateMenuItem()) with get, set - - static member CreateMenuItem () : Xamarin.Forms.MenuItem = - upcast (new Xamarin.Forms.MenuItem()) - - static member val UpdateFuncMenuItem = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.MenuItem) -> ViewBuilders.UpdateMenuItem (prevOpt, curr, target)) - - static member UpdateMenuItem (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.MenuItem) = - // update the inherited Element element - let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevTextOpt = ValueNone - let mutable currTextOpt = ValueNone - let mutable prevCommandOpt = ValueNone - let mutable currCommandOpt = ValueNone - let mutable prevIconOpt = ValueNone - let mutable currIconOpt = ValueNone - let mutable prevAcceleratorOpt = ValueNone - let mutable currAcceleratorOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - currTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then - currCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.IconAttribKey.KeyValue then - currIconOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.AcceleratorAttribKey.KeyValue then - currAcceleratorOpt <- ValueSome (kvp.Value :?> string) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - prevTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then - prevCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.IconAttribKey.KeyValue then - prevIconOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.AcceleratorAttribKey.KeyValue then - prevAcceleratorOpt <- ValueSome (kvp.Value :?> string) - match prevTextOpt, currTextOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Text <- currValue - | ValueSome _, ValueNone -> target.Text <- null - | ValueNone, ValueNone -> () - match prevCommandOpt, currCommandOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Command <- currValue - | ValueSome _, ValueNone -> target.Command <- null - | ValueNone, ValueNone -> () - match prevIconOpt, currIconOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Icon <- makeFileImageSource currValue - | ValueSome _, ValueNone -> target.Icon <- null - | ValueNone, ValueNone -> () - updateAccelerator prevAcceleratorOpt currAcceleratorOpt target - - static member inline ConstructMenuItem(?text: string, - ?command: unit -> unit, - ?icon: string, - ?accelerator: string, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.MenuItem -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildMenuItem(0, - ?text=text, - ?command=command, - ?icon=icon, - ?accelerator=accelerator, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncMenuItem, ViewBuilders.UpdateFuncMenuItem, attribBuilder) - - /// Builds the attributes for a TextCell in the view - static member inline BuildTextCell(attribCount: int, - ?text: string, - ?detail: string, - ?textColor: Xamarin.Forms.Color, - ?detailColor: Xamarin.Forms.Color, - ?command: unit -> unit, - ?canExecute: bool, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match text with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match detail with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match textColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match detailColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match command with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match canExecute with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildCell(attribCount, ?height=height, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match text with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextAttribKey, (v)) - match detail with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextDetailAttribKey, (v)) - match textColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextColorAttribKey, (v)) - match detailColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextDetailColorAttribKey, (v)) - match command with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextCellCommandAttribKey, (v)) - match canExecute with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextCellCanExecuteAttribKey, (v)) - attribBuilder - - static member val CreateFuncTextCell : (unit -> Xamarin.Forms.TextCell) = (fun () -> ViewBuilders.CreateTextCell()) with get, set - - static member CreateTextCell () : Xamarin.Forms.TextCell = - upcast (new Xamarin.Forms.TextCell()) - - static member val UpdateFuncTextCell = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.TextCell) -> ViewBuilders.UpdateTextCell (prevOpt, curr, target)) - - static member UpdateTextCell (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.TextCell) = - // update the inherited Cell element - let baseElement = (if ViewProto.ProtoCell.IsNone then ViewProto.ProtoCell <- Some (ViewBuilders.ConstructCell())); ViewProto.ProtoCell.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevTextOpt = ValueNone - let mutable currTextOpt = ValueNone - let mutable prevTextDetailOpt = ValueNone - let mutable currTextDetailOpt = ValueNone - let mutable prevTextColorOpt = ValueNone - let mutable currTextColorOpt = ValueNone - let mutable prevTextDetailColorOpt = ValueNone - let mutable currTextDetailColorOpt = ValueNone - let mutable prevTextCellCommandOpt = ValueNone - let mutable currTextCellCommandOpt = ValueNone - let mutable prevTextCellCanExecuteOpt = ValueNone - let mutable currTextCellCanExecuteOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - currTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.TextDetailAttribKey.KeyValue then - currTextDetailOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - currTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.TextDetailColorAttribKey.KeyValue then - currTextDetailColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.TextCellCommandAttribKey.KeyValue then - currTextCellCommandOpt <- ValueSome (kvp.Value :?> unit -> unit) - if kvp.Key = ViewAttributes.TextCellCanExecuteAttribKey.KeyValue then - currTextCellCanExecuteOpt <- ValueSome (kvp.Value :?> bool) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.TextAttribKey.KeyValue then - prevTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.TextDetailAttribKey.KeyValue then - prevTextDetailOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.TextColorAttribKey.KeyValue then - prevTextColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.TextDetailColorAttribKey.KeyValue then - prevTextDetailColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.TextCellCommandAttribKey.KeyValue then - prevTextCellCommandOpt <- ValueSome (kvp.Value :?> unit -> unit) - if kvp.Key = ViewAttributes.TextCellCanExecuteAttribKey.KeyValue then - prevTextCellCanExecuteOpt <- ValueSome (kvp.Value :?> bool) - match prevTextOpt, currTextOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Text <- currValue - | ValueSome _, ValueNone -> target.Text <- null - | ValueNone, ValueNone -> () - match prevTextDetailOpt, currTextDetailOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Detail <- currValue - | ValueSome _, ValueNone -> target.Detail <- null - | ValueNone, ValueNone -> () - match prevTextColorOpt, currTextColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.TextColor <- currValue - | ValueSome _, ValueNone -> target.TextColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevTextDetailColorOpt, currTextDetailColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.DetailColor <- currValue - | ValueSome _, ValueNone -> target.DetailColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - (fun _ _ _ -> ()) prevTextCellCommandOpt currTextCellCommandOpt target - updateCommand prevTextCellCommandOpt currTextCellCommandOpt (fun _target -> ()) (fun (target: Xamarin.Forms.TextCell) cmd -> target.Command <- cmd) prevTextCellCanExecuteOpt currTextCellCanExecuteOpt target - - static member inline ConstructTextCell(?text: string, - ?detail: string, - ?textColor: Xamarin.Forms.Color, - ?detailColor: Xamarin.Forms.Color, - ?command: unit -> unit, - ?canExecute: bool, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.TextCell -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildTextCell(0, - ?text=text, - ?detail=detail, - ?textColor=textColor, - ?detailColor=detailColor, - ?command=command, - ?canExecute=canExecute, - ?height=height, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncTextCell, ViewBuilders.UpdateFuncTextCell, attribBuilder) - - /// Builds the attributes for a ToolbarItem in the view - static member inline BuildToolbarItem(attribCount: int, - ?order: Xamarin.Forms.ToolbarItemOrder, - ?priority: int, - ?text: string, - ?command: unit -> unit, - ?icon: string, - ?accelerator: string, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match order with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match priority with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildMenuItem(attribCount, ?text=text, ?command=command, ?icon=icon, ?accelerator=accelerator, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match order with None -> () | Some v -> attribBuilder.Add(ViewAttributes.OrderAttribKey, (v)) - match priority with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PriorityAttribKey, (v)) - attribBuilder - - static member val CreateFuncToolbarItem : (unit -> Xamarin.Forms.ToolbarItem) = (fun () -> ViewBuilders.CreateToolbarItem()) with get, set - - static member CreateToolbarItem () : Xamarin.Forms.ToolbarItem = - upcast (new Xamarin.Forms.ToolbarItem()) - - static member val UpdateFuncToolbarItem = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ToolbarItem) -> ViewBuilders.UpdateToolbarItem (prevOpt, curr, target)) - - static member UpdateToolbarItem (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ToolbarItem) = - // update the inherited MenuItem element - let baseElement = (if ViewProto.ProtoMenuItem.IsNone then ViewProto.ProtoMenuItem <- Some (ViewBuilders.ConstructMenuItem())); ViewProto.ProtoMenuItem.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevOrderOpt = ValueNone - let mutable currOrderOpt = ValueNone - let mutable prevPriorityOpt = ValueNone - let mutable currPriorityOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.OrderAttribKey.KeyValue then - currOrderOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ToolbarItemOrder) - if kvp.Key = ViewAttributes.PriorityAttribKey.KeyValue then - currPriorityOpt <- ValueSome (kvp.Value :?> int) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.OrderAttribKey.KeyValue then - prevOrderOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ToolbarItemOrder) - if kvp.Key = ViewAttributes.PriorityAttribKey.KeyValue then - prevPriorityOpt <- ValueSome (kvp.Value :?> int) - match prevOrderOpt, currOrderOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Order <- currValue - | ValueSome _, ValueNone -> target.Order <- Xamarin.Forms.ToolbarItemOrder.Default - | ValueNone, ValueNone -> () - match prevPriorityOpt, currPriorityOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Priority <- currValue - | ValueSome _, ValueNone -> target.Priority <- 0 - | ValueNone, ValueNone -> () - - static member inline ConstructToolbarItem(?order: Xamarin.Forms.ToolbarItemOrder, - ?priority: int, - ?text: string, - ?command: unit -> unit, - ?icon: string, - ?accelerator: string, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ToolbarItem -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildToolbarItem(0, - ?order=order, - ?priority=priority, - ?text=text, - ?command=command, - ?icon=icon, - ?accelerator=accelerator, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncToolbarItem, ViewBuilders.UpdateFuncToolbarItem, attribBuilder) - - /// Builds the attributes for a ImageCell in the view - static member inline BuildImageCell(attribCount: int, - ?imageSource: obj, - ?text: string, - ?detail: string, - ?textColor: Xamarin.Forms.Color, - ?detailColor: Xamarin.Forms.Color, - ?command: unit -> unit, - ?canExecute: bool, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match imageSource with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildTextCell(attribCount, ?text=text, ?detail=detail, ?textColor=textColor, ?detailColor=detailColor, ?command=command, ?canExecute=canExecute, ?height=height, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match imageSource with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ImageSourceAttribKey, (v)) - attribBuilder - - static member val CreateFuncImageCell : (unit -> Xamarin.Forms.ImageCell) = (fun () -> ViewBuilders.CreateImageCell()) with get, set - - static member CreateImageCell () : Xamarin.Forms.ImageCell = - upcast (new Xamarin.Forms.ImageCell()) - - static member val UpdateFuncImageCell = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ImageCell) -> ViewBuilders.UpdateImageCell (prevOpt, curr, target)) - - static member UpdateImageCell (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ImageCell) = - // update the inherited TextCell element - let baseElement = (if ViewProto.ProtoTextCell.IsNone then ViewProto.ProtoTextCell <- Some (ViewBuilders.ConstructTextCell())); ViewProto.ProtoTextCell.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevImageSourceOpt = ValueNone - let mutable currImageSourceOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ImageSourceAttribKey.KeyValue then - currImageSourceOpt <- ValueSome (kvp.Value :?> obj) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ImageSourceAttribKey.KeyValue then - prevImageSourceOpt <- ValueSome (kvp.Value :?> obj) - match prevImageSourceOpt, currImageSourceOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ImageSource <- makeImageSource currValue - | ValueSome _, ValueNone -> target.ImageSource <- null - | ValueNone, ValueNone -> () - - static member inline ConstructImageCell(?imageSource: obj, - ?text: string, - ?detail: string, - ?textColor: Xamarin.Forms.Color, - ?detailColor: Xamarin.Forms.Color, - ?command: unit -> unit, - ?canExecute: bool, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ImageCell -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildImageCell(0, - ?imageSource=imageSource, - ?text=text, - ?detail=detail, - ?textColor=textColor, - ?detailColor=detailColor, - ?command=command, - ?canExecute=canExecute, - ?height=height, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncImageCell, ViewBuilders.UpdateFuncImageCell, attribBuilder) - - /// Builds the attributes for a ViewCell in the view - static member inline BuildViewCell(attribCount: int, - ?view: ViewElement, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match view with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildCell(attribCount, ?height=height, ?isEnabled=isEnabled, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match view with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ViewAttribKey, (v)) - attribBuilder - - static member val CreateFuncViewCell : (unit -> Xamarin.Forms.ViewCell) = (fun () -> ViewBuilders.CreateViewCell()) with get, set - - static member CreateViewCell () : Xamarin.Forms.ViewCell = - upcast (new Xamarin.Forms.ViewCell()) - - static member val UpdateFuncViewCell = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ViewCell) -> ViewBuilders.UpdateViewCell (prevOpt, curr, target)) - - static member UpdateViewCell (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ViewCell) = - // update the inherited Cell element - let baseElement = (if ViewProto.ProtoCell.IsNone then ViewProto.ProtoCell <- Some (ViewBuilders.ConstructCell())); ViewProto.ProtoCell.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevViewOpt = ValueNone - let mutable currViewOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ViewAttribKey.KeyValue then - currViewOpt <- ValueSome (kvp.Value :?> ViewElement) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ViewAttribKey.KeyValue then - prevViewOpt <- ValueSome (kvp.Value :?> ViewElement) - match prevViewOpt, currViewOpt with - // For structured objects, dependsOn on reference equality - | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () - | ValueSome prevValue, ValueSome newValue when canReuseChild prevValue newValue -> - newValue.UpdateIncremental(prevValue, target.View) - | _, ValueSome newValue -> - target.View <- (newValue.Create() :?> Xamarin.Forms.View) - | ValueSome _, ValueNone -> - target.View <- null - | ValueNone, ValueNone -> () - - static member inline ConstructViewCell(?view: ViewElement, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ViewCell -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildViewCell(0, - ?view=view, - ?height=height, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncViewCell, ViewBuilders.UpdateFuncViewCell, attribBuilder) - - /// Builds the attributes for a ListView in the view - static member inline BuildListView(attribCount: int, - ?items: seq, - ?footer: System.Object, - ?hasUnevenRows: bool, - ?header: System.Object, - ?headerTemplate: Xamarin.Forms.DataTemplate, - ?isGroupingEnabled: bool, - ?isPullToRefreshEnabled: bool, - ?isRefreshing: bool, - ?refreshCommand: unit -> unit, - ?rowHeight: int, - ?selectedItem: int option, - ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, - ?separatorColor: Xamarin.Forms.Color, - ?itemAppearing: int -> unit, - ?itemDisappearing: int -> unit, - ?itemSelected: int option -> unit, - ?itemTapped: int -> unit, - ?refreshing: unit -> unit, - ?selectionMode: Xamarin.Forms.ListViewSelectionMode, - ?horizontalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, - ?verticalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, - ?refreshControlColor: Xamarin.Forms.Color, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match items with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match footer with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match hasUnevenRows with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match header with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match headerTemplate with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isGroupingEnabled with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isPullToRefreshEnabled with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isRefreshing with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match refreshCommand with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match rowHeight with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match selectedItem with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match separatorVisibility with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match separatorColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match itemAppearing with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match itemDisappearing with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match itemSelected with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match itemTapped with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match refreshing with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match selectionMode with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match horizontalScrollBarVisibility with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match verticalScrollBarVisibility with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match refreshControlColor with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListViewItemsAttribKey, (v)) - match footer with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FooterAttribKey, (v)) - match hasUnevenRows with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HasUnevenRowsAttribKey, (v)) - match header with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HeaderAttribKey, (v)) - match headerTemplate with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HeaderTemplateAttribKey, (v)) - match isGroupingEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsGroupingEnabledAttribKey, (v)) - match isPullToRefreshEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsPullToRefreshEnabledAttribKey, (v)) - match isRefreshing with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsRefreshingAttribKey, (v)) - match refreshCommand with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RefreshCommandAttribKey, makeCommand(v)) - match rowHeight with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RowHeightAttribKey, (v)) - match selectedItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListView_SelectedItemAttribKey, (v)) - match separatorVisibility with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListView_SeparatorVisibilityAttribKey, (v)) - match separatorColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListView_SeparatorColorAttribKey, (v)) - match itemAppearing with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListView_ItemAppearingAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindListViewItem sender args.Item).Value))(v)) - match itemDisappearing with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListView_ItemDisappearingAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindListViewItem sender args.Item).Value))(v)) - match itemSelected with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListView_ItemSelectedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindListViewItem sender args.SelectedItem)))(v)) - match itemTapped with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListView_ItemTappedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindListViewItem sender args.Item).Value))(v)) - match refreshing with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListView_RefreshingAttribKey, (fun f -> System.EventHandler(fun sender args -> f ()))(v)) - match selectionMode with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionModeAttribKey, (v)) - match horizontalScrollBarVisibility with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HorizontalScrollBarVisibilityAttribKey, (v)) - match verticalScrollBarVisibility with None -> () | Some v -> attribBuilder.Add(ViewAttributes.VerticalScrollBarVisibilityAttribKey, (v)) - match refreshControlColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RefreshControlColorAttribKey, (v)) - attribBuilder - - static member val CreateFuncListView : (unit -> Xamarin.Forms.ListView) = (fun () -> ViewBuilders.CreateListView()) with get, set - - static member CreateListView () : Xamarin.Forms.ListView = - upcast (new Fabulous.DynamicViews.CustomListView()) - - static member val UpdateFuncListView = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ListView) -> ViewBuilders.UpdateListView (prevOpt, curr, target)) - - static member UpdateListView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ListView) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevListViewItemsOpt = ValueNone - let mutable currListViewItemsOpt = ValueNone - let mutable prevFooterOpt = ValueNone - let mutable currFooterOpt = ValueNone - let mutable prevHasUnevenRowsOpt = ValueNone - let mutable currHasUnevenRowsOpt = ValueNone - let mutable prevHeaderOpt = ValueNone - let mutable currHeaderOpt = ValueNone - let mutable prevHeaderTemplateOpt = ValueNone - let mutable currHeaderTemplateOpt = ValueNone - let mutable prevIsGroupingEnabledOpt = ValueNone - let mutable currIsGroupingEnabledOpt = ValueNone - let mutable prevIsPullToRefreshEnabledOpt = ValueNone - let mutable currIsPullToRefreshEnabledOpt = ValueNone - let mutable prevIsRefreshingOpt = ValueNone - let mutable currIsRefreshingOpt = ValueNone - let mutable prevRefreshCommandOpt = ValueNone - let mutable currRefreshCommandOpt = ValueNone - let mutable prevRowHeightOpt = ValueNone - let mutable currRowHeightOpt = ValueNone - let mutable prevListView_SelectedItemOpt = ValueNone - let mutable currListView_SelectedItemOpt = ValueNone - let mutable prevListView_SeparatorVisibilityOpt = ValueNone - let mutable currListView_SeparatorVisibilityOpt = ValueNone - let mutable prevListView_SeparatorColorOpt = ValueNone - let mutable currListView_SeparatorColorOpt = ValueNone - let mutable prevListView_ItemAppearingOpt = ValueNone - let mutable currListView_ItemAppearingOpt = ValueNone - let mutable prevListView_ItemDisappearingOpt = ValueNone - let mutable currListView_ItemDisappearingOpt = ValueNone - let mutable prevListView_ItemSelectedOpt = ValueNone - let mutable currListView_ItemSelectedOpt = ValueNone - let mutable prevListView_ItemTappedOpt = ValueNone - let mutable currListView_ItemTappedOpt = ValueNone - let mutable prevListView_RefreshingOpt = ValueNone - let mutable currListView_RefreshingOpt = ValueNone - let mutable prevSelectionModeOpt = ValueNone - let mutable currSelectionModeOpt = ValueNone - let mutable prevHorizontalScrollBarVisibilityOpt = ValueNone - let mutable currHorizontalScrollBarVisibilityOpt = ValueNone - let mutable prevVerticalScrollBarVisibilityOpt = ValueNone - let mutable currVerticalScrollBarVisibilityOpt = ValueNone - let mutable prevRefreshControlColorOpt = ValueNone - let mutable currRefreshControlColorOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ListViewItemsAttribKey.KeyValue then - currListViewItemsOpt <- ValueSome (kvp.Value :?> seq) - if kvp.Key = ViewAttributes.FooterAttribKey.KeyValue then - currFooterOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.HasUnevenRowsAttribKey.KeyValue then - currHasUnevenRowsOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.HeaderAttribKey.KeyValue then - currHeaderOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.HeaderTemplateAttribKey.KeyValue then - currHeaderTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) - if kvp.Key = ViewAttributes.IsGroupingEnabledAttribKey.KeyValue then - currIsGroupingEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.IsPullToRefreshEnabledAttribKey.KeyValue then - currIsPullToRefreshEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.IsRefreshingAttribKey.KeyValue then - currIsRefreshingOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.RefreshCommandAttribKey.KeyValue then - currRefreshCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.RowHeightAttribKey.KeyValue then - currRowHeightOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.ListView_SelectedItemAttribKey.KeyValue then - currListView_SelectedItemOpt <- ValueSome (kvp.Value :?> int option) - if kvp.Key = ViewAttributes.ListView_SeparatorVisibilityAttribKey.KeyValue then - currListView_SeparatorVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SeparatorVisibility) - if kvp.Key = ViewAttributes.ListView_SeparatorColorAttribKey.KeyValue then - currListView_SeparatorColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.ListView_ItemAppearingAttribKey.KeyValue then - currListView_ItemAppearingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ListView_ItemDisappearingAttribKey.KeyValue then - currListView_ItemDisappearingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ListView_ItemSelectedAttribKey.KeyValue then - currListView_ItemSelectedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ListView_ItemTappedAttribKey.KeyValue then - currListView_ItemTappedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ListView_RefreshingAttribKey.KeyValue then - currListView_RefreshingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.SelectionModeAttribKey.KeyValue then - currSelectionModeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ListViewSelectionMode) - if kvp.Key = ViewAttributes.HorizontalScrollBarVisibilityAttribKey.KeyValue then - currHorizontalScrollBarVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ScrollBarVisibility) - if kvp.Key = ViewAttributes.VerticalScrollBarVisibilityAttribKey.KeyValue then - currVerticalScrollBarVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ScrollBarVisibility) - if kvp.Key = ViewAttributes.RefreshControlColorAttribKey.KeyValue then - currRefreshControlColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ListViewItemsAttribKey.KeyValue then - prevListViewItemsOpt <- ValueSome (kvp.Value :?> seq) - if kvp.Key = ViewAttributes.FooterAttribKey.KeyValue then - prevFooterOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.HasUnevenRowsAttribKey.KeyValue then - prevHasUnevenRowsOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.HeaderAttribKey.KeyValue then - prevHeaderOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.HeaderTemplateAttribKey.KeyValue then - prevHeaderTemplateOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.DataTemplate) - if kvp.Key = ViewAttributes.IsGroupingEnabledAttribKey.KeyValue then - prevIsGroupingEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.IsPullToRefreshEnabledAttribKey.KeyValue then - prevIsPullToRefreshEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.IsRefreshingAttribKey.KeyValue then - prevIsRefreshingOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.RefreshCommandAttribKey.KeyValue then - prevRefreshCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.RowHeightAttribKey.KeyValue then - prevRowHeightOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.ListView_SelectedItemAttribKey.KeyValue then - prevListView_SelectedItemOpt <- ValueSome (kvp.Value :?> int option) - if kvp.Key = ViewAttributes.ListView_SeparatorVisibilityAttribKey.KeyValue then - prevListView_SeparatorVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SeparatorVisibility) - if kvp.Key = ViewAttributes.ListView_SeparatorColorAttribKey.KeyValue then - prevListView_SeparatorColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.ListView_ItemAppearingAttribKey.KeyValue then - prevListView_ItemAppearingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ListView_ItemDisappearingAttribKey.KeyValue then - prevListView_ItemDisappearingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ListView_ItemSelectedAttribKey.KeyValue then - prevListView_ItemSelectedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ListView_ItemTappedAttribKey.KeyValue then - prevListView_ItemTappedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ListView_RefreshingAttribKey.KeyValue then - prevListView_RefreshingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.SelectionModeAttribKey.KeyValue then - prevSelectionModeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ListViewSelectionMode) - if kvp.Key = ViewAttributes.HorizontalScrollBarVisibilityAttribKey.KeyValue then - prevHorizontalScrollBarVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ScrollBarVisibility) - if kvp.Key = ViewAttributes.VerticalScrollBarVisibilityAttribKey.KeyValue then - prevVerticalScrollBarVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ScrollBarVisibility) - if kvp.Key = ViewAttributes.RefreshControlColorAttribKey.KeyValue then - prevRefreshControlColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - updateListViewItems prevListViewItemsOpt currListViewItemsOpt target - match prevFooterOpt, currFooterOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Footer <- currValue - | ValueSome _, ValueNone -> target.Footer <- null - | ValueNone, ValueNone -> () - match prevHasUnevenRowsOpt, currHasUnevenRowsOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.HasUnevenRows <- currValue - | ValueSome _, ValueNone -> target.HasUnevenRows <- false - | ValueNone, ValueNone -> () - match prevHeaderOpt, currHeaderOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Header <- currValue - | ValueSome _, ValueNone -> target.Header <- null - | ValueNone, ValueNone -> () - match prevHeaderTemplateOpt, currHeaderTemplateOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.HeaderTemplate <- currValue - | ValueSome _, ValueNone -> target.HeaderTemplate <- null - | ValueNone, ValueNone -> () - match prevIsGroupingEnabledOpt, currIsGroupingEnabledOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsGroupingEnabled <- currValue - | ValueSome _, ValueNone -> target.IsGroupingEnabled <- false - | ValueNone, ValueNone -> () - match prevIsPullToRefreshEnabledOpt, currIsPullToRefreshEnabledOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsPullToRefreshEnabled <- currValue - | ValueSome _, ValueNone -> target.IsPullToRefreshEnabled <- false - | ValueNone, ValueNone -> () - match prevIsRefreshingOpt, currIsRefreshingOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsRefreshing <- currValue - | ValueSome _, ValueNone -> target.IsRefreshing <- false - | ValueNone, ValueNone -> () - match prevRefreshCommandOpt, currRefreshCommandOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.RefreshCommand <- currValue - | ValueSome _, ValueNone -> target.RefreshCommand <- null - | ValueNone, ValueNone -> () - match prevRowHeightOpt, currRowHeightOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.RowHeight <- currValue - | ValueSome _, ValueNone -> target.RowHeight <- -1 - | ValueNone, ValueNone -> () - match prevListView_SelectedItemOpt, currListView_SelectedItemOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.SelectedItem <- (function None -> null | Some i -> let items = target.ItemsSource :?> System.Collections.Generic.IList in if i >= 0 && i < items.Count then items.[i] else null) currValue - | ValueSome _, ValueNone -> target.SelectedItem <- null - | ValueNone, ValueNone -> () - match prevListView_SeparatorVisibilityOpt, currListView_SeparatorVisibilityOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.SeparatorVisibility <- currValue - | ValueSome _, ValueNone -> target.SeparatorVisibility <- Xamarin.Forms.SeparatorVisibility.Default - | ValueNone, ValueNone -> () - match prevListView_SeparatorColorOpt, currListView_SeparatorColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.SeparatorColor <- currValue - | ValueSome _, ValueNone -> target.SeparatorColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevListView_ItemAppearingOpt, currListView_ItemAppearingOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.ItemAppearing.RemoveHandler(prevValue); target.ItemAppearing.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.ItemAppearing.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.ItemAppearing.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevListView_ItemDisappearingOpt, currListView_ItemDisappearingOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.ItemDisappearing.RemoveHandler(prevValue); target.ItemDisappearing.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.ItemDisappearing.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.ItemDisappearing.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevListView_ItemSelectedOpt, currListView_ItemSelectedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.ItemSelected.RemoveHandler(prevValue); target.ItemSelected.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.ItemSelected.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.ItemSelected.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevListView_ItemTappedOpt, currListView_ItemTappedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.ItemTapped.RemoveHandler(prevValue); target.ItemTapped.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.ItemTapped.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.ItemTapped.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevListView_RefreshingOpt, currListView_RefreshingOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Refreshing.RemoveHandler(prevValue); target.Refreshing.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Refreshing.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Refreshing.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevSelectionModeOpt, currSelectionModeOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.SelectionMode <- currValue - | ValueSome _, ValueNone -> target.SelectionMode <- Xamarin.Forms.ListViewSelectionMode.Single - | ValueNone, ValueNone -> () - match prevHorizontalScrollBarVisibilityOpt, currHorizontalScrollBarVisibilityOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.HorizontalScrollBarVisibility <- currValue - | ValueSome _, ValueNone -> target.HorizontalScrollBarVisibility <- Xamarin.Forms.ScrollBarVisibility.Default - | ValueNone, ValueNone -> () - match prevVerticalScrollBarVisibilityOpt, currVerticalScrollBarVisibilityOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.VerticalScrollBarVisibility <- currValue - | ValueSome _, ValueNone -> target.VerticalScrollBarVisibility <- Xamarin.Forms.ScrollBarVisibility.Default - | ValueNone, ValueNone -> () - match prevRefreshControlColorOpt, currRefreshControlColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.RefreshControlColor <- currValue - | ValueSome _, ValueNone -> target.RefreshControlColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - - static member inline ConstructListView(?items: seq, - ?footer: System.Object, - ?hasUnevenRows: bool, - ?header: System.Object, - ?headerTemplate: Xamarin.Forms.DataTemplate, - ?isGroupingEnabled: bool, - ?isPullToRefreshEnabled: bool, - ?isRefreshing: bool, - ?refreshCommand: unit -> unit, - ?rowHeight: int, - ?selectedItem: int option, - ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, - ?separatorColor: Xamarin.Forms.Color, - ?itemAppearing: int -> unit, - ?itemDisappearing: int -> unit, - ?itemSelected: int option -> unit, - ?itemTapped: int -> unit, - ?refreshing: unit -> unit, - ?selectionMode: Xamarin.Forms.ListViewSelectionMode, - ?horizontalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, - ?verticalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, - ?refreshControlColor: Xamarin.Forms.Color, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ListView -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildListView(0, - ?items=items, - ?footer=footer, - ?hasUnevenRows=hasUnevenRows, - ?header=header, - ?headerTemplate=headerTemplate, - ?isGroupingEnabled=isGroupingEnabled, - ?isPullToRefreshEnabled=isPullToRefreshEnabled, - ?isRefreshing=isRefreshing, - ?refreshCommand=refreshCommand, - ?rowHeight=rowHeight, - ?selectedItem=selectedItem, - ?separatorVisibility=separatorVisibility, - ?separatorColor=separatorColor, - ?itemAppearing=itemAppearing, - ?itemDisappearing=itemDisappearing, - ?itemSelected=itemSelected, - ?itemTapped=itemTapped, - ?refreshing=refreshing, - ?selectionMode=selectionMode, - ?horizontalScrollBarVisibility=horizontalScrollBarVisibility, - ?verticalScrollBarVisibility=verticalScrollBarVisibility, - ?refreshControlColor=refreshControlColor, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncListView, ViewBuilders.UpdateFuncListView, attribBuilder) - - /// Builds the attributes for a ListViewGrouped in the view - static member inline BuildListViewGrouped(attribCount: int, - ?items: (string * ViewElement * ViewElement list) list, - ?showJumpList: bool, - ?footer: System.Object, - ?hasUnevenRows: bool, - ?header: System.Object, - ?isPullToRefreshEnabled: bool, - ?isRefreshing: bool, - ?refreshCommand: unit -> unit, - ?rowHeight: int, - ?selectedItem: (int * int) option, - ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, - ?separatorColor: Xamarin.Forms.Color, - ?itemAppearing: int * int option -> unit, - ?itemDisappearing: int * int option -> unit, - ?itemSelected: (int * int) option -> unit, - ?itemTapped: int * int -> unit, - ?refreshing: unit -> unit, - ?selectionMode: Xamarin.Forms.ListViewSelectionMode, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match items with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match showJumpList with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match footer with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match hasUnevenRows with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match header with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isPullToRefreshEnabled with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isRefreshing with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match refreshCommand with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match rowHeight with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match selectedItem with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match separatorVisibility with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match separatorColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match itemAppearing with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match itemDisappearing with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match itemSelected with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match itemTapped with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match refreshing with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match selectionMode with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListViewGrouped_ItemsSourceAttribKey, (fun es -> es |> Array.ofList |> Array.map (fun (g, e, l) -> (g, e, Array.ofList l)))(v)) - match showJumpList with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListViewGrouped_ShowJumpListAttribKey, (v)) - match footer with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FooterAttribKey, (v)) - match hasUnevenRows with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HasUnevenRowsAttribKey, (v)) - match header with None -> () | Some v -> attribBuilder.Add(ViewAttributes.HeaderAttribKey, (v)) - match isPullToRefreshEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsPullToRefreshEnabledAttribKey, (v)) - match isRefreshing with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsRefreshingAttribKey, (v)) - match refreshCommand with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RefreshCommandAttribKey, makeCommand(v)) - match rowHeight with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RowHeightAttribKey, (v)) - match selectedItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListViewGrouped_SelectedItemAttribKey, (v)) - match separatorVisibility with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SeparatorVisibilityAttribKey, (v)) - match separatorColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SeparatorColorAttribKey, (v)) - match itemAppearing with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListViewGrouped_ItemAppearingAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindGroupedListViewItemOrGroupItem sender args.Item).Value))(v)) - match itemDisappearing with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListViewGrouped_ItemDisappearingAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindGroupedListViewItemOrGroupItem sender args.Item).Value))(v)) - match itemSelected with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListViewGrouped_ItemSelectedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindGroupedListViewItem sender args.SelectedItem)))(v)) - match itemTapped with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ListViewGrouped_ItemTappedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindGroupedListViewItem sender args.Item).Value))(v)) - match refreshing with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RefreshingAttribKey, (fun f -> System.EventHandler(fun sender args -> f ()))(v)) - match selectionMode with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionModeAttribKey, (v)) - attribBuilder - - static member val CreateFuncListViewGrouped : (unit -> Xamarin.Forms.ListView) = (fun () -> ViewBuilders.CreateListViewGrouped()) with get, set - - static member CreateListViewGrouped () : Xamarin.Forms.ListView = - upcast (new Fabulous.DynamicViews.CustomGroupListView()) - - static member val UpdateFuncListViewGrouped = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ListView) -> ViewBuilders.UpdateListViewGrouped (prevOpt, curr, target)) - - static member UpdateListViewGrouped (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ListView) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevListViewGrouped_ItemsSourceOpt = ValueNone - let mutable currListViewGrouped_ItemsSourceOpt = ValueNone - let mutable prevListViewGrouped_ShowJumpListOpt = ValueNone - let mutable currListViewGrouped_ShowJumpListOpt = ValueNone - let mutable prevFooterOpt = ValueNone - let mutable currFooterOpt = ValueNone - let mutable prevHasUnevenRowsOpt = ValueNone - let mutable currHasUnevenRowsOpt = ValueNone - let mutable prevHeaderOpt = ValueNone - let mutable currHeaderOpt = ValueNone - let mutable prevIsPullToRefreshEnabledOpt = ValueNone - let mutable currIsPullToRefreshEnabledOpt = ValueNone - let mutable prevIsRefreshingOpt = ValueNone - let mutable currIsRefreshingOpt = ValueNone - let mutable prevRefreshCommandOpt = ValueNone - let mutable currRefreshCommandOpt = ValueNone - let mutable prevRowHeightOpt = ValueNone - let mutable currRowHeightOpt = ValueNone - let mutable prevListViewGrouped_SelectedItemOpt = ValueNone - let mutable currListViewGrouped_SelectedItemOpt = ValueNone - let mutable prevSeparatorVisibilityOpt = ValueNone - let mutable currSeparatorVisibilityOpt = ValueNone - let mutable prevSeparatorColorOpt = ValueNone - let mutable currSeparatorColorOpt = ValueNone - let mutable prevListViewGrouped_ItemAppearingOpt = ValueNone - let mutable currListViewGrouped_ItemAppearingOpt = ValueNone - let mutable prevListViewGrouped_ItemDisappearingOpt = ValueNone - let mutable currListViewGrouped_ItemDisappearingOpt = ValueNone - let mutable prevListViewGrouped_ItemSelectedOpt = ValueNone - let mutable currListViewGrouped_ItemSelectedOpt = ValueNone - let mutable prevListViewGrouped_ItemTappedOpt = ValueNone - let mutable currListViewGrouped_ItemTappedOpt = ValueNone - let mutable prevRefreshingOpt = ValueNone - let mutable currRefreshingOpt = ValueNone - let mutable prevSelectionModeOpt = ValueNone - let mutable currSelectionModeOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ListViewGrouped_ItemsSourceAttribKey.KeyValue then - currListViewGrouped_ItemsSourceOpt <- ValueSome (kvp.Value :?> (string * ViewElement * ViewElement[])[]) - if kvp.Key = ViewAttributes.ListViewGrouped_ShowJumpListAttribKey.KeyValue then - currListViewGrouped_ShowJumpListOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.FooterAttribKey.KeyValue then - currFooterOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.HasUnevenRowsAttribKey.KeyValue then - currHasUnevenRowsOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.HeaderAttribKey.KeyValue then - currHeaderOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.IsPullToRefreshEnabledAttribKey.KeyValue then - currIsPullToRefreshEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.IsRefreshingAttribKey.KeyValue then - currIsRefreshingOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.RefreshCommandAttribKey.KeyValue then - currRefreshCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.RowHeightAttribKey.KeyValue then - currRowHeightOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.ListViewGrouped_SelectedItemAttribKey.KeyValue then - currListViewGrouped_SelectedItemOpt <- ValueSome (kvp.Value :?> (int * int) option) - if kvp.Key = ViewAttributes.SeparatorVisibilityAttribKey.KeyValue then - currSeparatorVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SeparatorVisibility) - if kvp.Key = ViewAttributes.SeparatorColorAttribKey.KeyValue then - currSeparatorColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.ListViewGrouped_ItemAppearingAttribKey.KeyValue then - currListViewGrouped_ItemAppearingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ListViewGrouped_ItemDisappearingAttribKey.KeyValue then - currListViewGrouped_ItemDisappearingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ListViewGrouped_ItemSelectedAttribKey.KeyValue then - currListViewGrouped_ItemSelectedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ListViewGrouped_ItemTappedAttribKey.KeyValue then - currListViewGrouped_ItemTappedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.RefreshingAttribKey.KeyValue then - currRefreshingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.SelectionModeAttribKey.KeyValue then - currSelectionModeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ListViewSelectionMode) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ListViewGrouped_ItemsSourceAttribKey.KeyValue then - prevListViewGrouped_ItemsSourceOpt <- ValueSome (kvp.Value :?> (string * ViewElement * ViewElement[])[]) - if kvp.Key = ViewAttributes.ListViewGrouped_ShowJumpListAttribKey.KeyValue then - prevListViewGrouped_ShowJumpListOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.FooterAttribKey.KeyValue then - prevFooterOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.HasUnevenRowsAttribKey.KeyValue then - prevHasUnevenRowsOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.HeaderAttribKey.KeyValue then - prevHeaderOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.IsPullToRefreshEnabledAttribKey.KeyValue then - prevIsPullToRefreshEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.IsRefreshingAttribKey.KeyValue then - prevIsRefreshingOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.RefreshCommandAttribKey.KeyValue then - prevRefreshCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.RowHeightAttribKey.KeyValue then - prevRowHeightOpt <- ValueSome (kvp.Value :?> int) - if kvp.Key = ViewAttributes.ListViewGrouped_SelectedItemAttribKey.KeyValue then - prevListViewGrouped_SelectedItemOpt <- ValueSome (kvp.Value :?> (int * int) option) - if kvp.Key = ViewAttributes.SeparatorVisibilityAttribKey.KeyValue then - prevSeparatorVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SeparatorVisibility) - if kvp.Key = ViewAttributes.SeparatorColorAttribKey.KeyValue then - prevSeparatorColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.ListViewGrouped_ItemAppearingAttribKey.KeyValue then - prevListViewGrouped_ItemAppearingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ListViewGrouped_ItemDisappearingAttribKey.KeyValue then - prevListViewGrouped_ItemDisappearingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ListViewGrouped_ItemSelectedAttribKey.KeyValue then - prevListViewGrouped_ItemSelectedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.ListViewGrouped_ItemTappedAttribKey.KeyValue then - prevListViewGrouped_ItemTappedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.RefreshingAttribKey.KeyValue then - prevRefreshingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.SelectionModeAttribKey.KeyValue then - prevSelectionModeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ListViewSelectionMode) - updateListViewGroupedItems prevListViewGrouped_ItemsSourceOpt currListViewGrouped_ItemsSourceOpt target - updateListViewGroupedShowJumpList prevListViewGrouped_ShowJumpListOpt currListViewGrouped_ShowJumpListOpt target - match prevFooterOpt, currFooterOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Footer <- currValue - | ValueSome _, ValueNone -> target.Footer <- null - | ValueNone, ValueNone -> () - match prevHasUnevenRowsOpt, currHasUnevenRowsOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.HasUnevenRows <- currValue - | ValueSome _, ValueNone -> target.HasUnevenRows <- false - | ValueNone, ValueNone -> () - match prevHeaderOpt, currHeaderOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Header <- currValue - | ValueSome _, ValueNone -> target.Header <- null - | ValueNone, ValueNone -> () - match prevIsPullToRefreshEnabledOpt, currIsPullToRefreshEnabledOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsPullToRefreshEnabled <- currValue - | ValueSome _, ValueNone -> target.IsPullToRefreshEnabled <- false - | ValueNone, ValueNone -> () - match prevIsRefreshingOpt, currIsRefreshingOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsRefreshing <- currValue - | ValueSome _, ValueNone -> target.IsRefreshing <- false - | ValueNone, ValueNone -> () - match prevRefreshCommandOpt, currRefreshCommandOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.RefreshCommand <- currValue - | ValueSome _, ValueNone -> target.RefreshCommand <- null - | ValueNone, ValueNone -> () - match prevRowHeightOpt, currRowHeightOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.RowHeight <- currValue - | ValueSome _, ValueNone -> target.RowHeight <- -1 - | ValueNone, ValueNone -> () - match prevListViewGrouped_SelectedItemOpt, currListViewGrouped_SelectedItemOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.SelectedItem <- (function None -> null | Some (i,j) -> let items = target.ItemsSource :?> System.Collections.Generic.IList in (if i >= 0 && i < items.Count then (let items2 = items.[i] in if j >= 0 && j < items2.Count then items2.[j] else null) else null)) currValue - | ValueSome _, ValueNone -> target.SelectedItem <- null - | ValueNone, ValueNone -> () - match prevSeparatorVisibilityOpt, currSeparatorVisibilityOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.SeparatorVisibility <- currValue - | ValueSome _, ValueNone -> target.SeparatorVisibility <- Xamarin.Forms.SeparatorVisibility.Default - | ValueNone, ValueNone -> () - match prevSeparatorColorOpt, currSeparatorColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.SeparatorColor <- currValue - | ValueSome _, ValueNone -> target.SeparatorColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevListViewGrouped_ItemAppearingOpt, currListViewGrouped_ItemAppearingOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.ItemAppearing.RemoveHandler(prevValue); target.ItemAppearing.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.ItemAppearing.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.ItemAppearing.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevListViewGrouped_ItemDisappearingOpt, currListViewGrouped_ItemDisappearingOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.ItemDisappearing.RemoveHandler(prevValue); target.ItemDisappearing.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.ItemDisappearing.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.ItemDisappearing.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevListViewGrouped_ItemSelectedOpt, currListViewGrouped_ItemSelectedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.ItemSelected.RemoveHandler(prevValue); target.ItemSelected.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.ItemSelected.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.ItemSelected.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevListViewGrouped_ItemTappedOpt, currListViewGrouped_ItemTappedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.ItemTapped.RemoveHandler(prevValue); target.ItemTapped.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.ItemTapped.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.ItemTapped.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevRefreshingOpt, currRefreshingOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Refreshing.RemoveHandler(prevValue); target.Refreshing.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Refreshing.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Refreshing.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevSelectionModeOpt, currSelectionModeOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.SelectionMode <- currValue - | ValueSome _, ValueNone -> target.SelectionMode <- Xamarin.Forms.ListViewSelectionMode.Single - | ValueNone, ValueNone -> () - - static member inline ConstructListViewGrouped(?items: (string * ViewElement * ViewElement list) list, - ?showJumpList: bool, - ?footer: System.Object, - ?hasUnevenRows: bool, - ?header: System.Object, - ?isPullToRefreshEnabled: bool, - ?isRefreshing: bool, - ?refreshCommand: unit -> unit, - ?rowHeight: int, - ?selectedItem: (int * int) option, - ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, - ?separatorColor: Xamarin.Forms.Color, - ?itemAppearing: int * int option -> unit, - ?itemDisappearing: int * int option -> unit, - ?itemSelected: (int * int) option -> unit, - ?itemTapped: int * int -> unit, - ?refreshing: unit -> unit, - ?selectionMode: Xamarin.Forms.ListViewSelectionMode, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ListView -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildListViewGrouped(0, - ?items=items, - ?showJumpList=showJumpList, - ?footer=footer, - ?hasUnevenRows=hasUnevenRows, - ?header=header, - ?isPullToRefreshEnabled=isPullToRefreshEnabled, - ?isRefreshing=isRefreshing, - ?refreshCommand=refreshCommand, - ?rowHeight=rowHeight, - ?selectedItem=selectedItem, - ?separatorVisibility=separatorVisibility, - ?separatorColor=separatorColor, - ?itemAppearing=itemAppearing, - ?itemDisappearing=itemDisappearing, - ?itemSelected=itemSelected, - ?itemTapped=itemTapped, - ?refreshing=refreshing, - ?selectionMode=selectionMode, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncListViewGrouped, ViewBuilders.UpdateFuncListViewGrouped, attribBuilder) - - /// Builds the attributes for a BackButtonBehavior in the view - static member inline BuildBackButtonBehavior(attribCount: int, - ?textOverride: string, - ?command: unit -> unit, - ?commandParameter: System.Object, - ?iconOverride: string, - ?isEnabled: bool) = - - let attribCount = match textOverride with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match command with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match commandParameter with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match iconOverride with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isEnabled with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = new AttributesBuilder(attribCount) - match textOverride with None -> () | Some v -> attribBuilder.Add(ViewAttributes.TextOverrideAttribKey, (v)) - match command with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CommandAttribKey, makeCommand(v)) - match commandParameter with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CommandParameterAttribKey, (v)) - match iconOverride with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IconOverrideAttribKey, (v)) - match isEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsEnabledAttribKey, (v)) - attribBuilder - - static member val CreateFuncBackButtonBehavior : (unit -> Xamarin.Forms.BackButtonBehavior) = (fun () -> ViewBuilders.CreateBackButtonBehavior()) with get, set - - static member CreateBackButtonBehavior () : Xamarin.Forms.BackButtonBehavior = - upcast (new Xamarin.Forms.BackButtonBehavior()) - - static member val UpdateFuncBackButtonBehavior = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.BackButtonBehavior) -> ViewBuilders.UpdateBackButtonBehavior (prevOpt, curr, target)) - - static member UpdateBackButtonBehavior (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.BackButtonBehavior) = - let mutable prevTextOverrideOpt = ValueNone - let mutable currTextOverrideOpt = ValueNone - let mutable prevCommandOpt = ValueNone - let mutable currCommandOpt = ValueNone - let mutable prevCommandParameterOpt = ValueNone - let mutable currCommandParameterOpt = ValueNone - let mutable prevIconOverrideOpt = ValueNone - let mutable currIconOverrideOpt = ValueNone - let mutable prevIsEnabledOpt = ValueNone - let mutable currIsEnabledOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.TextOverrideAttribKey.KeyValue then - currTextOverrideOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then - currCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.CommandParameterAttribKey.KeyValue then - currCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.IconOverrideAttribKey.KeyValue then - currIconOverrideOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.IsEnabledAttribKey.KeyValue then - currIsEnabledOpt <- ValueSome (kvp.Value :?> bool) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.TextOverrideAttribKey.KeyValue then - prevTextOverrideOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then - prevCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.CommandParameterAttribKey.KeyValue then - prevCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.IconOverrideAttribKey.KeyValue then - prevIconOverrideOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.IsEnabledAttribKey.KeyValue then - prevIsEnabledOpt <- ValueSome (kvp.Value :?> bool) - match prevTextOverrideOpt, currTextOverrideOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.TextOverride <- currValue - | ValueSome _, ValueNone -> target.TextOverride <- null - | ValueNone, ValueNone -> () - match prevCommandOpt, currCommandOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Command <- currValue - | ValueSome _, ValueNone -> target.Command <- null - | ValueNone, ValueNone -> () - match prevCommandParameterOpt, currCommandParameterOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.CommandParameter <- currValue - | ValueSome _, ValueNone -> target.CommandParameter <- null - | ValueNone, ValueNone -> () - match prevIconOverrideOpt, currIconOverrideOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IconOverride <- makeFileImageSource currValue - | ValueSome _, ValueNone -> target.IconOverride <- null - | ValueNone, ValueNone -> () - match prevIsEnabledOpt, currIsEnabledOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsEnabled <- currValue - | ValueSome _, ValueNone -> target.IsEnabled <- true - | ValueNone, ValueNone -> () - - static member inline ConstructBackButtonBehavior(?textOverride: string, - ?command: unit -> unit, - ?commandParameter: System.Object, - ?iconOverride: string, - ?isEnabled: bool) = - - let attribBuilder = ViewBuilders.BuildBackButtonBehavior(0, - ?textOverride=textOverride, - ?command=command, - ?commandParameter=commandParameter, - ?iconOverride=iconOverride, - ?isEnabled=isEnabled) - - ViewElement.Create(ViewBuilders.CreateFuncBackButtonBehavior, ViewBuilders.UpdateFuncBackButtonBehavior, attribBuilder) - - /// Builds the attributes for a GridItemsLayout in the view - static member inline BuildGridItemsLayout(attribCount: int, - ?span: int) = - - let attribCount = match span with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = new AttributesBuilder(attribCount) - match span with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SpanAttribKey, (v)) - attribBuilder - - static member val CreateFuncGridItemsLayout : (unit -> Xamarin.Forms.GridItemsLayout) = (fun () -> ViewBuilders.CreateGridItemsLayout()) with get, set - - static member CreateGridItemsLayout () : Xamarin.Forms.GridItemsLayout = - failwith "can't create Xamarin.Forms.GridItemsLayout" - - static member val UpdateFuncGridItemsLayout = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.GridItemsLayout) -> ViewBuilders.UpdateGridItemsLayout (prevOpt, curr, target)) - - static member UpdateGridItemsLayout (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.GridItemsLayout) = - let mutable prevSpanOpt = ValueNone - let mutable currSpanOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.SpanAttribKey.KeyValue then - currSpanOpt <- ValueSome (kvp.Value :?> int) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.SpanAttribKey.KeyValue then - prevSpanOpt <- ValueSome (kvp.Value :?> int) - match prevSpanOpt, currSpanOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Span <- currValue - | ValueSome _, ValueNone -> target.Span <- 0 - | ValueNone, ValueNone -> () - - static member inline ConstructGridItemsLayout(?span: int) = - - let attribBuilder = ViewBuilders.BuildGridItemsLayout(0, - ?span=span) - - ViewElement.Create(ViewBuilders.CreateFuncGridItemsLayout, ViewBuilders.UpdateFuncGridItemsLayout, attribBuilder) - - /// Builds the attributes for a ItemsView in the view - static member inline BuildItemsView(attribCount: int, - ?emptyView: System.Object, - ?itemsLayout: Xamarin.Forms.IItemsLayout, - ?itemsSource: System.Collections.IEnumerable, - ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, - ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match emptyView with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match itemsLayout with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match itemsSource with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match scrollToRequested with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match scrollTo with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match emptyView with None -> () | Some v -> attribBuilder.Add(ViewAttributes.EmptyViewAttribKey, (v)) - match itemsLayout with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsLayoutAttribKey, (v)) - match itemsSource with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsSourceAttribKey, (v)) - match scrollToRequested with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ScrollToRequestedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match scrollTo with None -> () | Some v -> attribBuilder.Add(ViewAttributes.iScrollToAttribKey, (v)) - attribBuilder - - static member val CreateFuncItemsView : (unit -> Xamarin.Forms.ItemsView) = (fun () -> ViewBuilders.CreateItemsView()) with get, set - - static member CreateItemsView () : Xamarin.Forms.ItemsView = - failwith "can't create Xamarin.Forms.ItemsView" - - static member val UpdateFuncItemsView = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ItemsView) -> ViewBuilders.UpdateItemsView (prevOpt, curr, target)) - - static member UpdateItemsView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ItemsView) = - // update the inherited View element - let baseElement = (if ViewProto.ProtoView.IsNone then ViewProto.ProtoView <- Some (ViewBuilders.ConstructView())); ViewProto.ProtoView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevEmptyViewOpt = ValueNone - let mutable currEmptyViewOpt = ValueNone - let mutable prevItemsLayoutOpt = ValueNone - let mutable currItemsLayoutOpt = ValueNone - let mutable prevItemsSourceOpt = ValueNone - let mutable currItemsSourceOpt = ValueNone - let mutable prevScrollToRequestedOpt = ValueNone - let mutable currScrollToRequestedOpt = ValueNone - let mutable previScrollToOpt = ValueNone - let mutable curriScrollToOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.EmptyViewAttribKey.KeyValue then - currEmptyViewOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.ItemsLayoutAttribKey.KeyValue then - currItemsLayoutOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.IItemsLayout) - if kvp.Key = ViewAttributes.ItemsSourceAttribKey.KeyValue then - currItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IEnumerable) - if kvp.Key = ViewAttributes.ScrollToRequestedAttribKey.KeyValue then - currScrollToRequestedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.iScrollToAttribKey.KeyValue then - curriScrollToOpt <- ValueSome (kvp.Value :?> obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.EmptyViewAttribKey.KeyValue then - prevEmptyViewOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.ItemsLayoutAttribKey.KeyValue then - prevItemsLayoutOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.IItemsLayout) - if kvp.Key = ViewAttributes.ItemsSourceAttribKey.KeyValue then - prevItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IEnumerable) - if kvp.Key = ViewAttributes.ScrollToRequestedAttribKey.KeyValue then - prevScrollToRequestedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.iScrollToAttribKey.KeyValue then - previScrollToOpt <- ValueSome (kvp.Value :?> obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind) - match prevEmptyViewOpt, currEmptyViewOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.EmptyView <- currValue - | ValueSome _, ValueNone -> target.EmptyView <- null - | ValueNone, ValueNone -> () - match prevItemsLayoutOpt, currItemsLayoutOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ItemsLayout <- currValue - | ValueSome _, ValueNone -> target.ItemsLayout <- null - | ValueNone, ValueNone -> () - match prevItemsSourceOpt, currItemsSourceOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ItemsSource <- currValue - | ValueSome _, ValueNone -> target.ItemsSource <- null - | ValueNone, ValueNone -> () - match prevScrollToRequestedOpt, currScrollToRequestedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.ScrollToRequested.RemoveHandler(prevValue); target.ScrollToRequested.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.ScrollToRequested.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.ScrollToRequested.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - (fun _ curr target -> triggerScrollTo curr target) previScrollToOpt curriScrollToOpt target - - static member inline ConstructItemsView(?emptyView: System.Object, - ?itemsLayout: Xamarin.Forms.IItemsLayout, - ?itemsSource: System.Collections.IEnumerable, - ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, - ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ItemsView -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildItemsView(0, - ?emptyView=emptyView, - ?itemsLayout=itemsLayout, - ?itemsSource=itemsSource, - ?scrollToRequested=scrollToRequested, - ?scrollTo=scrollTo, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncItemsView, ViewBuilders.UpdateFuncItemsView, attribBuilder) - - /// Builds the attributes for a SearchHandler in the view - static member inline BuildSearchHandler(attribCount: int, - ?clearIcon: string, - ?clearIconHelpText: string, - ?clearIconName: string, - ?clearPlaceholderCommand: unit -> unit, - ?clearPlaceholderCommandParameter: System.Object, - ?clearPlaceholderEnabled: bool, - ?clearPlaceholderHelpText: string, - ?clearPlaceholderIcon: string, - ?clearPlaceholderName: string, - ?command: unit -> unit, - ?commandParameter: System.Object, - ?displayMemberName: string, - ?isSearchEnabled: bool, - ?placeholder: string, - ?query: string, - ?queryIcon: string, - ?queryIconHelpText: string, - ?queryIconName: string, - ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, - ?showsResults: bool, - ?itemsSource: System.Collections.IEnumerable) = - - let attribCount = match clearIcon with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match clearIconHelpText with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match clearIconName with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match clearPlaceholderCommand with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match clearPlaceholderCommandParameter with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match clearPlaceholderEnabled with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match clearPlaceholderHelpText with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match clearPlaceholderIcon with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match clearPlaceholderName with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match command with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match commandParameter with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match displayMemberName with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match isSearchEnabled with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match placeholder with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match query with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match queryIcon with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match queryIconHelpText with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match queryIconName with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match searchBoxVisibility with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match showsResults with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match itemsSource with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = new AttributesBuilder(attribCount) - match clearIcon with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearIconAttribKey, (v)) - match clearIconHelpText with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearIconHelpTextAttribKey, (v)) - match clearIconName with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearIconNameAttribKey, (v)) - match clearPlaceholderCommand with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearPlaceholderCommandAttribKey, makeCommand(v)) - match clearPlaceholderCommandParameter with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearPlaceholderCommandParameterAttribKey, (v)) - match clearPlaceholderEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearPlaceholderEnabledAttribKey, (v)) - match clearPlaceholderHelpText with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearPlaceholderHelpTextAttribKey, (v)) - match clearPlaceholderIcon with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearPlaceholderIconAttribKey, (v)) - match clearPlaceholderName with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ClearPlaceholderNameAttribKey, (v)) - match command with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CommandAttribKey, makeCommand(v)) - match commandParameter with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CommandParameterAttribKey, (v)) - match displayMemberName with None -> () | Some v -> attribBuilder.Add(ViewAttributes.DisplayMemberNameAttribKey, (v)) - match isSearchEnabled with None -> () | Some v -> attribBuilder.Add(ViewAttributes.IsSearchEnabledAttribKey, (v)) - match placeholder with None -> () | Some v -> attribBuilder.Add(ViewAttributes.PlaceholderAttribKey, (v)) - match query with None -> () | Some v -> attribBuilder.Add(ViewAttributes.QueryAttribKey, (v)) - match queryIcon with None -> () | Some v -> attribBuilder.Add(ViewAttributes.QueryIconAttribKey, (v)) - match queryIconHelpText with None -> () | Some v -> attribBuilder.Add(ViewAttributes.QueryIconHelpTextAttribKey, (v)) - match queryIconName with None -> () | Some v -> attribBuilder.Add(ViewAttributes.QueryIconNameAttribKey, (v)) - match searchBoxVisibility with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SearchBoxVisibilityAttribKey, (v)) - match showsResults with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ShowsResultsAttribKey, (v)) - match itemsSource with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsSourceAttribKey, (v)) - attribBuilder - - static member val CreateFuncSearchHandler : (unit -> Xamarin.Forms.SearchHandler) = (fun () -> ViewBuilders.CreateSearchHandler()) with get, set - - static member CreateSearchHandler () : Xamarin.Forms.SearchHandler = - upcast (new Xamarin.Forms.SearchHandler()) - - static member val UpdateFuncSearchHandler = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.SearchHandler) -> ViewBuilders.UpdateSearchHandler (prevOpt, curr, target)) - - static member UpdateSearchHandler (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.SearchHandler) = - let mutable prevClearIconOpt = ValueNone - let mutable currClearIconOpt = ValueNone - let mutable prevClearIconHelpTextOpt = ValueNone - let mutable currClearIconHelpTextOpt = ValueNone - let mutable prevClearIconNameOpt = ValueNone - let mutable currClearIconNameOpt = ValueNone - let mutable prevClearPlaceholderCommandOpt = ValueNone - let mutable currClearPlaceholderCommandOpt = ValueNone - let mutable prevClearPlaceholderCommandParameterOpt = ValueNone - let mutable currClearPlaceholderCommandParameterOpt = ValueNone - let mutable prevClearPlaceholderEnabledOpt = ValueNone - let mutable currClearPlaceholderEnabledOpt = ValueNone - let mutable prevClearPlaceholderHelpTextOpt = ValueNone - let mutable currClearPlaceholderHelpTextOpt = ValueNone - let mutable prevClearPlaceholderIconOpt = ValueNone - let mutable currClearPlaceholderIconOpt = ValueNone - let mutable prevClearPlaceholderNameOpt = ValueNone - let mutable currClearPlaceholderNameOpt = ValueNone - let mutable prevCommandOpt = ValueNone - let mutable currCommandOpt = ValueNone - let mutable prevCommandParameterOpt = ValueNone - let mutable currCommandParameterOpt = ValueNone - let mutable prevDisplayMemberNameOpt = ValueNone - let mutable currDisplayMemberNameOpt = ValueNone - let mutable prevIsSearchEnabledOpt = ValueNone - let mutable currIsSearchEnabledOpt = ValueNone - let mutable prevPlaceholderOpt = ValueNone - let mutable currPlaceholderOpt = ValueNone - let mutable prevQueryOpt = ValueNone - let mutable currQueryOpt = ValueNone - let mutable prevQueryIconOpt = ValueNone - let mutable currQueryIconOpt = ValueNone - let mutable prevQueryIconHelpTextOpt = ValueNone - let mutable currQueryIconHelpTextOpt = ValueNone - let mutable prevQueryIconNameOpt = ValueNone - let mutable currQueryIconNameOpt = ValueNone - let mutable prevSearchBoxVisibilityOpt = ValueNone - let mutable currSearchBoxVisibilityOpt = ValueNone - let mutable prevShowsResultsOpt = ValueNone - let mutable currShowsResultsOpt = ValueNone - let mutable prevItemsSourceOpt = ValueNone - let mutable currItemsSourceOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ClearIconAttribKey.KeyValue then - currClearIconOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.ClearIconHelpTextAttribKey.KeyValue then - currClearIconHelpTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.ClearIconNameAttribKey.KeyValue then - currClearIconNameOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.ClearPlaceholderCommandAttribKey.KeyValue then - currClearPlaceholderCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.ClearPlaceholderCommandParameterAttribKey.KeyValue then - currClearPlaceholderCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.ClearPlaceholderEnabledAttribKey.KeyValue then - currClearPlaceholderEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.ClearPlaceholderHelpTextAttribKey.KeyValue then - currClearPlaceholderHelpTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.ClearPlaceholderIconAttribKey.KeyValue then - currClearPlaceholderIconOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.ClearPlaceholderNameAttribKey.KeyValue then - currClearPlaceholderNameOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then - currCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.CommandParameterAttribKey.KeyValue then - currCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.DisplayMemberNameAttribKey.KeyValue then - currDisplayMemberNameOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.IsSearchEnabledAttribKey.KeyValue then - currIsSearchEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.PlaceholderAttribKey.KeyValue then - currPlaceholderOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.QueryAttribKey.KeyValue then - currQueryOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.QueryIconAttribKey.KeyValue then - currQueryIconOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.QueryIconHelpTextAttribKey.KeyValue then - currQueryIconHelpTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.QueryIconNameAttribKey.KeyValue then - currQueryIconNameOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.SearchBoxVisibilityAttribKey.KeyValue then - currSearchBoxVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SearchBoxVisiblity) - if kvp.Key = ViewAttributes.ShowsResultsAttribKey.KeyValue then - currShowsResultsOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.ItemsSourceAttribKey.KeyValue then - currItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IEnumerable) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ClearIconAttribKey.KeyValue then - prevClearIconOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.ClearIconHelpTextAttribKey.KeyValue then - prevClearIconHelpTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.ClearIconNameAttribKey.KeyValue then - prevClearIconNameOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.ClearPlaceholderCommandAttribKey.KeyValue then - prevClearPlaceholderCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.ClearPlaceholderCommandParameterAttribKey.KeyValue then - prevClearPlaceholderCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.ClearPlaceholderEnabledAttribKey.KeyValue then - prevClearPlaceholderEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.ClearPlaceholderHelpTextAttribKey.KeyValue then - prevClearPlaceholderHelpTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.ClearPlaceholderIconAttribKey.KeyValue then - prevClearPlaceholderIconOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.ClearPlaceholderNameAttribKey.KeyValue then - prevClearPlaceholderNameOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.CommandAttribKey.KeyValue then - prevCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.CommandParameterAttribKey.KeyValue then - prevCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.DisplayMemberNameAttribKey.KeyValue then - prevDisplayMemberNameOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.IsSearchEnabledAttribKey.KeyValue then - prevIsSearchEnabledOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.PlaceholderAttribKey.KeyValue then - prevPlaceholderOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.QueryAttribKey.KeyValue then - prevQueryOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.QueryIconAttribKey.KeyValue then - prevQueryIconOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.QueryIconHelpTextAttribKey.KeyValue then - prevQueryIconHelpTextOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.QueryIconNameAttribKey.KeyValue then - prevQueryIconNameOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.SearchBoxVisibilityAttribKey.KeyValue then - prevSearchBoxVisibilityOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SearchBoxVisiblity) - if kvp.Key = ViewAttributes.ShowsResultsAttribKey.KeyValue then - prevShowsResultsOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.ItemsSourceAttribKey.KeyValue then - prevItemsSourceOpt <- ValueSome (kvp.Value :?> System.Collections.IEnumerable) - match prevClearIconOpt, currClearIconOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ClearIcon <- makeImageSource currValue - | ValueSome _, ValueNone -> target.ClearIcon <- null - | ValueNone, ValueNone -> () - match prevClearIconHelpTextOpt, currClearIconHelpTextOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ClearIconHelpText <- currValue - | ValueSome _, ValueNone -> target.ClearIconHelpText <- null - | ValueNone, ValueNone -> () - match prevClearIconNameOpt, currClearIconNameOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ClearIconName <- currValue - | ValueSome _, ValueNone -> target.ClearIconName <- null - | ValueNone, ValueNone -> () - match prevClearPlaceholderCommandOpt, currClearPlaceholderCommandOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ClearPlaceholderCommand <- currValue - | ValueSome _, ValueNone -> target.ClearPlaceholderCommand <- null - | ValueNone, ValueNone -> () - match prevClearPlaceholderCommandParameterOpt, currClearPlaceholderCommandParameterOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ClearPlaceholderCommandParameter <- currValue - | ValueSome _, ValueNone -> target.ClearPlaceholderCommandParameter <- null - | ValueNone, ValueNone -> () - match prevClearPlaceholderEnabledOpt, currClearPlaceholderEnabledOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ClearPlaceholderEnabled <- currValue - | ValueSome _, ValueNone -> target.ClearPlaceholderEnabled <- true - | ValueNone, ValueNone -> () - match prevClearPlaceholderHelpTextOpt, currClearPlaceholderHelpTextOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ClearPlaceholderHelpText <- currValue - | ValueSome _, ValueNone -> target.ClearPlaceholderHelpText <- null - | ValueNone, ValueNone -> () - match prevClearPlaceholderIconOpt, currClearPlaceholderIconOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ClearPlaceholderIcon <- makeImageSource currValue - | ValueSome _, ValueNone -> target.ClearPlaceholderIcon <- null - | ValueNone, ValueNone -> () - match prevClearPlaceholderNameOpt, currClearPlaceholderNameOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ClearPlaceholderName <- currValue - | ValueSome _, ValueNone -> target.ClearPlaceholderName <- null - | ValueNone, ValueNone -> () - match prevCommandOpt, currCommandOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Command <- currValue - | ValueSome _, ValueNone -> target.Command <- null - | ValueNone, ValueNone -> () - match prevCommandParameterOpt, currCommandParameterOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.CommandParameter <- currValue - | ValueSome _, ValueNone -> target.CommandParameter <- null - | ValueNone, ValueNone -> () - match prevDisplayMemberNameOpt, currDisplayMemberNameOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.DisplayMemberName <- currValue - | ValueSome _, ValueNone -> target.DisplayMemberName <- null - | ValueNone, ValueNone -> () - match prevIsSearchEnabledOpt, currIsSearchEnabledOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.IsSearchEnabled <- currValue - | ValueSome _, ValueNone -> target.IsSearchEnabled <- true - | ValueNone, ValueNone -> () - match prevPlaceholderOpt, currPlaceholderOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Placeholder <- currValue - | ValueSome _, ValueNone -> target.Placeholder <- null - | ValueNone, ValueNone -> () - match prevQueryOpt, currQueryOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Query <- currValue - | ValueSome _, ValueNone -> target.Query <- null - | ValueNone, ValueNone -> () - match prevQueryIconOpt, currQueryIconOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.QueryIcon <- makeImageSource currValue - | ValueSome _, ValueNone -> target.QueryIcon <- null - | ValueNone, ValueNone -> () - match prevQueryIconHelpTextOpt, currQueryIconHelpTextOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.QueryIconHelpText <- currValue - | ValueSome _, ValueNone -> target.QueryIconHelpText <- null - | ValueNone, ValueNone -> () - match prevQueryIconNameOpt, currQueryIconNameOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.QueryIconName <- currValue - | ValueSome _, ValueNone -> target.QueryIconName <- null - | ValueNone, ValueNone -> () - match prevSearchBoxVisibilityOpt, currSearchBoxVisibilityOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.SearchBoxVisibility <- currValue - | ValueSome _, ValueNone -> target.SearchBoxVisibility <- Xamarin.Forms.SearchBoxVisiblity.Hidden - | ValueNone, ValueNone -> () - match prevShowsResultsOpt, currShowsResultsOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ShowsResults <- currValue - | ValueSome _, ValueNone -> target.ShowsResults <- true - | ValueNone, ValueNone -> () - match prevItemsSourceOpt, currItemsSourceOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.ItemsSource <- currValue - | ValueSome _, ValueNone -> target.ItemsSource <- null - | ValueNone, ValueNone -> () - - static member inline ConstructSearchHandler(?clearIcon: string, - ?clearIconHelpText: string, - ?clearIconName: string, - ?clearPlaceholderCommand: unit -> unit, - ?clearPlaceholderCommandParameter: System.Object, - ?clearPlaceholderEnabled: bool, - ?clearPlaceholderHelpText: string, - ?clearPlaceholderIcon: string, - ?clearPlaceholderName: string, - ?command: unit -> unit, - ?commandParameter: System.Object, - ?displayMemberName: string, - ?isSearchEnabled: bool, - ?placeholder: string, - ?query: string, - ?queryIcon: string, - ?queryIconHelpText: string, - ?queryIconName: string, - ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, - ?showsResults: bool, - ?itemsSource: System.Collections.IEnumerable) = - - let attribBuilder = ViewBuilders.BuildSearchHandler(0, - ?clearIcon=clearIcon, - ?clearIconHelpText=clearIconHelpText, - ?clearIconName=clearIconName, - ?clearPlaceholderCommand=clearPlaceholderCommand, - ?clearPlaceholderCommandParameter=clearPlaceholderCommandParameter, - ?clearPlaceholderEnabled=clearPlaceholderEnabled, - ?clearPlaceholderHelpText=clearPlaceholderHelpText, - ?clearPlaceholderIcon=clearPlaceholderIcon, - ?clearPlaceholderName=clearPlaceholderName, - ?command=command, - ?commandParameter=commandParameter, - ?displayMemberName=displayMemberName, - ?isSearchEnabled=isSearchEnabled, - ?placeholder=placeholder, - ?query=query, - ?queryIcon=queryIcon, - ?queryIconHelpText=queryIconHelpText, - ?queryIconName=queryIconName, - ?searchBoxVisibility=searchBoxVisibility, - ?showsResults=showsResults, - ?itemsSource=itemsSource) - - ViewElement.Create(ViewBuilders.CreateFuncSearchHandler, ViewBuilders.UpdateFuncSearchHandler, attribBuilder) - - /// Builds the attributes for a Shell in the view - static member inline BuildShell(attribCount: int, - ?items: seq, - ?menuItems: seq, - ?currentItem: ViewElement, - ?flyoutBackgroundColor: Xamarin.Forms.Color, - ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, - ?flyoutHeader: System.Object, - ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, - ?flyoutIsPresented: bool, - ?route: string, - ?routeHost: string, - ?routeScheme: string, - ?navigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, - ?navigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, - ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match items with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match menuItems with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match currentItem with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match flyoutBackgroundColor with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match flyoutBehavior with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match flyoutHeader with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match flyoutHeaderBehavior with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match flyoutIsPresented with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match route with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match routeHost with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match routeScheme with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match navigated with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match navigating with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match goToAsync with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildPage(attribCount, ?title=title, ?backgroundImage=backgroundImage, ?icon=icon, ?isBusy=isBusy, ?padding=padding, ?toolbarItems=toolbarItems, ?useSafeArea=useSafeArea, ?appearing=appearing, ?disappearing=disappearing, ?layoutChanged=layoutChanged, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsAttribKey, (v)) - match menuItems with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MenuItemsAttribKey, (v)) - match currentItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CurrentItemAttribKey, (v)) - match flyoutBackgroundColor with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutBackgroundColorAttribKey, (v)) - match flyoutBehavior with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutBehaviorAttribKey, (v)) - match flyoutHeader with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutHeaderAttribKey, (v)) - match flyoutHeaderBehavior with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutHeaderBehaviorAttribKey, (v)) - match flyoutIsPresented with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutIsPresentedAttribKey, (v)) - match route with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RouteAttribKey, (v)) - match routeHost with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RouteHostAttribKey, (v)) - match routeScheme with None -> () | Some v -> attribBuilder.Add(ViewAttributes.RouteSchemeAttribKey, (v)) - match navigated with None -> () | Some v -> attribBuilder.Add(ViewAttributes.OnNavigatedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match navigating with None -> () | Some v -> attribBuilder.Add(ViewAttributes.OnNavigatingAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - match goToAsync with None -> () | Some v -> attribBuilder.Add(ViewAttributes.GoToAsyncAttribKey, (v)) - attribBuilder - - static member val CreateFuncShell : (unit -> Xamarin.Forms.Shell) = (fun () -> ViewBuilders.CreateShell()) with get, set - - static member CreateShell () : Xamarin.Forms.Shell = - upcast (new Xamarin.Forms.Shell()) - - static member val UpdateFuncShell = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.Shell) -> ViewBuilders.UpdateShell (prevOpt, curr, target)) - - static member UpdateShell (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.Shell) = - // update the inherited Page element - let baseElement = (if ViewProto.ProtoPage.IsNone then ViewProto.ProtoPage <- Some (ViewBuilders.ConstructPage())); ViewProto.ProtoPage.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevItemsOpt = ValueNone - let mutable currItemsOpt = ValueNone - let mutable prevMenuItemsOpt = ValueNone - let mutable currMenuItemsOpt = ValueNone - let mutable prevCurrentItemOpt = ValueNone - let mutable currCurrentItemOpt = ValueNone - let mutable prevFlyoutBackgroundColorOpt = ValueNone - let mutable currFlyoutBackgroundColorOpt = ValueNone - let mutable prevFlyoutBehaviorOpt = ValueNone - let mutable currFlyoutBehaviorOpt = ValueNone - let mutable prevFlyoutHeaderOpt = ValueNone - let mutable currFlyoutHeaderOpt = ValueNone - let mutable prevFlyoutHeaderBehaviorOpt = ValueNone - let mutable currFlyoutHeaderBehaviorOpt = ValueNone - let mutable prevFlyoutIsPresentedOpt = ValueNone - let mutable currFlyoutIsPresentedOpt = ValueNone - let mutable prevRouteOpt = ValueNone - let mutable currRouteOpt = ValueNone - let mutable prevRouteHostOpt = ValueNone - let mutable currRouteHostOpt = ValueNone - let mutable prevRouteSchemeOpt = ValueNone - let mutable currRouteSchemeOpt = ValueNone - let mutable prevOnNavigatedOpt = ValueNone - let mutable currOnNavigatedOpt = ValueNone - let mutable prevOnNavigatingOpt = ValueNone - let mutable currOnNavigatingOpt = ValueNone - let mutable prevGoToAsyncOpt = ValueNone - let mutable currGoToAsyncOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ItemsAttribKey.KeyValue then - currItemsOpt <- ValueSome (kvp.Value :?> seq) - if kvp.Key = ViewAttributes.MenuItemsAttribKey.KeyValue then - currMenuItemsOpt <- ValueSome (kvp.Value :?> seq) - if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then - currCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.FlyoutBackgroundColorAttribKey.KeyValue then - currFlyoutBackgroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.FlyoutBehaviorAttribKey.KeyValue then - currFlyoutBehaviorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlyoutBehavior) - if kvp.Key = ViewAttributes.FlyoutHeaderAttribKey.KeyValue then - currFlyoutHeaderOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.FlyoutHeaderBehaviorAttribKey.KeyValue then - currFlyoutHeaderBehaviorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlyoutHeaderBehavior) - if kvp.Key = ViewAttributes.FlyoutIsPresentedAttribKey.KeyValue then - currFlyoutIsPresentedOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.RouteAttribKey.KeyValue then - currRouteOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.RouteHostAttribKey.KeyValue then - currRouteHostOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.RouteSchemeAttribKey.KeyValue then - currRouteSchemeOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.OnNavigatedAttribKey.KeyValue then - currOnNavigatedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.OnNavigatingAttribKey.KeyValue then - currOnNavigatingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.GoToAsyncAttribKey.KeyValue then - currGoToAsyncOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ItemsAttribKey.KeyValue then - prevItemsOpt <- ValueSome (kvp.Value :?> seq) - if kvp.Key = ViewAttributes.MenuItemsAttribKey.KeyValue then - prevMenuItemsOpt <- ValueSome (kvp.Value :?> seq) - if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then - prevCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.FlyoutBackgroundColorAttribKey.KeyValue then - prevFlyoutBackgroundColorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.Color) - if kvp.Key = ViewAttributes.FlyoutBehaviorAttribKey.KeyValue then - prevFlyoutBehaviorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlyoutBehavior) - if kvp.Key = ViewAttributes.FlyoutHeaderAttribKey.KeyValue then - prevFlyoutHeaderOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.FlyoutHeaderBehaviorAttribKey.KeyValue then - prevFlyoutHeaderBehaviorOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlyoutHeaderBehavior) - if kvp.Key = ViewAttributes.FlyoutIsPresentedAttribKey.KeyValue then - prevFlyoutIsPresentedOpt <- ValueSome (kvp.Value :?> bool) - if kvp.Key = ViewAttributes.RouteAttribKey.KeyValue then - prevRouteOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.RouteHostAttribKey.KeyValue then - prevRouteHostOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.RouteSchemeAttribKey.KeyValue then - prevRouteSchemeOpt <- ValueSome (kvp.Value :?> string) - if kvp.Key = ViewAttributes.OnNavigatedAttribKey.KeyValue then - prevOnNavigatedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.OnNavigatingAttribKey.KeyValue then - prevOnNavigatingOpt <- ValueSome (kvp.Value :?> System.EventHandler) - if kvp.Key = ViewAttributes.GoToAsyncAttribKey.KeyValue then - prevGoToAsyncOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind) - updateShellItems prevItemsOpt currItemsOpt target - updateMenuItemsShell prevMenuItemsOpt currMenuItemsOpt target - match prevCurrentItemOpt, currCurrentItemOpt with - // For structured objects, dependsOn on reference equality - | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () - | ValueSome prevValue, ValueSome newValue when canReuseChild prevValue newValue -> - newValue.UpdateIncremental(prevValue, target.CurrentItem) - | _, ValueSome newValue -> - target.CurrentItem <- (newValue.Create() :?> Xamarin.Forms.ShellItem) - | ValueSome _, ValueNone -> - target.CurrentItem <- null - | ValueNone, ValueNone -> () - match prevFlyoutBackgroundColorOpt, currFlyoutBackgroundColorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FlyoutBackgroundColor <- currValue - | ValueSome _, ValueNone -> target.FlyoutBackgroundColor <- Xamarin.Forms.Color.Default - | ValueNone, ValueNone -> () - match prevFlyoutBehaviorOpt, currFlyoutBehaviorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FlyoutBehavior <- currValue - | ValueSome _, ValueNone -> target.FlyoutBehavior <- Xamarin.Forms.FlyoutBehavior.Flyout - | ValueNone, ValueNone -> () - match prevFlyoutHeaderOpt, currFlyoutHeaderOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FlyoutHeader <- currValue - | ValueSome _, ValueNone -> target.FlyoutHeader <- null - | ValueNone, ValueNone -> () - match prevFlyoutHeaderBehaviorOpt, currFlyoutHeaderBehaviorOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FlyoutHeaderBehavior <- currValue - | ValueSome _, ValueNone -> target.FlyoutHeaderBehavior <- Xamarin.Forms.FlyoutHeaderBehavior.Default - | ValueNone, ValueNone -> () - match prevFlyoutIsPresentedOpt, currFlyoutIsPresentedOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FlyoutIsPresented <- currValue - | ValueSome _, ValueNone -> target.FlyoutIsPresented <- false - | ValueNone, ValueNone -> () - match prevRouteOpt, currRouteOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Route <- currValue - | ValueSome _, ValueNone -> target.Route <- null - | ValueNone, ValueNone -> () - match prevRouteHostOpt, currRouteHostOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.RouteHost <- currValue - | ValueSome _, ValueNone -> target.RouteHost <- null - | ValueNone, ValueNone -> () - match prevRouteSchemeOpt, currRouteSchemeOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.RouteScheme <- currValue - | ValueSome _, ValueNone -> target.RouteScheme <- null - | ValueNone, ValueNone -> () - match prevOnNavigatedOpt, currOnNavigatedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Navigated.RemoveHandler(prevValue); target.Navigated.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Navigated.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Navigated.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - match prevOnNavigatingOpt, currOnNavigatingOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.Navigating.RemoveHandler(prevValue); target.Navigating.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.Navigating.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.Navigating.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - (fun _ curr target -> triggerGoToAsync curr target) prevGoToAsyncOpt currGoToAsyncOpt target - - static member inline ConstructShell(?items: seq, - ?menuItems: seq, - ?currentItem: ViewElement, - ?flyoutBackgroundColor: Xamarin.Forms.Color, - ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, - ?flyoutHeader: System.Object, - ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, - ?flyoutIsPresented: bool, - ?route: string, - ?routeHost: string, - ?routeScheme: string, - ?navigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, - ?navigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, - ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Shell -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildShell(0, - ?items=items, - ?menuItems=menuItems, - ?currentItem=currentItem, - ?flyoutBackgroundColor=flyoutBackgroundColor, - ?flyoutBehavior=flyoutBehavior, - ?flyoutHeader=flyoutHeader, - ?flyoutHeaderBehavior=flyoutHeaderBehavior, - ?flyoutIsPresented=flyoutIsPresented, - ?route=route, - ?routeHost=routeHost, - ?routeScheme=routeScheme, - ?navigated=navigated, - ?navigating=navigating, - ?goToAsync=goToAsync, - ?title=title, - ?backgroundImage=backgroundImage, - ?icon=icon, - ?isBusy=isBusy, - ?padding=padding, - ?toolbarItems=toolbarItems, - ?useSafeArea=useSafeArea, - ?appearing=appearing, - ?disappearing=disappearing, - ?layoutChanged=layoutChanged, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncShell, ViewBuilders.UpdateFuncShell, attribBuilder) - - /// Builds the attributes for a ShellGroupItem in the view - static member inline BuildShellGroupItem(attribCount: int, - ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match flyoutDisplayOptions with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match flyoutDisplayOptions with None -> () | Some v -> attribBuilder.Add(ViewAttributes.FlyoutDisplayOptionsAttribKey, (v)) - attribBuilder - - static member val CreateFuncShellGroupItem : (unit -> Xamarin.Forms.ShellGroupItem) = (fun () -> ViewBuilders.CreateShellGroupItem()) with get, set - - static member CreateShellGroupItem () : Xamarin.Forms.ShellGroupItem = - upcast (new Xamarin.Forms.ShellGroupItem()) - - static member val UpdateFuncShellGroupItem = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ShellGroupItem) -> ViewBuilders.UpdateShellGroupItem (prevOpt, curr, target)) - - static member UpdateShellGroupItem (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ShellGroupItem) = - // update the inherited Element element - let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevFlyoutDisplayOptionsOpt = ValueNone - let mutable currFlyoutDisplayOptionsOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.FlyoutDisplayOptionsAttribKey.KeyValue then - currFlyoutDisplayOptionsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlyoutDisplayOptions) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.FlyoutDisplayOptionsAttribKey.KeyValue then - prevFlyoutDisplayOptionsOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.FlyoutDisplayOptions) - match prevFlyoutDisplayOptionsOpt, currFlyoutDisplayOptionsOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.FlyoutDisplayOptions <- currValue - | ValueSome _, ValueNone -> target.FlyoutDisplayOptions <- Xamarin.Forms.FlyoutDisplayOptions.AsSingleItem - | ValueNone, ValueNone -> () - - static member inline ConstructShellGroupItem(?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ShellGroupItem -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildShellGroupItem(0, - ?flyoutDisplayOptions=flyoutDisplayOptions, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncShellGroupItem, ViewBuilders.UpdateFuncShellGroupItem, attribBuilder) - - /// Builds the attributes for a SelectableItemsView in the view - static member inline BuildSelectableItemsView(attribCount: int, - ?selectedItem: System.Object, - ?selectionChangedCommand: unit -> unit, - ?selectionChangedCommandParameter: System.Object, - ?selectionMode: Xamarin.Forms.SelectionMode, - ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, - ?emptyView: System.Object, - ?itemsLayout: Xamarin.Forms.IItemsLayout, - ?itemsSource: System.Collections.IEnumerable, - ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, - ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match selectedItem with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match selectionChangedCommand with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match selectionChangedCommandParameter with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match selectionMode with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match selectionChanged with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildItemsView(attribCount, ?emptyView=emptyView, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match selectedItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectedItemAttribKey, (v)) - match selectionChangedCommand with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionChangedCommandAttribKey, makeCommand(v)) - match selectionChangedCommandParameter with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionChangedCommandParameterAttribKey, (v)) - match selectionMode with None -> () | Some v -> attribBuilder.Add(ViewAttributes.selectableItemsModeAttribKey, (v)) - match selectionChanged with None -> () | Some v -> attribBuilder.Add(ViewAttributes.SelectionChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(v)) - attribBuilder - - static member val CreateFuncSelectableItemsView : (unit -> Xamarin.Forms.SelectableItemsView) = (fun () -> ViewBuilders.CreateSelectableItemsView()) with get, set - - static member CreateSelectableItemsView () : Xamarin.Forms.SelectableItemsView = - upcast (new Xamarin.Forms.SelectableItemsView()) - - static member val UpdateFuncSelectableItemsView = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.SelectableItemsView) -> ViewBuilders.UpdateSelectableItemsView (prevOpt, curr, target)) - - static member UpdateSelectableItemsView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.SelectableItemsView) = - // update the inherited ItemsView element - let baseElement = (if ViewProto.ProtoItemsView.IsNone then ViewProto.ProtoItemsView <- Some (ViewBuilders.ConstructItemsView())); ViewProto.ProtoItemsView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevSelectedItemOpt = ValueNone - let mutable currSelectedItemOpt = ValueNone - let mutable prevSelectionChangedCommandOpt = ValueNone - let mutable currSelectionChangedCommandOpt = ValueNone - let mutable prevSelectionChangedCommandParameterOpt = ValueNone - let mutable currSelectionChangedCommandParameterOpt = ValueNone - let mutable prevselectableItemsModeOpt = ValueNone - let mutable currselectableItemsModeOpt = ValueNone - let mutable prevSelectionChangedOpt = ValueNone - let mutable currSelectionChangedOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.SelectedItemAttribKey.KeyValue then - currSelectedItemOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.SelectionChangedCommandAttribKey.KeyValue then - currSelectionChangedCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.SelectionChangedCommandParameterAttribKey.KeyValue then - currSelectionChangedCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.selectableItemsModeAttribKey.KeyValue then - currselectableItemsModeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SelectionMode) - if kvp.Key = ViewAttributes.SelectionChangedAttribKey.KeyValue then - currSelectionChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.SelectedItemAttribKey.KeyValue then - prevSelectedItemOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.SelectionChangedCommandAttribKey.KeyValue then - prevSelectionChangedCommandOpt <- ValueSome (kvp.Value :?> System.Windows.Input.ICommand) - if kvp.Key = ViewAttributes.SelectionChangedCommandParameterAttribKey.KeyValue then - prevSelectionChangedCommandParameterOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.selectableItemsModeAttribKey.KeyValue then - prevselectableItemsModeOpt <- ValueSome (kvp.Value :?> Xamarin.Forms.SelectionMode) - if kvp.Key = ViewAttributes.SelectionChangedAttribKey.KeyValue then - prevSelectionChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler) - match prevSelectedItemOpt, currSelectedItemOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.SelectedItem <- currValue - | ValueSome _, ValueNone -> target.SelectedItem <- null - | ValueNone, ValueNone -> () - match prevSelectionChangedCommandOpt, currSelectionChangedCommandOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.SelectionChangedCommand <- currValue - | ValueSome _, ValueNone -> target.SelectionChangedCommand <- null - | ValueNone, ValueNone -> () - match prevSelectionChangedCommandParameterOpt, currSelectionChangedCommandParameterOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.SelectionChangedCommandParameter <- currValue - | ValueSome _, ValueNone -> target.SelectionChangedCommandParameter <- null - | ValueNone, ValueNone -> () - match prevselectableItemsModeOpt, currselectableItemsModeOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.SelectionMode <- currValue - | ValueSome _, ValueNone -> target.SelectionMode <- Xamarin.Forms.SelectionMode.None - | ValueNone, ValueNone -> () - match prevSelectionChangedOpt, currSelectionChangedOpt with - | ValueSome prevValue, ValueSome currValue when identical prevValue currValue -> () - | ValueSome prevValue, ValueSome currValue -> target.SelectionChanged.RemoveHandler(prevValue); target.SelectionChanged.AddHandler(currValue) - | ValueNone, ValueSome currValue -> target.SelectionChanged.AddHandler(currValue) - | ValueSome prevValue, ValueNone -> target.SelectionChanged.RemoveHandler(prevValue) - | ValueNone, ValueNone -> () - - static member inline ConstructSelectableItemsView(?selectedItem: System.Object, - ?selectionChangedCommand: unit -> unit, - ?selectionChangedCommandParameter: System.Object, - ?selectionMode: Xamarin.Forms.SelectionMode, - ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, - ?emptyView: System.Object, - ?itemsLayout: Xamarin.Forms.IItemsLayout, - ?itemsSource: System.Collections.IEnumerable, - ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, - ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.SelectableItemsView -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildSelectableItemsView(0, - ?selectedItem=selectedItem, - ?selectionChangedCommand=selectionChangedCommand, - ?selectionChangedCommandParameter=selectionChangedCommandParameter, - ?selectionMode=selectionMode, - ?selectionChanged=selectionChanged, - ?emptyView=emptyView, - ?itemsLayout=itemsLayout, - ?itemsSource=itemsSource, - ?scrollToRequested=scrollToRequested, - ?scrollTo=scrollTo, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncSelectableItemsView, ViewBuilders.UpdateFuncSelectableItemsView, attribBuilder) - - /// Builds the attributes for a ShellNavigationState in the view - static member inline BuildShellNavigationState(attribCount: int, - ?location: System.Uri) = - - let attribCount = match location with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = new AttributesBuilder(attribCount) - match location with None -> () | Some v -> attribBuilder.Add(ViewAttributes.LocationAttribKey, makeUri(v)) - attribBuilder - - static member val CreateFuncShellNavigationState : (unit -> Xamarin.Forms.ShellNavigationState) = (fun () -> ViewBuilders.CreateShellNavigationState()) with get, set - - static member CreateShellNavigationState () : Xamarin.Forms.ShellNavigationState = - upcast (new Xamarin.Forms.ShellNavigationState()) - - static member val UpdateFuncShellNavigationState = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ShellNavigationState) -> ViewBuilders.UpdateShellNavigationState (prevOpt, curr, target)) - - static member UpdateShellNavigationState (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ShellNavigationState) = - let mutable prevLocationOpt = ValueNone - let mutable currLocationOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.LocationAttribKey.KeyValue then - currLocationOpt <- ValueSome (kvp.Value :?> System.Uri) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.LocationAttribKey.KeyValue then - prevLocationOpt <- ValueSome (kvp.Value :?> System.Uri) - match prevLocationOpt, currLocationOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Location <- currValue - | ValueSome _, ValueNone -> target.Location <- null - | ValueNone, ValueNone -> () - - static member inline ConstructShellNavigationState(?location: System.Uri) = - - let attribBuilder = ViewBuilders.BuildShellNavigationState(0, - ?location=location) - - ViewElement.Create(ViewBuilders.CreateFuncShellNavigationState, ViewBuilders.UpdateFuncShellNavigationState, attribBuilder) - - /// Builds the attributes for a ShellContent in the view - static member inline BuildShellContent(attribCount: int, - ?content: ViewElement, - ?menuItems: seq, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match content with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match menuItems with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildElement(attribCount, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match content with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ContentAttribKey, (v)) - match menuItems with None -> () | Some v -> attribBuilder.Add(ViewAttributes.MenuItemsAttribKey, (v)) - attribBuilder - - static member val CreateFuncShellContent : (unit -> Xamarin.Forms.ShellContent) = (fun () -> ViewBuilders.CreateShellContent()) with get, set - - static member CreateShellContent () : Xamarin.Forms.ShellContent = - upcast (new Xamarin.Forms.ShellContent()) - - static member val UpdateFuncShellContent = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ShellContent) -> ViewBuilders.UpdateShellContent (prevOpt, curr, target)) - - static member UpdateShellContent (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ShellContent) = - // update the inherited Element element - let baseElement = (if ViewProto.ProtoElement.IsNone then ViewProto.ProtoElement <- Some (ViewBuilders.ConstructElement())); ViewProto.ProtoElement.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevContentOpt = ValueNone - let mutable currContentOpt = ValueNone - let mutable prevMenuItemsOpt = ValueNone - let mutable currMenuItemsOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.ContentAttribKey.KeyValue then - currContentOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.MenuItemsAttribKey.KeyValue then - currMenuItemsOpt <- ValueSome (kvp.Value :?> seq) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.ContentAttribKey.KeyValue then - prevContentOpt <- ValueSome (kvp.Value :?> System.Object) - if kvp.Key = ViewAttributes.MenuItemsAttribKey.KeyValue then - prevMenuItemsOpt <- ValueSome (kvp.Value :?> seq) - match prevContentOpt, currContentOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.Content <- currValue - | ValueSome _, ValueNone -> target.Content <- null - | ValueNone, ValueNone -> () - updateMenuItemsShellContent prevMenuItemsOpt currMenuItemsOpt target - - static member inline ConstructShellContent(?content: ViewElement, - ?menuItems: seq, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ShellContent -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildShellContent(0, - ?content=content, - ?menuItems=menuItems, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncShellContent, ViewBuilders.UpdateFuncShellContent, attribBuilder) - - /// Builds the attributes for a ShellItem in the view - static member inline BuildShellItem(attribCount: int, - ?currentItem: ViewElement, - ?items: seq, - ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match currentItem with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match items with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildShellGroupItem(attribCount, ?flyoutDisplayOptions=flyoutDisplayOptions, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match currentItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CurrentItemAttribKey, (v)) - match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsAttribKey, (v)) - attribBuilder - - static member val CreateFuncShellItem : (unit -> Xamarin.Forms.ShellItem) = (fun () -> ViewBuilders.CreateShellItem()) with get, set - - static member CreateShellItem () : Xamarin.Forms.ShellItem = - upcast (new Xamarin.Forms.ShellItem()) - - static member val UpdateFuncShellItem = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ShellItem) -> ViewBuilders.UpdateShellItem (prevOpt, curr, target)) - - static member UpdateShellItem (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ShellItem) = - // update the inherited ShellGroupItem element - let baseElement = (if ViewProto.ProtoShellGroupItem.IsNone then ViewProto.ProtoShellGroupItem <- Some (ViewBuilders.ConstructShellGroupItem())); ViewProto.ProtoShellGroupItem.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevCurrentItemOpt = ValueNone - let mutable currCurrentItemOpt = ValueNone - let mutable prevItemsOpt = ValueNone - let mutable currItemsOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then - currCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.ItemsAttribKey.KeyValue then - currItemsOpt <- ValueSome (kvp.Value :?> seq) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then - prevCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.ItemsAttribKey.KeyValue then - prevItemsOpt <- ValueSome (kvp.Value :?> seq) - match prevCurrentItemOpt, currCurrentItemOpt with - // For structured objects, dependsOn on reference equality - | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () - | ValueSome prevValue, ValueSome newValue when canReuseChild prevValue newValue -> - newValue.UpdateIncremental(prevValue, target.CurrentItem) - | _, ValueSome newValue -> - target.CurrentItem <- (newValue.Create() :?> Xamarin.Forms.ShellSection) - | ValueSome _, ValueNone -> - target.CurrentItem <- null - | ValueNone, ValueNone -> () - updateShellItemItems prevItemsOpt currItemsOpt target - - static member inline ConstructShellItem(?currentItem: ViewElement, - ?items: seq, - ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ShellItem -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildShellItem(0, - ?currentItem=currentItem, - ?items=items, - ?flyoutDisplayOptions=flyoutDisplayOptions, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncShellItem, ViewBuilders.UpdateFuncShellItem, attribBuilder) - - /// Builds the attributes for a ShellSection in the view - static member inline BuildShellSection(attribCount: int, - ?currentItem: ViewElement, - ?goToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, - ?items: seq, - ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match currentItem with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match goToAsync with Some _ -> attribCount + 1 | None -> attribCount - let attribCount = match items with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildShellGroupItem(attribCount, ?flyoutDisplayOptions=flyoutDisplayOptions, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match currentItem with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CurrentItemAttribKey, (v)) - match goToAsync with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ssGoToAsyncAttribKey, (v)) - match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.ItemsAttribKey, (v)) - attribBuilder - - static member val CreateFuncShellSection : (unit -> Xamarin.Forms.ShellSection) = (fun () -> ViewBuilders.CreateShellSection()) with get, set - - static member CreateShellSection () : Xamarin.Forms.ShellSection = - upcast (new Xamarin.Forms.ShellSection()) - - static member val UpdateFuncShellSection = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.ShellSection) -> ViewBuilders.UpdateShellSection (prevOpt, curr, target)) - - static member UpdateShellSection (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.ShellSection) = - // update the inherited ShellGroupItem element - let baseElement = (if ViewProto.ProtoShellGroupItem.IsNone then ViewProto.ProtoShellGroupItem <- Some (ViewBuilders.ConstructShellGroupItem())); ViewProto.ProtoShellGroupItem.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevCurrentItemOpt = ValueNone - let mutable currCurrentItemOpt = ValueNone - let mutable prevssGoToAsyncOpt = ValueNone - let mutable currssGoToAsyncOpt = ValueNone - let mutable prevItemsOpt = ValueNone - let mutable currItemsOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then - currCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.ssGoToAsyncAttribKey.KeyValue then - currssGoToAsyncOpt <- ValueSome (kvp.Value :?> string list * Map * Fabulous.DynamicViews.AnimationKind) - if kvp.Key = ViewAttributes.ItemsAttribKey.KeyValue then - currItemsOpt <- ValueSome (kvp.Value :?> seq) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.CurrentItemAttribKey.KeyValue then - prevCurrentItemOpt <- ValueSome (kvp.Value :?> ViewElement) - if kvp.Key = ViewAttributes.ssGoToAsyncAttribKey.KeyValue then - prevssGoToAsyncOpt <- ValueSome (kvp.Value :?> string list * Map * Fabulous.DynamicViews.AnimationKind) - if kvp.Key = ViewAttributes.ItemsAttribKey.KeyValue then - prevItemsOpt <- ValueSome (kvp.Value :?> seq) - match prevCurrentItemOpt, currCurrentItemOpt with - // For structured objects, dependsOn on reference equality - | ValueSome prevValue, ValueSome newValue when identical prevValue newValue -> () - | ValueSome prevValue, ValueSome newValue when canReuseChild prevValue newValue -> - newValue.UpdateIncremental(prevValue, target.CurrentItem) - | _, ValueSome newValue -> - target.CurrentItem <- (newValue.Create() :?> Xamarin.Forms.ShellContent) - | ValueSome _, ValueNone -> - target.CurrentItem <- null - | ValueNone, ValueNone -> () - (fun _ curr target -> triggerSSGoToAsync curr target) prevssGoToAsyncOpt currssGoToAsyncOpt target - updateShellSectionItems prevItemsOpt currItemsOpt target - - static member inline ConstructShellSection(?currentItem: ViewElement, - ?goToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, - ?items: seq, - ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ShellSection -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildShellSection(0, - ?currentItem=currentItem, - ?goToAsync=goToAsync, - ?items=items, - ?flyoutDisplayOptions=flyoutDisplayOptions, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncShellSection, ViewBuilders.UpdateFuncShellSection, attribBuilder) - - /// Builds the attributes for a CarouselView in the view - static member inline BuildCarouselView(attribCount: int, - ?items: seq, - ?emptyView: System.Object, - ?itemsLayout: Xamarin.Forms.IItemsLayout, - ?itemsSource: System.Collections.IEnumerable, - ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, - ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match items with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildItemsView(attribCount, ?emptyView=emptyView, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CarouselViewItemsAttribKey, (v)) - attribBuilder - - static member val CreateFuncCarouselView : (unit -> Xamarin.Forms.CarouselView) = (fun () -> ViewBuilders.CreateCarouselView()) with get, set - - static member CreateCarouselView () : Xamarin.Forms.CarouselView = - upcast (new Fabulous.DynamicViews.CustomCarouselView()) - - static member val UpdateFuncCarouselView = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.CarouselView) -> ViewBuilders.UpdateCarouselView (prevOpt, curr, target)) - - static member UpdateCarouselView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.CarouselView) = - // update the inherited ItemsView element - let baseElement = (if ViewProto.ProtoItemsView.IsNone then ViewProto.ProtoItemsView <- Some (ViewBuilders.ConstructItemsView())); ViewProto.ProtoItemsView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevCarouselViewItemsOpt = ValueNone - let mutable currCarouselViewItemsOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.CarouselViewItemsAttribKey.KeyValue then - currCarouselViewItemsOpt <- ValueSome (kvp.Value :?> seq) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.CarouselViewItemsAttribKey.KeyValue then - prevCarouselViewItemsOpt <- ValueSome (kvp.Value :?> seq) - updateCarouselViewItems prevCarouselViewItemsOpt currCarouselViewItemsOpt target - - static member inline ConstructCarouselView(?items: seq, - ?emptyView: System.Object, - ?itemsLayout: Xamarin.Forms.IItemsLayout, - ?itemsSource: System.Collections.IEnumerable, - ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, - ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.CarouselView -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildCarouselView(0, - ?items=items, - ?emptyView=emptyView, - ?itemsLayout=itemsLayout, - ?itemsSource=itemsSource, - ?scrollToRequested=scrollToRequested, - ?scrollTo=scrollTo, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncCarouselView, ViewBuilders.UpdateFuncCarouselView, attribBuilder) - - /// Builds the attributes for a CollectionView in the view - static member inline BuildCollectionView(attribCount: int, - ?items: seq, - ?selectedItem: System.Object, - ?selectionChangedCommand: unit -> unit, - ?selectionChangedCommandParameter: System.Object, - ?selectionMode: Xamarin.Forms.SelectionMode, - ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, - ?emptyView: System.Object, - ?itemsLayout: Xamarin.Forms.IItemsLayout, - ?itemsSource: System.Collections.IEnumerable, - ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, - ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: obj -> unit, - ?ref: ViewRef) = - - let attribCount = match items with Some _ -> attribCount + 1 | None -> attribCount - - let attribBuilder = ViewBuilders.BuildSelectableItemsView(attribCount, ?selectedItem=selectedItem, ?selectionChangedCommand=selectionChangedCommand, ?selectionChangedCommandParameter=selectionChangedCommandParameter, ?selectionMode=selectionMode, ?selectionChanged=selectionChanged, ?emptyView=emptyView, ?itemsLayout=itemsLayout, ?itemsSource=itemsSource, ?scrollToRequested=scrollToRequested, ?scrollTo=scrollTo, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?isTabStop=isTabStop, ?scaleX=scaleX, ?scaleY=scaleY, ?tabIndex=tabIndex, ?childrenReordered=childrenReordered, ?measureInvalidated=measureInvalidated, ?focused=focused, ?sizeChanged=sizeChanged, ?unfocused=unfocused, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref) - match items with None -> () | Some v -> attribBuilder.Add(ViewAttributes.CollectionViewItemsAttribKey, (v)) - attribBuilder - - static member val CreateFuncCollectionView : (unit -> Xamarin.Forms.CollectionView) = (fun () -> ViewBuilders.CreateCollectionView()) with get, set - - static member CreateCollectionView () : Xamarin.Forms.CollectionView = - upcast (new Fabulous.DynamicViews.CustomCollectionListView()) - - static member val UpdateFuncCollectionView = - (fun (prevOpt: ViewElement voption) (curr: ViewElement) (target: Xamarin.Forms.CollectionView) -> ViewBuilders.UpdateCollectionView (prevOpt, curr, target)) - - static member UpdateCollectionView (prevOpt: ViewElement voption, curr: ViewElement, target: Xamarin.Forms.CollectionView) = - // update the inherited SelectableItemsView element - let baseElement = (if ViewProto.ProtoSelectableItemsView.IsNone then ViewProto.ProtoSelectableItemsView <- Some (ViewBuilders.ConstructSelectableItemsView())); ViewProto.ProtoSelectableItemsView.Value - baseElement.UpdateInherited (prevOpt, curr, target) - let mutable prevCollectionViewItemsOpt = ValueNone - let mutable currCollectionViewItemsOpt = ValueNone - for kvp in curr.AttributesKeyed do - if kvp.Key = ViewAttributes.CollectionViewItemsAttribKey.KeyValue then - currCollectionViewItemsOpt <- ValueSome (kvp.Value :?> seq) - match prevOpt with - | ValueNone -> () - | ValueSome prev -> - for kvp in prev.AttributesKeyed do - if kvp.Key = ViewAttributes.CollectionViewItemsAttribKey.KeyValue then - prevCollectionViewItemsOpt <- ValueSome (kvp.Value :?> seq) - updateCollectionViewItems prevCollectionViewItemsOpt currCollectionViewItemsOpt target - - static member inline ConstructCollectionView(?items: seq, - ?selectedItem: System.Object, - ?selectionChangedCommand: unit -> unit, - ?selectionChangedCommandParameter: System.Object, - ?selectionMode: Xamarin.Forms.SelectionMode, - ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, - ?emptyView: System.Object, - ?itemsLayout: Xamarin.Forms.IItemsLayout, - ?itemsSource: System.Collections.IEnumerable, - ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, - ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.CollectionView -> unit), - ?ref: ViewRef) = - - let attribBuilder = ViewBuilders.BuildCollectionView(0, - ?items=items, - ?selectedItem=selectedItem, - ?selectionChangedCommand=selectionChangedCommand, - ?selectionChangedCommandParameter=selectionChangedCommandParameter, - ?selectionMode=selectionMode, - ?selectionChanged=selectionChanged, - ?emptyView=emptyView, - ?itemsLayout=itemsLayout, - ?itemsSource=itemsSource, - ?scrollToRequested=scrollToRequested, - ?scrollTo=scrollTo, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=(match created with None -> None | Some createdFunc -> Some (fun (target: obj) -> createdFunc (unbox target))), - ?ref=(match ref with None -> None | Some (ref: ViewRef) -> Some ref.Unbox)) - - ViewElement.Create(ViewBuilders.CreateFuncCollectionView, ViewBuilders.UpdateFuncCollectionView, attribBuilder) - -/// Viewer that allows to read the properties of a ViewElement representing a Element -type ElementViewer(element: ViewElement) = - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Element' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the ClassId property - member this.ClassId = element.GetAttributeKeyed(ViewAttributes.ClassIdAttribKey) - /// Get the value of the StyleId property - member this.StyleId = element.GetAttributeKeyed(ViewAttributes.StyleIdAttribKey) - /// Get the value of the AutomationId property - member this.AutomationId = element.GetAttributeKeyed(ViewAttributes.AutomationIdAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a VisualElement -type VisualElementViewer(element: ViewElement) = - inherit ElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.VisualElement' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the AnchorX property - member this.AnchorX = element.GetAttributeKeyed(ViewAttributes.AnchorXAttribKey) - /// Get the value of the AnchorY property - member this.AnchorY = element.GetAttributeKeyed(ViewAttributes.AnchorYAttribKey) - /// Get the value of the BackgroundColor property - member this.BackgroundColor = element.GetAttributeKeyed(ViewAttributes.BackgroundColorAttribKey) - /// Get the value of the HeightRequest property - member this.HeightRequest = element.GetAttributeKeyed(ViewAttributes.HeightRequestAttribKey) - /// Get the value of the InputTransparent property - member this.InputTransparent = element.GetAttributeKeyed(ViewAttributes.InputTransparentAttribKey) - /// Get the value of the IsEnabled property - member this.IsEnabled = element.GetAttributeKeyed(ViewAttributes.IsEnabledAttribKey) - /// Get the value of the IsVisible property - member this.IsVisible = element.GetAttributeKeyed(ViewAttributes.IsVisibleAttribKey) - /// Get the value of the MinimumHeightRequest property - member this.MinimumHeightRequest = element.GetAttributeKeyed(ViewAttributes.MinimumHeightRequestAttribKey) - /// Get the value of the MinimumWidthRequest property - member this.MinimumWidthRequest = element.GetAttributeKeyed(ViewAttributes.MinimumWidthRequestAttribKey) - /// Get the value of the Opacity property - member this.Opacity = element.GetAttributeKeyed(ViewAttributes.OpacityAttribKey) - /// Get the value of the Rotation property - member this.Rotation = element.GetAttributeKeyed(ViewAttributes.RotationAttribKey) - /// Get the value of the RotationX property - member this.RotationX = element.GetAttributeKeyed(ViewAttributes.RotationXAttribKey) - /// Get the value of the RotationY property - member this.RotationY = element.GetAttributeKeyed(ViewAttributes.RotationYAttribKey) - /// Get the value of the Scale property - member this.Scale = element.GetAttributeKeyed(ViewAttributes.ScaleAttribKey) - /// Get the value of the Style property - member this.Style = element.GetAttributeKeyed(ViewAttributes.StyleAttribKey) - /// Get the value of the StyleClass property - member this.StyleClass = element.GetAttributeKeyed(ViewAttributes.StyleClassAttribKey) - /// Get the value of the TranslationX property - member this.TranslationX = element.GetAttributeKeyed(ViewAttributes.TranslationXAttribKey) - /// Get the value of the TranslationY property - member this.TranslationY = element.GetAttributeKeyed(ViewAttributes.TranslationYAttribKey) - /// Get the value of the WidthRequest property - member this.WidthRequest = element.GetAttributeKeyed(ViewAttributes.WidthRequestAttribKey) - /// Get the value of the Resources property - member this.Resources = element.GetAttributeKeyed(ViewAttributes.ResourcesAttribKey) - /// Get the value of the Styles property - member this.Styles = element.GetAttributeKeyed(ViewAttributes.StylesAttribKey) - /// Get the value of the StyleSheets property - member this.StyleSheets = element.GetAttributeKeyed(ViewAttributes.StyleSheetsAttribKey) - /// Get the value of the IsTabStop property - member this.IsTabStop = element.GetAttributeKeyed(ViewAttributes.IsTabStopAttribKey) - /// Get the value of the ScaleX property - member this.ScaleX = element.GetAttributeKeyed(ViewAttributes.ScaleXAttribKey) - /// Get the value of the ScaleY property - member this.ScaleY = element.GetAttributeKeyed(ViewAttributes.ScaleYAttribKey) - /// Get the value of the TabIndex property - member this.TabIndex = element.GetAttributeKeyed(ViewAttributes.TabIndexAttribKey) - /// Get the value of the ChildrenReordered property - member this.ChildrenReordered = element.GetAttributeKeyed(ViewAttributes.ChildrenReorderedAttribKey) - /// Get the value of the MeasureInvalidated property - member this.MeasureInvalidated = element.GetAttributeKeyed(ViewAttributes.MeasureInvalidatedAttribKey) - /// Get the value of the Focused property - member this.Focused = element.GetAttributeKeyed(ViewAttributes.FocusedAttribKey) - /// Get the value of the SizeChanged property - member this.SizeChanged = element.GetAttributeKeyed(ViewAttributes.SizeChangedAttribKey) - /// Get the value of the Unfocused property - member this.Unfocused = element.GetAttributeKeyed(ViewAttributes.UnfocusedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a View -type ViewViewer(element: ViewElement) = - inherit VisualElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.View' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the HorizontalOptions property - member this.HorizontalOptions = element.GetAttributeKeyed(ViewAttributes.HorizontalOptionsAttribKey) - /// Get the value of the VerticalOptions property - member this.VerticalOptions = element.GetAttributeKeyed(ViewAttributes.VerticalOptionsAttribKey) - /// Get the value of the Margin property - member this.Margin = element.GetAttributeKeyed(ViewAttributes.MarginAttribKey) - /// Get the value of the GestureRecognizers property - member this.GestureRecognizers = element.GetAttributeKeyed(ViewAttributes.GestureRecognizersAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a IGestureRecognizer -type IGestureRecognizerViewer(element: ViewElement) = - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.IGestureRecognizer' is expected, but '%s' was provided." element.TargetType.FullName - -/// Viewer that allows to read the properties of a ViewElement representing a PanGestureRecognizer -type PanGestureRecognizerViewer(element: ViewElement) = - inherit ElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.PanGestureRecognizer' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the TouchPoints property - member this.TouchPoints = element.GetAttributeKeyed(ViewAttributes.TouchPointsAttribKey) - /// Get the value of the PanUpdated property - member this.PanUpdated = element.GetAttributeKeyed(ViewAttributes.PanUpdatedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a TapGestureRecognizer -type TapGestureRecognizerViewer(element: ViewElement) = - inherit ElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.TapGestureRecognizer' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Command property - member this.Command = element.GetAttributeKeyed(ViewAttributes.CommandAttribKey) - /// Get the value of the NumberOfTapsRequired property - member this.NumberOfTapsRequired = element.GetAttributeKeyed(ViewAttributes.NumberOfTapsRequiredAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ClickGestureRecognizer -type ClickGestureRecognizerViewer(element: ViewElement) = - inherit ElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ClickGestureRecognizer' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Command property - member this.Command = element.GetAttributeKeyed(ViewAttributes.CommandAttribKey) - /// Get the value of the NumberOfClicksRequired property - member this.NumberOfClicksRequired = element.GetAttributeKeyed(ViewAttributes.NumberOfClicksRequiredAttribKey) - /// Get the value of the Buttons property - member this.Buttons = element.GetAttributeKeyed(ViewAttributes.ButtonsAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a PinchGestureRecognizer -type PinchGestureRecognizerViewer(element: ViewElement) = - inherit ElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.PinchGestureRecognizer' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the IsPinching property - member this.IsPinching = element.GetAttributeKeyed(ViewAttributes.IsPinchingAttribKey) - /// Get the value of the PinchUpdated property - member this.PinchUpdated = element.GetAttributeKeyed(ViewAttributes.PinchUpdatedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a SwipeGestureRecognizer -type SwipeGestureRecognizerViewer(element: ViewElement) = - inherit ElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.SwipeGestureRecognizer' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Command property - member this.Command = element.GetAttributeKeyed(ViewAttributes.CommandAttribKey) - /// Get the value of the Direction property - member this.Direction = element.GetAttributeKeyed(ViewAttributes.SwipeGestureRecognizerDirectionAttribKey) - /// Get the value of the Threshold property - member this.Threshold = element.GetAttributeKeyed(ViewAttributes.ThresholdAttribKey) - /// Get the value of the Swiped property - member this.Swiped = element.GetAttributeKeyed(ViewAttributes.SwipedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ActivityIndicator -type ActivityIndicatorViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ActivityIndicator' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Color property - member this.Color = element.GetAttributeKeyed(ViewAttributes.ColorAttribKey) - /// Get the value of the IsRunning property - member this.IsRunning = element.GetAttributeKeyed(ViewAttributes.IsRunningAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a BoxView -type BoxViewViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.BoxView' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Color property - member this.Color = element.GetAttributeKeyed(ViewAttributes.ColorAttribKey) - /// Get the value of the CornerRadius property - member this.CornerRadius = element.GetAttributeKeyed(ViewAttributes.BoxViewCornerRadiusAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ProgressBar -type ProgressBarViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ProgressBar' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Progress property - member this.Progress = element.GetAttributeKeyed(ViewAttributes.ProgressAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Layout -type LayoutViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Layout' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the IsClippedToBounds property - member this.IsClippedToBounds = element.GetAttributeKeyed(ViewAttributes.IsClippedToBoundsAttribKey) - /// Get the value of the Padding property - member this.Padding = element.GetAttributeKeyed(ViewAttributes.PaddingAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ScrollView -type ScrollViewViewer(element: ViewElement) = - inherit LayoutViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ScrollView' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Content property - member this.Content = element.GetAttributeKeyed(ViewAttributes.ContentAttribKey) - /// Get the value of the Orientation property - member this.Orientation = element.GetAttributeKeyed(ViewAttributes.ScrollOrientationAttribKey) - /// Get the value of the HorizontalScrollBarVisibility property - member this.HorizontalScrollBarVisibility = element.GetAttributeKeyed(ViewAttributes.HorizontalScrollBarVisibilityAttribKey) - /// Get the value of the VerticalScrollBarVisibility property - member this.VerticalScrollBarVisibility = element.GetAttributeKeyed(ViewAttributes.VerticalScrollBarVisibilityAttribKey) - /// Get the value of the ScrollTo property - member this.ScrollTo = element.GetAttributeKeyed(ViewAttributes.ScrollToAttribKey) - /// Get the value of the Scrolled property - member this.Scrolled = element.GetAttributeKeyed(ViewAttributes.ScrolledAttribKey) - /// Get the value of the LayoutAreaOverride property - member this.LayoutAreaOverride = element.GetAttributeKeyed(ViewAttributes.LayoutAreaOverrideAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a SearchBar -type SearchBarViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.SearchBar' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the CancelButtonColor property - member this.CancelButtonColor = element.GetAttributeKeyed(ViewAttributes.CancelButtonColorAttribKey) - /// Get the value of the FontFamily property - member this.FontFamily = element.GetAttributeKeyed(ViewAttributes.FontFamilyAttribKey) - /// Get the value of the FontAttributes property - member this.FontAttributes = element.GetAttributeKeyed(ViewAttributes.FontAttributesAttribKey) - /// Get the value of the FontSize property - member this.FontSize = element.GetAttributeKeyed(ViewAttributes.FontSizeAttribKey) - /// Get the value of the HorizontalTextAlignment property - member this.HorizontalTextAlignment = element.GetAttributeKeyed(ViewAttributes.HorizontalTextAlignmentAttribKey) - /// Get the value of the Placeholder property - member this.Placeholder = element.GetAttributeKeyed(ViewAttributes.PlaceholderAttribKey) - /// Get the value of the PlaceholderColor property - member this.PlaceholderColor = element.GetAttributeKeyed(ViewAttributes.PlaceholderColorAttribKey) - /// Get the value of the SearchCommand property - member this.SearchCommand = element.GetAttributeKeyed(ViewAttributes.SearchBarCommandAttribKey) - /// Get the value of the CanExecute property - member this.CanExecute = element.GetAttributeKeyed(ViewAttributes.SearchBarCanExecuteAttribKey) - /// Get the value of the Text property - member this.Text = element.GetAttributeKeyed(ViewAttributes.TextAttribKey) - /// Get the value of the TextColor property - member this.TextColor = element.GetAttributeKeyed(ViewAttributes.TextColorAttribKey) - /// Get the value of the TextChanged property - member this.TextChanged = element.GetAttributeKeyed(ViewAttributes.SearchBarTextChangedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Button -type ButtonViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Button' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Text property - member this.Text = element.GetAttributeKeyed(ViewAttributes.TextAttribKey) - /// Get the value of the Command property - member this.Command = element.GetAttributeKeyed(ViewAttributes.ButtonCommandAttribKey) - /// Get the value of the CanExecute property - member this.CanExecute = element.GetAttributeKeyed(ViewAttributes.ButtonCanExecuteAttribKey) - /// Get the value of the BorderColor property - member this.BorderColor = element.GetAttributeKeyed(ViewAttributes.BorderColorAttribKey) - /// Get the value of the BorderWidth property - member this.BorderWidth = element.GetAttributeKeyed(ViewAttributes.BorderWidthAttribKey) - /// Get the value of the ContentLayout property - member this.ContentLayout = element.GetAttributeKeyed(ViewAttributes.ContentLayoutAttribKey) - /// Get the value of the CornerRadius property - member this.CornerRadius = element.GetAttributeKeyed(ViewAttributes.ButtonCornerRadiusAttribKey) - /// Get the value of the FontFamily property - member this.FontFamily = element.GetAttributeKeyed(ViewAttributes.FontFamilyAttribKey) - /// Get the value of the FontAttributes property - member this.FontAttributes = element.GetAttributeKeyed(ViewAttributes.FontAttributesAttribKey) - /// Get the value of the FontSize property - member this.FontSize = element.GetAttributeKeyed(ViewAttributes.FontSizeAttribKey) - /// Get the value of the Image property - member this.Image = element.GetAttributeKeyed(ViewAttributes.ButtonImageSourceAttribKey) - /// Get the value of the TextColor property - member this.TextColor = element.GetAttributeKeyed(ViewAttributes.TextColorAttribKey) - /// Get the value of the Padding property - member this.Padding = element.GetAttributeKeyed(ViewAttributes.PaddingAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Slider -type SliderViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Slider' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the MinimumMaximum property - member this.MinimumMaximum = element.GetAttributeKeyed(ViewAttributes.MinimumMaximumAttribKey) - /// Get the value of the Value property - member this.Value = element.GetAttributeKeyed(ViewAttributes.ValueAttribKey) - /// Get the value of the ValueChanged property - member this.ValueChanged = element.GetAttributeKeyed(ViewAttributes.ValueChangedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Stepper -type StepperViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Stepper' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the MinimumMaximum property - member this.MinimumMaximum = element.GetAttributeKeyed(ViewAttributes.MinimumMaximumAttribKey) - /// Get the value of the Value property - member this.Value = element.GetAttributeKeyed(ViewAttributes.ValueAttribKey) - /// Get the value of the Increment property - member this.Increment = element.GetAttributeKeyed(ViewAttributes.IncrementAttribKey) - /// Get the value of the ValueChanged property - member this.ValueChanged = element.GetAttributeKeyed(ViewAttributes.ValueChangedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Switch -type SwitchViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Switch' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the IsToggled property - member this.IsToggled = element.GetAttributeKeyed(ViewAttributes.IsToggledAttribKey) - /// Get the value of the Toggled property - member this.Toggled = element.GetAttributeKeyed(ViewAttributes.ToggledAttribKey) - /// Get the value of the OnColor property - member this.OnColor = element.GetAttributeKeyed(ViewAttributes.OnColorAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Cell -type CellViewer(element: ViewElement) = - inherit ElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Cell' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Height property - member this.Height = element.GetAttributeKeyed(ViewAttributes.HeightAttribKey) - /// Get the value of the IsEnabled property - member this.IsEnabled = element.GetAttributeKeyed(ViewAttributes.IsEnabledAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a SwitchCell -type SwitchCellViewer(element: ViewElement) = - inherit CellViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.SwitchCell' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the On property - member this.On = element.GetAttributeKeyed(ViewAttributes.OnAttribKey) - /// Get the value of the Text property - member this.Text = element.GetAttributeKeyed(ViewAttributes.TextAttribKey) - /// Get the value of the OnChanged property - member this.OnChanged = element.GetAttributeKeyed(ViewAttributes.OnChangedAttribKey) - /// Get the value of the OnColor property - member this.OnColor = element.GetAttributeKeyed(ViewAttributes.OnColorAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a TableView -type TableViewViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.TableView' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Intent property - member this.Intent = element.GetAttributeKeyed(ViewAttributes.IntentAttribKey) - /// Get the value of the HasUnevenRows property - member this.HasUnevenRows = element.GetAttributeKeyed(ViewAttributes.HasUnevenRowsAttribKey) - /// Get the value of the RowHeight property - member this.RowHeight = element.GetAttributeKeyed(ViewAttributes.RowHeightAttribKey) - /// Get the value of the Root property - member this.Root = element.GetAttributeKeyed(ViewAttributes.TableRootAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a RowDefinition -type RowDefinitionViewer(element: ViewElement) = - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.RowDefinition' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Height property - member this.Height = element.GetAttributeKeyed(ViewAttributes.RowDefinitionHeightAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ColumnDefinition -type ColumnDefinitionViewer(element: ViewElement) = - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ColumnDefinition' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Width property - member this.Width = element.GetAttributeKeyed(ViewAttributes.ColumnDefinitionWidthAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Grid -type GridViewer(element: ViewElement) = - inherit LayoutViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Grid' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the RowDefinitions property - member this.RowDefinitions = element.GetAttributeKeyed(ViewAttributes.GridRowDefinitionsAttribKey) - /// Get the value of the ColumnDefinitions property - member this.ColumnDefinitions = element.GetAttributeKeyed(ViewAttributes.GridColumnDefinitionsAttribKey) - /// Get the value of the RowSpacing property - member this.RowSpacing = element.GetAttributeKeyed(ViewAttributes.RowSpacingAttribKey) - /// Get the value of the ColumnSpacing property - member this.ColumnSpacing = element.GetAttributeKeyed(ViewAttributes.ColumnSpacingAttribKey) - /// Get the value of the Children property - member this.Children = element.GetAttributeKeyed(ViewAttributes.ChildrenAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a AbsoluteLayout -type AbsoluteLayoutViewer(element: ViewElement) = - inherit LayoutViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.AbsoluteLayout' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Children property - member this.Children = element.GetAttributeKeyed(ViewAttributes.ChildrenAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a RelativeLayout -type RelativeLayoutViewer(element: ViewElement) = - inherit LayoutViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.RelativeLayout' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Children property - member this.Children = element.GetAttributeKeyed(ViewAttributes.ChildrenAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a FlexLayout -type FlexLayoutViewer(element: ViewElement) = - inherit LayoutViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.FlexLayout' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the AlignContent property - member this.AlignContent = element.GetAttributeKeyed(ViewAttributes.AlignContentAttribKey) - /// Get the value of the AlignItems property - member this.AlignItems = element.GetAttributeKeyed(ViewAttributes.AlignItemsAttribKey) - /// Get the value of the Direction property - member this.Direction = element.GetAttributeKeyed(ViewAttributes.FlexLayoutDirectionAttribKey) - /// Get the value of the Position property - member this.Position = element.GetAttributeKeyed(ViewAttributes.PositionAttribKey) - /// Get the value of the Wrap property - member this.Wrap = element.GetAttributeKeyed(ViewAttributes.WrapAttribKey) - /// Get the value of the JustifyContent property - member this.JustifyContent = element.GetAttributeKeyed(ViewAttributes.JustifyContentAttribKey) - /// Get the value of the Children property - member this.Children = element.GetAttributeKeyed(ViewAttributes.ChildrenAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a TemplatedView -type TemplatedViewViewer(element: ViewElement) = - inherit LayoutViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.TemplatedView' is expected, but '%s' was provided." element.TargetType.FullName - -/// Viewer that allows to read the properties of a ViewElement representing a ContentView -type ContentViewViewer(element: ViewElement) = - inherit TemplatedViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ContentView' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Content property - member this.Content = element.GetAttributeKeyed(ViewAttributes.ContentAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a DatePicker -type DatePickerViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.DatePicker' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Date property - member this.Date = element.GetAttributeKeyed(ViewAttributes.DateAttribKey) - /// Get the value of the Format property - member this.Format = element.GetAttributeKeyed(ViewAttributes.FormatAttribKey) - /// Get the value of the MinimumDate property - member this.MinimumDate = element.GetAttributeKeyed(ViewAttributes.MinimumDateAttribKey) - /// Get the value of the MaximumDate property - member this.MaximumDate = element.GetAttributeKeyed(ViewAttributes.MaximumDateAttribKey) - /// Get the value of the DateSelected property - member this.DateSelected = element.GetAttributeKeyed(ViewAttributes.DateSelectedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Picker -type PickerViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Picker' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the ItemsSource property - member this.ItemsSource = element.GetAttributeKeyed(ViewAttributes.PickerItemsSourceAttribKey) - /// Get the value of the SelectedIndex property - member this.SelectedIndex = element.GetAttributeKeyed(ViewAttributes.SelectedIndexAttribKey) - /// Get the value of the Title property - member this.Title = element.GetAttributeKeyed(ViewAttributes.TitleAttribKey) - /// Get the value of the TextColor property - member this.TextColor = element.GetAttributeKeyed(ViewAttributes.TextColorAttribKey) - /// Get the value of the SelectedIndexChanged property - member this.SelectedIndexChanged = element.GetAttributeKeyed(ViewAttributes.SelectedIndexChangedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Frame -type FrameViewer(element: ViewElement) = - inherit ContentViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Frame' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the BorderColor property - member this.BorderColor = element.GetAttributeKeyed(ViewAttributes.BorderColorAttribKey) - /// Get the value of the CornerRadius property - member this.CornerRadius = element.GetAttributeKeyed(ViewAttributes.FrameCornerRadiusAttribKey) - /// Get the value of the HasShadow property - member this.HasShadow = element.GetAttributeKeyed(ViewAttributes.HasShadowAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Image -type ImageViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Image' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Source property - member this.Source = element.GetAttributeKeyed(ViewAttributes.ImageSourceAttribKey) - /// Get the value of the Aspect property - member this.Aspect = element.GetAttributeKeyed(ViewAttributes.AspectAttribKey) - /// Get the value of the IsOpaque property - member this.IsOpaque = element.GetAttributeKeyed(ViewAttributes.IsOpaqueAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ImageButton -type ImageButtonViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ImageButton' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Command property - member this.Command = element.GetAttributeKeyed(ViewAttributes.ImageButtonCommandAttribKey) - /// Get the value of the Source property - member this.Source = element.GetAttributeKeyed(ViewAttributes.ImageSourceAttribKey) - /// Get the value of the Aspect property - member this.Aspect = element.GetAttributeKeyed(ViewAttributes.AspectAttribKey) - /// Get the value of the BorderColor property - member this.BorderColor = element.GetAttributeKeyed(ViewAttributes.BorderColorAttribKey) - /// Get the value of the BorderWidth property - member this.BorderWidth = element.GetAttributeKeyed(ViewAttributes.BorderWidthAttribKey) - /// Get the value of the CornerRadius property - member this.CornerRadius = element.GetAttributeKeyed(ViewAttributes.ImageButtonCornerRadiusAttribKey) - /// Get the value of the IsOpaque property - member this.IsOpaque = element.GetAttributeKeyed(ViewAttributes.IsOpaqueAttribKey) - /// Get the value of the Padding property - member this.Padding = element.GetAttributeKeyed(ViewAttributes.PaddingAttribKey) - /// Get the value of the Clicked property - member this.Clicked = element.GetAttributeKeyed(ViewAttributes.ClickedAttribKey) - /// Get the value of the Pressed property - member this.Pressed = element.GetAttributeKeyed(ViewAttributes.PressedAttribKey) - /// Get the value of the Released property - member this.Released = element.GetAttributeKeyed(ViewAttributes.ReleasedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a InputView -type InputViewViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.InputView' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Keyboard property - member this.Keyboard = element.GetAttributeKeyed(ViewAttributes.KeyboardAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Editor -type EditorViewer(element: ViewElement) = - inherit InputViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Editor' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Text property - member this.Text = element.GetAttributeKeyed(ViewAttributes.TextAttribKey) - /// Get the value of the FontSize property - member this.FontSize = element.GetAttributeKeyed(ViewAttributes.FontSizeAttribKey) - /// Get the value of the FontFamily property - member this.FontFamily = element.GetAttributeKeyed(ViewAttributes.FontFamilyAttribKey) - /// Get the value of the FontAttributes property - member this.FontAttributes = element.GetAttributeKeyed(ViewAttributes.FontAttributesAttribKey) - /// Get the value of the TextColor property - member this.TextColor = element.GetAttributeKeyed(ViewAttributes.TextColorAttribKey) - /// Get the value of the Completed property - member this.Completed = element.GetAttributeKeyed(ViewAttributes.EditorCompletedAttribKey) - /// Get the value of the TextChanged property - member this.TextChanged = element.GetAttributeKeyed(ViewAttributes.TextChangedAttribKey) - /// Get the value of the AutoSize property - member this.AutoSize = element.GetAttributeKeyed(ViewAttributes.AutoSizeAttribKey) - /// Get the value of the Placeholder property - member this.Placeholder = element.GetAttributeKeyed(ViewAttributes.PlaceholderAttribKey) - /// Get the value of the PlaceholderColor property - member this.PlaceholderColor = element.GetAttributeKeyed(ViewAttributes.PlaceholderColorAttribKey) - /// Get the value of the IsTextPredictionEnabled property - member this.IsTextPredictionEnabled = element.GetAttributeKeyed(ViewAttributes.IsTextPredictionEnabledAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Entry -type EntryViewer(element: ViewElement) = - inherit InputViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Entry' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Text property - member this.Text = element.GetAttributeKeyed(ViewAttributes.TextAttribKey) - /// Get the value of the Placeholder property - member this.Placeholder = element.GetAttributeKeyed(ViewAttributes.PlaceholderAttribKey) - /// Get the value of the HorizontalTextAlignment property - member this.HorizontalTextAlignment = element.GetAttributeKeyed(ViewAttributes.HorizontalTextAlignmentAttribKey) - /// Get the value of the FontSize property - member this.FontSize = element.GetAttributeKeyed(ViewAttributes.FontSizeAttribKey) - /// Get the value of the FontFamily property - member this.FontFamily = element.GetAttributeKeyed(ViewAttributes.FontFamilyAttribKey) - /// Get the value of the FontAttributes property - member this.FontAttributes = element.GetAttributeKeyed(ViewAttributes.FontAttributesAttribKey) - /// Get the value of the TextColor property - member this.TextColor = element.GetAttributeKeyed(ViewAttributes.TextColorAttribKey) - /// Get the value of the PlaceholderColor property - member this.PlaceholderColor = element.GetAttributeKeyed(ViewAttributes.PlaceholderColorAttribKey) - /// Get the value of the IsPassword property - member this.IsPassword = element.GetAttributeKeyed(ViewAttributes.IsPasswordAttribKey) - /// Get the value of the Completed property - member this.Completed = element.GetAttributeKeyed(ViewAttributes.EntryCompletedAttribKey) - /// Get the value of the TextChanged property - member this.TextChanged = element.GetAttributeKeyed(ViewAttributes.TextChangedAttribKey) - /// Get the value of the IsTextPredictionEnabled property - member this.IsTextPredictionEnabled = element.GetAttributeKeyed(ViewAttributes.IsTextPredictionEnabledAttribKey) - /// Get the value of the ReturnType property - member this.ReturnType = element.GetAttributeKeyed(ViewAttributes.ReturnTypeAttribKey) - /// Get the value of the ReturnCommand property - member this.ReturnCommand = element.GetAttributeKeyed(ViewAttributes.ReturnCommandAttribKey) - /// Get the value of the CursorPosition property - member this.CursorPosition = element.GetAttributeKeyed(ViewAttributes.CursorPositionAttribKey) - /// Get the value of the SelectionLength property - member this.SelectionLength = element.GetAttributeKeyed(ViewAttributes.SelectionLengthAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a EntryCell -type EntryCellViewer(element: ViewElement) = - inherit CellViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Fabulous.CustomControls.CustomEntryCell' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Label property - member this.Label = element.GetAttributeKeyed(ViewAttributes.LabelAttribKey) - /// Get the value of the Text property - member this.Text = element.GetAttributeKeyed(ViewAttributes.TextAttribKey) - /// Get the value of the Keyboard property - member this.Keyboard = element.GetAttributeKeyed(ViewAttributes.KeyboardAttribKey) - /// Get the value of the Placeholder property - member this.Placeholder = element.GetAttributeKeyed(ViewAttributes.PlaceholderAttribKey) - /// Get the value of the HorizontalTextAlignment property - member this.HorizontalTextAlignment = element.GetAttributeKeyed(ViewAttributes.HorizontalTextAlignmentAttribKey) - /// Get the value of the Completed property - member this.Completed = element.GetAttributeKeyed(ViewAttributes.EntryCompletedAttribKey) - /// Get the value of the TextChanged property - member this.TextChanged = element.GetAttributeKeyed(ViewAttributes.EntryCellTextChangedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Label -type LabelViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Label' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Text property - member this.Text = element.GetAttributeKeyed(ViewAttributes.TextAttribKey) - /// Get the value of the HorizontalTextAlignment property - member this.HorizontalTextAlignment = element.GetAttributeKeyed(ViewAttributes.HorizontalTextAlignmentAttribKey) - /// Get the value of the VerticalTextAlignment property - member this.VerticalTextAlignment = element.GetAttributeKeyed(ViewAttributes.VerticalTextAlignmentAttribKey) - /// Get the value of the FontSize property - member this.FontSize = element.GetAttributeKeyed(ViewAttributes.FontSizeAttribKey) - /// Get the value of the FontFamily property - member this.FontFamily = element.GetAttributeKeyed(ViewAttributes.FontFamilyAttribKey) - /// Get the value of the FontAttributes property - member this.FontAttributes = element.GetAttributeKeyed(ViewAttributes.FontAttributesAttribKey) - /// Get the value of the TextColor property - member this.TextColor = element.GetAttributeKeyed(ViewAttributes.TextColorAttribKey) - /// Get the value of the FormattedText property - member this.FormattedText = element.GetAttributeKeyed(ViewAttributes.FormattedTextAttribKey) - /// Get the value of the LineBreakMode property - member this.LineBreakMode = element.GetAttributeKeyed(ViewAttributes.LineBreakModeAttribKey) - /// Get the value of the LineHeight property - member this.LineHeight = element.GetAttributeKeyed(ViewAttributes.LineHeightAttribKey) - /// Get the value of the MaxLines property - member this.MaxLines = element.GetAttributeKeyed(ViewAttributes.MaxLinesAttribKey) - /// Get the value of the TextDecorations property - member this.TextDecorations = element.GetAttributeKeyed(ViewAttributes.TextDecorationsAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a StackLayout -type StackLayoutViewer(element: ViewElement) = - inherit LayoutViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.StackLayout' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Children property - member this.Children = element.GetAttributeKeyed(ViewAttributes.ChildrenAttribKey) - /// Get the value of the Orientation property - member this.Orientation = element.GetAttributeKeyed(ViewAttributes.StackOrientationAttribKey) - /// Get the value of the Spacing property - member this.Spacing = element.GetAttributeKeyed(ViewAttributes.SpacingAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Span -type SpanViewer(element: ViewElement) = - inherit ElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Span' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the FontFamily property - member this.FontFamily = element.GetAttributeKeyed(ViewAttributes.FontFamilyAttribKey) - /// Get the value of the FontAttributes property - member this.FontAttributes = element.GetAttributeKeyed(ViewAttributes.FontAttributesAttribKey) - /// Get the value of the FontSize property - member this.FontSize = element.GetAttributeKeyed(ViewAttributes.FontSizeAttribKey) - /// Get the value of the BackgroundColor property - member this.BackgroundColor = element.GetAttributeKeyed(ViewAttributes.BackgroundColorAttribKey) - /// Get the value of the ForegroundColor property - member this.ForegroundColor = element.GetAttributeKeyed(ViewAttributes.ForegroundColorAttribKey) - /// Get the value of the Text property - member this.Text = element.GetAttributeKeyed(ViewAttributes.TextAttribKey) - /// Get the value of the PropertyChanged property - member this.PropertyChanged = element.GetAttributeKeyed(ViewAttributes.PropertyChangedAttribKey) - /// Get the value of the LineHeight property - member this.LineHeight = element.GetAttributeKeyed(ViewAttributes.LineHeightAttribKey) - /// Get the value of the TextDecorations property - member this.TextDecorations = element.GetAttributeKeyed(ViewAttributes.TextDecorationsAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a FormattedString -type FormattedStringViewer(element: ViewElement) = - inherit ElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.FormattedString' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Spans property - member this.Spans = element.GetAttributeKeyed(ViewAttributes.SpansAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a TimePicker -type TimePickerViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.TimePicker' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Time property - member this.Time = element.GetAttributeKeyed(ViewAttributes.TimeAttribKey) - /// Get the value of the Format property - member this.Format = element.GetAttributeKeyed(ViewAttributes.FormatAttribKey) - /// Get the value of the TextColor property - member this.TextColor = element.GetAttributeKeyed(ViewAttributes.TextColorAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a WebView -type WebViewViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.WebView' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Source property - member this.Source = element.GetAttributeKeyed(ViewAttributes.WebSourceAttribKey) - /// Get the value of the Reload property - member this.Reload = element.GetAttributeKeyed(ViewAttributes.ReloadAttribKey) - /// Get the value of the Navigated property - member this.Navigated = element.GetAttributeKeyed(ViewAttributes.NavigatedAttribKey) - /// Get the value of the Navigating property - member this.Navigating = element.GetAttributeKeyed(ViewAttributes.NavigatingAttribKey) - /// Get the value of the ReloadRequested property - member this.ReloadRequested = element.GetAttributeKeyed(ViewAttributes.ReloadRequestedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Page -type PageViewer(element: ViewElement) = - inherit VisualElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Page' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Title property - member this.Title = element.GetAttributeKeyed(ViewAttributes.TitleAttribKey) - /// Get the value of the BackgroundImage property - member this.BackgroundImage = element.GetAttributeKeyed(ViewAttributes.BackgroundImageAttribKey) - /// Get the value of the Icon property - member this.Icon = element.GetAttributeKeyed(ViewAttributes.IconAttribKey) - /// Get the value of the IsBusy property - member this.IsBusy = element.GetAttributeKeyed(ViewAttributes.IsBusyAttribKey) - /// Get the value of the Padding property - member this.Padding = element.GetAttributeKeyed(ViewAttributes.PaddingAttribKey) - /// Get the value of the ToolbarItems property - member this.ToolbarItems = element.GetAttributeKeyed(ViewAttributes.ToolbarItemsAttribKey) - /// Get the value of the UseSafeArea property - member this.UseSafeArea = element.GetAttributeKeyed(ViewAttributes.UseSafeAreaAttribKey) - /// Get the value of the Appearing property - member this.Appearing = element.GetAttributeKeyed(ViewAttributes.Page_AppearingAttribKey) - /// Get the value of the Disappearing property - member this.Disappearing = element.GetAttributeKeyed(ViewAttributes.Page_DisappearingAttribKey) - /// Get the value of the LayoutChanged property - member this.LayoutChanged = element.GetAttributeKeyed(ViewAttributes.Page_LayoutChangedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a CarouselPage -type CarouselPageViewer(element: ViewElement) = - inherit PageViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.CarouselPage' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Children property - member this.Children = element.GetAttributeKeyed(ViewAttributes.ChildrenAttribKey) - /// Get the value of the CurrentPage property - member this.CurrentPage = element.GetAttributeKeyed(ViewAttributes.CarouselPage_CurrentPageAttribKey) - /// Get the value of the CurrentPageChanged property - member this.CurrentPageChanged = element.GetAttributeKeyed(ViewAttributes.CarouselPage_CurrentPageChangedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a NavigationPage -type NavigationPageViewer(element: ViewElement) = - inherit PageViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.NavigationPage' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Pages property - member this.Pages = element.GetAttributeKeyed(ViewAttributes.PagesAttribKey) - /// Get the value of the BarBackgroundColor property - member this.BarBackgroundColor = element.GetAttributeKeyed(ViewAttributes.BarBackgroundColorAttribKey) - /// Get the value of the BarTextColor property - member this.BarTextColor = element.GetAttributeKeyed(ViewAttributes.BarTextColorAttribKey) - /// Get the value of the Popped property - member this.Popped = element.GetAttributeKeyed(ViewAttributes.PoppedAttribKey) - /// Get the value of the PoppedToRoot property - member this.PoppedToRoot = element.GetAttributeKeyed(ViewAttributes.PoppedToRootAttribKey) - /// Get the value of the Pushed property - member this.Pushed = element.GetAttributeKeyed(ViewAttributes.PushedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a TabbedPage -type TabbedPageViewer(element: ViewElement) = - inherit PageViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.TabbedPage' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Children property - member this.Children = element.GetAttributeKeyed(ViewAttributes.ChildrenAttribKey) - /// Get the value of the BarBackgroundColor property - member this.BarBackgroundColor = element.GetAttributeKeyed(ViewAttributes.BarBackgroundColorAttribKey) - /// Get the value of the BarTextColor property - member this.BarTextColor = element.GetAttributeKeyed(ViewAttributes.BarTextColorAttribKey) - /// Get the value of the CurrentPage property - member this.CurrentPage = element.GetAttributeKeyed(ViewAttributes.TabbedPage_CurrentPageAttribKey) - /// Get the value of the CurrentPageChanged property - member this.CurrentPageChanged = element.GetAttributeKeyed(ViewAttributes.TabbedPage_CurrentPageChangedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ContentPage -type ContentPageViewer(element: ViewElement) = - inherit PageViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ContentPage' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Content property - member this.Content = element.GetAttributeKeyed(ViewAttributes.ContentAttribKey) - /// Get the value of the OnSizeAllocatedCallback property - member this.OnSizeAllocatedCallback = element.GetAttributeKeyed(ViewAttributes.OnSizeAllocatedCallbackAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a MasterDetailPage -type MasterDetailPageViewer(element: ViewElement) = - inherit PageViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.MasterDetailPage' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Master property - member this.Master = element.GetAttributeKeyed(ViewAttributes.MasterAttribKey) - /// Get the value of the Detail property - member this.Detail = element.GetAttributeKeyed(ViewAttributes.DetailAttribKey) - /// Get the value of the IsGestureEnabled property - member this.IsGestureEnabled = element.GetAttributeKeyed(ViewAttributes.IsGestureEnabledAttribKey) - /// Get the value of the IsPresented property - member this.IsPresented = element.GetAttributeKeyed(ViewAttributes.IsPresentedAttribKey) - /// Get the value of the MasterBehavior property - member this.MasterBehavior = element.GetAttributeKeyed(ViewAttributes.MasterBehaviorAttribKey) - /// Get the value of the IsPresentedChanged property - member this.IsPresentedChanged = element.GetAttributeKeyed(ViewAttributes.IsPresentedChangedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a MenuItem -type MenuItemViewer(element: ViewElement) = - inherit ElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.MenuItem' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Text property - member this.Text = element.GetAttributeKeyed(ViewAttributes.TextAttribKey) - /// Get the value of the Command property - member this.Command = element.GetAttributeKeyed(ViewAttributes.CommandAttribKey) - /// Get the value of the Icon property - member this.Icon = element.GetAttributeKeyed(ViewAttributes.IconAttribKey) - /// Get the value of the Accelerator property - member this.Accelerator = element.GetAttributeKeyed(ViewAttributes.AcceleratorAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a TextCell -type TextCellViewer(element: ViewElement) = - inherit CellViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.TextCell' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Text property - member this.Text = element.GetAttributeKeyed(ViewAttributes.TextAttribKey) - /// Get the value of the Detail property - member this.Detail = element.GetAttributeKeyed(ViewAttributes.TextDetailAttribKey) - /// Get the value of the TextColor property - member this.TextColor = element.GetAttributeKeyed(ViewAttributes.TextColorAttribKey) - /// Get the value of the DetailColor property - member this.DetailColor = element.GetAttributeKeyed(ViewAttributes.TextDetailColorAttribKey) - /// Get the value of the Command property - member this.Command = element.GetAttributeKeyed(ViewAttributes.TextCellCommandAttribKey) - /// Get the value of the CanExecute property - member this.CanExecute = element.GetAttributeKeyed(ViewAttributes.TextCellCanExecuteAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ToolbarItem -type ToolbarItemViewer(element: ViewElement) = - inherit MenuItemViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ToolbarItem' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Order property - member this.Order = element.GetAttributeKeyed(ViewAttributes.OrderAttribKey) - /// Get the value of the Priority property - member this.Priority = element.GetAttributeKeyed(ViewAttributes.PriorityAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ImageCell -type ImageCellViewer(element: ViewElement) = - inherit TextCellViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ImageCell' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the ImageSource property - member this.ImageSource = element.GetAttributeKeyed(ViewAttributes.ImageSourceAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ViewCell -type ViewCellViewer(element: ViewElement) = - inherit CellViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ViewCell' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the View property - member this.View = element.GetAttributeKeyed(ViewAttributes.ViewAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ListView -type ListViewViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ListView' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the ItemsSource property - member this.ItemsSource = element.GetAttributeKeyed(ViewAttributes.ListViewItemsAttribKey) - /// Get the value of the Footer property - member this.Footer = element.GetAttributeKeyed(ViewAttributes.FooterAttribKey) - /// Get the value of the HasUnevenRows property - member this.HasUnevenRows = element.GetAttributeKeyed(ViewAttributes.HasUnevenRowsAttribKey) - /// Get the value of the Header property - member this.Header = element.GetAttributeKeyed(ViewAttributes.HeaderAttribKey) - /// Get the value of the HeaderTemplate property - member this.HeaderTemplate = element.GetAttributeKeyed(ViewAttributes.HeaderTemplateAttribKey) - /// Get the value of the IsGroupingEnabled property - member this.IsGroupingEnabled = element.GetAttributeKeyed(ViewAttributes.IsGroupingEnabledAttribKey) - /// Get the value of the IsPullToRefreshEnabled property - member this.IsPullToRefreshEnabled = element.GetAttributeKeyed(ViewAttributes.IsPullToRefreshEnabledAttribKey) - /// Get the value of the IsRefreshing property - member this.IsRefreshing = element.GetAttributeKeyed(ViewAttributes.IsRefreshingAttribKey) - /// Get the value of the RefreshCommand property - member this.RefreshCommand = element.GetAttributeKeyed(ViewAttributes.RefreshCommandAttribKey) - /// Get the value of the RowHeight property - member this.RowHeight = element.GetAttributeKeyed(ViewAttributes.RowHeightAttribKey) - /// Get the value of the SelectedItem property - member this.SelectedItem = element.GetAttributeKeyed(ViewAttributes.ListView_SelectedItemAttribKey) - /// Get the value of the SeparatorVisibility property - member this.SeparatorVisibility = element.GetAttributeKeyed(ViewAttributes.ListView_SeparatorVisibilityAttribKey) - /// Get the value of the SeparatorColor property - member this.SeparatorColor = element.GetAttributeKeyed(ViewAttributes.ListView_SeparatorColorAttribKey) - /// Get the value of the ItemAppearing property - member this.ItemAppearing = element.GetAttributeKeyed(ViewAttributes.ListView_ItemAppearingAttribKey) - /// Get the value of the ItemDisappearing property - member this.ItemDisappearing = element.GetAttributeKeyed(ViewAttributes.ListView_ItemDisappearingAttribKey) - /// Get the value of the ItemSelected property - member this.ItemSelected = element.GetAttributeKeyed(ViewAttributes.ListView_ItemSelectedAttribKey) - /// Get the value of the ItemTapped property - member this.ItemTapped = element.GetAttributeKeyed(ViewAttributes.ListView_ItemTappedAttribKey) - /// Get the value of the Refreshing property - member this.Refreshing = element.GetAttributeKeyed(ViewAttributes.ListView_RefreshingAttribKey) - /// Get the value of the SelectionMode property - member this.SelectionMode = element.GetAttributeKeyed(ViewAttributes.SelectionModeAttribKey) - /// Get the value of the HorizontalScrollBarVisibility property - member this.HorizontalScrollBarVisibility = element.GetAttributeKeyed(ViewAttributes.HorizontalScrollBarVisibilityAttribKey) - /// Get the value of the VerticalScrollBarVisibility property - member this.VerticalScrollBarVisibility = element.GetAttributeKeyed(ViewAttributes.VerticalScrollBarVisibilityAttribKey) - /// Get the value of the RefreshControlColor property - member this.RefreshControlColor = element.GetAttributeKeyed(ViewAttributes.RefreshControlColorAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ListViewGrouped -type ListViewGroupedViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ListView' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the ItemsSource property - member this.ItemsSource = element.GetAttributeKeyed(ViewAttributes.ListViewGrouped_ItemsSourceAttribKey) - /// Get the value of the ShowJumpList property - member this.ShowJumpList = element.GetAttributeKeyed(ViewAttributes.ListViewGrouped_ShowJumpListAttribKey) - /// Get the value of the Footer property - member this.Footer = element.GetAttributeKeyed(ViewAttributes.FooterAttribKey) - /// Get the value of the HasUnevenRows property - member this.HasUnevenRows = element.GetAttributeKeyed(ViewAttributes.HasUnevenRowsAttribKey) - /// Get the value of the Header property - member this.Header = element.GetAttributeKeyed(ViewAttributes.HeaderAttribKey) - /// Get the value of the IsPullToRefreshEnabled property - member this.IsPullToRefreshEnabled = element.GetAttributeKeyed(ViewAttributes.IsPullToRefreshEnabledAttribKey) - /// Get the value of the IsRefreshing property - member this.IsRefreshing = element.GetAttributeKeyed(ViewAttributes.IsRefreshingAttribKey) - /// Get the value of the RefreshCommand property - member this.RefreshCommand = element.GetAttributeKeyed(ViewAttributes.RefreshCommandAttribKey) - /// Get the value of the RowHeight property - member this.RowHeight = element.GetAttributeKeyed(ViewAttributes.RowHeightAttribKey) - /// Get the value of the SelectedItem property - member this.SelectedItem = element.GetAttributeKeyed(ViewAttributes.ListViewGrouped_SelectedItemAttribKey) - /// Get the value of the SeparatorVisibility property - member this.SeparatorVisibility = element.GetAttributeKeyed(ViewAttributes.SeparatorVisibilityAttribKey) - /// Get the value of the SeparatorColor property - member this.SeparatorColor = element.GetAttributeKeyed(ViewAttributes.SeparatorColorAttribKey) - /// Get the value of the ItemAppearing property - member this.ItemAppearing = element.GetAttributeKeyed(ViewAttributes.ListViewGrouped_ItemAppearingAttribKey) - /// Get the value of the ItemDisappearing property - member this.ItemDisappearing = element.GetAttributeKeyed(ViewAttributes.ListViewGrouped_ItemDisappearingAttribKey) - /// Get the value of the ItemSelected property - member this.ItemSelected = element.GetAttributeKeyed(ViewAttributes.ListViewGrouped_ItemSelectedAttribKey) - /// Get the value of the ItemTapped property - member this.ItemTapped = element.GetAttributeKeyed(ViewAttributes.ListViewGrouped_ItemTappedAttribKey) - /// Get the value of the Refreshing property - member this.Refreshing = element.GetAttributeKeyed(ViewAttributes.RefreshingAttribKey) - /// Get the value of the SelectionMode property - member this.SelectionMode = element.GetAttributeKeyed(ViewAttributes.SelectionModeAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a BackButtonBehavior -type BackButtonBehaviorViewer(element: ViewElement) = - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.BackButtonBehavior' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the TextOverride property - member this.TextOverride = element.GetAttributeKeyed(ViewAttributes.TextOverrideAttribKey) - /// Get the value of the Command property - member this.Command = element.GetAttributeKeyed(ViewAttributes.CommandAttribKey) - /// Get the value of the CommandParameter property - member this.CommandParameter = element.GetAttributeKeyed(ViewAttributes.CommandParameterAttribKey) - /// Get the value of the IconOverride property - member this.IconOverride = element.GetAttributeKeyed(ViewAttributes.IconOverrideAttribKey) - /// Get the value of the IsEnabled property - member this.IsEnabled = element.GetAttributeKeyed(ViewAttributes.IsEnabledAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a GridItemsLayout -type GridItemsLayoutViewer(element: ViewElement) = - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.GridItemsLayout' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Span property - member this.Span = element.GetAttributeKeyed(ViewAttributes.SpanAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ItemsView -type ItemsViewViewer(element: ViewElement) = - inherit ViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ItemsView' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the EmptyView property - member this.EmptyView = element.GetAttributeKeyed(ViewAttributes.EmptyViewAttribKey) - /// Get the value of the ItemsLayout property - member this.ItemsLayout = element.GetAttributeKeyed(ViewAttributes.ItemsLayoutAttribKey) - /// Get the value of the ItemsSource property - member this.ItemsSource = element.GetAttributeKeyed(ViewAttributes.ItemsSourceAttribKey) - /// Get the value of the ScrollToRequested property - member this.ScrollToRequested = element.GetAttributeKeyed(ViewAttributes.ScrollToRequestedAttribKey) - /// Get the value of the ScrollTo property - member this.ScrollTo = element.GetAttributeKeyed(ViewAttributes.iScrollToAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a SearchHandler -type SearchHandlerViewer(element: ViewElement) = - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.SearchHandler' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the ClearIcon property - member this.ClearIcon = element.GetAttributeKeyed(ViewAttributes.ClearIconAttribKey) - /// Get the value of the ClearIconHelpText property - member this.ClearIconHelpText = element.GetAttributeKeyed(ViewAttributes.ClearIconHelpTextAttribKey) - /// Get the value of the ClearIconName property - member this.ClearIconName = element.GetAttributeKeyed(ViewAttributes.ClearIconNameAttribKey) - /// Get the value of the ClearPlaceholderCommand property - member this.ClearPlaceholderCommand = element.GetAttributeKeyed(ViewAttributes.ClearPlaceholderCommandAttribKey) - /// Get the value of the ClearPlaceholderCommandParameter property - member this.ClearPlaceholderCommandParameter = element.GetAttributeKeyed(ViewAttributes.ClearPlaceholderCommandParameterAttribKey) - /// Get the value of the ClearPlaceholderEnabled property - member this.ClearPlaceholderEnabled = element.GetAttributeKeyed(ViewAttributes.ClearPlaceholderEnabledAttribKey) - /// Get the value of the ClearPlaceholderHelpText property - member this.ClearPlaceholderHelpText = element.GetAttributeKeyed(ViewAttributes.ClearPlaceholderHelpTextAttribKey) - /// Get the value of the ClearPlaceholderIcon property - member this.ClearPlaceholderIcon = element.GetAttributeKeyed(ViewAttributes.ClearPlaceholderIconAttribKey) - /// Get the value of the ClearPlaceholderName property - member this.ClearPlaceholderName = element.GetAttributeKeyed(ViewAttributes.ClearPlaceholderNameAttribKey) - /// Get the value of the Command property - member this.Command = element.GetAttributeKeyed(ViewAttributes.CommandAttribKey) - /// Get the value of the CommandParameter property - member this.CommandParameter = element.GetAttributeKeyed(ViewAttributes.CommandParameterAttribKey) - /// Get the value of the DisplayMemberName property - member this.DisplayMemberName = element.GetAttributeKeyed(ViewAttributes.DisplayMemberNameAttribKey) - /// Get the value of the IsSearchEnabled property - member this.IsSearchEnabled = element.GetAttributeKeyed(ViewAttributes.IsSearchEnabledAttribKey) - /// Get the value of the Placeholder property - member this.Placeholder = element.GetAttributeKeyed(ViewAttributes.PlaceholderAttribKey) - /// Get the value of the Query property - member this.Query = element.GetAttributeKeyed(ViewAttributes.QueryAttribKey) - /// Get the value of the QueryIcon property - member this.QueryIcon = element.GetAttributeKeyed(ViewAttributes.QueryIconAttribKey) - /// Get the value of the QueryIconHelpText property - member this.QueryIconHelpText = element.GetAttributeKeyed(ViewAttributes.QueryIconHelpTextAttribKey) - /// Get the value of the QueryIconName property - member this.QueryIconName = element.GetAttributeKeyed(ViewAttributes.QueryIconNameAttribKey) - /// Get the value of the SearchBoxVisibility property - member this.SearchBoxVisibility = element.GetAttributeKeyed(ViewAttributes.SearchBoxVisibilityAttribKey) - /// Get the value of the ShowsResults property - member this.ShowsResults = element.GetAttributeKeyed(ViewAttributes.ShowsResultsAttribKey) - /// Get the value of the ItemsSource property - member this.ItemsSource = element.GetAttributeKeyed(ViewAttributes.ItemsSourceAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a Shell -type ShellViewer(element: ViewElement) = - inherit PageViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.Shell' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Items property - member this.Items = element.GetAttributeKeyed(ViewAttributes.ItemsAttribKey) - /// Get the value of the MenuItems property - member this.MenuItems = element.GetAttributeKeyed(ViewAttributes.MenuItemsAttribKey) - /// Get the value of the CurrentItem property - member this.CurrentItem = element.GetAttributeKeyed(ViewAttributes.CurrentItemAttribKey) - /// Get the value of the FlyoutBackgroundColor property - member this.FlyoutBackgroundColor = element.GetAttributeKeyed(ViewAttributes.FlyoutBackgroundColorAttribKey) - /// Get the value of the FlyoutBehavior property - member this.FlyoutBehavior = element.GetAttributeKeyed(ViewAttributes.FlyoutBehaviorAttribKey) - /// Get the value of the FlyoutHeader property - member this.FlyoutHeader = element.GetAttributeKeyed(ViewAttributes.FlyoutHeaderAttribKey) - /// Get the value of the FlyoutHeaderBehavior property - member this.FlyoutHeaderBehavior = element.GetAttributeKeyed(ViewAttributes.FlyoutHeaderBehaviorAttribKey) - /// Get the value of the FlyoutIsPresented property - member this.FlyoutIsPresented = element.GetAttributeKeyed(ViewAttributes.FlyoutIsPresentedAttribKey) - /// Get the value of the Route property - member this.Route = element.GetAttributeKeyed(ViewAttributes.RouteAttribKey) - /// Get the value of the RouteHost property - member this.RouteHost = element.GetAttributeKeyed(ViewAttributes.RouteHostAttribKey) - /// Get the value of the RouteScheme property - member this.RouteScheme = element.GetAttributeKeyed(ViewAttributes.RouteSchemeAttribKey) - /// Get the value of the Navigated property - member this.Navigated = element.GetAttributeKeyed(ViewAttributes.OnNavigatedAttribKey) - /// Get the value of the Navigating property - member this.Navigating = element.GetAttributeKeyed(ViewAttributes.OnNavigatingAttribKey) - /// Get the value of the GoToAsync property - member this.GoToAsync = element.GetAttributeKeyed(ViewAttributes.GoToAsyncAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ShellGroupItem -type ShellGroupItemViewer(element: ViewElement) = - inherit ElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ShellGroupItem' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the FlyoutDisplayOptions property - member this.FlyoutDisplayOptions = element.GetAttributeKeyed(ViewAttributes.FlyoutDisplayOptionsAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a SelectableItemsView -type SelectableItemsViewViewer(element: ViewElement) = - inherit ItemsViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.SelectableItemsView' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the SelectedItem property - member this.SelectedItem = element.GetAttributeKeyed(ViewAttributes.SelectedItemAttribKey) - /// Get the value of the SelectionChangedCommand property - member this.SelectionChangedCommand = element.GetAttributeKeyed(ViewAttributes.SelectionChangedCommandAttribKey) - /// Get the value of the SelectionChangedCommandParameter property - member this.SelectionChangedCommandParameter = element.GetAttributeKeyed(ViewAttributes.SelectionChangedCommandParameterAttribKey) - /// Get the value of the SelectionMode property - member this.SelectionMode = element.GetAttributeKeyed(ViewAttributes.selectableItemsModeAttribKey) - /// Get the value of the SelectionChanged property - member this.SelectionChanged = element.GetAttributeKeyed(ViewAttributes.SelectionChangedAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ShellNavigationState -type ShellNavigationStateViewer(element: ViewElement) = - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ShellNavigationState' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Location property - member this.Location = element.GetAttributeKeyed(ViewAttributes.LocationAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ShellContent -type ShellContentViewer(element: ViewElement) = - inherit ElementViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ShellContent' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the Content property - member this.Content = element.GetAttributeKeyed(ViewAttributes.ContentAttribKey) - /// Get the value of the MenuItems property - member this.MenuItems = element.GetAttributeKeyed(ViewAttributes.MenuItemsAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ShellItem -type ShellItemViewer(element: ViewElement) = - inherit ShellGroupItemViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ShellItem' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the CurrentItem property - member this.CurrentItem = element.GetAttributeKeyed(ViewAttributes.CurrentItemAttribKey) - /// Get the value of the Items property - member this.Items = element.GetAttributeKeyed(ViewAttributes.ItemsAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a ShellSection -type ShellSectionViewer(element: ViewElement) = - inherit ShellGroupItemViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.ShellSection' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the CurrentItem property - member this.CurrentItem = element.GetAttributeKeyed(ViewAttributes.CurrentItemAttribKey) - /// Get the value of the GoToAsync property - member this.GoToAsync = element.GetAttributeKeyed(ViewAttributes.ssGoToAsyncAttribKey) - /// Get the value of the Items property - member this.Items = element.GetAttributeKeyed(ViewAttributes.ItemsAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a CarouselView -type CarouselViewViewer(element: ViewElement) = - inherit ItemsViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.CarouselView' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the ItemsSource property - member this.ItemsSource = element.GetAttributeKeyed(ViewAttributes.CarouselViewItemsAttribKey) - -/// Viewer that allows to read the properties of a ViewElement representing a CollectionView -type CollectionViewViewer(element: ViewElement) = - inherit SelectableItemsViewViewer(element) - do if not ((typeof).IsAssignableFrom(element.TargetType)) then failwithf "A ViewElement assignable to type 'Xamarin.Forms.CollectionView' is expected, but '%s' was provided." element.TargetType.FullName - /// Get the value of the ItemsSource property - member this.ItemsSource = element.GetAttributeKeyed(ViewAttributes.CollectionViewItemsAttribKey) - -type View() = - /// Describes a Element in the view - static member inline Element(?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Element -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructElement(?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a VisualElement in the view - static member inline VisualElement(?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.VisualElement -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructVisualElement(?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a View in the view - static member inline View(?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.View -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructView(?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a IGestureRecognizer in the view - static member inline IGestureRecognizer() = - - ViewBuilders.ConstructIGestureRecognizer() - - /// Describes a PanGestureRecognizer in the view - static member inline PanGestureRecognizer(?touchPoints: int, - ?panUpdated: Xamarin.Forms.PanUpdatedEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.PanGestureRecognizer -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructPanGestureRecognizer(?touchPoints=touchPoints, - ?panUpdated=panUpdated, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a TapGestureRecognizer in the view - static member inline TapGestureRecognizer(?command: unit -> unit, - ?numberOfTapsRequired: int, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.TapGestureRecognizer -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructTapGestureRecognizer(?command=command, - ?numberOfTapsRequired=numberOfTapsRequired, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ClickGestureRecognizer in the view - static member inline ClickGestureRecognizer(?command: unit -> unit, - ?numberOfClicksRequired: int, - ?buttons: Xamarin.Forms.ButtonsMask, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ClickGestureRecognizer -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructClickGestureRecognizer(?command=command, - ?numberOfClicksRequired=numberOfClicksRequired, - ?buttons=buttons, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a PinchGestureRecognizer in the view - static member inline PinchGestureRecognizer(?isPinching: bool, - ?pinchUpdated: Xamarin.Forms.PinchGestureUpdatedEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.PinchGestureRecognizer -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructPinchGestureRecognizer(?isPinching=isPinching, - ?pinchUpdated=pinchUpdated, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a SwipeGestureRecognizer in the view - static member inline SwipeGestureRecognizer(?command: unit -> unit, - ?direction: Xamarin.Forms.SwipeDirection, - ?threshold: System.UInt32, - ?swiped: Xamarin.Forms.SwipedEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.SwipeGestureRecognizer -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructSwipeGestureRecognizer(?command=command, - ?direction=direction, - ?threshold=threshold, - ?swiped=swiped, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ActivityIndicator in the view - static member inline ActivityIndicator(?color: Xamarin.Forms.Color, - ?isRunning: bool, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ActivityIndicator -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructActivityIndicator(?color=color, - ?isRunning=isRunning, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a BoxView in the view - static member inline BoxView(?color: Xamarin.Forms.Color, - ?cornerRadius: Xamarin.Forms.CornerRadius, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.BoxView -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructBoxView(?color=color, - ?cornerRadius=cornerRadius, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ProgressBar in the view - static member inline ProgressBar(?progress: double, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ProgressBar -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructProgressBar(?progress=progress, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a Layout in the view - static member inline Layout(?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Layout -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructLayout(?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ScrollView in the view - static member inline ScrollView(?content: ViewElement, - ?orientation: Xamarin.Forms.ScrollOrientation, - ?horizontalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, - ?verticalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, - ?scrollTo: float * float * Fabulous.DynamicViews.AnimationKind, - ?scrolled: Xamarin.Forms.ScrolledEventArgs -> unit, - ?layoutAreaOverride: Xamarin.Forms.Rectangle, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ScrollView -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructScrollView(?content=content, - ?orientation=orientation, - ?horizontalScrollBarVisibility=horizontalScrollBarVisibility, - ?verticalScrollBarVisibility=verticalScrollBarVisibility, - ?scrollTo=scrollTo, - ?scrolled=scrolled, - ?layoutAreaOverride=layoutAreaOverride, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a SearchBar in the view - static member inline SearchBar(?cancelButtonColor: Xamarin.Forms.Color, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?fontSize: obj, - ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, - ?placeholder: string, - ?placeholderColor: Xamarin.Forms.Color, - ?searchCommand: string -> unit, - ?canExecute: bool, - ?text: string, - ?textColor: Xamarin.Forms.Color, - ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.SearchBar -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructSearchBar(?cancelButtonColor=cancelButtonColor, - ?fontFamily=fontFamily, - ?fontAttributes=fontAttributes, - ?fontSize=fontSize, - ?horizontalTextAlignment=horizontalTextAlignment, - ?placeholder=placeholder, - ?placeholderColor=placeholderColor, - ?searchCommand=searchCommand, - ?canExecute=canExecute, - ?text=text, - ?textColor=textColor, - ?textChanged=textChanged, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a Button in the view - static member inline Button(?text: string, - ?command: unit -> unit, - ?canExecute: bool, - ?borderColor: Xamarin.Forms.Color, - ?borderWidth: double, - ?contentLayout: Xamarin.Forms.Button.ButtonContentLayout, - ?cornerRadius: int, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?fontSize: obj, - ?image: string, - ?textColor: Xamarin.Forms.Color, - ?padding: Xamarin.Forms.Thickness, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Button -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructButton(?text=text, - ?command=command, - ?canExecute=canExecute, - ?borderColor=borderColor, - ?borderWidth=borderWidth, - ?contentLayout=contentLayout, - ?cornerRadius=cornerRadius, - ?fontFamily=fontFamily, - ?fontAttributes=fontAttributes, - ?fontSize=fontSize, - ?image=image, - ?textColor=textColor, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a Slider in the view - static member inline Slider(?minimumMaximum: float * float, - ?value: double, - ?valueChanged: Xamarin.Forms.ValueChangedEventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Slider -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructSlider(?minimumMaximum=minimumMaximum, - ?value=value, - ?valueChanged=valueChanged, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a Stepper in the view - static member inline Stepper(?minimumMaximum: float * float, - ?value: double, - ?increment: double, - ?valueChanged: Xamarin.Forms.ValueChangedEventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Stepper -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructStepper(?minimumMaximum=minimumMaximum, - ?value=value, - ?increment=increment, - ?valueChanged=valueChanged, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a Switch in the view - static member inline Switch(?isToggled: bool, - ?toggled: Xamarin.Forms.ToggledEventArgs -> unit, - ?onColor: Xamarin.Forms.Color, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Switch -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructSwitch(?isToggled=isToggled, - ?toggled=toggled, - ?onColor=onColor, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a Cell in the view - static member inline Cell(?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Cell -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructCell(?height=height, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a SwitchCell in the view - static member inline SwitchCell(?on: bool, - ?text: string, - ?onChanged: Xamarin.Forms.ToggledEventArgs -> unit, - ?onColor: Xamarin.Forms.Color, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.SwitchCell -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructSwitchCell(?on=on, - ?text=text, - ?onChanged=onChanged, - ?onColor=onColor, - ?height=height, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a TableView in the view - static member inline TableView(?intent: Xamarin.Forms.TableIntent, - ?hasUnevenRows: bool, - ?rowHeight: int, - ?items: (string * ViewElement list) list, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.TableView -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructTableView(?intent=intent, - ?hasUnevenRows=hasUnevenRows, - ?rowHeight=rowHeight, - ?items=items, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a RowDefinition in the view - static member inline RowDefinition(?height: obj) = - - ViewBuilders.ConstructRowDefinition(?height=height) - - /// Describes a ColumnDefinition in the view - static member inline ColumnDefinition(?width: obj) = - - ViewBuilders.ConstructColumnDefinition(?width=width) - - /// Describes a Grid in the view - static member inline Grid(?rowdefs: obj list, - ?coldefs: obj list, - ?rowSpacing: double, - ?columnSpacing: double, - ?children: ViewElement list, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Grid -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructGrid(?rowdefs=rowdefs, - ?coldefs=coldefs, - ?rowSpacing=rowSpacing, - ?columnSpacing=columnSpacing, - ?children=children, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a AbsoluteLayout in the view - static member inline AbsoluteLayout(?children: ViewElement list, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.AbsoluteLayout -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructAbsoluteLayout(?children=children, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a RelativeLayout in the view - static member inline RelativeLayout(?children: ViewElement list, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.RelativeLayout -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructRelativeLayout(?children=children, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a FlexLayout in the view - static member inline FlexLayout(?alignContent: Xamarin.Forms.FlexAlignContent, - ?alignItems: Xamarin.Forms.FlexAlignItems, - ?direction: Xamarin.Forms.FlexDirection, - ?position: Xamarin.Forms.FlexPosition, - ?wrap: Xamarin.Forms.FlexWrap, - ?justifyContent: Xamarin.Forms.FlexJustify, - ?children: ViewElement list, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.FlexLayout -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructFlexLayout(?alignContent=alignContent, - ?alignItems=alignItems, - ?direction=direction, - ?position=position, - ?wrap=wrap, - ?justifyContent=justifyContent, - ?children=children, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a TemplatedView in the view - static member inline TemplatedView(?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.TemplatedView -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructTemplatedView(?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ContentView in the view - static member inline ContentView(?content: ViewElement, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ContentView -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructContentView(?content=content, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a DatePicker in the view - static member inline DatePicker(?date: System.DateTime, - ?format: string, - ?minimumDate: System.DateTime, - ?maximumDate: System.DateTime, - ?dateSelected: Xamarin.Forms.DateChangedEventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.DatePicker -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructDatePicker(?date=date, - ?format=format, - ?minimumDate=minimumDate, - ?maximumDate=maximumDate, - ?dateSelected=dateSelected, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a Picker in the view - static member inline Picker(?itemsSource: seq<'T>, - ?selectedIndex: int, - ?title: string, - ?textColor: Xamarin.Forms.Color, - ?selectedIndexChanged: (int * 'T option) -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Picker -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructPicker(?itemsSource=itemsSource, - ?selectedIndex=selectedIndex, - ?title=title, - ?textColor=textColor, - ?selectedIndexChanged=selectedIndexChanged, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a Frame in the view - static member inline Frame(?borderColor: Xamarin.Forms.Color, - ?cornerRadius: double, - ?hasShadow: bool, - ?content: ViewElement, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Frame -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructFrame(?borderColor=borderColor, - ?cornerRadius=cornerRadius, - ?hasShadow=hasShadow, - ?content=content, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a Image in the view - static member inline Image(?source: obj, - ?aspect: Xamarin.Forms.Aspect, - ?isOpaque: bool, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Image -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructImage(?source=source, - ?aspect=aspect, - ?isOpaque=isOpaque, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ImageButton in the view - static member inline ImageButton(?command: unit -> unit, - ?source: obj, - ?aspect: Xamarin.Forms.Aspect, - ?borderColor: Xamarin.Forms.Color, - ?borderWidth: double, - ?cornerRadius: int, - ?isOpaque: bool, - ?padding: Xamarin.Forms.Thickness, - ?clicked: System.EventArgs -> unit, - ?pressed: System.EventArgs -> unit, - ?released: System.EventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ImageButton -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructImageButton(?command=command, - ?source=source, - ?aspect=aspect, - ?borderColor=borderColor, - ?borderWidth=borderWidth, - ?cornerRadius=cornerRadius, - ?isOpaque=isOpaque, - ?padding=padding, - ?clicked=clicked, - ?pressed=pressed, - ?released=released, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a InputView in the view - static member inline InputView(?keyboard: Xamarin.Forms.Keyboard, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.InputView -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructInputView(?keyboard=keyboard, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a Editor in the view - static member inline Editor(?text: string, - ?fontSize: obj, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?textColor: Xamarin.Forms.Color, - ?completed: string -> unit, - ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, - ?autoSize: Xamarin.Forms.EditorAutoSizeOption, - ?placeholder: string, - ?placeholderColor: Xamarin.Forms.Color, - ?isTextPredictionEnabled: bool, - ?keyboard: Xamarin.Forms.Keyboard, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Editor -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructEditor(?text=text, - ?fontSize=fontSize, - ?fontFamily=fontFamily, - ?fontAttributes=fontAttributes, - ?textColor=textColor, - ?completed=completed, - ?textChanged=textChanged, - ?autoSize=autoSize, - ?placeholder=placeholder, - ?placeholderColor=placeholderColor, - ?isTextPredictionEnabled=isTextPredictionEnabled, - ?keyboard=keyboard, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a Entry in the view - static member inline Entry(?text: string, - ?placeholder: string, - ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, - ?fontSize: obj, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?textColor: Xamarin.Forms.Color, - ?placeholderColor: Xamarin.Forms.Color, - ?isPassword: bool, - ?completed: string -> unit, - ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, - ?isTextPredictionEnabled: bool, - ?returnType: Xamarin.Forms.ReturnType, - ?returnCommand: unit -> unit, - ?cursorPosition: int, - ?selectionLength: int, - ?keyboard: Xamarin.Forms.Keyboard, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Entry -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructEntry(?text=text, - ?placeholder=placeholder, - ?horizontalTextAlignment=horizontalTextAlignment, - ?fontSize=fontSize, - ?fontFamily=fontFamily, - ?fontAttributes=fontAttributes, - ?textColor=textColor, - ?placeholderColor=placeholderColor, - ?isPassword=isPassword, - ?completed=completed, - ?textChanged=textChanged, - ?isTextPredictionEnabled=isTextPredictionEnabled, - ?returnType=returnType, - ?returnCommand=returnCommand, - ?cursorPosition=cursorPosition, - ?selectionLength=selectionLength, - ?keyboard=keyboard, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a EntryCell in the view - static member inline EntryCell(?label: string, - ?text: string, - ?keyboard: Xamarin.Forms.Keyboard, - ?placeholder: string, - ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, - ?completed: string -> unit, - ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Fabulous.CustomControls.CustomEntryCell -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructEntryCell(?label=label, - ?text=text, - ?keyboard=keyboard, - ?placeholder=placeholder, - ?horizontalTextAlignment=horizontalTextAlignment, - ?completed=completed, - ?textChanged=textChanged, - ?height=height, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a Label in the view - static member inline Label(?text: string, - ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, - ?verticalTextAlignment: Xamarin.Forms.TextAlignment, - ?fontSize: obj, - ?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?textColor: Xamarin.Forms.Color, - ?formattedText: ViewElement, - ?lineBreakMode: Xamarin.Forms.LineBreakMode, - ?lineHeight: double, - ?maxLines: int, - ?textDecorations: Xamarin.Forms.TextDecorations, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Label -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructLabel(?text=text, - ?horizontalTextAlignment=horizontalTextAlignment, - ?verticalTextAlignment=verticalTextAlignment, - ?fontSize=fontSize, - ?fontFamily=fontFamily, - ?fontAttributes=fontAttributes, - ?textColor=textColor, - ?formattedText=formattedText, - ?lineBreakMode=lineBreakMode, - ?lineHeight=lineHeight, - ?maxLines=maxLines, - ?textDecorations=textDecorations, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a StackLayout in the view - static member inline StackLayout(?children: ViewElement list, - ?orientation: Xamarin.Forms.StackOrientation, - ?spacing: double, - ?isClippedToBounds: bool, - ?padding: obj, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.StackLayout -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructStackLayout(?children=children, - ?orientation=orientation, - ?spacing=spacing, - ?isClippedToBounds=isClippedToBounds, - ?padding=padding, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a Span in the view - static member inline Span(?fontFamily: string, - ?fontAttributes: Xamarin.Forms.FontAttributes, - ?fontSize: obj, - ?backgroundColor: Xamarin.Forms.Color, - ?foregroundColor: Xamarin.Forms.Color, - ?text: string, - ?propertyChanged: System.ComponentModel.PropertyChangedEventArgs -> unit, - ?lineHeight: double, - ?textDecorations: Xamarin.Forms.TextDecorations, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Span -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructSpan(?fontFamily=fontFamily, - ?fontAttributes=fontAttributes, - ?fontSize=fontSize, - ?backgroundColor=backgroundColor, - ?foregroundColor=foregroundColor, - ?text=text, - ?propertyChanged=propertyChanged, - ?lineHeight=lineHeight, - ?textDecorations=textDecorations, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a FormattedString in the view - static member inline FormattedString(?spans: ViewElement[], - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.FormattedString -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructFormattedString(?spans=spans, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a TimePicker in the view - static member inline TimePicker(?time: System.TimeSpan, - ?format: string, - ?textColor: Xamarin.Forms.Color, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.TimePicker -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructTimePicker(?time=time, - ?format=format, - ?textColor=textColor, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a WebView in the view - static member inline WebView(?source: Xamarin.Forms.WebViewSource, - ?reload: bool, - ?navigated: Xamarin.Forms.WebNavigatedEventArgs -> unit, - ?navigating: Xamarin.Forms.WebNavigatingEventArgs -> unit, - ?reloadRequested: System.EventArgs -> unit, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.WebView -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructWebView(?source=source, - ?reload=reload, - ?navigated=navigated, - ?navigating=navigating, - ?reloadRequested=reloadRequested, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a Page in the view - static member inline Page(?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Page -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructPage(?title=title, - ?backgroundImage=backgroundImage, - ?icon=icon, - ?isBusy=isBusy, - ?padding=padding, - ?toolbarItems=toolbarItems, - ?useSafeArea=useSafeArea, - ?appearing=appearing, - ?disappearing=disappearing, - ?layoutChanged=layoutChanged, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a CarouselPage in the view - static member inline CarouselPage(?children: ViewElement list, - ?currentPage: int, - ?currentPageChanged: int option -> unit, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.CarouselPage -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructCarouselPage(?children=children, - ?currentPage=currentPage, - ?currentPageChanged=currentPageChanged, - ?title=title, - ?backgroundImage=backgroundImage, - ?icon=icon, - ?isBusy=isBusy, - ?padding=padding, - ?toolbarItems=toolbarItems, - ?useSafeArea=useSafeArea, - ?appearing=appearing, - ?disappearing=disappearing, - ?layoutChanged=layoutChanged, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a NavigationPage in the view - static member inline NavigationPage(?pages: ViewElement list, - ?barBackgroundColor: Xamarin.Forms.Color, - ?barTextColor: Xamarin.Forms.Color, - ?popped: Xamarin.Forms.NavigationEventArgs -> unit, - ?poppedToRoot: Xamarin.Forms.NavigationEventArgs -> unit, - ?pushed: Xamarin.Forms.NavigationEventArgs -> unit, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.NavigationPage -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructNavigationPage(?pages=pages, - ?barBackgroundColor=barBackgroundColor, - ?barTextColor=barTextColor, - ?popped=popped, - ?poppedToRoot=poppedToRoot, - ?pushed=pushed, - ?title=title, - ?backgroundImage=backgroundImage, - ?icon=icon, - ?isBusy=isBusy, - ?padding=padding, - ?toolbarItems=toolbarItems, - ?useSafeArea=useSafeArea, - ?appearing=appearing, - ?disappearing=disappearing, - ?layoutChanged=layoutChanged, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a TabbedPage in the view - static member inline TabbedPage(?children: ViewElement list, - ?barBackgroundColor: Xamarin.Forms.Color, - ?barTextColor: Xamarin.Forms.Color, - ?currentPage: int, - ?currentPageChanged: int option -> unit, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.TabbedPage -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructTabbedPage(?children=children, - ?barBackgroundColor=barBackgroundColor, - ?barTextColor=barTextColor, - ?currentPage=currentPage, - ?currentPageChanged=currentPageChanged, - ?title=title, - ?backgroundImage=backgroundImage, - ?icon=icon, - ?isBusy=isBusy, - ?padding=padding, - ?toolbarItems=toolbarItems, - ?useSafeArea=useSafeArea, - ?appearing=appearing, - ?disappearing=disappearing, - ?layoutChanged=layoutChanged, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ContentPage in the view - static member inline ContentPage(?content: ViewElement, - ?onSizeAllocated: (double * double) -> unit, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ContentPage -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructContentPage(?content=content, - ?onSizeAllocated=onSizeAllocated, - ?title=title, - ?backgroundImage=backgroundImage, - ?icon=icon, - ?isBusy=isBusy, - ?padding=padding, - ?toolbarItems=toolbarItems, - ?useSafeArea=useSafeArea, - ?appearing=appearing, - ?disappearing=disappearing, - ?layoutChanged=layoutChanged, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a MasterDetailPage in the view - static member inline MasterDetailPage(?master: ViewElement, - ?detail: ViewElement, - ?isGestureEnabled: bool, - ?isPresented: bool, - ?masterBehavior: Xamarin.Forms.MasterBehavior, - ?isPresentedChanged: bool -> unit, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.MasterDetailPage -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructMasterDetailPage(?master=master, - ?detail=detail, - ?isGestureEnabled=isGestureEnabled, - ?isPresented=isPresented, - ?masterBehavior=masterBehavior, - ?isPresentedChanged=isPresentedChanged, - ?title=title, - ?backgroundImage=backgroundImage, - ?icon=icon, - ?isBusy=isBusy, - ?padding=padding, - ?toolbarItems=toolbarItems, - ?useSafeArea=useSafeArea, - ?appearing=appearing, - ?disappearing=disappearing, - ?layoutChanged=layoutChanged, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a MenuItem in the view - static member inline MenuItem(?text: string, - ?command: unit -> unit, - ?icon: string, - ?accelerator: string, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.MenuItem -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructMenuItem(?text=text, - ?command=command, - ?icon=icon, - ?accelerator=accelerator, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a TextCell in the view - static member inline TextCell(?text: string, - ?detail: string, - ?textColor: Xamarin.Forms.Color, - ?detailColor: Xamarin.Forms.Color, - ?command: unit -> unit, - ?canExecute: bool, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.TextCell -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructTextCell(?text=text, - ?detail=detail, - ?textColor=textColor, - ?detailColor=detailColor, - ?command=command, - ?canExecute=canExecute, - ?height=height, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ToolbarItem in the view - static member inline ToolbarItem(?order: Xamarin.Forms.ToolbarItemOrder, - ?priority: int, - ?text: string, - ?command: unit -> unit, - ?icon: string, - ?accelerator: string, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ToolbarItem -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructToolbarItem(?order=order, - ?priority=priority, - ?text=text, - ?command=command, - ?icon=icon, - ?accelerator=accelerator, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ImageCell in the view - static member inline ImageCell(?imageSource: obj, - ?text: string, - ?detail: string, - ?textColor: Xamarin.Forms.Color, - ?detailColor: Xamarin.Forms.Color, - ?command: unit -> unit, - ?canExecute: bool, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ImageCell -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructImageCell(?imageSource=imageSource, - ?text=text, - ?detail=detail, - ?textColor=textColor, - ?detailColor=detailColor, - ?command=command, - ?canExecute=canExecute, - ?height=height, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ViewCell in the view - static member inline ViewCell(?view: ViewElement, - ?height: double, - ?isEnabled: bool, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ViewCell -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructViewCell(?view=view, - ?height=height, - ?isEnabled=isEnabled, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ListView in the view - static member inline ListView(?items: seq, - ?footer: System.Object, - ?hasUnevenRows: bool, - ?header: System.Object, - ?headerTemplate: Xamarin.Forms.DataTemplate, - ?isGroupingEnabled: bool, - ?isPullToRefreshEnabled: bool, - ?isRefreshing: bool, - ?refreshCommand: unit -> unit, - ?rowHeight: int, - ?selectedItem: int option, - ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, - ?separatorColor: Xamarin.Forms.Color, - ?itemAppearing: int -> unit, - ?itemDisappearing: int -> unit, - ?itemSelected: int option -> unit, - ?itemTapped: int -> unit, - ?refreshing: unit -> unit, - ?selectionMode: Xamarin.Forms.ListViewSelectionMode, - ?horizontalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, - ?verticalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, - ?refreshControlColor: Xamarin.Forms.Color, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ListView -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructListView(?items=items, - ?footer=footer, - ?hasUnevenRows=hasUnevenRows, - ?header=header, - ?headerTemplate=headerTemplate, - ?isGroupingEnabled=isGroupingEnabled, - ?isPullToRefreshEnabled=isPullToRefreshEnabled, - ?isRefreshing=isRefreshing, - ?refreshCommand=refreshCommand, - ?rowHeight=rowHeight, - ?selectedItem=selectedItem, - ?separatorVisibility=separatorVisibility, - ?separatorColor=separatorColor, - ?itemAppearing=itemAppearing, - ?itemDisappearing=itemDisappearing, - ?itemSelected=itemSelected, - ?itemTapped=itemTapped, - ?refreshing=refreshing, - ?selectionMode=selectionMode, - ?horizontalScrollBarVisibility=horizontalScrollBarVisibility, - ?verticalScrollBarVisibility=verticalScrollBarVisibility, - ?refreshControlColor=refreshControlColor, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ListViewGrouped in the view - static member inline ListViewGrouped(?items: (string * ViewElement * ViewElement list) list, - ?showJumpList: bool, - ?footer: System.Object, - ?hasUnevenRows: bool, - ?header: System.Object, - ?isPullToRefreshEnabled: bool, - ?isRefreshing: bool, - ?refreshCommand: unit -> unit, - ?rowHeight: int, - ?selectedItem: (int * int) option, - ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, - ?separatorColor: Xamarin.Forms.Color, - ?itemAppearing: int * int option -> unit, - ?itemDisappearing: int * int option -> unit, - ?itemSelected: (int * int) option -> unit, - ?itemTapped: int * int -> unit, - ?refreshing: unit -> unit, - ?selectionMode: Xamarin.Forms.ListViewSelectionMode, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ListView -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructListViewGrouped(?items=items, - ?showJumpList=showJumpList, - ?footer=footer, - ?hasUnevenRows=hasUnevenRows, - ?header=header, - ?isPullToRefreshEnabled=isPullToRefreshEnabled, - ?isRefreshing=isRefreshing, - ?refreshCommand=refreshCommand, - ?rowHeight=rowHeight, - ?selectedItem=selectedItem, - ?separatorVisibility=separatorVisibility, - ?separatorColor=separatorColor, - ?itemAppearing=itemAppearing, - ?itemDisappearing=itemDisappearing, - ?itemSelected=itemSelected, - ?itemTapped=itemTapped, - ?refreshing=refreshing, - ?selectionMode=selectionMode, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a BackButtonBehavior in the view - static member inline BackButtonBehavior(?textOverride: string, - ?command: unit -> unit, - ?commandParameter: System.Object, - ?iconOverride: string, - ?isEnabled: bool) = - - ViewBuilders.ConstructBackButtonBehavior(?textOverride=textOverride, - ?command=command, - ?commandParameter=commandParameter, - ?iconOverride=iconOverride, - ?isEnabled=isEnabled) - - /// Describes a GridItemsLayout in the view - static member inline GridItemsLayout(?span: int) = - - ViewBuilders.ConstructGridItemsLayout(?span=span) - - /// Describes a ItemsView in the view - static member inline ItemsView(?emptyView: System.Object, - ?itemsLayout: Xamarin.Forms.IItemsLayout, - ?itemsSource: System.Collections.IEnumerable, - ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, - ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ItemsView -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructItemsView(?emptyView=emptyView, - ?itemsLayout=itemsLayout, - ?itemsSource=itemsSource, - ?scrollToRequested=scrollToRequested, - ?scrollTo=scrollTo, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a SearchHandler in the view - static member inline SearchHandler(?clearIcon: string, - ?clearIconHelpText: string, - ?clearIconName: string, - ?clearPlaceholderCommand: unit -> unit, - ?clearPlaceholderCommandParameter: System.Object, - ?clearPlaceholderEnabled: bool, - ?clearPlaceholderHelpText: string, - ?clearPlaceholderIcon: string, - ?clearPlaceholderName: string, - ?command: unit -> unit, - ?commandParameter: System.Object, - ?displayMemberName: string, - ?isSearchEnabled: bool, - ?placeholder: string, - ?query: string, - ?queryIcon: string, - ?queryIconHelpText: string, - ?queryIconName: string, - ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, - ?showsResults: bool, - ?itemsSource: System.Collections.IEnumerable) = - - ViewBuilders.ConstructSearchHandler(?clearIcon=clearIcon, - ?clearIconHelpText=clearIconHelpText, - ?clearIconName=clearIconName, - ?clearPlaceholderCommand=clearPlaceholderCommand, - ?clearPlaceholderCommandParameter=clearPlaceholderCommandParameter, - ?clearPlaceholderEnabled=clearPlaceholderEnabled, - ?clearPlaceholderHelpText=clearPlaceholderHelpText, - ?clearPlaceholderIcon=clearPlaceholderIcon, - ?clearPlaceholderName=clearPlaceholderName, - ?command=command, - ?commandParameter=commandParameter, - ?displayMemberName=displayMemberName, - ?isSearchEnabled=isSearchEnabled, - ?placeholder=placeholder, - ?query=query, - ?queryIcon=queryIcon, - ?queryIconHelpText=queryIconHelpText, - ?queryIconName=queryIconName, - ?searchBoxVisibility=searchBoxVisibility, - ?showsResults=showsResults, - ?itemsSource=itemsSource) - - /// Describes a Shell in the view - static member inline Shell(?items: seq, - ?menuItems: seq, - ?currentItem: ViewElement, - ?flyoutBackgroundColor: Xamarin.Forms.Color, - ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, - ?flyoutHeader: System.Object, - ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, - ?flyoutIsPresented: bool, - ?route: string, - ?routeHost: string, - ?routeScheme: string, - ?navigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, - ?navigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, - ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, - ?title: string, - ?backgroundImage: string, - ?icon: string, - ?isBusy: bool, - ?padding: obj, - ?toolbarItems: ViewElement list, - ?useSafeArea: bool, - ?appearing: unit -> unit, - ?disappearing: unit -> unit, - ?layoutChanged: unit -> unit, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.Shell -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructShell(?items=items, - ?menuItems=menuItems, - ?currentItem=currentItem, - ?flyoutBackgroundColor=flyoutBackgroundColor, - ?flyoutBehavior=flyoutBehavior, - ?flyoutHeader=flyoutHeader, - ?flyoutHeaderBehavior=flyoutHeaderBehavior, - ?flyoutIsPresented=flyoutIsPresented, - ?route=route, - ?routeHost=routeHost, - ?routeScheme=routeScheme, - ?navigated=navigated, - ?navigating=navigating, - ?goToAsync=goToAsync, - ?title=title, - ?backgroundImage=backgroundImage, - ?icon=icon, - ?isBusy=isBusy, - ?padding=padding, - ?toolbarItems=toolbarItems, - ?useSafeArea=useSafeArea, - ?appearing=appearing, - ?disappearing=disappearing, - ?layoutChanged=layoutChanged, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ShellGroupItem in the view - static member inline ShellGroupItem(?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ShellGroupItem -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructShellGroupItem(?flyoutDisplayOptions=flyoutDisplayOptions, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a SelectableItemsView in the view - static member inline SelectableItemsView(?selectedItem: System.Object, - ?selectionChangedCommand: unit -> unit, - ?selectionChangedCommandParameter: System.Object, - ?selectionMode: Xamarin.Forms.SelectionMode, - ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, - ?emptyView: System.Object, - ?itemsLayout: Xamarin.Forms.IItemsLayout, - ?itemsSource: System.Collections.IEnumerable, - ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, - ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.SelectableItemsView -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructSelectableItemsView(?selectedItem=selectedItem, - ?selectionChangedCommand=selectionChangedCommand, - ?selectionChangedCommandParameter=selectionChangedCommandParameter, - ?selectionMode=selectionMode, - ?selectionChanged=selectionChanged, - ?emptyView=emptyView, - ?itemsLayout=itemsLayout, - ?itemsSource=itemsSource, - ?scrollToRequested=scrollToRequested, - ?scrollTo=scrollTo, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ShellNavigationState in the view - static member inline ShellNavigationState(?location: System.Uri) = - - ViewBuilders.ConstructShellNavigationState(?location=location) - - /// Describes a ShellContent in the view - static member inline ShellContent(?content: ViewElement, - ?menuItems: seq, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ShellContent -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructShellContent(?content=content, - ?menuItems=menuItems, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ShellItem in the view - static member inline ShellItem(?currentItem: ViewElement, - ?items: seq, - ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ShellItem -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructShellItem(?currentItem=currentItem, - ?items=items, - ?flyoutDisplayOptions=flyoutDisplayOptions, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a ShellSection in the view - static member inline ShellSection(?currentItem: ViewElement, - ?goToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, - ?items: seq, - ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.ShellSection -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructShellSection(?currentItem=currentItem, - ?goToAsync=goToAsync, - ?items=items, - ?flyoutDisplayOptions=flyoutDisplayOptions, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a CarouselView in the view - static member inline CarouselView(?items: seq, - ?emptyView: System.Object, - ?itemsLayout: Xamarin.Forms.IItemsLayout, - ?itemsSource: System.Collections.IEnumerable, - ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, - ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.CarouselView -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructCarouselView(?items=items, - ?emptyView=emptyView, - ?itemsLayout=itemsLayout, - ?itemsSource=itemsSource, - ?scrollToRequested=scrollToRequested, - ?scrollTo=scrollTo, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - /// Describes a CollectionView in the view - static member inline CollectionView(?items: seq, - ?selectedItem: System.Object, - ?selectionChangedCommand: unit -> unit, - ?selectionChangedCommandParameter: System.Object, - ?selectionMode: Xamarin.Forms.SelectionMode, - ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, - ?emptyView: System.Object, - ?itemsLayout: Xamarin.Forms.IItemsLayout, - ?itemsSource: System.Collections.IEnumerable, - ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, - ?scrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, - ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, - ?margin: obj, - ?gestureRecognizers: ViewElement list, - ?anchorX: double, - ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, - ?heightRequest: double, - ?inputTransparent: bool, - ?isEnabled: bool, - ?isVisible: bool, - ?minimumHeightRequest: double, - ?minimumWidthRequest: double, - ?opacity: double, - ?rotation: double, - ?rotationX: double, - ?rotationY: double, - ?scale: double, - ?style: Xamarin.Forms.Style, - ?styleClass: obj, - ?translationX: double, - ?translationY: double, - ?widthRequest: double, - ?resources: (string * obj) list, - ?styles: Xamarin.Forms.Style list, - ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, - ?scaleX: double, - ?scaleY: double, - ?tabIndex: int, - ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, - ?focused: Xamarin.Forms.FocusEventArgs -> unit, - ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, - ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, - ?classId: string, - ?styleId: string, - ?automationId: string, - ?created: (Xamarin.Forms.CollectionView -> unit), - ?ref: ViewRef) = - - ViewBuilders.ConstructCollectionView(?items=items, - ?selectedItem=selectedItem, - ?selectionChangedCommand=selectionChangedCommand, - ?selectionChangedCommandParameter=selectionChangedCommandParameter, - ?selectionMode=selectionMode, - ?selectionChanged=selectionChanged, - ?emptyView=emptyView, - ?itemsLayout=itemsLayout, - ?itemsSource=itemsSource, - ?scrollToRequested=scrollToRequested, - ?scrollTo=scrollTo, - ?horizontalOptions=horizontalOptions, - ?verticalOptions=verticalOptions, - ?margin=margin, - ?gestureRecognizers=gestureRecognizers, - ?anchorX=anchorX, - ?anchorY=anchorY, - ?backgroundColor=backgroundColor, - ?heightRequest=heightRequest, - ?inputTransparent=inputTransparent, - ?isEnabled=isEnabled, - ?isVisible=isVisible, - ?minimumHeightRequest=minimumHeightRequest, - ?minimumWidthRequest=minimumWidthRequest, - ?opacity=opacity, - ?rotation=rotation, - ?rotationX=rotationX, - ?rotationY=rotationY, - ?scale=scale, - ?style=style, - ?styleClass=styleClass, - ?translationX=translationX, - ?translationY=translationY, - ?widthRequest=widthRequest, - ?resources=resources, - ?styles=styles, - ?styleSheets=styleSheets, - ?isTabStop=isTabStop, - ?scaleX=scaleX, - ?scaleY=scaleY, - ?tabIndex=tabIndex, - ?childrenReordered=childrenReordered, - ?measureInvalidated=measureInvalidated, - ?focused=focused, - ?sizeChanged=sizeChanged, - ?unfocused=unfocused, - ?classId=classId, - ?styleId=styleId, - ?automationId=automationId, - ?created=created, - ?ref=ref) - - -[] -module ViewElementExtensions = - - type ViewElement with - - /// Adjusts the ClassId property in the visual element - member x.ClassId(value: string) = x.WithAttribute(ViewAttributes.ClassIdAttribKey, (value)) - - /// Adjusts the StyleId property in the visual element - member x.StyleId(value: string) = x.WithAttribute(ViewAttributes.StyleIdAttribKey, (value)) - - /// Adjusts the AutomationId property in the visual element - member x.AutomationId(value: string) = x.WithAttribute(ViewAttributes.AutomationIdAttribKey, (value)) - - /// Adjusts the AnchorX property in the visual element - member x.AnchorX(value: double) = x.WithAttribute(ViewAttributes.AnchorXAttribKey, (value)) - - /// Adjusts the AnchorY property in the visual element - member x.AnchorY(value: double) = x.WithAttribute(ViewAttributes.AnchorYAttribKey, (value)) - - /// Adjusts the BackgroundColor property in the visual element - member x.BackgroundColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.BackgroundColorAttribKey, (value)) - - /// Adjusts the HeightRequest property in the visual element - member x.HeightRequest(value: double) = x.WithAttribute(ViewAttributes.HeightRequestAttribKey, (value)) - - /// Adjusts the InputTransparent property in the visual element - member x.InputTransparent(value: bool) = x.WithAttribute(ViewAttributes.InputTransparentAttribKey, (value)) - - /// Adjusts the IsEnabled property in the visual element - member x.IsEnabled(value: bool) = x.WithAttribute(ViewAttributes.IsEnabledAttribKey, (value)) - - /// Adjusts the IsVisible property in the visual element - member x.IsVisible(value: bool) = x.WithAttribute(ViewAttributes.IsVisibleAttribKey, (value)) - - /// Adjusts the MinimumHeightRequest property in the visual element - member x.MinimumHeightRequest(value: double) = x.WithAttribute(ViewAttributes.MinimumHeightRequestAttribKey, (value)) - - /// Adjusts the MinimumWidthRequest property in the visual element - member x.MinimumWidthRequest(value: double) = x.WithAttribute(ViewAttributes.MinimumWidthRequestAttribKey, (value)) - - /// Adjusts the Opacity property in the visual element - member x.Opacity(value: double) = x.WithAttribute(ViewAttributes.OpacityAttribKey, (value)) - - /// Adjusts the Rotation property in the visual element - member x.Rotation(value: double) = x.WithAttribute(ViewAttributes.RotationAttribKey, (value)) - - /// Adjusts the RotationX property in the visual element - member x.RotationX(value: double) = x.WithAttribute(ViewAttributes.RotationXAttribKey, (value)) - - /// Adjusts the RotationY property in the visual element - member x.RotationY(value: double) = x.WithAttribute(ViewAttributes.RotationYAttribKey, (value)) - - /// Adjusts the Scale property in the visual element - member x.Scale(value: double) = x.WithAttribute(ViewAttributes.ScaleAttribKey, (value)) - - /// Adjusts the Style property in the visual element - member x.Style(value: Xamarin.Forms.Style) = x.WithAttribute(ViewAttributes.StyleAttribKey, (value)) - - /// Adjusts the StyleClass property in the visual element - member x.StyleClass(value: obj) = x.WithAttribute(ViewAttributes.StyleClassAttribKey, makeStyleClass(value)) - - /// Adjusts the TranslationX property in the visual element - member x.TranslationX(value: double) = x.WithAttribute(ViewAttributes.TranslationXAttribKey, (value)) - - /// Adjusts the TranslationY property in the visual element - member x.TranslationY(value: double) = x.WithAttribute(ViewAttributes.TranslationYAttribKey, (value)) - - /// Adjusts the WidthRequest property in the visual element - member x.WidthRequest(value: double) = x.WithAttribute(ViewAttributes.WidthRequestAttribKey, (value)) - - /// Adjusts the Resources property in the visual element - member x.Resources(value: (string * obj) list) = x.WithAttribute(ViewAttributes.ResourcesAttribKey, (value)) - - /// Adjusts the Styles property in the visual element - member x.Styles(value: Xamarin.Forms.Style list) = x.WithAttribute(ViewAttributes.StylesAttribKey, (value)) - - /// Adjusts the StyleSheets property in the visual element - member x.StyleSheets(value: Xamarin.Forms.StyleSheets.StyleSheet list) = x.WithAttribute(ViewAttributes.StyleSheetsAttribKey, (value)) - - /// Adjusts the IsTabStop property in the visual element - member x.IsTabStop(value: bool) = x.WithAttribute(ViewAttributes.IsTabStopAttribKey, (value)) - - /// Adjusts the ScaleX property in the visual element - member x.ScaleX(value: double) = x.WithAttribute(ViewAttributes.ScaleXAttribKey, (value)) - - /// Adjusts the ScaleY property in the visual element - member x.ScaleY(value: double) = x.WithAttribute(ViewAttributes.ScaleYAttribKey, (value)) - - /// Adjusts the TabIndex property in the visual element - member x.TabIndex(value: int) = x.WithAttribute(ViewAttributes.TabIndexAttribKey, (value)) - - /// Adjusts the ChildrenReordered property in the visual element - member x.ChildrenReordered(value: System.EventArgs -> unit) = x.WithAttribute(ViewAttributes.ChildrenReorderedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the MeasureInvalidated property in the visual element - member x.MeasureInvalidated(value: System.EventArgs -> unit) = x.WithAttribute(ViewAttributes.MeasureInvalidatedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the Focused property in the visual element - member x.Focused(value: Xamarin.Forms.FocusEventArgs -> unit) = x.WithAttribute(ViewAttributes.FocusedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the SizeChanged property in the visual element - member x.SizeChanged(value: Fabulous.CustomControls.SizeChangedEventArgs -> unit) = x.WithAttribute(ViewAttributes.SizeChangedAttribKey, (fun f -> System.EventHandler(fun sender _args -> let visualElement = sender :?> Xamarin.Forms.VisualElement in f (Fabulous.CustomControls.SizeChangedEventArgs(visualElement.Width, visualElement.Height))))(value)) - - /// Adjusts the Unfocused property in the visual element - member x.Unfocused(value: Xamarin.Forms.FocusEventArgs -> unit) = x.WithAttribute(ViewAttributes.UnfocusedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the HorizontalOptions property in the visual element - member x.HorizontalOptions(value: Xamarin.Forms.LayoutOptions) = x.WithAttribute(ViewAttributes.HorizontalOptionsAttribKey, (value)) - - /// Adjusts the VerticalOptions property in the visual element - member x.VerticalOptions(value: Xamarin.Forms.LayoutOptions) = x.WithAttribute(ViewAttributes.VerticalOptionsAttribKey, (value)) - - /// Adjusts the Margin property in the visual element - member x.Margin(value: obj) = x.WithAttribute(ViewAttributes.MarginAttribKey, makeThickness(value)) - - /// Adjusts the GestureRecognizers property in the visual element - member x.GestureRecognizers(value: ViewElement list) = x.WithAttribute(ViewAttributes.GestureRecognizersAttribKey, Array.ofList(value)) - - /// Adjusts the TouchPoints property in the visual element - member x.TouchPoints(value: int) = x.WithAttribute(ViewAttributes.TouchPointsAttribKey, (value)) - - /// Adjusts the PanUpdated property in the visual element - member x.PanUpdated(value: Xamarin.Forms.PanUpdatedEventArgs -> unit) = x.WithAttribute(ViewAttributes.PanUpdatedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the Command property in the visual element - member x.Command(value: unit -> unit) = x.WithAttribute(ViewAttributes.CommandAttribKey, makeCommand(value)) - - /// Adjusts the NumberOfTapsRequired property in the visual element - member x.NumberOfTapsRequired(value: int) = x.WithAttribute(ViewAttributes.NumberOfTapsRequiredAttribKey, (value)) - - /// Adjusts the NumberOfClicksRequired property in the visual element - member x.NumberOfClicksRequired(value: int) = x.WithAttribute(ViewAttributes.NumberOfClicksRequiredAttribKey, (value)) - - /// Adjusts the Buttons property in the visual element - member x.Buttons(value: Xamarin.Forms.ButtonsMask) = x.WithAttribute(ViewAttributes.ButtonsAttribKey, (value)) - - /// Adjusts the IsPinching property in the visual element - member x.IsPinching(value: bool) = x.WithAttribute(ViewAttributes.IsPinchingAttribKey, (value)) - - /// Adjusts the PinchUpdated property in the visual element - member x.PinchUpdated(value: Xamarin.Forms.PinchGestureUpdatedEventArgs -> unit) = x.WithAttribute(ViewAttributes.PinchUpdatedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the SwipeGestureRecognizerDirection property in the visual element - member x.SwipeGestureRecognizerDirection(value: Xamarin.Forms.SwipeDirection) = x.WithAttribute(ViewAttributes.SwipeGestureRecognizerDirectionAttribKey, (value)) - - /// Adjusts the Threshold property in the visual element - member x.Threshold(value: System.UInt32) = x.WithAttribute(ViewAttributes.ThresholdAttribKey, (value)) - - /// Adjusts the Swiped property in the visual element - member x.Swiped(value: Xamarin.Forms.SwipedEventArgs -> unit) = x.WithAttribute(ViewAttributes.SwipedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the Color property in the visual element - member x.Color(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.ColorAttribKey, (value)) - - /// Adjusts the IsRunning property in the visual element - member x.IsRunning(value: bool) = x.WithAttribute(ViewAttributes.IsRunningAttribKey, (value)) - - /// Adjusts the BoxViewCornerRadius property in the visual element - member x.BoxViewCornerRadius(value: Xamarin.Forms.CornerRadius) = x.WithAttribute(ViewAttributes.BoxViewCornerRadiusAttribKey, (value)) - - /// Adjusts the Progress property in the visual element - member x.Progress(value: double) = x.WithAttribute(ViewAttributes.ProgressAttribKey, (value)) - - /// Adjusts the IsClippedToBounds property in the visual element - member x.IsClippedToBounds(value: bool) = x.WithAttribute(ViewAttributes.IsClippedToBoundsAttribKey, (value)) - - /// Adjusts the Padding property in the visual element - member x.Padding(value: obj) = x.WithAttribute(ViewAttributes.PaddingAttribKey, makeThickness(value)) - - /// Adjusts the Content property in the visual element - member x.Content(value: ViewElement) = x.WithAttribute(ViewAttributes.ContentAttribKey, (value)) - - /// Adjusts the ScrollOrientation property in the visual element - member x.ScrollOrientation(value: Xamarin.Forms.ScrollOrientation) = x.WithAttribute(ViewAttributes.ScrollOrientationAttribKey, (value)) - - /// Adjusts the HorizontalScrollBarVisibility property in the visual element - member x.HorizontalScrollBarVisibility(value: Xamarin.Forms.ScrollBarVisibility) = x.WithAttribute(ViewAttributes.HorizontalScrollBarVisibilityAttribKey, (value)) - - /// Adjusts the VerticalScrollBarVisibility property in the visual element - member x.VerticalScrollBarVisibility(value: Xamarin.Forms.ScrollBarVisibility) = x.WithAttribute(ViewAttributes.VerticalScrollBarVisibilityAttribKey, (value)) - - /// Adjusts the ScrollTo property in the visual element - member x.ScrollTo(value: float * float * Fabulous.DynamicViews.AnimationKind) = x.WithAttribute(ViewAttributes.ScrollToAttribKey, (value)) - - /// Adjusts the Scrolled property in the visual element - member x.Scrolled(value: Xamarin.Forms.ScrolledEventArgs -> unit) = x.WithAttribute(ViewAttributes.ScrolledAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the LayoutAreaOverride property in the visual element - member x.LayoutAreaOverride(value: Xamarin.Forms.Rectangle) = x.WithAttribute(ViewAttributes.LayoutAreaOverrideAttribKey, (value)) - - /// Adjusts the CancelButtonColor property in the visual element - member x.CancelButtonColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.CancelButtonColorAttribKey, (value)) - - /// Adjusts the FontFamily property in the visual element - member x.FontFamily(value: string) = x.WithAttribute(ViewAttributes.FontFamilyAttribKey, (value)) - - /// Adjusts the FontAttributes property in the visual element - member x.FontAttributes(value: Xamarin.Forms.FontAttributes) = x.WithAttribute(ViewAttributes.FontAttributesAttribKey, (value)) - - /// Adjusts the FontSize property in the visual element - member x.FontSize(value: obj) = x.WithAttribute(ViewAttributes.FontSizeAttribKey, makeFontSize(value)) - - /// Adjusts the HorizontalTextAlignment property in the visual element - member x.HorizontalTextAlignment(value: Xamarin.Forms.TextAlignment) = x.WithAttribute(ViewAttributes.HorizontalTextAlignmentAttribKey, (value)) - - /// Adjusts the Placeholder property in the visual element - member x.Placeholder(value: string) = x.WithAttribute(ViewAttributes.PlaceholderAttribKey, (value)) - - /// Adjusts the PlaceholderColor property in the visual element - member x.PlaceholderColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.PlaceholderColorAttribKey, (value)) - - /// Adjusts the SearchBarCommand property in the visual element - member x.SearchBarCommand(value: string -> unit) = x.WithAttribute(ViewAttributes.SearchBarCommandAttribKey, (value)) - - /// Adjusts the SearchBarCanExecute property in the visual element - member x.SearchBarCanExecute(value: bool) = x.WithAttribute(ViewAttributes.SearchBarCanExecuteAttribKey, (value)) - - /// Adjusts the Text property in the visual element - member x.Text(value: string) = x.WithAttribute(ViewAttributes.TextAttribKey, (value)) - - /// Adjusts the TextColor property in the visual element - member x.TextColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.TextColorAttribKey, (value)) - - /// Adjusts the SearchBarTextChanged property in the visual element - member x.SearchBarTextChanged(value: Xamarin.Forms.TextChangedEventArgs -> unit) = x.WithAttribute(ViewAttributes.SearchBarTextChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the ButtonCommand property in the visual element - member x.ButtonCommand(value: unit -> unit) = x.WithAttribute(ViewAttributes.ButtonCommandAttribKey, (value)) - - /// Adjusts the ButtonCanExecute property in the visual element - member x.ButtonCanExecute(value: bool) = x.WithAttribute(ViewAttributes.ButtonCanExecuteAttribKey, (value)) - - /// Adjusts the BorderColor property in the visual element - member x.BorderColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.BorderColorAttribKey, (value)) - - /// Adjusts the BorderWidth property in the visual element - member x.BorderWidth(value: double) = x.WithAttribute(ViewAttributes.BorderWidthAttribKey, (value)) - - /// Adjusts the ContentLayout property in the visual element - member x.ContentLayout(value: Xamarin.Forms.Button.ButtonContentLayout) = x.WithAttribute(ViewAttributes.ContentLayoutAttribKey, (value)) - - /// Adjusts the ButtonCornerRadius property in the visual element - member x.ButtonCornerRadius(value: int) = x.WithAttribute(ViewAttributes.ButtonCornerRadiusAttribKey, (value)) - - /// Adjusts the ButtonImageSource property in the visual element - member x.ButtonImageSource(value: string) = x.WithAttribute(ViewAttributes.ButtonImageSourceAttribKey, (value)) - - /// Adjusts the MinimumMaximum property in the visual element - member x.MinimumMaximum(value: float * float) = x.WithAttribute(ViewAttributes.MinimumMaximumAttribKey, (value)) - - /// Adjusts the Value property in the visual element - member x.Value(value: double) = x.WithAttribute(ViewAttributes.ValueAttribKey, (value)) - - /// Adjusts the ValueChanged property in the visual element - member x.ValueChanged(value: Xamarin.Forms.ValueChangedEventArgs -> unit) = x.WithAttribute(ViewAttributes.ValueChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the Increment property in the visual element - member x.Increment(value: double) = x.WithAttribute(ViewAttributes.IncrementAttribKey, (value)) - - /// Adjusts the IsToggled property in the visual element - member x.IsToggled(value: bool) = x.WithAttribute(ViewAttributes.IsToggledAttribKey, (value)) - - /// Adjusts the Toggled property in the visual element - member x.Toggled(value: Xamarin.Forms.ToggledEventArgs -> unit) = x.WithAttribute(ViewAttributes.ToggledAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the OnColor property in the visual element - member x.OnColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.OnColorAttribKey, (value)) - - /// Adjusts the Height property in the visual element - member x.Height(value: double) = x.WithAttribute(ViewAttributes.HeightAttribKey, (value)) - - /// Adjusts the On property in the visual element - member x.On(value: bool) = x.WithAttribute(ViewAttributes.OnAttribKey, (value)) - - /// Adjusts the OnChanged property in the visual element - member x.OnChanged(value: Xamarin.Forms.ToggledEventArgs -> unit) = x.WithAttribute(ViewAttributes.OnChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the Intent property in the visual element - member x.Intent(value: Xamarin.Forms.TableIntent) = x.WithAttribute(ViewAttributes.IntentAttribKey, (value)) - - /// Adjusts the HasUnevenRows property in the visual element - member x.HasUnevenRows(value: bool) = x.WithAttribute(ViewAttributes.HasUnevenRowsAttribKey, (value)) - - /// Adjusts the RowHeight property in the visual element - member x.RowHeight(value: int) = x.WithAttribute(ViewAttributes.RowHeightAttribKey, (value)) - - /// Adjusts the TableRoot property in the visual element - member x.TableRoot(value: (string * ViewElement list) list) = x.WithAttribute(ViewAttributes.TableRootAttribKey, (fun es -> es |> Array.ofList |> Array.map (fun (title, es) -> (title, Array.ofList es)))(value)) - - /// Adjusts the RowDefinitionHeight property in the visual element - member x.RowDefinitionHeight(value: obj) = x.WithAttribute(ViewAttributes.RowDefinitionHeightAttribKey, makeGridLength(value)) - - /// Adjusts the ColumnDefinitionWidth property in the visual element - member x.ColumnDefinitionWidth(value: obj) = x.WithAttribute(ViewAttributes.ColumnDefinitionWidthAttribKey, makeGridLength(value)) - - /// Adjusts the GridRowDefinitions property in the visual element - member x.GridRowDefinitions(value: obj list) = x.WithAttribute(ViewAttributes.GridRowDefinitionsAttribKey, (fun es -> es |> Array.ofList |> Array.map (fun h -> ViewBuilders.ConstructRowDefinition(height=h)))(value)) - - /// Adjusts the GridColumnDefinitions property in the visual element - member x.GridColumnDefinitions(value: obj list) = x.WithAttribute(ViewAttributes.GridColumnDefinitionsAttribKey, (fun es -> es |> Array.ofList |> Array.map (fun h -> ViewBuilders.ConstructColumnDefinition(width=h)))(value)) - - /// Adjusts the RowSpacing property in the visual element - member x.RowSpacing(value: double) = x.WithAttribute(ViewAttributes.RowSpacingAttribKey, (value)) - - /// Adjusts the ColumnSpacing property in the visual element - member x.ColumnSpacing(value: double) = x.WithAttribute(ViewAttributes.ColumnSpacingAttribKey, (value)) - - /// Adjusts the Children property in the visual element - member x.Children(value: ViewElement list) = x.WithAttribute(ViewAttributes.ChildrenAttribKey, Array.ofList(value)) - - /// Adjusts the GridRow property in the visual element - member x.GridRow(value: int) = x.WithAttribute(ViewAttributes.GridRowAttribKey, (value)) - - /// Adjusts the GridRowSpan property in the visual element - member x.GridRowSpan(value: int) = x.WithAttribute(ViewAttributes.GridRowSpanAttribKey, (value)) - - /// Adjusts the GridColumn property in the visual element - member x.GridColumn(value: int) = x.WithAttribute(ViewAttributes.GridColumnAttribKey, (value)) - - /// Adjusts the GridColumnSpan property in the visual element - member x.GridColumnSpan(value: int) = x.WithAttribute(ViewAttributes.GridColumnSpanAttribKey, (value)) - - /// Adjusts the LayoutBounds property in the visual element - member x.LayoutBounds(value: Xamarin.Forms.Rectangle) = x.WithAttribute(ViewAttributes.LayoutBoundsAttribKey, (value)) - - /// Adjusts the LayoutFlags property in the visual element - member x.LayoutFlags(value: Xamarin.Forms.AbsoluteLayoutFlags) = x.WithAttribute(ViewAttributes.LayoutFlagsAttribKey, (value)) - - /// Adjusts the BoundsConstraint property in the visual element - member x.BoundsConstraint(value: Xamarin.Forms.BoundsConstraint) = x.WithAttribute(ViewAttributes.BoundsConstraintAttribKey, (value)) - - /// Adjusts the HeightConstraint property in the visual element - member x.HeightConstraint(value: Xamarin.Forms.Constraint) = x.WithAttribute(ViewAttributes.HeightConstraintAttribKey, (value)) - - /// Adjusts the WidthConstraint property in the visual element - member x.WidthConstraint(value: Xamarin.Forms.Constraint) = x.WithAttribute(ViewAttributes.WidthConstraintAttribKey, (value)) - - /// Adjusts the XConstraint property in the visual element - member x.XConstraint(value: Xamarin.Forms.Constraint) = x.WithAttribute(ViewAttributes.XConstraintAttribKey, (value)) - - /// Adjusts the YConstraint property in the visual element - member x.YConstraint(value: Xamarin.Forms.Constraint) = x.WithAttribute(ViewAttributes.YConstraintAttribKey, (value)) - - /// Adjusts the AlignContent property in the visual element - member x.AlignContent(value: Xamarin.Forms.FlexAlignContent) = x.WithAttribute(ViewAttributes.AlignContentAttribKey, (value)) - - /// Adjusts the AlignItems property in the visual element - member x.AlignItems(value: Xamarin.Forms.FlexAlignItems) = x.WithAttribute(ViewAttributes.AlignItemsAttribKey, (value)) - - /// Adjusts the FlexLayoutDirection property in the visual element - member x.FlexLayoutDirection(value: Xamarin.Forms.FlexDirection) = x.WithAttribute(ViewAttributes.FlexLayoutDirectionAttribKey, (value)) - - /// Adjusts the Position property in the visual element - member x.Position(value: Xamarin.Forms.FlexPosition) = x.WithAttribute(ViewAttributes.PositionAttribKey, (value)) - - /// Adjusts the Wrap property in the visual element - member x.Wrap(value: Xamarin.Forms.FlexWrap) = x.WithAttribute(ViewAttributes.WrapAttribKey, (value)) - - /// Adjusts the JustifyContent property in the visual element - member x.JustifyContent(value: Xamarin.Forms.FlexJustify) = x.WithAttribute(ViewAttributes.JustifyContentAttribKey, (value)) - - /// Adjusts the FlexAlignSelf property in the visual element - member x.FlexAlignSelf(value: Xamarin.Forms.FlexAlignSelf) = x.WithAttribute(ViewAttributes.FlexAlignSelfAttribKey, (value)) - - /// Adjusts the FlexOrder property in the visual element - member x.FlexOrder(value: int) = x.WithAttribute(ViewAttributes.FlexOrderAttribKey, (value)) - - /// Adjusts the FlexBasis property in the visual element - member x.FlexBasis(value: Xamarin.Forms.FlexBasis) = x.WithAttribute(ViewAttributes.FlexBasisAttribKey, (value)) - - /// Adjusts the FlexGrow property in the visual element - member x.FlexGrow(value: double) = x.WithAttribute(ViewAttributes.FlexGrowAttribKey, single(value)) - - /// Adjusts the FlexShrink property in the visual element - member x.FlexShrink(value: double) = x.WithAttribute(ViewAttributes.FlexShrinkAttribKey, single(value)) - - /// Adjusts the Date property in the visual element - member x.Date(value: System.DateTime) = x.WithAttribute(ViewAttributes.DateAttribKey, (value)) - - /// Adjusts the Format property in the visual element - member x.Format(value: string) = x.WithAttribute(ViewAttributes.FormatAttribKey, (value)) - - /// Adjusts the MinimumDate property in the visual element - member x.MinimumDate(value: System.DateTime) = x.WithAttribute(ViewAttributes.MinimumDateAttribKey, (value)) - - /// Adjusts the MaximumDate property in the visual element - member x.MaximumDate(value: System.DateTime) = x.WithAttribute(ViewAttributes.MaximumDateAttribKey, (value)) - - /// Adjusts the DateSelected property in the visual element - member x.DateSelected(value: Xamarin.Forms.DateChangedEventArgs -> unit) = x.WithAttribute(ViewAttributes.DateSelectedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the PickerItemsSource property in the visual element - member x.PickerItemsSource(value: seq<'T>) = x.WithAttribute(ViewAttributes.PickerItemsSourceAttribKey, seqToIListUntyped(value)) - - /// Adjusts the SelectedIndex property in the visual element - member x.SelectedIndex(value: int) = x.WithAttribute(ViewAttributes.SelectedIndexAttribKey, (value)) - - /// Adjusts the Title property in the visual element - member x.Title(value: string) = x.WithAttribute(ViewAttributes.TitleAttribKey, (value)) - - /// Adjusts the SelectedIndexChanged property in the visual element - member x.SelectedIndexChanged(value: (int * 'T option) -> unit) = x.WithAttribute(ViewAttributes.SelectedIndexChangedAttribKey, (fun f -> System.EventHandler(fun sender args -> let picker = (sender :?> Xamarin.Forms.Picker) in f (picker.SelectedIndex, (picker.SelectedItem |> Option.ofObj |> Option.map unbox<'T>))))(value)) - - /// Adjusts the FrameCornerRadius property in the visual element - member x.FrameCornerRadius(value: double) = x.WithAttribute(ViewAttributes.FrameCornerRadiusAttribKey, single(value)) - - /// Adjusts the HasShadow property in the visual element - member x.HasShadow(value: bool) = x.WithAttribute(ViewAttributes.HasShadowAttribKey, (value)) - - /// Adjusts the ImageSource property in the visual element - member x.ImageSource(value: obj) = x.WithAttribute(ViewAttributes.ImageSourceAttribKey, (value)) - - /// Adjusts the Aspect property in the visual element - member x.Aspect(value: Xamarin.Forms.Aspect) = x.WithAttribute(ViewAttributes.AspectAttribKey, (value)) - - /// Adjusts the IsOpaque property in the visual element - member x.IsOpaque(value: bool) = x.WithAttribute(ViewAttributes.IsOpaqueAttribKey, (value)) - - /// Adjusts the ImageButtonCommand property in the visual element - member x.ImageButtonCommand(value: unit -> unit) = x.WithAttribute(ViewAttributes.ImageButtonCommandAttribKey, (value)) - - /// Adjusts the ImageButtonCornerRadius property in the visual element - member x.ImageButtonCornerRadius(value: int) = x.WithAttribute(ViewAttributes.ImageButtonCornerRadiusAttribKey, (value)) - - /// Adjusts the Clicked property in the visual element - member x.Clicked(value: System.EventArgs -> unit) = x.WithAttribute(ViewAttributes.ClickedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the Pressed property in the visual element - member x.Pressed(value: System.EventArgs -> unit) = x.WithAttribute(ViewAttributes.PressedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the Released property in the visual element - member x.Released(value: System.EventArgs -> unit) = x.WithAttribute(ViewAttributes.ReleasedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the Keyboard property in the visual element - member x.Keyboard(value: Xamarin.Forms.Keyboard) = x.WithAttribute(ViewAttributes.KeyboardAttribKey, (value)) - - /// Adjusts the EditorCompleted property in the visual element - member x.EditorCompleted(value: string -> unit) = x.WithAttribute(ViewAttributes.EditorCompletedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (sender :?> Xamarin.Forms.Editor).Text))(value)) - - /// Adjusts the TextChanged property in the visual element - member x.TextChanged(value: Xamarin.Forms.TextChangedEventArgs -> unit) = x.WithAttribute(ViewAttributes.TextChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the AutoSize property in the visual element - member x.AutoSize(value: Xamarin.Forms.EditorAutoSizeOption) = x.WithAttribute(ViewAttributes.AutoSizeAttribKey, (value)) - - /// Adjusts the IsTextPredictionEnabled property in the visual element - member x.IsTextPredictionEnabled(value: bool) = x.WithAttribute(ViewAttributes.IsTextPredictionEnabledAttribKey, (value)) - - /// Adjusts the IsPassword property in the visual element - member x.IsPassword(value: bool) = x.WithAttribute(ViewAttributes.IsPasswordAttribKey, (value)) - - /// Adjusts the EntryCompleted property in the visual element - member x.EntryCompleted(value: string -> unit) = x.WithAttribute(ViewAttributes.EntryCompletedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (sender :?> Xamarin.Forms.Entry).Text))(value)) - - /// Adjusts the ReturnType property in the visual element - member x.ReturnType(value: Xamarin.Forms.ReturnType) = x.WithAttribute(ViewAttributes.ReturnTypeAttribKey, (value)) - - /// Adjusts the ReturnCommand property in the visual element - member x.ReturnCommand(value: unit -> unit) = x.WithAttribute(ViewAttributes.ReturnCommandAttribKey, makeCommand(value)) - - /// Adjusts the CursorPosition property in the visual element - member x.CursorPosition(value: int) = x.WithAttribute(ViewAttributes.CursorPositionAttribKey, (value)) - - /// Adjusts the SelectionLength property in the visual element - member x.SelectionLength(value: int) = x.WithAttribute(ViewAttributes.SelectionLengthAttribKey, (value)) - - /// Adjusts the Label property in the visual element - member x.Label(value: string) = x.WithAttribute(ViewAttributes.LabelAttribKey, (value)) - - /// Adjusts the EntryCellTextChanged property in the visual element - member x.EntryCellTextChanged(value: Xamarin.Forms.TextChangedEventArgs -> unit) = x.WithAttribute(ViewAttributes.EntryCellTextChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the VerticalTextAlignment property in the visual element - member x.VerticalTextAlignment(value: Xamarin.Forms.TextAlignment) = x.WithAttribute(ViewAttributes.VerticalTextAlignmentAttribKey, (value)) - - /// Adjusts the FormattedText property in the visual element - member x.FormattedText(value: ViewElement) = x.WithAttribute(ViewAttributes.FormattedTextAttribKey, (value)) - - /// Adjusts the LineBreakMode property in the visual element - member x.LineBreakMode(value: Xamarin.Forms.LineBreakMode) = x.WithAttribute(ViewAttributes.LineBreakModeAttribKey, (value)) - - /// Adjusts the LineHeight property in the visual element - member x.LineHeight(value: double) = x.WithAttribute(ViewAttributes.LineHeightAttribKey, (value)) - - /// Adjusts the MaxLines property in the visual element - member x.MaxLines(value: int) = x.WithAttribute(ViewAttributes.MaxLinesAttribKey, (value)) - - /// Adjusts the TextDecorations property in the visual element - member x.TextDecorations(value: Xamarin.Forms.TextDecorations) = x.WithAttribute(ViewAttributes.TextDecorationsAttribKey, (value)) - - /// Adjusts the StackOrientation property in the visual element - member x.StackOrientation(value: Xamarin.Forms.StackOrientation) = x.WithAttribute(ViewAttributes.StackOrientationAttribKey, (value)) - - /// Adjusts the Spacing property in the visual element - member x.Spacing(value: double) = x.WithAttribute(ViewAttributes.SpacingAttribKey, (value)) - - /// Adjusts the ForegroundColor property in the visual element - member x.ForegroundColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.ForegroundColorAttribKey, (value)) - - /// Adjusts the PropertyChanged property in the visual element - member x.PropertyChanged(value: System.ComponentModel.PropertyChangedEventArgs -> unit) = x.WithAttribute(ViewAttributes.PropertyChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the Spans property in the visual element - member x.Spans(value: ViewElement[]) = x.WithAttribute(ViewAttributes.SpansAttribKey, (value)) - - /// Adjusts the Time property in the visual element - member x.Time(value: System.TimeSpan) = x.WithAttribute(ViewAttributes.TimeAttribKey, (value)) - - /// Adjusts the WebSource property in the visual element - member x.WebSource(value: Xamarin.Forms.WebViewSource) = x.WithAttribute(ViewAttributes.WebSourceAttribKey, (value)) - - /// Adjusts the Reload property in the visual element - member x.Reload(value: bool) = x.WithAttribute(ViewAttributes.ReloadAttribKey, (value)) - - /// Adjusts the Navigated property in the visual element - member x.Navigated(value: Xamarin.Forms.WebNavigatedEventArgs -> unit) = x.WithAttribute(ViewAttributes.NavigatedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the Navigating property in the visual element - member x.Navigating(value: Xamarin.Forms.WebNavigatingEventArgs -> unit) = x.WithAttribute(ViewAttributes.NavigatingAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the ReloadRequested property in the visual element - member x.ReloadRequested(value: System.EventArgs -> unit) = x.WithAttribute(ViewAttributes.ReloadRequestedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the BackgroundImage property in the visual element - member x.BackgroundImage(value: string) = x.WithAttribute(ViewAttributes.BackgroundImageAttribKey, (value)) - - /// Adjusts the Icon property in the visual element - member x.Icon(value: string) = x.WithAttribute(ViewAttributes.IconAttribKey, (value)) - - /// Adjusts the IsBusy property in the visual element - member x.IsBusy(value: bool) = x.WithAttribute(ViewAttributes.IsBusyAttribKey, (value)) - - /// Adjusts the ToolbarItems property in the visual element - member x.ToolbarItems(value: ViewElement list) = x.WithAttribute(ViewAttributes.ToolbarItemsAttribKey, Array.ofList(value)) - - /// Adjusts the UseSafeArea property in the visual element - member x.UseSafeArea(value: bool) = x.WithAttribute(ViewAttributes.UseSafeAreaAttribKey, (value)) - - /// Adjusts the Page_Appearing property in the visual element - member x.Page_Appearing(value: unit -> unit) = x.WithAttribute(ViewAttributes.Page_AppearingAttribKey, (fun f -> System.EventHandler(fun _sender _args -> f ()))(value)) - - /// Adjusts the Page_Disappearing property in the visual element - member x.Page_Disappearing(value: unit -> unit) = x.WithAttribute(ViewAttributes.Page_DisappearingAttribKey, (fun f -> System.EventHandler(fun _sender _args -> f ()))(value)) - - /// Adjusts the Page_LayoutChanged property in the visual element - member x.Page_LayoutChanged(value: unit -> unit) = x.WithAttribute(ViewAttributes.Page_LayoutChangedAttribKey, (fun f -> System.EventHandler(fun _sender _args -> f ()))(value)) - - /// Adjusts the CarouselPage_CurrentPage property in the visual element - member x.CarouselPage_CurrentPage(value: int) = x.WithAttribute(ViewAttributes.CarouselPage_CurrentPageAttribKey, (value)) - - /// Adjusts the CarouselPage_CurrentPageChanged property in the visual element - member x.CarouselPage_CurrentPageChanged(value: int option -> unit) = x.WithAttribute(ViewAttributes.CarouselPage_CurrentPageChangedAttribKey, makeCurrentPageChanged(value)) - - /// Adjusts the Pages property in the visual element - member x.Pages(value: ViewElement list) = x.WithAttribute(ViewAttributes.PagesAttribKey, Array.ofList(value)) - - /// Adjusts the BackButtonTitle property in the visual element - member x.BackButtonTitle(value: string) = x.WithAttribute(ViewAttributes.BackButtonTitleAttribKey, (value)) - - /// Adjusts the HasBackButton property in the visual element - member x.HasBackButton(value: bool) = x.WithAttribute(ViewAttributes.HasBackButtonAttribKey, (value)) - - /// Adjusts the HasNavigationBar property in the visual element - member x.HasNavigationBar(value: bool) = x.WithAttribute(ViewAttributes.HasNavigationBarAttribKey, (value)) - - /// Adjusts the TitleIcon property in the visual element - member x.TitleIcon(value: string) = x.WithAttribute(ViewAttributes.TitleIconAttribKey, (value)) - - /// Adjusts the TitleView property in the visual element - member x.TitleView(value: ViewElement) = x.WithAttribute(ViewAttributes.TitleViewAttribKey, (value)) - - /// Adjusts the BarBackgroundColor property in the visual element - member x.BarBackgroundColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.BarBackgroundColorAttribKey, (value)) - - /// Adjusts the BarTextColor property in the visual element - member x.BarTextColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.BarTextColorAttribKey, (value)) - - /// Adjusts the Popped property in the visual element - member x.Popped(value: Xamarin.Forms.NavigationEventArgs -> unit) = x.WithAttribute(ViewAttributes.PoppedAttribKey, (fun f -> System.EventHandler(fun sender args -> f args))(value)) - - /// Adjusts the PoppedToRoot property in the visual element - member x.PoppedToRoot(value: Xamarin.Forms.NavigationEventArgs -> unit) = x.WithAttribute(ViewAttributes.PoppedToRootAttribKey, (fun f -> System.EventHandler(fun sender args -> f args))(value)) - - /// Adjusts the Pushed property in the visual element - member x.Pushed(value: Xamarin.Forms.NavigationEventArgs -> unit) = x.WithAttribute(ViewAttributes.PushedAttribKey, (fun f -> System.EventHandler(fun sender args -> f args))(value)) - - /// Adjusts the TabbedPage_CurrentPage property in the visual element - member x.TabbedPage_CurrentPage(value: int) = x.WithAttribute(ViewAttributes.TabbedPage_CurrentPageAttribKey, (value)) - - /// Adjusts the TabbedPage_CurrentPageChanged property in the visual element - member x.TabbedPage_CurrentPageChanged(value: int option -> unit) = x.WithAttribute(ViewAttributes.TabbedPage_CurrentPageChangedAttribKey, makeCurrentPageChanged(value)) - - /// Adjusts the OnSizeAllocatedCallback property in the visual element - member x.OnSizeAllocatedCallback(value: (double * double) -> unit) = x.WithAttribute(ViewAttributes.OnSizeAllocatedCallbackAttribKey, (fun f -> FSharp.Control.Handler<_>(fun _sender args -> f args))(value)) - - /// Adjusts the Master property in the visual element - member x.Master(value: ViewElement) = x.WithAttribute(ViewAttributes.MasterAttribKey, (value)) - - /// Adjusts the Detail property in the visual element - member x.Detail(value: ViewElement) = x.WithAttribute(ViewAttributes.DetailAttribKey, (value)) - - /// Adjusts the IsGestureEnabled property in the visual element - member x.IsGestureEnabled(value: bool) = x.WithAttribute(ViewAttributes.IsGestureEnabledAttribKey, (value)) - - /// Adjusts the IsPresented property in the visual element - member x.IsPresented(value: bool) = x.WithAttribute(ViewAttributes.IsPresentedAttribKey, (value)) - - /// Adjusts the MasterBehavior property in the visual element - member x.MasterBehavior(value: Xamarin.Forms.MasterBehavior) = x.WithAttribute(ViewAttributes.MasterBehaviorAttribKey, (value)) - - /// Adjusts the IsPresentedChanged property in the visual element - member x.IsPresentedChanged(value: bool -> unit) = x.WithAttribute(ViewAttributes.IsPresentedChangedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (sender :?> Xamarin.Forms.MasterDetailPage).IsPresented))(value)) - - /// Adjusts the Accelerator property in the visual element - member x.Accelerator(value: string) = x.WithAttribute(ViewAttributes.AcceleratorAttribKey, (value)) - - /// Adjusts the TextDetail property in the visual element - member x.TextDetail(value: string) = x.WithAttribute(ViewAttributes.TextDetailAttribKey, (value)) - - /// Adjusts the TextDetailColor property in the visual element - member x.TextDetailColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.TextDetailColorAttribKey, (value)) - - /// Adjusts the TextCellCommand property in the visual element - member x.TextCellCommand(value: unit -> unit) = x.WithAttribute(ViewAttributes.TextCellCommandAttribKey, (value)) - - /// Adjusts the TextCellCanExecute property in the visual element - member x.TextCellCanExecute(value: bool) = x.WithAttribute(ViewAttributes.TextCellCanExecuteAttribKey, (value)) - - /// Adjusts the Order property in the visual element - member x.Order(value: Xamarin.Forms.ToolbarItemOrder) = x.WithAttribute(ViewAttributes.OrderAttribKey, (value)) - - /// Adjusts the Priority property in the visual element - member x.Priority(value: int) = x.WithAttribute(ViewAttributes.PriorityAttribKey, (value)) - - /// Adjusts the View property in the visual element - member x.View(value: ViewElement) = x.WithAttribute(ViewAttributes.ViewAttribKey, (value)) - - /// Adjusts the ListViewItems property in the visual element - member x.ListViewItems(value: seq) = x.WithAttribute(ViewAttributes.ListViewItemsAttribKey, (value)) - - /// Adjusts the Footer property in the visual element - member x.Footer(value: System.Object) = x.WithAttribute(ViewAttributes.FooterAttribKey, (value)) - - /// Adjusts the Header property in the visual element - member x.Header(value: System.Object) = x.WithAttribute(ViewAttributes.HeaderAttribKey, (value)) - - /// Adjusts the HeaderTemplate property in the visual element - member x.HeaderTemplate(value: Xamarin.Forms.DataTemplate) = x.WithAttribute(ViewAttributes.HeaderTemplateAttribKey, (value)) - - /// Adjusts the IsGroupingEnabled property in the visual element - member x.IsGroupingEnabled(value: bool) = x.WithAttribute(ViewAttributes.IsGroupingEnabledAttribKey, (value)) - - /// Adjusts the IsPullToRefreshEnabled property in the visual element - member x.IsPullToRefreshEnabled(value: bool) = x.WithAttribute(ViewAttributes.IsPullToRefreshEnabledAttribKey, (value)) - - /// Adjusts the IsRefreshing property in the visual element - member x.IsRefreshing(value: bool) = x.WithAttribute(ViewAttributes.IsRefreshingAttribKey, (value)) - - /// Adjusts the RefreshCommand property in the visual element - member x.RefreshCommand(value: unit -> unit) = x.WithAttribute(ViewAttributes.RefreshCommandAttribKey, makeCommand(value)) - - /// Adjusts the ListView_SelectedItem property in the visual element - member x.ListView_SelectedItem(value: int option) = x.WithAttribute(ViewAttributes.ListView_SelectedItemAttribKey, (value)) - - /// Adjusts the ListView_SeparatorVisibility property in the visual element - member x.ListView_SeparatorVisibility(value: Xamarin.Forms.SeparatorVisibility) = x.WithAttribute(ViewAttributes.ListView_SeparatorVisibilityAttribKey, (value)) - - /// Adjusts the ListView_SeparatorColor property in the visual element - member x.ListView_SeparatorColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.ListView_SeparatorColorAttribKey, (value)) - - /// Adjusts the ListView_ItemAppearing property in the visual element - member x.ListView_ItemAppearing(value: int -> unit) = x.WithAttribute(ViewAttributes.ListView_ItemAppearingAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindListViewItem sender args.Item).Value))(value)) - - /// Adjusts the ListView_ItemDisappearing property in the visual element - member x.ListView_ItemDisappearing(value: int -> unit) = x.WithAttribute(ViewAttributes.ListView_ItemDisappearingAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindListViewItem sender args.Item).Value))(value)) - - /// Adjusts the ListView_ItemSelected property in the visual element - member x.ListView_ItemSelected(value: int option -> unit) = x.WithAttribute(ViewAttributes.ListView_ItemSelectedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindListViewItem sender args.SelectedItem)))(value)) - - /// Adjusts the ListView_ItemTapped property in the visual element - member x.ListView_ItemTapped(value: int -> unit) = x.WithAttribute(ViewAttributes.ListView_ItemTappedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindListViewItem sender args.Item).Value))(value)) - - /// Adjusts the ListView_Refreshing property in the visual element - member x.ListView_Refreshing(value: unit -> unit) = x.WithAttribute(ViewAttributes.ListView_RefreshingAttribKey, (fun f -> System.EventHandler(fun sender args -> f ()))(value)) - - /// Adjusts the SelectionMode property in the visual element - member x.SelectionMode(value: Xamarin.Forms.ListViewSelectionMode) = x.WithAttribute(ViewAttributes.SelectionModeAttribKey, (value)) - - /// Adjusts the RefreshControlColor property in the visual element - member x.RefreshControlColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.RefreshControlColorAttribKey, (value)) - - /// Adjusts the ListViewGrouped_ItemsSource property in the visual element - member x.ListViewGrouped_ItemsSource(value: (string * ViewElement * ViewElement list) list) = x.WithAttribute(ViewAttributes.ListViewGrouped_ItemsSourceAttribKey, (fun es -> es |> Array.ofList |> Array.map (fun (g, e, l) -> (g, e, Array.ofList l)))(value)) - - /// Adjusts the ListViewGrouped_ShowJumpList property in the visual element - member x.ListViewGrouped_ShowJumpList(value: bool) = x.WithAttribute(ViewAttributes.ListViewGrouped_ShowJumpListAttribKey, (value)) - - /// Adjusts the ListViewGrouped_SelectedItem property in the visual element - member x.ListViewGrouped_SelectedItem(value: (int * int) option) = x.WithAttribute(ViewAttributes.ListViewGrouped_SelectedItemAttribKey, (value)) - - /// Adjusts the SeparatorVisibility property in the visual element - member x.SeparatorVisibility(value: Xamarin.Forms.SeparatorVisibility) = x.WithAttribute(ViewAttributes.SeparatorVisibilityAttribKey, (value)) - - /// Adjusts the SeparatorColor property in the visual element - member x.SeparatorColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.SeparatorColorAttribKey, (value)) - - /// Adjusts the ListViewGrouped_ItemAppearing property in the visual element - member x.ListViewGrouped_ItemAppearing(value: int * int option -> unit) = x.WithAttribute(ViewAttributes.ListViewGrouped_ItemAppearingAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindGroupedListViewItemOrGroupItem sender args.Item).Value))(value)) - - /// Adjusts the ListViewGrouped_ItemDisappearing property in the visual element - member x.ListViewGrouped_ItemDisappearing(value: int * int option -> unit) = x.WithAttribute(ViewAttributes.ListViewGrouped_ItemDisappearingAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindGroupedListViewItemOrGroupItem sender args.Item).Value))(value)) - - /// Adjusts the ListViewGrouped_ItemSelected property in the visual element - member x.ListViewGrouped_ItemSelected(value: (int * int) option -> unit) = x.WithAttribute(ViewAttributes.ListViewGrouped_ItemSelectedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindGroupedListViewItem sender args.SelectedItem)))(value)) - - /// Adjusts the ListViewGrouped_ItemTapped property in the visual element - member x.ListViewGrouped_ItemTapped(value: int * int -> unit) = x.WithAttribute(ViewAttributes.ListViewGrouped_ItemTappedAttribKey, (fun f -> System.EventHandler(fun sender args -> f (tryFindGroupedListViewItem sender args.Item).Value))(value)) - - /// Adjusts the Refreshing property in the visual element - member x.Refreshing(value: unit -> unit) = x.WithAttribute(ViewAttributes.RefreshingAttribKey, (fun f -> System.EventHandler(fun sender args -> f ()))(value)) - - /// Adjusts the TextOverride property in the visual element - member x.TextOverride(value: string) = x.WithAttribute(ViewAttributes.TextOverrideAttribKey, (value)) - - /// Adjusts the CommandParameter property in the visual element - member x.CommandParameter(value: System.Object) = x.WithAttribute(ViewAttributes.CommandParameterAttribKey, (value)) - - /// Adjusts the IconOverride property in the visual element - member x.IconOverride(value: string) = x.WithAttribute(ViewAttributes.IconOverrideAttribKey, (value)) - - /// Adjusts the Span property in the visual element - member x.Span(value: int) = x.WithAttribute(ViewAttributes.SpanAttribKey, (value)) - - /// Adjusts the EmptyView property in the visual element - member x.EmptyView(value: System.Object) = x.WithAttribute(ViewAttributes.EmptyViewAttribKey, (value)) - - /// Adjusts the ItemsLayout property in the visual element - member x.ItemsLayout(value: Xamarin.Forms.IItemsLayout) = x.WithAttribute(ViewAttributes.ItemsLayoutAttribKey, (value)) - - /// Adjusts the ItemsSource property in the visual element - member x.ItemsSource(value: System.Collections.IEnumerable) = x.WithAttribute(ViewAttributes.ItemsSourceAttribKey, (value)) - - /// Adjusts the ScrollToRequested property in the visual element - member x.ScrollToRequested(value: Xamarin.Forms.ScrollToRequestEventArgs -> unit) = x.WithAttribute(ViewAttributes.ScrollToRequestedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the iScrollTo property in the visual element - member x.iScrollTo(value: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind) = x.WithAttribute(ViewAttributes.iScrollToAttribKey, (value)) - - /// Adjusts the ClearIcon property in the visual element - member x.ClearIcon(value: string) = x.WithAttribute(ViewAttributes.ClearIconAttribKey, (value)) - - /// Adjusts the ClearIconHelpText property in the visual element - member x.ClearIconHelpText(value: string) = x.WithAttribute(ViewAttributes.ClearIconHelpTextAttribKey, (value)) - - /// Adjusts the ClearIconName property in the visual element - member x.ClearIconName(value: string) = x.WithAttribute(ViewAttributes.ClearIconNameAttribKey, (value)) - - /// Adjusts the ClearPlaceholderCommand property in the visual element - member x.ClearPlaceholderCommand(value: unit -> unit) = x.WithAttribute(ViewAttributes.ClearPlaceholderCommandAttribKey, makeCommand(value)) - - /// Adjusts the ClearPlaceholderCommandParameter property in the visual element - member x.ClearPlaceholderCommandParameter(value: System.Object) = x.WithAttribute(ViewAttributes.ClearPlaceholderCommandParameterAttribKey, (value)) - - /// Adjusts the ClearPlaceholderEnabled property in the visual element - member x.ClearPlaceholderEnabled(value: bool) = x.WithAttribute(ViewAttributes.ClearPlaceholderEnabledAttribKey, (value)) - - /// Adjusts the ClearPlaceholderHelpText property in the visual element - member x.ClearPlaceholderHelpText(value: string) = x.WithAttribute(ViewAttributes.ClearPlaceholderHelpTextAttribKey, (value)) - - /// Adjusts the ClearPlaceholderIcon property in the visual element - member x.ClearPlaceholderIcon(value: string) = x.WithAttribute(ViewAttributes.ClearPlaceholderIconAttribKey, (value)) - - /// Adjusts the ClearPlaceholderName property in the visual element - member x.ClearPlaceholderName(value: string) = x.WithAttribute(ViewAttributes.ClearPlaceholderNameAttribKey, (value)) - - /// Adjusts the DisplayMemberName property in the visual element - member x.DisplayMemberName(value: string) = x.WithAttribute(ViewAttributes.DisplayMemberNameAttribKey, (value)) - - /// Adjusts the IsSearchEnabled property in the visual element - member x.IsSearchEnabled(value: bool) = x.WithAttribute(ViewAttributes.IsSearchEnabledAttribKey, (value)) - - /// Adjusts the Query property in the visual element - member x.Query(value: string) = x.WithAttribute(ViewAttributes.QueryAttribKey, (value)) - - /// Adjusts the QueryIcon property in the visual element - member x.QueryIcon(value: string) = x.WithAttribute(ViewAttributes.QueryIconAttribKey, (value)) - - /// Adjusts the QueryIconHelpText property in the visual element - member x.QueryIconHelpText(value: string) = x.WithAttribute(ViewAttributes.QueryIconHelpTextAttribKey, (value)) - - /// Adjusts the QueryIconName property in the visual element - member x.QueryIconName(value: string) = x.WithAttribute(ViewAttributes.QueryIconNameAttribKey, (value)) - - /// Adjusts the SearchBoxVisibility property in the visual element - member x.SearchBoxVisibility(value: Xamarin.Forms.SearchBoxVisiblity) = x.WithAttribute(ViewAttributes.SearchBoxVisibilityAttribKey, (value)) - - /// Adjusts the ShowsResults property in the visual element - member x.ShowsResults(value: bool) = x.WithAttribute(ViewAttributes.ShowsResultsAttribKey, (value)) - - /// Adjusts the Items property in the visual element - member x.Items(value: seq) = x.WithAttribute(ViewAttributes.ItemsAttribKey, (value)) - - /// Adjusts the MenuItems property in the visual element - member x.MenuItems(value: seq) = x.WithAttribute(ViewAttributes.MenuItemsAttribKey, (value)) - - /// Adjusts the CurrentItem property in the visual element - member x.CurrentItem(value: ViewElement) = x.WithAttribute(ViewAttributes.CurrentItemAttribKey, (value)) - - /// Adjusts the FlyoutBackgroundColor property in the visual element - member x.FlyoutBackgroundColor(value: Xamarin.Forms.Color) = x.WithAttribute(ViewAttributes.FlyoutBackgroundColorAttribKey, (value)) - - /// Adjusts the FlyoutBehavior property in the visual element - member x.FlyoutBehavior(value: Xamarin.Forms.FlyoutBehavior) = x.WithAttribute(ViewAttributes.FlyoutBehaviorAttribKey, (value)) - - /// Adjusts the FlyoutHeader property in the visual element - member x.FlyoutHeader(value: System.Object) = x.WithAttribute(ViewAttributes.FlyoutHeaderAttribKey, (value)) - - /// Adjusts the FlyoutHeaderBehavior property in the visual element - member x.FlyoutHeaderBehavior(value: Xamarin.Forms.FlyoutHeaderBehavior) = x.WithAttribute(ViewAttributes.FlyoutHeaderBehaviorAttribKey, (value)) - - /// Adjusts the FlyoutIsPresented property in the visual element - member x.FlyoutIsPresented(value: bool) = x.WithAttribute(ViewAttributes.FlyoutIsPresentedAttribKey, (value)) - - /// Adjusts the Route property in the visual element - member x.Route(value: string) = x.WithAttribute(ViewAttributes.RouteAttribKey, (value)) - - /// Adjusts the RouteHost property in the visual element - member x.RouteHost(value: string) = x.WithAttribute(ViewAttributes.RouteHostAttribKey, (value)) - - /// Adjusts the RouteScheme property in the visual element - member x.RouteScheme(value: string) = x.WithAttribute(ViewAttributes.RouteSchemeAttribKey, (value)) - - /// Adjusts the OnNavigated property in the visual element - member x.OnNavigated(value: Xamarin.Forms.ShellNavigatedEventArgs -> unit) = x.WithAttribute(ViewAttributes.OnNavigatedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the OnNavigating property in the visual element - member x.OnNavigating(value: Xamarin.Forms.ShellNavigatingEventArgs -> unit) = x.WithAttribute(ViewAttributes.OnNavigatingAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the GoToAsync property in the visual element - member x.GoToAsync(value: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind) = x.WithAttribute(ViewAttributes.GoToAsyncAttribKey, (value)) - - /// Adjusts the FlyoutDisplayOptions property in the visual element - member x.FlyoutDisplayOptions(value: Xamarin.Forms.FlyoutDisplayOptions) = x.WithAttribute(ViewAttributes.FlyoutDisplayOptionsAttribKey, (value)) - - /// Adjusts the SelectedItem property in the visual element - member x.SelectedItem(value: System.Object) = x.WithAttribute(ViewAttributes.SelectedItemAttribKey, (value)) - - /// Adjusts the SelectionChangedCommand property in the visual element - member x.SelectionChangedCommand(value: unit -> unit) = x.WithAttribute(ViewAttributes.SelectionChangedCommandAttribKey, makeCommand(value)) - - /// Adjusts the SelectionChangedCommandParameter property in the visual element - member x.SelectionChangedCommandParameter(value: System.Object) = x.WithAttribute(ViewAttributes.SelectionChangedCommandParameterAttribKey, (value)) - - /// Adjusts the selectableItemsMode property in the visual element - member x.selectableItemsMode(value: Xamarin.Forms.SelectionMode) = x.WithAttribute(ViewAttributes.selectableItemsModeAttribKey, (value)) - - /// Adjusts the SelectionChanged property in the visual element - member x.SelectionChanged(value: Xamarin.Forms.SelectionChangedEventArgs -> unit) = x.WithAttribute(ViewAttributes.SelectionChangedAttribKey, (fun f -> System.EventHandler(fun _sender args -> f args))(value)) - - /// Adjusts the Location property in the visual element - member x.Location(value: System.Uri) = x.WithAttribute(ViewAttributes.LocationAttribKey, makeUri(value)) - - /// Adjusts the ssGoToAsync property in the visual element - member x.ssGoToAsync(value: string list * Map * Fabulous.DynamicViews.AnimationKind) = x.WithAttribute(ViewAttributes.ssGoToAsyncAttribKey, (value)) - - /// Adjusts the CarouselViewItems property in the visual element - member x.CarouselViewItems(value: seq) = x.WithAttribute(ViewAttributes.CarouselViewItemsAttribKey, (value)) - - /// Adjusts the CollectionViewItems property in the visual element - member x.CollectionViewItems(value: seq) = x.WithAttribute(ViewAttributes.CollectionViewItemsAttribKey, (value)) - - member x.With(?classId: string, ?styleId: string, ?automationId: string, ?anchorX: double, ?anchorY: double, - ?backgroundColor: Xamarin.Forms.Color, ?heightRequest: double, ?inputTransparent: bool, ?isEnabled: bool, ?isVisible: bool, - ?minimumHeightRequest: double, ?minimumWidthRequest: double, ?opacity: double, ?rotation: double, ?rotationX: double, - ?rotationY: double, ?scale: double, ?style: Xamarin.Forms.Style, ?styleClass: obj, ?translationX: double, - ?translationY: double, ?widthRequest: double, ?resources: (string * obj) list, ?styles: Xamarin.Forms.Style list, ?styleSheets: Xamarin.Forms.StyleSheets.StyleSheet list, - ?isTabStop: bool, ?scaleX: double, ?scaleY: double, ?tabIndex: int, ?childrenReordered: System.EventArgs -> unit, - ?measureInvalidated: System.EventArgs -> unit, ?focused: Xamarin.Forms.FocusEventArgs -> unit, ?sizeChanged: Fabulous.CustomControls.SizeChangedEventArgs -> unit, ?unfocused: Xamarin.Forms.FocusEventArgs -> unit, ?horizontalOptions: Xamarin.Forms.LayoutOptions, - ?verticalOptions: Xamarin.Forms.LayoutOptions, ?margin: obj, ?gestureRecognizers: ViewElement list, ?touchPoints: int, ?panUpdated: Xamarin.Forms.PanUpdatedEventArgs -> unit, - ?command: unit -> unit, ?numberOfTapsRequired: int, ?numberOfClicksRequired: int, ?buttons: Xamarin.Forms.ButtonsMask, ?isPinching: bool, - ?pinchUpdated: Xamarin.Forms.PinchGestureUpdatedEventArgs -> unit, ?swipeGestureRecognizerDirection: Xamarin.Forms.SwipeDirection, ?threshold: System.UInt32, ?swiped: Xamarin.Forms.SwipedEventArgs -> unit, ?color: Xamarin.Forms.Color, - ?isRunning: bool, ?boxViewCornerRadius: Xamarin.Forms.CornerRadius, ?progress: double, ?isClippedToBounds: bool, ?padding: obj, - ?content: ViewElement, ?scrollOrientation: Xamarin.Forms.ScrollOrientation, ?horizontalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, ?verticalScrollBarVisibility: Xamarin.Forms.ScrollBarVisibility, ?scrollTo: float * float * Fabulous.DynamicViews.AnimationKind, - ?scrolled: Xamarin.Forms.ScrolledEventArgs -> unit, ?layoutAreaOverride: Xamarin.Forms.Rectangle, ?cancelButtonColor: Xamarin.Forms.Color, ?fontFamily: string, ?fontAttributes: Xamarin.Forms.FontAttributes, - ?fontSize: obj, ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, ?placeholder: string, ?placeholderColor: Xamarin.Forms.Color, ?searchBarCommand: string -> unit, - ?searchBarCanExecute: bool, ?text: string, ?textColor: Xamarin.Forms.Color, ?searchBarTextChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?buttonCommand: unit -> unit, - ?buttonCanExecute: bool, ?borderColor: Xamarin.Forms.Color, ?borderWidth: double, ?contentLayout: Xamarin.Forms.Button.ButtonContentLayout, ?buttonCornerRadius: int, - ?buttonImageSource: string, ?minimumMaximum: float * float, ?value: double, ?valueChanged: Xamarin.Forms.ValueChangedEventArgs -> unit, ?increment: double, - ?isToggled: bool, ?toggled: Xamarin.Forms.ToggledEventArgs -> unit, ?onColor: Xamarin.Forms.Color, ?height: double, ?on: bool, - ?onChanged: Xamarin.Forms.ToggledEventArgs -> unit, ?intent: Xamarin.Forms.TableIntent, ?hasUnevenRows: bool, ?rowHeight: int, ?tableRoot: (string * ViewElement list) list, - ?rowDefinitionHeight: obj, ?columnDefinitionWidth: obj, ?gridRowDefinitions: obj list, ?gridColumnDefinitions: obj list, ?rowSpacing: double, - ?columnSpacing: double, ?children: ViewElement list, ?gridRow: int, ?gridRowSpan: int, ?gridColumn: int, - ?gridColumnSpan: int, ?layoutBounds: Xamarin.Forms.Rectangle, ?layoutFlags: Xamarin.Forms.AbsoluteLayoutFlags, ?boundsConstraint: Xamarin.Forms.BoundsConstraint, ?heightConstraint: Xamarin.Forms.Constraint, - ?widthConstraint: Xamarin.Forms.Constraint, ?xConstraint: Xamarin.Forms.Constraint, ?yConstraint: Xamarin.Forms.Constraint, ?alignContent: Xamarin.Forms.FlexAlignContent, ?alignItems: Xamarin.Forms.FlexAlignItems, - ?flexLayoutDirection: Xamarin.Forms.FlexDirection, ?position: Xamarin.Forms.FlexPosition, ?wrap: Xamarin.Forms.FlexWrap, ?justifyContent: Xamarin.Forms.FlexJustify, ?flexAlignSelf: Xamarin.Forms.FlexAlignSelf, - ?flexOrder: int, ?flexBasis: Xamarin.Forms.FlexBasis, ?flexGrow: double, ?flexShrink: double, ?date: System.DateTime, - ?format: string, ?minimumDate: System.DateTime, ?maximumDate: System.DateTime, ?dateSelected: Xamarin.Forms.DateChangedEventArgs -> unit, ?pickerItemsSource: seq<'T>, - ?selectedIndex: int, ?title: string, ?selectedIndexChanged: (int * 'T option) -> unit, ?frameCornerRadius: double, ?hasShadow: bool, - ?imageSource: obj, ?aspect: Xamarin.Forms.Aspect, ?isOpaque: bool, ?imageButtonCommand: unit -> unit, ?imageButtonCornerRadius: int, - ?clicked: System.EventArgs -> unit, ?pressed: System.EventArgs -> unit, ?released: System.EventArgs -> unit, ?keyboard: Xamarin.Forms.Keyboard, ?editorCompleted: string -> unit, - ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?autoSize: Xamarin.Forms.EditorAutoSizeOption, ?isTextPredictionEnabled: bool, ?isPassword: bool, ?entryCompleted: string -> unit, - ?returnType: Xamarin.Forms.ReturnType, ?returnCommand: unit -> unit, ?cursorPosition: int, ?selectionLength: int, ?label: string, - ?entryCellTextChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?verticalTextAlignment: Xamarin.Forms.TextAlignment, ?formattedText: ViewElement, ?lineBreakMode: Xamarin.Forms.LineBreakMode, ?lineHeight: double, - ?maxLines: int, ?textDecorations: Xamarin.Forms.TextDecorations, ?stackOrientation: Xamarin.Forms.StackOrientation, ?spacing: double, ?foregroundColor: Xamarin.Forms.Color, - ?propertyChanged: System.ComponentModel.PropertyChangedEventArgs -> unit, ?spans: ViewElement[], ?time: System.TimeSpan, ?webSource: Xamarin.Forms.WebViewSource, ?reload: bool, - ?navigated: Xamarin.Forms.WebNavigatedEventArgs -> unit, ?navigating: Xamarin.Forms.WebNavigatingEventArgs -> unit, ?reloadRequested: System.EventArgs -> unit, ?backgroundImage: string, ?icon: string, - ?isBusy: bool, ?toolbarItems: ViewElement list, ?useSafeArea: bool, ?page_Appearing: unit -> unit, ?page_Disappearing: unit -> unit, - ?page_LayoutChanged: unit -> unit, ?carouselPage_CurrentPage: int, ?carouselPage_CurrentPageChanged: int option -> unit, ?pages: ViewElement list, ?backButtonTitle: string, - ?hasBackButton: bool, ?hasNavigationBar: bool, ?titleIcon: string, ?titleView: ViewElement, ?barBackgroundColor: Xamarin.Forms.Color, - ?barTextColor: Xamarin.Forms.Color, ?popped: Xamarin.Forms.NavigationEventArgs -> unit, ?poppedToRoot: Xamarin.Forms.NavigationEventArgs -> unit, ?pushed: Xamarin.Forms.NavigationEventArgs -> unit, ?tabbedPage_CurrentPage: int, - ?tabbedPage_CurrentPageChanged: int option -> unit, ?onSizeAllocatedCallback: (double * double) -> unit, ?master: ViewElement, ?detail: ViewElement, ?isGestureEnabled: bool, - ?isPresented: bool, ?masterBehavior: Xamarin.Forms.MasterBehavior, ?isPresentedChanged: bool -> unit, ?accelerator: string, ?textDetail: string, - ?textDetailColor: Xamarin.Forms.Color, ?textCellCommand: unit -> unit, ?textCellCanExecute: bool, ?order: Xamarin.Forms.ToolbarItemOrder, ?priority: int, - ?view: ViewElement, ?listViewItems: seq, ?footer: System.Object, ?header: System.Object, ?headerTemplate: Xamarin.Forms.DataTemplate, - ?isGroupingEnabled: bool, ?isPullToRefreshEnabled: bool, ?isRefreshing: bool, ?refreshCommand: unit -> unit, ?listView_SelectedItem: int option, - ?listView_SeparatorVisibility: Xamarin.Forms.SeparatorVisibility, ?listView_SeparatorColor: Xamarin.Forms.Color, ?listView_ItemAppearing: int -> unit, ?listView_ItemDisappearing: int -> unit, ?listView_ItemSelected: int option -> unit, - ?listView_ItemTapped: int -> unit, ?listView_Refreshing: unit -> unit, ?selectionMode: Xamarin.Forms.ListViewSelectionMode, ?refreshControlColor: Xamarin.Forms.Color, ?listViewGrouped_ItemsSource: (string * ViewElement * ViewElement list) list, - ?listViewGrouped_ShowJumpList: bool, ?listViewGrouped_SelectedItem: (int * int) option, ?separatorVisibility: Xamarin.Forms.SeparatorVisibility, ?separatorColor: Xamarin.Forms.Color, ?listViewGrouped_ItemAppearing: int * int option -> unit, - ?listViewGrouped_ItemDisappearing: int * int option -> unit, ?listViewGrouped_ItemSelected: (int * int) option -> unit, ?listViewGrouped_ItemTapped: int * int -> unit, ?refreshing: unit -> unit, ?textOverride: string, - ?commandParameter: System.Object, ?iconOverride: string, ?span: int, ?emptyView: System.Object, ?itemsLayout: Xamarin.Forms.IItemsLayout, - ?itemsSource: System.Collections.IEnumerable, ?scrollToRequested: Xamarin.Forms.ScrollToRequestEventArgs -> unit, ?iScrollTo: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind, ?clearIcon: string, ?clearIconHelpText: string, - ?clearIconName: string, ?clearPlaceholderCommand: unit -> unit, ?clearPlaceholderCommandParameter: System.Object, ?clearPlaceholderEnabled: bool, ?clearPlaceholderHelpText: string, - ?clearPlaceholderIcon: string, ?clearPlaceholderName: string, ?displayMemberName: string, ?isSearchEnabled: bool, ?query: string, - ?queryIcon: string, ?queryIconHelpText: string, ?queryIconName: string, ?searchBoxVisibility: Xamarin.Forms.SearchBoxVisiblity, ?showsResults: bool, - ?items: seq, ?menuItems: seq, ?currentItem: ViewElement, ?flyoutBackgroundColor: Xamarin.Forms.Color, ?flyoutBehavior: Xamarin.Forms.FlyoutBehavior, - ?flyoutHeader: System.Object, ?flyoutHeaderBehavior: Xamarin.Forms.FlyoutHeaderBehavior, ?flyoutIsPresented: bool, ?route: string, ?routeHost: string, - ?routeScheme: string, ?onNavigated: Xamarin.Forms.ShellNavigatedEventArgs -> unit, ?onNavigating: Xamarin.Forms.ShellNavigatingEventArgs -> unit, ?goToAsync: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind, ?flyoutDisplayOptions: Xamarin.Forms.FlyoutDisplayOptions, - ?selectedItem: System.Object, ?selectionChangedCommand: unit -> unit, ?selectionChangedCommandParameter: System.Object, ?selectableItemsMode: Xamarin.Forms.SelectionMode, ?selectionChanged: Xamarin.Forms.SelectionChangedEventArgs -> unit, - ?location: System.Uri, ?ssGoToAsync: string list * Map * Fabulous.DynamicViews.AnimationKind, ?carouselViewItems: seq, ?collectionViewItems: seq) = - let x = match classId with None -> x | Some opt -> x.ClassId(opt) - let x = match styleId with None -> x | Some opt -> x.StyleId(opt) - let x = match automationId with None -> x | Some opt -> x.AutomationId(opt) - let x = match anchorX with None -> x | Some opt -> x.AnchorX(opt) - let x = match anchorY with None -> x | Some opt -> x.AnchorY(opt) - let x = match backgroundColor with None -> x | Some opt -> x.BackgroundColor(opt) - let x = match heightRequest with None -> x | Some opt -> x.HeightRequest(opt) - let x = match inputTransparent with None -> x | Some opt -> x.InputTransparent(opt) - let x = match isEnabled with None -> x | Some opt -> x.IsEnabled(opt) - let x = match isVisible with None -> x | Some opt -> x.IsVisible(opt) - let x = match minimumHeightRequest with None -> x | Some opt -> x.MinimumHeightRequest(opt) - let x = match minimumWidthRequest with None -> x | Some opt -> x.MinimumWidthRequest(opt) - let x = match opacity with None -> x | Some opt -> x.Opacity(opt) - let x = match rotation with None -> x | Some opt -> x.Rotation(opt) - let x = match rotationX with None -> x | Some opt -> x.RotationX(opt) - let x = match rotationY with None -> x | Some opt -> x.RotationY(opt) - let x = match scale with None -> x | Some opt -> x.Scale(opt) - let x = match style with None -> x | Some opt -> x.Style(opt) - let x = match styleClass with None -> x | Some opt -> x.StyleClass(opt) - let x = match translationX with None -> x | Some opt -> x.TranslationX(opt) - let x = match translationY with None -> x | Some opt -> x.TranslationY(opt) - let x = match widthRequest with None -> x | Some opt -> x.WidthRequest(opt) - let x = match resources with None -> x | Some opt -> x.Resources(opt) - let x = match styles with None -> x | Some opt -> x.Styles(opt) - let x = match styleSheets with None -> x | Some opt -> x.StyleSheets(opt) - let x = match isTabStop with None -> x | Some opt -> x.IsTabStop(opt) - let x = match scaleX with None -> x | Some opt -> x.ScaleX(opt) - let x = match scaleY with None -> x | Some opt -> x.ScaleY(opt) - let x = match tabIndex with None -> x | Some opt -> x.TabIndex(opt) - let x = match childrenReordered with None -> x | Some opt -> x.ChildrenReordered(opt) - let x = match measureInvalidated with None -> x | Some opt -> x.MeasureInvalidated(opt) - let x = match focused with None -> x | Some opt -> x.Focused(opt) - let x = match sizeChanged with None -> x | Some opt -> x.SizeChanged(opt) - let x = match unfocused with None -> x | Some opt -> x.Unfocused(opt) - let x = match horizontalOptions with None -> x | Some opt -> x.HorizontalOptions(opt) - let x = match verticalOptions with None -> x | Some opt -> x.VerticalOptions(opt) - let x = match margin with None -> x | Some opt -> x.Margin(opt) - let x = match gestureRecognizers with None -> x | Some opt -> x.GestureRecognizers(opt) - let x = match touchPoints with None -> x | Some opt -> x.TouchPoints(opt) - let x = match panUpdated with None -> x | Some opt -> x.PanUpdated(opt) - let x = match command with None -> x | Some opt -> x.Command(opt) - let x = match numberOfTapsRequired with None -> x | Some opt -> x.NumberOfTapsRequired(opt) - let x = match numberOfClicksRequired with None -> x | Some opt -> x.NumberOfClicksRequired(opt) - let x = match buttons with None -> x | Some opt -> x.Buttons(opt) - let x = match isPinching with None -> x | Some opt -> x.IsPinching(opt) - let x = match pinchUpdated with None -> x | Some opt -> x.PinchUpdated(opt) - let x = match swipeGestureRecognizerDirection with None -> x | Some opt -> x.SwipeGestureRecognizerDirection(opt) - let x = match threshold with None -> x | Some opt -> x.Threshold(opt) - let x = match swiped with None -> x | Some opt -> x.Swiped(opt) - let x = match color with None -> x | Some opt -> x.Color(opt) - let x = match isRunning with None -> x | Some opt -> x.IsRunning(opt) - let x = match boxViewCornerRadius with None -> x | Some opt -> x.BoxViewCornerRadius(opt) - let x = match progress with None -> x | Some opt -> x.Progress(opt) - let x = match isClippedToBounds with None -> x | Some opt -> x.IsClippedToBounds(opt) - let x = match padding with None -> x | Some opt -> x.Padding(opt) - let x = match content with None -> x | Some opt -> x.Content(opt) - let x = match scrollOrientation with None -> x | Some opt -> x.ScrollOrientation(opt) - let x = match horizontalScrollBarVisibility with None -> x | Some opt -> x.HorizontalScrollBarVisibility(opt) - let x = match verticalScrollBarVisibility with None -> x | Some opt -> x.VerticalScrollBarVisibility(opt) - let x = match scrollTo with None -> x | Some opt -> x.ScrollTo(opt) - let x = match scrolled with None -> x | Some opt -> x.Scrolled(opt) - let x = match layoutAreaOverride with None -> x | Some opt -> x.LayoutAreaOverride(opt) - let x = match cancelButtonColor with None -> x | Some opt -> x.CancelButtonColor(opt) - let x = match fontFamily with None -> x | Some opt -> x.FontFamily(opt) - let x = match fontAttributes with None -> x | Some opt -> x.FontAttributes(opt) - let x = match fontSize with None -> x | Some opt -> x.FontSize(opt) - let x = match horizontalTextAlignment with None -> x | Some opt -> x.HorizontalTextAlignment(opt) - let x = match placeholder with None -> x | Some opt -> x.Placeholder(opt) - let x = match placeholderColor with None -> x | Some opt -> x.PlaceholderColor(opt) - let x = match searchBarCommand with None -> x | Some opt -> x.SearchBarCommand(opt) - let x = match searchBarCanExecute with None -> x | Some opt -> x.SearchBarCanExecute(opt) - let x = match text with None -> x | Some opt -> x.Text(opt) - let x = match textColor with None -> x | Some opt -> x.TextColor(opt) - let x = match searchBarTextChanged with None -> x | Some opt -> x.SearchBarTextChanged(opt) - let x = match buttonCommand with None -> x | Some opt -> x.ButtonCommand(opt) - let x = match buttonCanExecute with None -> x | Some opt -> x.ButtonCanExecute(opt) - let x = match borderColor with None -> x | Some opt -> x.BorderColor(opt) - let x = match borderWidth with None -> x | Some opt -> x.BorderWidth(opt) - let x = match contentLayout with None -> x | Some opt -> x.ContentLayout(opt) - let x = match buttonCornerRadius with None -> x | Some opt -> x.ButtonCornerRadius(opt) - let x = match buttonImageSource with None -> x | Some opt -> x.ButtonImageSource(opt) - let x = match minimumMaximum with None -> x | Some opt -> x.MinimumMaximum(opt) - let x = match value with None -> x | Some opt -> x.Value(opt) - let x = match valueChanged with None -> x | Some opt -> x.ValueChanged(opt) - let x = match increment with None -> x | Some opt -> x.Increment(opt) - let x = match isToggled with None -> x | Some opt -> x.IsToggled(opt) - let x = match toggled with None -> x | Some opt -> x.Toggled(opt) - let x = match onColor with None -> x | Some opt -> x.OnColor(opt) - let x = match height with None -> x | Some opt -> x.Height(opt) - let x = match on with None -> x | Some opt -> x.On(opt) - let x = match onChanged with None -> x | Some opt -> x.OnChanged(opt) - let x = match intent with None -> x | Some opt -> x.Intent(opt) - let x = match hasUnevenRows with None -> x | Some opt -> x.HasUnevenRows(opt) - let x = match rowHeight with None -> x | Some opt -> x.RowHeight(opt) - let x = match tableRoot with None -> x | Some opt -> x.TableRoot(opt) - let x = match rowDefinitionHeight with None -> x | Some opt -> x.RowDefinitionHeight(opt) - let x = match columnDefinitionWidth with None -> x | Some opt -> x.ColumnDefinitionWidth(opt) - let x = match gridRowDefinitions with None -> x | Some opt -> x.GridRowDefinitions(opt) - let x = match gridColumnDefinitions with None -> x | Some opt -> x.GridColumnDefinitions(opt) - let x = match rowSpacing with None -> x | Some opt -> x.RowSpacing(opt) - let x = match columnSpacing with None -> x | Some opt -> x.ColumnSpacing(opt) - let x = match children with None -> x | Some opt -> x.Children(opt) - let x = match gridRow with None -> x | Some opt -> x.GridRow(opt) - let x = match gridRowSpan with None -> x | Some opt -> x.GridRowSpan(opt) - let x = match gridColumn with None -> x | Some opt -> x.GridColumn(opt) - let x = match gridColumnSpan with None -> x | Some opt -> x.GridColumnSpan(opt) - let x = match layoutBounds with None -> x | Some opt -> x.LayoutBounds(opt) - let x = match layoutFlags with None -> x | Some opt -> x.LayoutFlags(opt) - let x = match boundsConstraint with None -> x | Some opt -> x.BoundsConstraint(opt) - let x = match heightConstraint with None -> x | Some opt -> x.HeightConstraint(opt) - let x = match widthConstraint with None -> x | Some opt -> x.WidthConstraint(opt) - let x = match xConstraint with None -> x | Some opt -> x.XConstraint(opt) - let x = match yConstraint with None -> x | Some opt -> x.YConstraint(opt) - let x = match alignContent with None -> x | Some opt -> x.AlignContent(opt) - let x = match alignItems with None -> x | Some opt -> x.AlignItems(opt) - let x = match flexLayoutDirection with None -> x | Some opt -> x.FlexLayoutDirection(opt) - let x = match position with None -> x | Some opt -> x.Position(opt) - let x = match wrap with None -> x | Some opt -> x.Wrap(opt) - let x = match justifyContent with None -> x | Some opt -> x.JustifyContent(opt) - let x = match flexAlignSelf with None -> x | Some opt -> x.FlexAlignSelf(opt) - let x = match flexOrder with None -> x | Some opt -> x.FlexOrder(opt) - let x = match flexBasis with None -> x | Some opt -> x.FlexBasis(opt) - let x = match flexGrow with None -> x | Some opt -> x.FlexGrow(opt) - let x = match flexShrink with None -> x | Some opt -> x.FlexShrink(opt) - let x = match date with None -> x | Some opt -> x.Date(opt) - let x = match format with None -> x | Some opt -> x.Format(opt) - let x = match minimumDate with None -> x | Some opt -> x.MinimumDate(opt) - let x = match maximumDate with None -> x | Some opt -> x.MaximumDate(opt) - let x = match dateSelected with None -> x | Some opt -> x.DateSelected(opt) - let x = match pickerItemsSource with None -> x | Some opt -> x.PickerItemsSource(opt) - let x = match selectedIndex with None -> x | Some opt -> x.SelectedIndex(opt) - let x = match title with None -> x | Some opt -> x.Title(opt) - let x = match selectedIndexChanged with None -> x | Some opt -> x.SelectedIndexChanged(opt) - let x = match frameCornerRadius with None -> x | Some opt -> x.FrameCornerRadius(opt) - let x = match hasShadow with None -> x | Some opt -> x.HasShadow(opt) - let x = match imageSource with None -> x | Some opt -> x.ImageSource(opt) - let x = match aspect with None -> x | Some opt -> x.Aspect(opt) - let x = match isOpaque with None -> x | Some opt -> x.IsOpaque(opt) - let x = match imageButtonCommand with None -> x | Some opt -> x.ImageButtonCommand(opt) - let x = match imageButtonCornerRadius with None -> x | Some opt -> x.ImageButtonCornerRadius(opt) - let x = match clicked with None -> x | Some opt -> x.Clicked(opt) - let x = match pressed with None -> x | Some opt -> x.Pressed(opt) - let x = match released with None -> x | Some opt -> x.Released(opt) - let x = match keyboard with None -> x | Some opt -> x.Keyboard(opt) - let x = match editorCompleted with None -> x | Some opt -> x.EditorCompleted(opt) - let x = match textChanged with None -> x | Some opt -> x.TextChanged(opt) - let x = match autoSize with None -> x | Some opt -> x.AutoSize(opt) - let x = match isTextPredictionEnabled with None -> x | Some opt -> x.IsTextPredictionEnabled(opt) - let x = match isPassword with None -> x | Some opt -> x.IsPassword(opt) - let x = match entryCompleted with None -> x | Some opt -> x.EntryCompleted(opt) - let x = match returnType with None -> x | Some opt -> x.ReturnType(opt) - let x = match returnCommand with None -> x | Some opt -> x.ReturnCommand(opt) - let x = match cursorPosition with None -> x | Some opt -> x.CursorPosition(opt) - let x = match selectionLength with None -> x | Some opt -> x.SelectionLength(opt) - let x = match label with None -> x | Some opt -> x.Label(opt) - let x = match entryCellTextChanged with None -> x | Some opt -> x.EntryCellTextChanged(opt) - let x = match verticalTextAlignment with None -> x | Some opt -> x.VerticalTextAlignment(opt) - let x = match formattedText with None -> x | Some opt -> x.FormattedText(opt) - let x = match lineBreakMode with None -> x | Some opt -> x.LineBreakMode(opt) - let x = match lineHeight with None -> x | Some opt -> x.LineHeight(opt) - let x = match maxLines with None -> x | Some opt -> x.MaxLines(opt) - let x = match textDecorations with None -> x | Some opt -> x.TextDecorations(opt) - let x = match stackOrientation with None -> x | Some opt -> x.StackOrientation(opt) - let x = match spacing with None -> x | Some opt -> x.Spacing(opt) - let x = match foregroundColor with None -> x | Some opt -> x.ForegroundColor(opt) - let x = match propertyChanged with None -> x | Some opt -> x.PropertyChanged(opt) - let x = match spans with None -> x | Some opt -> x.Spans(opt) - let x = match time with None -> x | Some opt -> x.Time(opt) - let x = match webSource with None -> x | Some opt -> x.WebSource(opt) - let x = match reload with None -> x | Some opt -> x.Reload(opt) - let x = match navigated with None -> x | Some opt -> x.Navigated(opt) - let x = match navigating with None -> x | Some opt -> x.Navigating(opt) - let x = match reloadRequested with None -> x | Some opt -> x.ReloadRequested(opt) - let x = match backgroundImage with None -> x | Some opt -> x.BackgroundImage(opt) - let x = match icon with None -> x | Some opt -> x.Icon(opt) - let x = match isBusy with None -> x | Some opt -> x.IsBusy(opt) - let x = match toolbarItems with None -> x | Some opt -> x.ToolbarItems(opt) - let x = match useSafeArea with None -> x | Some opt -> x.UseSafeArea(opt) - let x = match page_Appearing with None -> x | Some opt -> x.Page_Appearing(opt) - let x = match page_Disappearing with None -> x | Some opt -> x.Page_Disappearing(opt) - let x = match page_LayoutChanged with None -> x | Some opt -> x.Page_LayoutChanged(opt) - let x = match carouselPage_CurrentPage with None -> x | Some opt -> x.CarouselPage_CurrentPage(opt) - let x = match carouselPage_CurrentPageChanged with None -> x | Some opt -> x.CarouselPage_CurrentPageChanged(opt) - let x = match pages with None -> x | Some opt -> x.Pages(opt) - let x = match backButtonTitle with None -> x | Some opt -> x.BackButtonTitle(opt) - let x = match hasBackButton with None -> x | Some opt -> x.HasBackButton(opt) - let x = match hasNavigationBar with None -> x | Some opt -> x.HasNavigationBar(opt) - let x = match titleIcon with None -> x | Some opt -> x.TitleIcon(opt) - let x = match titleView with None -> x | Some opt -> x.TitleView(opt) - let x = match barBackgroundColor with None -> x | Some opt -> x.BarBackgroundColor(opt) - let x = match barTextColor with None -> x | Some opt -> x.BarTextColor(opt) - let x = match popped with None -> x | Some opt -> x.Popped(opt) - let x = match poppedToRoot with None -> x | Some opt -> x.PoppedToRoot(opt) - let x = match pushed with None -> x | Some opt -> x.Pushed(opt) - let x = match tabbedPage_CurrentPage with None -> x | Some opt -> x.TabbedPage_CurrentPage(opt) - let x = match tabbedPage_CurrentPageChanged with None -> x | Some opt -> x.TabbedPage_CurrentPageChanged(opt) - let x = match onSizeAllocatedCallback with None -> x | Some opt -> x.OnSizeAllocatedCallback(opt) - let x = match master with None -> x | Some opt -> x.Master(opt) - let x = match detail with None -> x | Some opt -> x.Detail(opt) - let x = match isGestureEnabled with None -> x | Some opt -> x.IsGestureEnabled(opt) - let x = match isPresented with None -> x | Some opt -> x.IsPresented(opt) - let x = match masterBehavior with None -> x | Some opt -> x.MasterBehavior(opt) - let x = match isPresentedChanged with None -> x | Some opt -> x.IsPresentedChanged(opt) - let x = match accelerator with None -> x | Some opt -> x.Accelerator(opt) - let x = match textDetail with None -> x | Some opt -> x.TextDetail(opt) - let x = match textDetailColor with None -> x | Some opt -> x.TextDetailColor(opt) - let x = match textCellCommand with None -> x | Some opt -> x.TextCellCommand(opt) - let x = match textCellCanExecute with None -> x | Some opt -> x.TextCellCanExecute(opt) - let x = match order with None -> x | Some opt -> x.Order(opt) - let x = match priority with None -> x | Some opt -> x.Priority(opt) - let x = match view with None -> x | Some opt -> x.View(opt) - let x = match listViewItems with None -> x | Some opt -> x.ListViewItems(opt) - let x = match footer with None -> x | Some opt -> x.Footer(opt) - let x = match header with None -> x | Some opt -> x.Header(opt) - let x = match headerTemplate with None -> x | Some opt -> x.HeaderTemplate(opt) - let x = match isGroupingEnabled with None -> x | Some opt -> x.IsGroupingEnabled(opt) - let x = match isPullToRefreshEnabled with None -> x | Some opt -> x.IsPullToRefreshEnabled(opt) - let x = match isRefreshing with None -> x | Some opt -> x.IsRefreshing(opt) - let x = match refreshCommand with None -> x | Some opt -> x.RefreshCommand(opt) - let x = match listView_SelectedItem with None -> x | Some opt -> x.ListView_SelectedItem(opt) - let x = match listView_SeparatorVisibility with None -> x | Some opt -> x.ListView_SeparatorVisibility(opt) - let x = match listView_SeparatorColor with None -> x | Some opt -> x.ListView_SeparatorColor(opt) - let x = match listView_ItemAppearing with None -> x | Some opt -> x.ListView_ItemAppearing(opt) - let x = match listView_ItemDisappearing with None -> x | Some opt -> x.ListView_ItemDisappearing(opt) - let x = match listView_ItemSelected with None -> x | Some opt -> x.ListView_ItemSelected(opt) - let x = match listView_ItemTapped with None -> x | Some opt -> x.ListView_ItemTapped(opt) - let x = match listView_Refreshing with None -> x | Some opt -> x.ListView_Refreshing(opt) - let x = match selectionMode with None -> x | Some opt -> x.SelectionMode(opt) - let x = match refreshControlColor with None -> x | Some opt -> x.RefreshControlColor(opt) - let x = match listViewGrouped_ItemsSource with None -> x | Some opt -> x.ListViewGrouped_ItemsSource(opt) - let x = match listViewGrouped_ShowJumpList with None -> x | Some opt -> x.ListViewGrouped_ShowJumpList(opt) - let x = match listViewGrouped_SelectedItem with None -> x | Some opt -> x.ListViewGrouped_SelectedItem(opt) - let x = match separatorVisibility with None -> x | Some opt -> x.SeparatorVisibility(opt) - let x = match separatorColor with None -> x | Some opt -> x.SeparatorColor(opt) - let x = match listViewGrouped_ItemAppearing with None -> x | Some opt -> x.ListViewGrouped_ItemAppearing(opt) - let x = match listViewGrouped_ItemDisappearing with None -> x | Some opt -> x.ListViewGrouped_ItemDisappearing(opt) - let x = match listViewGrouped_ItemSelected with None -> x | Some opt -> x.ListViewGrouped_ItemSelected(opt) - let x = match listViewGrouped_ItemTapped with None -> x | Some opt -> x.ListViewGrouped_ItemTapped(opt) - let x = match refreshing with None -> x | Some opt -> x.Refreshing(opt) - let x = match textOverride with None -> x | Some opt -> x.TextOverride(opt) - let x = match commandParameter with None -> x | Some opt -> x.CommandParameter(opt) - let x = match iconOverride with None -> x | Some opt -> x.IconOverride(opt) - let x = match span with None -> x | Some opt -> x.Span(opt) - let x = match emptyView with None -> x | Some opt -> x.EmptyView(opt) - let x = match itemsLayout with None -> x | Some opt -> x.ItemsLayout(opt) - let x = match itemsSource with None -> x | Some opt -> x.ItemsSource(opt) - let x = match scrollToRequested with None -> x | Some opt -> x.ScrollToRequested(opt) - let x = match iScrollTo with None -> x | Some opt -> x.iScrollTo(opt) - let x = match clearIcon with None -> x | Some opt -> x.ClearIcon(opt) - let x = match clearIconHelpText with None -> x | Some opt -> x.ClearIconHelpText(opt) - let x = match clearIconName with None -> x | Some opt -> x.ClearIconName(opt) - let x = match clearPlaceholderCommand with None -> x | Some opt -> x.ClearPlaceholderCommand(opt) - let x = match clearPlaceholderCommandParameter with None -> x | Some opt -> x.ClearPlaceholderCommandParameter(opt) - let x = match clearPlaceholderEnabled with None -> x | Some opt -> x.ClearPlaceholderEnabled(opt) - let x = match clearPlaceholderHelpText with None -> x | Some opt -> x.ClearPlaceholderHelpText(opt) - let x = match clearPlaceholderIcon with None -> x | Some opt -> x.ClearPlaceholderIcon(opt) - let x = match clearPlaceholderName with None -> x | Some opt -> x.ClearPlaceholderName(opt) - let x = match displayMemberName with None -> x | Some opt -> x.DisplayMemberName(opt) - let x = match isSearchEnabled with None -> x | Some opt -> x.IsSearchEnabled(opt) - let x = match query with None -> x | Some opt -> x.Query(opt) - let x = match queryIcon with None -> x | Some opt -> x.QueryIcon(opt) - let x = match queryIconHelpText with None -> x | Some opt -> x.QueryIconHelpText(opt) - let x = match queryIconName with None -> x | Some opt -> x.QueryIconName(opt) - let x = match searchBoxVisibility with None -> x | Some opt -> x.SearchBoxVisibility(opt) - let x = match showsResults with None -> x | Some opt -> x.ShowsResults(opt) - let x = match items with None -> x | Some opt -> x.Items(opt) - let x = match menuItems with None -> x | Some opt -> x.MenuItems(opt) - let x = match currentItem with None -> x | Some opt -> x.CurrentItem(opt) - let x = match flyoutBackgroundColor with None -> x | Some opt -> x.FlyoutBackgroundColor(opt) - let x = match flyoutBehavior with None -> x | Some opt -> x.FlyoutBehavior(opt) - let x = match flyoutHeader with None -> x | Some opt -> x.FlyoutHeader(opt) - let x = match flyoutHeaderBehavior with None -> x | Some opt -> x.FlyoutHeaderBehavior(opt) - let x = match flyoutIsPresented with None -> x | Some opt -> x.FlyoutIsPresented(opt) - let x = match route with None -> x | Some opt -> x.Route(opt) - let x = match routeHost with None -> x | Some opt -> x.RouteHost(opt) - let x = match routeScheme with None -> x | Some opt -> x.RouteScheme(opt) - let x = match onNavigated with None -> x | Some opt -> x.OnNavigated(opt) - let x = match onNavigating with None -> x | Some opt -> x.OnNavigating(opt) - let x = match goToAsync with None -> x | Some opt -> x.GoToAsync(opt) - let x = match flyoutDisplayOptions with None -> x | Some opt -> x.FlyoutDisplayOptions(opt) - let x = match selectedItem with None -> x | Some opt -> x.SelectedItem(opt) - let x = match selectionChangedCommand with None -> x | Some opt -> x.SelectionChangedCommand(opt) - let x = match selectionChangedCommandParameter with None -> x | Some opt -> x.SelectionChangedCommandParameter(opt) - let x = match selectableItemsMode with None -> x | Some opt -> x.selectableItemsMode(opt) - let x = match selectionChanged with None -> x | Some opt -> x.SelectionChanged(opt) - let x = match location with None -> x | Some opt -> x.Location(opt) - let x = match ssGoToAsync with None -> x | Some opt -> x.ssGoToAsync(opt) - let x = match carouselViewItems with None -> x | Some opt -> x.CarouselViewItems(opt) - let x = match collectionViewItems with None -> x | Some opt -> x.CollectionViewItems(opt) - x - - /// Adjusts the ClassId property in the visual element - let classId (value: string) (x: ViewElement) = x.ClassId(value) - /// Adjusts the StyleId property in the visual element - let styleId (value: string) (x: ViewElement) = x.StyleId(value) - /// Adjusts the AutomationId property in the visual element - let automationId (value: string) (x: ViewElement) = x.AutomationId(value) - /// Adjusts the AnchorX property in the visual element - let anchorX (value: double) (x: ViewElement) = x.AnchorX(value) - /// Adjusts the AnchorY property in the visual element - let anchorY (value: double) (x: ViewElement) = x.AnchorY(value) - /// Adjusts the BackgroundColor property in the visual element - let backgroundColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.BackgroundColor(value) - /// Adjusts the HeightRequest property in the visual element - let heightRequest (value: double) (x: ViewElement) = x.HeightRequest(value) - /// Adjusts the InputTransparent property in the visual element - let inputTransparent (value: bool) (x: ViewElement) = x.InputTransparent(value) - /// Adjusts the IsEnabled property in the visual element - let isEnabled (value: bool) (x: ViewElement) = x.IsEnabled(value) - /// Adjusts the IsVisible property in the visual element - let isVisible (value: bool) (x: ViewElement) = x.IsVisible(value) - /// Adjusts the MinimumHeightRequest property in the visual element - let minimumHeightRequest (value: double) (x: ViewElement) = x.MinimumHeightRequest(value) - /// Adjusts the MinimumWidthRequest property in the visual element - let minimumWidthRequest (value: double) (x: ViewElement) = x.MinimumWidthRequest(value) - /// Adjusts the Opacity property in the visual element - let opacity (value: double) (x: ViewElement) = x.Opacity(value) - /// Adjusts the Rotation property in the visual element - let rotation (value: double) (x: ViewElement) = x.Rotation(value) - /// Adjusts the RotationX property in the visual element - let rotationX (value: double) (x: ViewElement) = x.RotationX(value) - /// Adjusts the RotationY property in the visual element - let rotationY (value: double) (x: ViewElement) = x.RotationY(value) - /// Adjusts the Scale property in the visual element - let scale (value: double) (x: ViewElement) = x.Scale(value) - /// Adjusts the Style property in the visual element - let style (value: Xamarin.Forms.Style) (x: ViewElement) = x.Style(value) - /// Adjusts the StyleClass property in the visual element - let styleClass (value: obj) (x: ViewElement) = x.StyleClass(value) - /// Adjusts the TranslationX property in the visual element - let translationX (value: double) (x: ViewElement) = x.TranslationX(value) - /// Adjusts the TranslationY property in the visual element - let translationY (value: double) (x: ViewElement) = x.TranslationY(value) - /// Adjusts the WidthRequest property in the visual element - let widthRequest (value: double) (x: ViewElement) = x.WidthRequest(value) - /// Adjusts the Resources property in the visual element - let resources (value: (string * obj) list) (x: ViewElement) = x.Resources(value) - /// Adjusts the Styles property in the visual element - let styles (value: Xamarin.Forms.Style list) (x: ViewElement) = x.Styles(value) - /// Adjusts the StyleSheets property in the visual element - let styleSheets (value: Xamarin.Forms.StyleSheets.StyleSheet list) (x: ViewElement) = x.StyleSheets(value) - /// Adjusts the IsTabStop property in the visual element - let isTabStop (value: bool) (x: ViewElement) = x.IsTabStop(value) - /// Adjusts the ScaleX property in the visual element - let scaleX (value: double) (x: ViewElement) = x.ScaleX(value) - /// Adjusts the ScaleY property in the visual element - let scaleY (value: double) (x: ViewElement) = x.ScaleY(value) - /// Adjusts the TabIndex property in the visual element - let tabIndex (value: int) (x: ViewElement) = x.TabIndex(value) - /// Adjusts the ChildrenReordered property in the visual element - let childrenReordered (value: System.EventArgs -> unit) (x: ViewElement) = x.ChildrenReordered(value) - /// Adjusts the MeasureInvalidated property in the visual element - let measureInvalidated (value: System.EventArgs -> unit) (x: ViewElement) = x.MeasureInvalidated(value) - /// Adjusts the Focused property in the visual element - let focused (value: Xamarin.Forms.FocusEventArgs -> unit) (x: ViewElement) = x.Focused(value) - /// Adjusts the SizeChanged property in the visual element - let sizeChanged (value: Fabulous.CustomControls.SizeChangedEventArgs -> unit) (x: ViewElement) = x.SizeChanged(value) - /// Adjusts the Unfocused property in the visual element - let unfocused (value: Xamarin.Forms.FocusEventArgs -> unit) (x: ViewElement) = x.Unfocused(value) - /// Adjusts the HorizontalOptions property in the visual element - let horizontalOptions (value: Xamarin.Forms.LayoutOptions) (x: ViewElement) = x.HorizontalOptions(value) - /// Adjusts the VerticalOptions property in the visual element - let verticalOptions (value: Xamarin.Forms.LayoutOptions) (x: ViewElement) = x.VerticalOptions(value) - /// Adjusts the Margin property in the visual element - let margin (value: obj) (x: ViewElement) = x.Margin(value) - /// Adjusts the GestureRecognizers property in the visual element - let gestureRecognizers (value: ViewElement list) (x: ViewElement) = x.GestureRecognizers(value) - /// Adjusts the TouchPoints property in the visual element - let touchPoints (value: int) (x: ViewElement) = x.TouchPoints(value) - /// Adjusts the PanUpdated property in the visual element - let panUpdated (value: Xamarin.Forms.PanUpdatedEventArgs -> unit) (x: ViewElement) = x.PanUpdated(value) - /// Adjusts the Command property in the visual element - let command (value: unit -> unit) (x: ViewElement) = x.Command(value) - /// Adjusts the NumberOfTapsRequired property in the visual element - let numberOfTapsRequired (value: int) (x: ViewElement) = x.NumberOfTapsRequired(value) - /// Adjusts the NumberOfClicksRequired property in the visual element - let numberOfClicksRequired (value: int) (x: ViewElement) = x.NumberOfClicksRequired(value) - /// Adjusts the Buttons property in the visual element - let buttons (value: Xamarin.Forms.ButtonsMask) (x: ViewElement) = x.Buttons(value) - /// Adjusts the IsPinching property in the visual element - let isPinching (value: bool) (x: ViewElement) = x.IsPinching(value) - /// Adjusts the PinchUpdated property in the visual element - let pinchUpdated (value: Xamarin.Forms.PinchGestureUpdatedEventArgs -> unit) (x: ViewElement) = x.PinchUpdated(value) - /// Adjusts the SwipeGestureRecognizerDirection property in the visual element - let swipeGestureRecognizerDirection (value: Xamarin.Forms.SwipeDirection) (x: ViewElement) = x.SwipeGestureRecognizerDirection(value) - /// Adjusts the Threshold property in the visual element - let threshold (value: System.UInt32) (x: ViewElement) = x.Threshold(value) - /// Adjusts the Swiped property in the visual element - let swiped (value: Xamarin.Forms.SwipedEventArgs -> unit) (x: ViewElement) = x.Swiped(value) - /// Adjusts the Color property in the visual element - let color (value: Xamarin.Forms.Color) (x: ViewElement) = x.Color(value) - /// Adjusts the IsRunning property in the visual element - let isRunning (value: bool) (x: ViewElement) = x.IsRunning(value) - /// Adjusts the BoxViewCornerRadius property in the visual element - let boxViewCornerRadius (value: Xamarin.Forms.CornerRadius) (x: ViewElement) = x.BoxViewCornerRadius(value) - /// Adjusts the Progress property in the visual element - let progress (value: double) (x: ViewElement) = x.Progress(value) - /// Adjusts the IsClippedToBounds property in the visual element - let isClippedToBounds (value: bool) (x: ViewElement) = x.IsClippedToBounds(value) - /// Adjusts the Padding property in the visual element - let padding (value: obj) (x: ViewElement) = x.Padding(value) - /// Adjusts the Content property in the visual element - let content (value: ViewElement) (x: ViewElement) = x.Content(value) - /// Adjusts the ScrollOrientation property in the visual element - let scrollOrientation (value: Xamarin.Forms.ScrollOrientation) (x: ViewElement) = x.ScrollOrientation(value) - /// Adjusts the HorizontalScrollBarVisibility property in the visual element - let horizontalScrollBarVisibility (value: Xamarin.Forms.ScrollBarVisibility) (x: ViewElement) = x.HorizontalScrollBarVisibility(value) - /// Adjusts the VerticalScrollBarVisibility property in the visual element - let verticalScrollBarVisibility (value: Xamarin.Forms.ScrollBarVisibility) (x: ViewElement) = x.VerticalScrollBarVisibility(value) - /// Adjusts the ScrollTo property in the visual element - let scrollTo (value: float * float * Fabulous.DynamicViews.AnimationKind) (x: ViewElement) = x.ScrollTo(value) - /// Adjusts the Scrolled property in the visual element - let scrolled (value: Xamarin.Forms.ScrolledEventArgs -> unit) (x: ViewElement) = x.Scrolled(value) - /// Adjusts the LayoutAreaOverride property in the visual element - let layoutAreaOverride (value: Xamarin.Forms.Rectangle) (x: ViewElement) = x.LayoutAreaOverride(value) - /// Adjusts the CancelButtonColor property in the visual element - let cancelButtonColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.CancelButtonColor(value) - /// Adjusts the FontFamily property in the visual element - let fontFamily (value: string) (x: ViewElement) = x.FontFamily(value) - /// Adjusts the FontAttributes property in the visual element - let fontAttributes (value: Xamarin.Forms.FontAttributes) (x: ViewElement) = x.FontAttributes(value) - /// Adjusts the FontSize property in the visual element - let fontSize (value: obj) (x: ViewElement) = x.FontSize(value) - /// Adjusts the HorizontalTextAlignment property in the visual element - let horizontalTextAlignment (value: Xamarin.Forms.TextAlignment) (x: ViewElement) = x.HorizontalTextAlignment(value) - /// Adjusts the Placeholder property in the visual element - let placeholder (value: string) (x: ViewElement) = x.Placeholder(value) - /// Adjusts the PlaceholderColor property in the visual element - let placeholderColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.PlaceholderColor(value) - /// Adjusts the SearchBarCommand property in the visual element - let searchBarCommand (value: string -> unit) (x: ViewElement) = x.SearchBarCommand(value) - /// Adjusts the SearchBarCanExecute property in the visual element - let searchBarCanExecute (value: bool) (x: ViewElement) = x.SearchBarCanExecute(value) - /// Adjusts the Text property in the visual element - let text (value: string) (x: ViewElement) = x.Text(value) - /// Adjusts the TextColor property in the visual element - let textColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.TextColor(value) - /// Adjusts the SearchBarTextChanged property in the visual element - let searchBarTextChanged (value: Xamarin.Forms.TextChangedEventArgs -> unit) (x: ViewElement) = x.SearchBarTextChanged(value) - /// Adjusts the ButtonCommand property in the visual element - let buttonCommand (value: unit -> unit) (x: ViewElement) = x.ButtonCommand(value) - /// Adjusts the ButtonCanExecute property in the visual element - let buttonCanExecute (value: bool) (x: ViewElement) = x.ButtonCanExecute(value) - /// Adjusts the BorderColor property in the visual element - let borderColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.BorderColor(value) - /// Adjusts the BorderWidth property in the visual element - let borderWidth (value: double) (x: ViewElement) = x.BorderWidth(value) - /// Adjusts the ContentLayout property in the visual element - let contentLayout (value: Xamarin.Forms.Button.ButtonContentLayout) (x: ViewElement) = x.ContentLayout(value) - /// Adjusts the ButtonCornerRadius property in the visual element - let buttonCornerRadius (value: int) (x: ViewElement) = x.ButtonCornerRadius(value) - /// Adjusts the ButtonImageSource property in the visual element - let buttonImageSource (value: string) (x: ViewElement) = x.ButtonImageSource(value) - /// Adjusts the MinimumMaximum property in the visual element - let minimumMaximum (value: float * float) (x: ViewElement) = x.MinimumMaximum(value) - /// Adjusts the Value property in the visual element - let value (value: double) (x: ViewElement) = x.Value(value) - /// Adjusts the ValueChanged property in the visual element - let valueChanged (value: Xamarin.Forms.ValueChangedEventArgs -> unit) (x: ViewElement) = x.ValueChanged(value) - /// Adjusts the Increment property in the visual element - let increment (value: double) (x: ViewElement) = x.Increment(value) - /// Adjusts the IsToggled property in the visual element - let isToggled (value: bool) (x: ViewElement) = x.IsToggled(value) - /// Adjusts the Toggled property in the visual element - let toggled (value: Xamarin.Forms.ToggledEventArgs -> unit) (x: ViewElement) = x.Toggled(value) - /// Adjusts the OnColor property in the visual element - let onColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.OnColor(value) - /// Adjusts the Height property in the visual element - let height (value: double) (x: ViewElement) = x.Height(value) - /// Adjusts the On property in the visual element - let on (value: bool) (x: ViewElement) = x.On(value) - /// Adjusts the OnChanged property in the visual element - let onChanged (value: Xamarin.Forms.ToggledEventArgs -> unit) (x: ViewElement) = x.OnChanged(value) - /// Adjusts the Intent property in the visual element - let intent (value: Xamarin.Forms.TableIntent) (x: ViewElement) = x.Intent(value) - /// Adjusts the HasUnevenRows property in the visual element - let hasUnevenRows (value: bool) (x: ViewElement) = x.HasUnevenRows(value) - /// Adjusts the RowHeight property in the visual element - let rowHeight (value: int) (x: ViewElement) = x.RowHeight(value) - /// Adjusts the TableRoot property in the visual element - let tableRoot (value: (string * ViewElement list) list) (x: ViewElement) = x.TableRoot(value) - /// Adjusts the RowDefinitionHeight property in the visual element - let rowDefinitionHeight (value: obj) (x: ViewElement) = x.RowDefinitionHeight(value) - /// Adjusts the ColumnDefinitionWidth property in the visual element - let columnDefinitionWidth (value: obj) (x: ViewElement) = x.ColumnDefinitionWidth(value) - /// Adjusts the GridRowDefinitions property in the visual element - let gridRowDefinitions (value: obj list) (x: ViewElement) = x.GridRowDefinitions(value) - /// Adjusts the GridColumnDefinitions property in the visual element - let gridColumnDefinitions (value: obj list) (x: ViewElement) = x.GridColumnDefinitions(value) - /// Adjusts the RowSpacing property in the visual element - let rowSpacing (value: double) (x: ViewElement) = x.RowSpacing(value) - /// Adjusts the ColumnSpacing property in the visual element - let columnSpacing (value: double) (x: ViewElement) = x.ColumnSpacing(value) - /// Adjusts the Children property in the visual element - let children (value: ViewElement list) (x: ViewElement) = x.Children(value) - /// Adjusts the GridRow property in the visual element - let gridRow (value: int) (x: ViewElement) = x.GridRow(value) - /// Adjusts the GridRowSpan property in the visual element - let gridRowSpan (value: int) (x: ViewElement) = x.GridRowSpan(value) - /// Adjusts the GridColumn property in the visual element - let gridColumn (value: int) (x: ViewElement) = x.GridColumn(value) - /// Adjusts the GridColumnSpan property in the visual element - let gridColumnSpan (value: int) (x: ViewElement) = x.GridColumnSpan(value) - /// Adjusts the LayoutBounds property in the visual element - let layoutBounds (value: Xamarin.Forms.Rectangle) (x: ViewElement) = x.LayoutBounds(value) - /// Adjusts the LayoutFlags property in the visual element - let layoutFlags (value: Xamarin.Forms.AbsoluteLayoutFlags) (x: ViewElement) = x.LayoutFlags(value) - /// Adjusts the BoundsConstraint property in the visual element - let boundsConstraint (value: Xamarin.Forms.BoundsConstraint) (x: ViewElement) = x.BoundsConstraint(value) - /// Adjusts the HeightConstraint property in the visual element - let heightConstraint (value: Xamarin.Forms.Constraint) (x: ViewElement) = x.HeightConstraint(value) - /// Adjusts the WidthConstraint property in the visual element - let widthConstraint (value: Xamarin.Forms.Constraint) (x: ViewElement) = x.WidthConstraint(value) - /// Adjusts the XConstraint property in the visual element - let xConstraint (value: Xamarin.Forms.Constraint) (x: ViewElement) = x.XConstraint(value) - /// Adjusts the YConstraint property in the visual element - let yConstraint (value: Xamarin.Forms.Constraint) (x: ViewElement) = x.YConstraint(value) - /// Adjusts the AlignContent property in the visual element - let alignContent (value: Xamarin.Forms.FlexAlignContent) (x: ViewElement) = x.AlignContent(value) - /// Adjusts the AlignItems property in the visual element - let alignItems (value: Xamarin.Forms.FlexAlignItems) (x: ViewElement) = x.AlignItems(value) - /// Adjusts the FlexLayoutDirection property in the visual element - let flexLayoutDirection (value: Xamarin.Forms.FlexDirection) (x: ViewElement) = x.FlexLayoutDirection(value) - /// Adjusts the Position property in the visual element - let position (value: Xamarin.Forms.FlexPosition) (x: ViewElement) = x.Position(value) - /// Adjusts the Wrap property in the visual element - let wrap (value: Xamarin.Forms.FlexWrap) (x: ViewElement) = x.Wrap(value) - /// Adjusts the JustifyContent property in the visual element - let justifyContent (value: Xamarin.Forms.FlexJustify) (x: ViewElement) = x.JustifyContent(value) - /// Adjusts the FlexAlignSelf property in the visual element - let flexAlignSelf (value: Xamarin.Forms.FlexAlignSelf) (x: ViewElement) = x.FlexAlignSelf(value) - /// Adjusts the FlexOrder property in the visual element - let flexOrder (value: int) (x: ViewElement) = x.FlexOrder(value) - /// Adjusts the FlexBasis property in the visual element - let flexBasis (value: Xamarin.Forms.FlexBasis) (x: ViewElement) = x.FlexBasis(value) - /// Adjusts the FlexGrow property in the visual element - let flexGrow (value: double) (x: ViewElement) = x.FlexGrow(value) - /// Adjusts the FlexShrink property in the visual element - let flexShrink (value: double) (x: ViewElement) = x.FlexShrink(value) - /// Adjusts the Date property in the visual element - let date (value: System.DateTime) (x: ViewElement) = x.Date(value) - /// Adjusts the Format property in the visual element - let format (value: string) (x: ViewElement) = x.Format(value) - /// Adjusts the MinimumDate property in the visual element - let minimumDate (value: System.DateTime) (x: ViewElement) = x.MinimumDate(value) - /// Adjusts the MaximumDate property in the visual element - let maximumDate (value: System.DateTime) (x: ViewElement) = x.MaximumDate(value) - /// Adjusts the DateSelected property in the visual element - let dateSelected (value: Xamarin.Forms.DateChangedEventArgs -> unit) (x: ViewElement) = x.DateSelected(value) - /// Adjusts the PickerItemsSource property in the visual element - let pickerItemsSource (value: seq<'T>) (x: ViewElement) = x.PickerItemsSource(value) - /// Adjusts the SelectedIndex property in the visual element - let selectedIndex (value: int) (x: ViewElement) = x.SelectedIndex(value) - /// Adjusts the Title property in the visual element - let title (value: string) (x: ViewElement) = x.Title(value) - /// Adjusts the SelectedIndexChanged property in the visual element - let selectedIndexChanged (value: (int * 'T option) -> unit) (x: ViewElement) = x.SelectedIndexChanged(value) - /// Adjusts the FrameCornerRadius property in the visual element - let frameCornerRadius (value: double) (x: ViewElement) = x.FrameCornerRadius(value) - /// Adjusts the HasShadow property in the visual element - let hasShadow (value: bool) (x: ViewElement) = x.HasShadow(value) - /// Adjusts the ImageSource property in the visual element - let imageSource (value: obj) (x: ViewElement) = x.ImageSource(value) - /// Adjusts the Aspect property in the visual element - let aspect (value: Xamarin.Forms.Aspect) (x: ViewElement) = x.Aspect(value) - /// Adjusts the IsOpaque property in the visual element - let isOpaque (value: bool) (x: ViewElement) = x.IsOpaque(value) - /// Adjusts the ImageButtonCommand property in the visual element - let imageButtonCommand (value: unit -> unit) (x: ViewElement) = x.ImageButtonCommand(value) - /// Adjusts the ImageButtonCornerRadius property in the visual element - let imageButtonCornerRadius (value: int) (x: ViewElement) = x.ImageButtonCornerRadius(value) - /// Adjusts the Clicked property in the visual element - let clicked (value: System.EventArgs -> unit) (x: ViewElement) = x.Clicked(value) - /// Adjusts the Pressed property in the visual element - let pressed (value: System.EventArgs -> unit) (x: ViewElement) = x.Pressed(value) - /// Adjusts the Released property in the visual element - let released (value: System.EventArgs -> unit) (x: ViewElement) = x.Released(value) - /// Adjusts the Keyboard property in the visual element - let keyboard (value: Xamarin.Forms.Keyboard) (x: ViewElement) = x.Keyboard(value) - /// Adjusts the EditorCompleted property in the visual element - let editorCompleted (value: string -> unit) (x: ViewElement) = x.EditorCompleted(value) - /// Adjusts the TextChanged property in the visual element - let textChanged (value: Xamarin.Forms.TextChangedEventArgs -> unit) (x: ViewElement) = x.TextChanged(value) - /// Adjusts the AutoSize property in the visual element - let autoSize (value: Xamarin.Forms.EditorAutoSizeOption) (x: ViewElement) = x.AutoSize(value) - /// Adjusts the IsTextPredictionEnabled property in the visual element - let isTextPredictionEnabled (value: bool) (x: ViewElement) = x.IsTextPredictionEnabled(value) - /// Adjusts the IsPassword property in the visual element - let isPassword (value: bool) (x: ViewElement) = x.IsPassword(value) - /// Adjusts the EntryCompleted property in the visual element - let entryCompleted (value: string -> unit) (x: ViewElement) = x.EntryCompleted(value) - /// Adjusts the ReturnType property in the visual element - let returnType (value: Xamarin.Forms.ReturnType) (x: ViewElement) = x.ReturnType(value) - /// Adjusts the ReturnCommand property in the visual element - let returnCommand (value: unit -> unit) (x: ViewElement) = x.ReturnCommand(value) - /// Adjusts the CursorPosition property in the visual element - let cursorPosition (value: int) (x: ViewElement) = x.CursorPosition(value) - /// Adjusts the SelectionLength property in the visual element - let selectionLength (value: int) (x: ViewElement) = x.SelectionLength(value) - /// Adjusts the Label property in the visual element - let label (value: string) (x: ViewElement) = x.Label(value) - /// Adjusts the EntryCellTextChanged property in the visual element - let entryCellTextChanged (value: Xamarin.Forms.TextChangedEventArgs -> unit) (x: ViewElement) = x.EntryCellTextChanged(value) - /// Adjusts the VerticalTextAlignment property in the visual element - let verticalTextAlignment (value: Xamarin.Forms.TextAlignment) (x: ViewElement) = x.VerticalTextAlignment(value) - /// Adjusts the FormattedText property in the visual element - let formattedText (value: ViewElement) (x: ViewElement) = x.FormattedText(value) - /// Adjusts the LineBreakMode property in the visual element - let lineBreakMode (value: Xamarin.Forms.LineBreakMode) (x: ViewElement) = x.LineBreakMode(value) - /// Adjusts the LineHeight property in the visual element - let lineHeight (value: double) (x: ViewElement) = x.LineHeight(value) - /// Adjusts the MaxLines property in the visual element - let maxLines (value: int) (x: ViewElement) = x.MaxLines(value) - /// Adjusts the TextDecorations property in the visual element - let textDecorations (value: Xamarin.Forms.TextDecorations) (x: ViewElement) = x.TextDecorations(value) - /// Adjusts the StackOrientation property in the visual element - let stackOrientation (value: Xamarin.Forms.StackOrientation) (x: ViewElement) = x.StackOrientation(value) - /// Adjusts the Spacing property in the visual element - let spacing (value: double) (x: ViewElement) = x.Spacing(value) - /// Adjusts the ForegroundColor property in the visual element - let foregroundColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.ForegroundColor(value) - /// Adjusts the PropertyChanged property in the visual element - let propertyChanged (value: System.ComponentModel.PropertyChangedEventArgs -> unit) (x: ViewElement) = x.PropertyChanged(value) - /// Adjusts the Spans property in the visual element - let spans (value: ViewElement[]) (x: ViewElement) = x.Spans(value) - /// Adjusts the Time property in the visual element - let time (value: System.TimeSpan) (x: ViewElement) = x.Time(value) - /// Adjusts the WebSource property in the visual element - let webSource (value: Xamarin.Forms.WebViewSource) (x: ViewElement) = x.WebSource(value) - /// Adjusts the Reload property in the visual element - let reload (value: bool) (x: ViewElement) = x.Reload(value) - /// Adjusts the Navigated property in the visual element - let navigated (value: Xamarin.Forms.WebNavigatedEventArgs -> unit) (x: ViewElement) = x.Navigated(value) - /// Adjusts the Navigating property in the visual element - let navigating (value: Xamarin.Forms.WebNavigatingEventArgs -> unit) (x: ViewElement) = x.Navigating(value) - /// Adjusts the ReloadRequested property in the visual element - let reloadRequested (value: System.EventArgs -> unit) (x: ViewElement) = x.ReloadRequested(value) - /// Adjusts the BackgroundImage property in the visual element - let backgroundImage (value: string) (x: ViewElement) = x.BackgroundImage(value) - /// Adjusts the Icon property in the visual element - let icon (value: string) (x: ViewElement) = x.Icon(value) - /// Adjusts the IsBusy property in the visual element - let isBusy (value: bool) (x: ViewElement) = x.IsBusy(value) - /// Adjusts the ToolbarItems property in the visual element - let toolbarItems (value: ViewElement list) (x: ViewElement) = x.ToolbarItems(value) - /// Adjusts the UseSafeArea property in the visual element - let useSafeArea (value: bool) (x: ViewElement) = x.UseSafeArea(value) - /// Adjusts the Page_Appearing property in the visual element - let page_Appearing (value: unit -> unit) (x: ViewElement) = x.Page_Appearing(value) - /// Adjusts the Page_Disappearing property in the visual element - let page_Disappearing (value: unit -> unit) (x: ViewElement) = x.Page_Disappearing(value) - /// Adjusts the Page_LayoutChanged property in the visual element - let page_LayoutChanged (value: unit -> unit) (x: ViewElement) = x.Page_LayoutChanged(value) - /// Adjusts the CarouselPage_CurrentPage property in the visual element - let carouselPage_CurrentPage (value: int) (x: ViewElement) = x.CarouselPage_CurrentPage(value) - /// Adjusts the CarouselPage_CurrentPageChanged property in the visual element - let carouselPage_CurrentPageChanged (value: int option -> unit) (x: ViewElement) = x.CarouselPage_CurrentPageChanged(value) - /// Adjusts the Pages property in the visual element - let pages (value: ViewElement list) (x: ViewElement) = x.Pages(value) - /// Adjusts the BackButtonTitle property in the visual element - let backButtonTitle (value: string) (x: ViewElement) = x.BackButtonTitle(value) - /// Adjusts the HasBackButton property in the visual element - let hasBackButton (value: bool) (x: ViewElement) = x.HasBackButton(value) - /// Adjusts the HasNavigationBar property in the visual element - let hasNavigationBar (value: bool) (x: ViewElement) = x.HasNavigationBar(value) - /// Adjusts the TitleIcon property in the visual element - let titleIcon (value: string) (x: ViewElement) = x.TitleIcon(value) - /// Adjusts the TitleView property in the visual element - let titleView (value: ViewElement) (x: ViewElement) = x.TitleView(value) - /// Adjusts the BarBackgroundColor property in the visual element - let barBackgroundColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.BarBackgroundColor(value) - /// Adjusts the BarTextColor property in the visual element - let barTextColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.BarTextColor(value) - /// Adjusts the Popped property in the visual element - let popped (value: Xamarin.Forms.NavigationEventArgs -> unit) (x: ViewElement) = x.Popped(value) - /// Adjusts the PoppedToRoot property in the visual element - let poppedToRoot (value: Xamarin.Forms.NavigationEventArgs -> unit) (x: ViewElement) = x.PoppedToRoot(value) - /// Adjusts the Pushed property in the visual element - let pushed (value: Xamarin.Forms.NavigationEventArgs -> unit) (x: ViewElement) = x.Pushed(value) - /// Adjusts the TabbedPage_CurrentPage property in the visual element - let tabbedPage_CurrentPage (value: int) (x: ViewElement) = x.TabbedPage_CurrentPage(value) - /// Adjusts the TabbedPage_CurrentPageChanged property in the visual element - let tabbedPage_CurrentPageChanged (value: int option -> unit) (x: ViewElement) = x.TabbedPage_CurrentPageChanged(value) - /// Adjusts the OnSizeAllocatedCallback property in the visual element - let onSizeAllocatedCallback (value: (double * double) -> unit) (x: ViewElement) = x.OnSizeAllocatedCallback(value) - /// Adjusts the Master property in the visual element - let master (value: ViewElement) (x: ViewElement) = x.Master(value) - /// Adjusts the Detail property in the visual element - let detail (value: ViewElement) (x: ViewElement) = x.Detail(value) - /// Adjusts the IsGestureEnabled property in the visual element - let isGestureEnabled (value: bool) (x: ViewElement) = x.IsGestureEnabled(value) - /// Adjusts the IsPresented property in the visual element - let isPresented (value: bool) (x: ViewElement) = x.IsPresented(value) - /// Adjusts the MasterBehavior property in the visual element - let masterBehavior (value: Xamarin.Forms.MasterBehavior) (x: ViewElement) = x.MasterBehavior(value) - /// Adjusts the IsPresentedChanged property in the visual element - let isPresentedChanged (value: bool -> unit) (x: ViewElement) = x.IsPresentedChanged(value) - /// Adjusts the Accelerator property in the visual element - let accelerator (value: string) (x: ViewElement) = x.Accelerator(value) - /// Adjusts the TextDetail property in the visual element - let textDetail (value: string) (x: ViewElement) = x.TextDetail(value) - /// Adjusts the TextDetailColor property in the visual element - let textDetailColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.TextDetailColor(value) - /// Adjusts the TextCellCommand property in the visual element - let textCellCommand (value: unit -> unit) (x: ViewElement) = x.TextCellCommand(value) - /// Adjusts the TextCellCanExecute property in the visual element - let textCellCanExecute (value: bool) (x: ViewElement) = x.TextCellCanExecute(value) - /// Adjusts the Order property in the visual element - let order (value: Xamarin.Forms.ToolbarItemOrder) (x: ViewElement) = x.Order(value) - /// Adjusts the Priority property in the visual element - let priority (value: int) (x: ViewElement) = x.Priority(value) - /// Adjusts the View property in the visual element - let view (value: ViewElement) (x: ViewElement) = x.View(value) - /// Adjusts the ListViewItems property in the visual element - let listViewItems (value: seq) (x: ViewElement) = x.ListViewItems(value) - /// Adjusts the Footer property in the visual element - let footer (value: System.Object) (x: ViewElement) = x.Footer(value) - /// Adjusts the Header property in the visual element - let header (value: System.Object) (x: ViewElement) = x.Header(value) - /// Adjusts the HeaderTemplate property in the visual element - let headerTemplate (value: Xamarin.Forms.DataTemplate) (x: ViewElement) = x.HeaderTemplate(value) - /// Adjusts the IsGroupingEnabled property in the visual element - let isGroupingEnabled (value: bool) (x: ViewElement) = x.IsGroupingEnabled(value) - /// Adjusts the IsPullToRefreshEnabled property in the visual element - let isPullToRefreshEnabled (value: bool) (x: ViewElement) = x.IsPullToRefreshEnabled(value) - /// Adjusts the IsRefreshing property in the visual element - let isRefreshing (value: bool) (x: ViewElement) = x.IsRefreshing(value) - /// Adjusts the RefreshCommand property in the visual element - let refreshCommand (value: unit -> unit) (x: ViewElement) = x.RefreshCommand(value) - /// Adjusts the ListView_SelectedItem property in the visual element - let listView_SelectedItem (value: int option) (x: ViewElement) = x.ListView_SelectedItem(value) - /// Adjusts the ListView_SeparatorVisibility property in the visual element - let listView_SeparatorVisibility (value: Xamarin.Forms.SeparatorVisibility) (x: ViewElement) = x.ListView_SeparatorVisibility(value) - /// Adjusts the ListView_SeparatorColor property in the visual element - let listView_SeparatorColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.ListView_SeparatorColor(value) - /// Adjusts the ListView_ItemAppearing property in the visual element - let listView_ItemAppearing (value: int -> unit) (x: ViewElement) = x.ListView_ItemAppearing(value) - /// Adjusts the ListView_ItemDisappearing property in the visual element - let listView_ItemDisappearing (value: int -> unit) (x: ViewElement) = x.ListView_ItemDisappearing(value) - /// Adjusts the ListView_ItemSelected property in the visual element - let listView_ItemSelected (value: int option -> unit) (x: ViewElement) = x.ListView_ItemSelected(value) - /// Adjusts the ListView_ItemTapped property in the visual element - let listView_ItemTapped (value: int -> unit) (x: ViewElement) = x.ListView_ItemTapped(value) - /// Adjusts the ListView_Refreshing property in the visual element - let listView_Refreshing (value: unit -> unit) (x: ViewElement) = x.ListView_Refreshing(value) - /// Adjusts the SelectionMode property in the visual element - let selectionMode (value: Xamarin.Forms.ListViewSelectionMode) (x: ViewElement) = x.SelectionMode(value) - /// Adjusts the RefreshControlColor property in the visual element - let refreshControlColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.RefreshControlColor(value) - /// Adjusts the ListViewGrouped_ItemsSource property in the visual element - let listViewGrouped_ItemsSource (value: (string * ViewElement * ViewElement list) list) (x: ViewElement) = x.ListViewGrouped_ItemsSource(value) - /// Adjusts the ListViewGrouped_ShowJumpList property in the visual element - let listViewGrouped_ShowJumpList (value: bool) (x: ViewElement) = x.ListViewGrouped_ShowJumpList(value) - /// Adjusts the ListViewGrouped_SelectedItem property in the visual element - let listViewGrouped_SelectedItem (value: (int * int) option) (x: ViewElement) = x.ListViewGrouped_SelectedItem(value) - /// Adjusts the SeparatorVisibility property in the visual element - let separatorVisibility (value: Xamarin.Forms.SeparatorVisibility) (x: ViewElement) = x.SeparatorVisibility(value) - /// Adjusts the SeparatorColor property in the visual element - let separatorColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.SeparatorColor(value) - /// Adjusts the ListViewGrouped_ItemAppearing property in the visual element - let listViewGrouped_ItemAppearing (value: int * int option -> unit) (x: ViewElement) = x.ListViewGrouped_ItemAppearing(value) - /// Adjusts the ListViewGrouped_ItemDisappearing property in the visual element - let listViewGrouped_ItemDisappearing (value: int * int option -> unit) (x: ViewElement) = x.ListViewGrouped_ItemDisappearing(value) - /// Adjusts the ListViewGrouped_ItemSelected property in the visual element - let listViewGrouped_ItemSelected (value: (int * int) option -> unit) (x: ViewElement) = x.ListViewGrouped_ItemSelected(value) - /// Adjusts the ListViewGrouped_ItemTapped property in the visual element - let listViewGrouped_ItemTapped (value: int * int -> unit) (x: ViewElement) = x.ListViewGrouped_ItemTapped(value) - /// Adjusts the Refreshing property in the visual element - let refreshing (value: unit -> unit) (x: ViewElement) = x.Refreshing(value) - /// Adjusts the TextOverride property in the visual element - let textOverride (value: string) (x: ViewElement) = x.TextOverride(value) - /// Adjusts the CommandParameter property in the visual element - let commandParameter (value: System.Object) (x: ViewElement) = x.CommandParameter(value) - /// Adjusts the IconOverride property in the visual element - let iconOverride (value: string) (x: ViewElement) = x.IconOverride(value) - /// Adjusts the Span property in the visual element - let span (value: int) (x: ViewElement) = x.Span(value) - /// Adjusts the EmptyView property in the visual element - let emptyView (value: System.Object) (x: ViewElement) = x.EmptyView(value) - /// Adjusts the ItemsLayout property in the visual element - let itemsLayout (value: Xamarin.Forms.IItemsLayout) (x: ViewElement) = x.ItemsLayout(value) - /// Adjusts the ItemsSource property in the visual element - let itemsSource (value: System.Collections.IEnumerable) (x: ViewElement) = x.ItemsSource(value) - /// Adjusts the ScrollToRequested property in the visual element - let scrollToRequested (value: Xamarin.Forms.ScrollToRequestEventArgs -> unit) (x: ViewElement) = x.ScrollToRequested(value) - /// Adjusts the iScrollTo property in the visual element - let iScrollTo (value: obj * obj * Xamarin.Forms.ScrollToPosition * Fabulous.DynamicViews.AnimationKind) (x: ViewElement) = x.iScrollTo(value) - /// Adjusts the ClearIcon property in the visual element - let clearIcon (value: string) (x: ViewElement) = x.ClearIcon(value) - /// Adjusts the ClearIconHelpText property in the visual element - let clearIconHelpText (value: string) (x: ViewElement) = x.ClearIconHelpText(value) - /// Adjusts the ClearIconName property in the visual element - let clearIconName (value: string) (x: ViewElement) = x.ClearIconName(value) - /// Adjusts the ClearPlaceholderCommand property in the visual element - let clearPlaceholderCommand (value: unit -> unit) (x: ViewElement) = x.ClearPlaceholderCommand(value) - /// Adjusts the ClearPlaceholderCommandParameter property in the visual element - let clearPlaceholderCommandParameter (value: System.Object) (x: ViewElement) = x.ClearPlaceholderCommandParameter(value) - /// Adjusts the ClearPlaceholderEnabled property in the visual element - let clearPlaceholderEnabled (value: bool) (x: ViewElement) = x.ClearPlaceholderEnabled(value) - /// Adjusts the ClearPlaceholderHelpText property in the visual element - let clearPlaceholderHelpText (value: string) (x: ViewElement) = x.ClearPlaceholderHelpText(value) - /// Adjusts the ClearPlaceholderIcon property in the visual element - let clearPlaceholderIcon (value: string) (x: ViewElement) = x.ClearPlaceholderIcon(value) - /// Adjusts the ClearPlaceholderName property in the visual element - let clearPlaceholderName (value: string) (x: ViewElement) = x.ClearPlaceholderName(value) - /// Adjusts the DisplayMemberName property in the visual element - let displayMemberName (value: string) (x: ViewElement) = x.DisplayMemberName(value) - /// Adjusts the IsSearchEnabled property in the visual element - let isSearchEnabled (value: bool) (x: ViewElement) = x.IsSearchEnabled(value) - /// Adjusts the Query property in the visual element - let query (value: string) (x: ViewElement) = x.Query(value) - /// Adjusts the QueryIcon property in the visual element - let queryIcon (value: string) (x: ViewElement) = x.QueryIcon(value) - /// Adjusts the QueryIconHelpText property in the visual element - let queryIconHelpText (value: string) (x: ViewElement) = x.QueryIconHelpText(value) - /// Adjusts the QueryIconName property in the visual element - let queryIconName (value: string) (x: ViewElement) = x.QueryIconName(value) - /// Adjusts the SearchBoxVisibility property in the visual element - let searchBoxVisibility (value: Xamarin.Forms.SearchBoxVisiblity) (x: ViewElement) = x.SearchBoxVisibility(value) - /// Adjusts the ShowsResults property in the visual element - let showsResults (value: bool) (x: ViewElement) = x.ShowsResults(value) - /// Adjusts the Items property in the visual element - let items (value: seq) (x: ViewElement) = x.Items(value) - /// Adjusts the MenuItems property in the visual element - let menuItems (value: seq) (x: ViewElement) = x.MenuItems(value) - /// Adjusts the CurrentItem property in the visual element - let currentItem (value: ViewElement) (x: ViewElement) = x.CurrentItem(value) - /// Adjusts the FlyoutBackgroundColor property in the visual element - let flyoutBackgroundColor (value: Xamarin.Forms.Color) (x: ViewElement) = x.FlyoutBackgroundColor(value) - /// Adjusts the FlyoutBehavior property in the visual element - let flyoutBehavior (value: Xamarin.Forms.FlyoutBehavior) (x: ViewElement) = x.FlyoutBehavior(value) - /// Adjusts the FlyoutHeader property in the visual element - let flyoutHeader (value: System.Object) (x: ViewElement) = x.FlyoutHeader(value) - /// Adjusts the FlyoutHeaderBehavior property in the visual element - let flyoutHeaderBehavior (value: Xamarin.Forms.FlyoutHeaderBehavior) (x: ViewElement) = x.FlyoutHeaderBehavior(value) - /// Adjusts the FlyoutIsPresented property in the visual element - let flyoutIsPresented (value: bool) (x: ViewElement) = x.FlyoutIsPresented(value) - /// Adjusts the Route property in the visual element - let route (value: string) (x: ViewElement) = x.Route(value) - /// Adjusts the RouteHost property in the visual element - let routeHost (value: string) (x: ViewElement) = x.RouteHost(value) - /// Adjusts the RouteScheme property in the visual element - let routeScheme (value: string) (x: ViewElement) = x.RouteScheme(value) - /// Adjusts the OnNavigated property in the visual element - let onNavigated (value: Xamarin.Forms.ShellNavigatedEventArgs -> unit) (x: ViewElement) = x.OnNavigated(value) - /// Adjusts the OnNavigating property in the visual element - let onNavigating (value: Xamarin.Forms.ShellNavigatingEventArgs -> unit) (x: ViewElement) = x.OnNavigating(value) - /// Adjusts the GoToAsync property in the visual element - let goToAsync (value: Xamarin.Forms.ShellNavigationState * Fabulous.DynamicViews.AnimationKind) (x: ViewElement) = x.GoToAsync(value) - /// Adjusts the FlyoutDisplayOptions property in the visual element - let flyoutDisplayOptions (value: Xamarin.Forms.FlyoutDisplayOptions) (x: ViewElement) = x.FlyoutDisplayOptions(value) - /// Adjusts the SelectedItem property in the visual element - let selectedItem (value: System.Object) (x: ViewElement) = x.SelectedItem(value) - /// Adjusts the SelectionChangedCommand property in the visual element - let selectionChangedCommand (value: unit -> unit) (x: ViewElement) = x.SelectionChangedCommand(value) - /// Adjusts the SelectionChangedCommandParameter property in the visual element - let selectionChangedCommandParameter (value: System.Object) (x: ViewElement) = x.SelectionChangedCommandParameter(value) - /// Adjusts the selectableItemsMode property in the visual element - let selectableItemsMode (value: Xamarin.Forms.SelectionMode) (x: ViewElement) = x.selectableItemsMode(value) - /// Adjusts the SelectionChanged property in the visual element - let selectionChanged (value: Xamarin.Forms.SelectionChangedEventArgs -> unit) (x: ViewElement) = x.SelectionChanged(value) - /// Adjusts the Location property in the visual element - let location (value: System.Uri) (x: ViewElement) = x.Location(value) - /// Adjusts the ssGoToAsync property in the visual element - let ssGoToAsync (value: string list * Map * Fabulous.DynamicViews.AnimationKind) (x: ViewElement) = x.ssGoToAsync(value) - /// Adjusts the CarouselViewItems property in the visual element - let carouselViewItems (value: seq) (x: ViewElement) = x.CarouselViewItems(value) - /// Adjusts the CollectionViewItems property in the visual element - let collectionViewItems (value: seq) (x: ViewElement) = x.CollectionViewItems(value) diff --git a/templates/paket.dependencies b/templates/paket.dependencies new file mode 100644 index 000000000..792dae169 --- /dev/null +++ b/templates/paket.dependencies @@ -0,0 +1 @@ +# This file is here to prevent `paket install` to try add dependencies to the templates \ No newline at end of file diff --git a/tools/Generator/Xamarin.Forms.Core.json b/tools/Generator/Xamarin.Forms.Core.json index 82388102b..09de19049 100644 --- a/tools/Generator/Xamarin.Forms.Core.json +++ b/tools/Generator/Xamarin.Forms.Core.json @@ -1024,9 +1024,9 @@ { "name": "Command", "uniqueName": "ImageButtonCommand", + "defaultValue": "null", "inputType": "unit -> unit", - "modelType": "unit -> unit", - "updateCode": "(fun _ _ _ -> ())" + "convToModel": "makeCommand" }, { "name": "Source", From a52b87e69a4b3a3329f0551247c997c26ab5a176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9=20Larivi=C3=A8re?= Date: Wed, 15 May 2019 21:51:18 +0200 Subject: [PATCH 18/18] docs --- docs/views-elements.md | 68 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/docs/views-elements.md b/docs/views-elements.md index ae1140704..6e182abda 100644 --- a/docs/views-elements.md +++ b/docs/views-elements.md @@ -500,6 +500,74 @@ See also: * [Xamarin.Forms.Core.SearchBar](https://docs.microsoft.com/en-us/dotnet/api/xamarin.forms.searchbar?view=xamarin-forms) + +### CollectionView, CarouselView, Shell + +`CollectionView`, `CarouselView` and `Shell` are available in preview in Xamarin.Forms 3.5. +Please read the Xamarin.Forms documentation to check whether those controls are available for the platforms you target. + +Fabulous provides an initial but partial support for them. +We will fully support them once officially released. + +As they are experimental, each one of these controls requires a flag before they can be used. +- Shell = Shell_Experimental +- CollectionView/CarouselView = CollectionView_Experimental + +```fsharp + +// iOS +[] +type AppDelegate () = + inherit FormsApplicationDelegate () + + override this.FinishedLaunching (uiApp, options) = + Xamarin.Forms.Forms.SetFlags([|"Shell_Experimental"; "CollectionView_Experimental"|]); + (...) + +// Android +[] +type MainActivity() = + inherit FormsApplicationActivity() + + override this.OnCreate (bundle: Bundle) = + base.OnCreate (bundle) + global.Xamarin.Forms.Forms.SetFlags([|"Shell_Experimental"; "CollectionView_Experimental"|]) + (...) +``` + +Usage: +```fsharp +View.Shell(title = "TitleShell", + items = [ + View.ShellItem( + items = [ + View.ShellSection(items = [ + View.ShellContent(title = "Section 1", content = View.ContentPage(content = View.Button(text = "Button"))) + ]) + ]) + ]) + +View.CarouselView(itemsSource = [ + View.Label(text="Person1") + View.Label(text="Person2") + View.Label(text="Person3") + View.Label(text="Person4") + View.Label(text="Person5") + ]) + +View.CollectionView(items=[ + View.Label(text="Person1") + View.Label(text="Person2") + View.Label(text="Person3") + View.Label(text="Person4") + View.Label(text="Person5") + ]) +``` + +See also: + +* [Xamarin.Forms 4.0 Preview](https://devblogs.microsoft.com/xamarin/xamarin-forms-4-0-preview/) + Gestures -------------------