diff --git a/Fabulous.XamarinForms/samples/LoginShape/LoginShape/LoginShape.fs b/Fabulous.XamarinForms/samples/LoginShape/LoginShape/LoginShape.fs index 012bd878f..1932423b9 100644 --- a/Fabulous.XamarinForms/samples/LoginShape/LoginShape/LoginShape.fs +++ b/Fabulous.XamarinForms/samples/LoginShape/LoginShape/LoginShape.fs @@ -6,36 +6,36 @@ open Fabulous open Fabulous.XamarinForms open Xamarin.Forms -module App = +module App = let appColor appTheme dark light = match appTheme with | OSAppTheme.Dark -> Color.FromHex(dark) | _ -> Color.FromHex(light) - + let labelTextColor appTheme = match appTheme with | OSAppTheme.Dark -> Color.FromHex("#eeeeee") | _ -> Color.FromHex("#222222") - + let entryTextColor appTheme = match appTheme with | OSAppTheme.Dark -> Color.FromHex("#eeeeee") | _ -> Color.FromHex("#222222") - + let entryBackgroundColor appTheme = match appTheme with | OSAppTheme.Dark -> Color.FromHex("#1d1d1d") | _ -> Color.FromHex("#F1F1F1") - - let pathFill appTheme = + + let pathFillColor appTheme = match appTheme with | OSAppTheme.Dark -> Color.FromHex("#333333") | _ -> Color.FromHex("#FFFFFF") - - type Model = + + type Model = { CurrentAppTheme: OSAppTheme } - type Msg = + type Msg = | SetRequestedAppTheme of OSAppTheme let init () = { CurrentAppTheme = Application.Current.RequestedTheme } @@ -65,7 +65,7 @@ module App = radiusY = 75. ) ).Column(1) - + View.Grid( rowdefs = [ Absolute 34.; Absolute 40.; Absolute 16.; Absolute 44.; Absolute 20.; Absolute 44.; Star ], coldefs = [ Absolute 22.; Star; Star; Absolute 22. ], @@ -73,10 +73,10 @@ module App = View.Path( horizontalOptions = LayoutOptions.Fill, verticalOptions = LayoutOptions.Fill, - fill = pathFill model.CurrentAppTheme, + fill = View.SolidColorBrush(pathFillColor model.CurrentAppTheme), data = Str "M251,0 C266.463973,-2.84068575e-15 279,12.536027 279,28 L279,276 C279,291.463973 266.463973,304 251,304 L214.607,304 L214.629319,304.009394 L202.570739,304.356889 C196.091582,304.5436 190.154631,308.020457 186.821897,313.579883 L186.821897,313.579883 L183.402481,319.283905 C177.100406,337.175023 160.04792,350 140,350 C119.890172,350 102.794306,337.095694 96.5412691,319.115947 L96.5273695,319.126964 L92.8752676,313.28194 C89.5084023,307.893423 83.6708508,304.544546 77.3197008,304.358047 L65.133,304 L28,304 C12.536027,304 1.8937905e-15,291.463973 0,276 L0,28 C-1.8937905e-15,12.536027 12.536027,2.84068575e-15 28,0 L251,0 Z" ).RowSpan(7).ColumnSpan(4) - + View.Label( horizontalTextAlignment = TextAlignment.Center, fontFamily = "DINBold", @@ -84,7 +84,7 @@ module App = fontSize = FontSize 22., textColor = labelTextColor model.CurrentAppTheme ).Row(1).Column(1) - + View.Label( fontFamily = "DINBold", horizontalTextAlignment = TextAlignment.Center, @@ -93,7 +93,7 @@ module App = fontSize = FontSize 22., textColor = labelTextColor model.CurrentAppTheme ).Row(1).Column(2) - + View.Label( text = "Username", fontSize = FontSize 16., @@ -113,13 +113,13 @@ module App = fontSize = FontSize 16., textColor = labelTextColor model.CurrentAppTheme ).Row(4).Column(1).ColumnSpan(2) - + View.Entry( placeholder = "Enter password", textColor = entryTextColor model.CurrentAppTheme, backgroundColor = entryBackgroundColor model.CurrentAppTheme ).Row(5).Column(1).ColumnSpan(2) - + View.Grid( coldefs = [ Absolute 64. ], rowdefs = [ Absolute 64. ], @@ -128,13 +128,13 @@ module App = margin = Thickness(0., 0., 0., 13.), children = [ View.Ellipse( - fill = Color.FromHex("#222222"), + fill = View.SolidColorBrush(Color.FromHex("#222222")), width = 64., height = 64. ) - + View.Path( - fill = Color.White, + fill = View.SolidColorBrush(Color.White), verticalOptions = LayoutOptions.Center, horizontalOptions = LayoutOptions.Center, rotation = 90., @@ -151,12 +151,12 @@ module App = // Note, this declaration is needed if you enable LiveUpdate let program = XamarinFormsProgram.mkSimple init update view -type App () as app = +type App () as app = inherit Application () - + do Device.SetFlags([| "Shapes_Experimental"; "AppTheme_Experimental" |]); - let runner = + let runner = App.program #if DEBUG |> Program.withConsoleTrace @@ -166,6 +166,6 @@ type App () as app = let onRequestedThemeChanged = EventHandler(fun _ args -> runner.Dispatch (App.Msg.SetRequestedAppTheme args.RequestedTheme) ) - + override this.OnStart() = Application.Current.RequestedThemeChanged.AddHandler(onRequestedThemeChanged) diff --git a/Fabulous.XamarinForms/src/Fabulous.XamarinForms.Core/Collections.fs b/Fabulous.XamarinForms/src/Fabulous.XamarinForms.Core/Collections.fs index 936104563..7ccef0ef8 100644 --- a/Fabulous.XamarinForms/src/Fabulous.XamarinForms.Core/Collections.fs +++ b/Fabulous.XamarinForms/src/Fabulous.XamarinForms.Core/Collections.fs @@ -15,12 +15,12 @@ module Collections = | Update of index: int * prev: 'T * curr: 'T | MoveAndUpdate of oldIndex: int * prev: 'T * newIndex: int * curr: 'T | Delete of oldIndex: int - + type DiffResult<'T> = | NoChange | ClearCollection | Operations of Operation<'T> list - + /// Returns a list of operations to apply to go from the initial list to the new list /// /// The algorithm will try in priority to update elements sharing the same instance (usually achieved with dependsOn) @@ -36,7 +36,7 @@ module Collections = (keyOf: 'T -> string voption) (canReuse: 'T -> 'T -> bool) = - + match prevCollOpt, collOpt with | ValueNone, ValueNone -> NoChange | ValueSome prevColl, ValueSome newColl when identical prevColl newColl -> NoChange @@ -65,7 +65,7 @@ module Collections = keyOf newChild = ValueSome key && canReuse prevChild newChild ) - + match keyOf prevChild with | ValueSome key when canReuseChildOf key -> keyedElements.Add(key, (prevIndex, prevChild)) @@ -73,11 +73,11 @@ module Collections = reusableElements.Add((prevIndex, prevChild)) | ValueSome _ -> discardedElements.Add(prevIndex) - + let operations = [ for i in 0 .. coll.Length - 1 do let newChild = coll.[i] - + // Check if the same instance was reused (dependsOn), if so just move the element to the correct index match identicalElements.TryGetValue(newChild) with | (true, prevIndex) -> @@ -85,19 +85,19 @@ module Collections = | _ -> // If the key existed previously, reuse the previous element match keyOf newChild with - | ValueSome key when keyedElements.ContainsKey(key) -> + | ValueSome key when keyedElements.ContainsKey(key) -> let prevIndex, prevChild = keyedElements.[key] if prevIndex <> i then yield MoveAndUpdate (prevIndex, prevChild, i, newChild) else yield Update (i, prevChild, newChild) - + // Otherwise, reuse an old element if possible or create a new one | _ -> let isMatch (index, reusableChild) = canReuse reusableChild newChild && (aggressiveReuseMode || index = i) - + match reusableElements |> Seq.tryFind isMatch with | Some ((prevIndex, prevChild) as item) -> reusableElements.Remove item |> ignore @@ -105,27 +105,27 @@ module Collections = yield MoveAndUpdate (prevIndex, prevChild, i, newChild) else yield Update (i, prevChild, newChild) - + | None -> yield Insert (i, newChild) - + // If we have discarded elements, delete them if discardedElements.Count > 0 then for prevIndex in discardedElements do yield Delete prevIndex - + // If we still have old elements that were not reused, delete them if reusableElements.Count > 0 then for prevIndex, _ in reusableElements do yield Delete prevIndex ] - + if operations.Length = 0 then NoChange else Operations operations - + /// Reduces the operations of the DiffResult to be applicable to an ObservableCollection. - /// + /// /// diff returns all the operations to move from List A to List B. /// Except with ObservableCollection, we're forced to apply the changes one after the other, changing the indices /// So this algorithm compensates this offsetting @@ -135,20 +135,20 @@ module Collections = | ClearCollection -> ClearCollection | Operations operations -> let prevIndices = Array.init prevCollLength id - + // Shift all old indices by 1 (down the list) on insert after the inserted position let shiftForInsert index = for i in 0 .. prevIndices.Length - 1 do if prevIndices.[i] >= index then prevIndices.[i] <- prevIndices.[i] + 1 - + // Shift all old indices by -1 (up the list) on delete after the deleted position let shiftForDelete originalIndexInPrevColl prevIndex = for i in 0 .. prevIndices.Length - 1 do if prevIndices.[i] > prevIndex then prevIndices.[i] <- prevIndices.[i] - 1 - prevIndices.[originalIndexInPrevColl] <- -1 - + prevIndices.[originalIndexInPrevColl] <- -1 + // Shift all old indices between the previous and new position on move let shiftForMove originalIndexInPrevColl prevIndex newIndex = for i in 0 .. prevIndices.Length - 1 do @@ -157,7 +157,7 @@ module Collections = else if newIndex <= prevIndices.[i] && prevIndices.[i] < prevIndex then prevIndices.[i] <- prevIndices.[i] + 1 prevIndices.[originalIndexInPrevColl] <- newIndex - + // Return an update operation preceded by a move only if actual indices don't match let moveAndUpdate oldIndex prev newIndex curr = let prevIndex = prevIndices.[oldIndex] @@ -166,32 +166,32 @@ module Collections = else shiftForMove oldIndex prevIndex newIndex MoveAndUpdate (prevIndex, prev, newIndex, curr) - + let operations = [ for op in operations do match op with | Insert (index, element) -> yield Insert (index, element) shiftForInsert index - + | Move (oldIndex, newIndex) -> // Prevent a move if the actual indices match let prevIndex = prevIndices.[oldIndex] if prevIndex <> newIndex then yield (Move (prevIndex, newIndex)) shiftForMove oldIndex prevIndex newIndex - + | Update (index, prev, curr) -> yield moveAndUpdate index prev index curr - + | MoveAndUpdate (oldIndex, prev, newIndex, curr) -> yield moveAndUpdate oldIndex prev newIndex curr - + | Delete oldIndex -> let prevIndex = prevIndices.[oldIndex] yield Delete prevIndex shiftForDelete oldIndex prevIndex ] - + if operations.Length = 0 then NoChange else @@ -201,20 +201,20 @@ module Collections = /// a reduced number of clear/add/remove/insert operations let updateCollection (aggressiveReuseMode: bool) - (prevCollOpt: 'T[] voption) - (collOpt: 'T[] voption) - (targetColl: IList<'TargetT>) + (prevCollOpt: 'T[] voption) + (collOpt: 'T[] voption) + (targetColl: IList<'TargetT>) (keyOf: 'T -> string voption) (canReuse: 'T -> 'T -> bool) (create: 'T -> 'TargetT) (update: 'T -> 'T -> 'TargetT -> unit) // Incremental element-wise update, only if element reuse is allowed (attach: 'T voption -> 'T -> 'TargetT -> unit) // adjust attached properties = - + let diffResult = diff aggressiveReuseMode prevCollOpt collOpt keyOf canReuse |> adaptDiffForObservableCollection (match prevCollOpt with ValueNone -> 0 | ValueSome c -> c.Length) - + match diffResult with | NoChange -> () | ClearCollection -> targetColl.Clear() @@ -225,37 +225,37 @@ module Collections = let child = create element attach ValueNone element child targetColl.Insert(index, child) - + | Move (prevIndex, newIndex) -> let child = targetColl.[prevIndex] targetColl.RemoveAt(prevIndex) targetColl.Insert(newIndex, child) - + | Update (index, prev, curr) -> let child = targetColl.[index] update prev curr child attach (ValueSome prev) curr child - + | MoveAndUpdate (prevIndex, prev, newIndex, curr) -> let child = targetColl.[prevIndex] targetColl.RemoveAt(prevIndex) targetColl.Insert(newIndex, child) update prev curr child attach (ValueSome prev) curr child - + | Delete index -> targetColl.RemoveAt(index) |> ignore - + let updateChildren prevCollOpt collOpt target create update attach = updateCollection true prevCollOpt collOpt target ViewHelpers.tryGetKey ViewHelpers.canReuseView create update attach - + let updateItems prevCollOpt collOpt target keyOf canReuse create update attach = updateCollection false prevCollOpt collOpt target keyOf canReuse create update attach /// Update a control given the previous and new view elements - let inline updateChild (prevChild: ViewElement) (newChild: ViewElement) targetChild = + let inline updateChild (prevChild: ViewElement) (newChild: ViewElement) targetChild = newChild.UpdateIncremental(prevChild, targetChild) - + /// Update the items of a TableSectionBase<'T> control, given previous and current view elements let inline updateTableSectionBaseOfTItems<'T when 'T :> BindableObject> prevCollOpt collOpt (target: TableSectionBase<'T>) attach = updateChildren prevCollOpt collOpt target (fun c -> c.Create() :?> 'T) updateChild attach @@ -282,7 +282,7 @@ module Collections = updateChild prevViewElement currViewElement realTarget updateChildren prevCollOpt collOpt target.Items createChild updateChild attach - + /// Update the menu items of a ShellContent, given previous and current view elements let inline updateShellContentMenuItems prevCollOpt collOpt (target: ShellContent) = updateChildren prevCollOpt collOpt target.MenuItems (fun c -> c.Create() :?> MenuItem) updateChild (fun _ _ _ -> ()) @@ -313,24 +313,24 @@ module Collections = /// Update the items of a SwipeItems, given previous and current view elements let inline updateSwipeItems prevCollOpt collOpt (target: SwipeItems) = updateChildren prevCollOpt collOpt target (fun c -> c.Create() :?> ISwipeItem) updateChild (fun _ _ _ -> ()) - + /// Update the children of a Menu, given previous and current view elements let inline updateMenuChildren prevCollOpt collOpt (target: Menu) attach = updateChildren prevCollOpt collOpt target (fun c -> c.Create() :?> Menu) updateChild attach - + /// Update the effects of an Element, given previous and current view elements let inline updateElementEffects prevCollOpt collOpt (target: Element) attach = let createChild (desc: ViewElement) = match desc.Create() with | :? CustomEffect as customEffect -> Effect.Resolve(customEffect.Name) | effect -> effect :?> Effect - + updateChildren prevCollOpt collOpt target.Effects createChild updateChild attach - + /// Update the toolbar items of a Page, given previous and current view elements let inline updatePageToolbarItems prevCollOpt collOpt (target: Page) attach = updateChildren prevCollOpt collOpt target.ToolbarItems (fun c -> c.Create() :?> ToolbarItem) updateChild attach - + /// Update the children of a TransformGroup, given previous and current view elements let inline updateTransformGroupChildren prevCollOpt collOpt (target: TransformGroup) attach = let targetColl = @@ -338,7 +338,7 @@ module Collections = | null -> let oc = TransformCollection() in target.Children <- oc; oc | oc -> oc updateChildren prevCollOpt collOpt targetColl (fun c -> c.Create() :?> Transform) updateChild attach - + /// Update the children of a GeometryGroup, given previous and current view elements let inline updateGeometryGroupChildren prevCollOpt collOpt (target: GeometryGroup) attach = let targetColl = @@ -346,7 +346,7 @@ module Collections = | null -> let oc = GeometryCollection() in target.Children <- oc; oc | oc -> oc updateChildren prevCollOpt collOpt targetColl (fun c -> c.Create() :?> Geometry) updateChild attach - + /// Update the figures of a PathGeometry, given previous and current view elements let inline updatePathGeometryFigures prevCollOpt collOpt (target: PathGeometry) attach = let targetColl = @@ -354,7 +354,7 @@ module Collections = | null -> let oc = PathFigureCollection() in target.Figures <- oc; oc | oc -> oc updateChildren prevCollOpt collOpt targetColl (fun c -> c.Create() :?> PathFigure) updateChild attach - + /// Update the segments of a PathFigure, given previous and current view elements let inline updatePathFigureSegments prevCollOpt collOpt (target: PathFigure) attach = let targetColl = @@ -362,34 +362,34 @@ module Collections = | null -> let oc = PathSegmentCollection() in target.Segments <- oc; oc | oc -> oc updateChildren prevCollOpt collOpt targetColl (fun c -> c.Create() :?> PathSegment) updateChild attach - + let inline updatePoints getPointsFn setPointsFn prevCollOpt collOpt = let targetColl = match getPointsFn() with | null -> let oc = PointCollection() in setPointsFn oc; oc | oc -> oc updateCollection true prevCollOpt collOpt targetColl (fun _ -> ValueNone) (fun _ _ -> false) (fun c -> c) (fun _ _ _ -> ()) (fun _ _ _ -> ()) - + /// Update the points of a Polygon, given previous and current view elements let inline updatePolygonPoints prevCollOpt collOpt (target: Polygon) = updatePoints (fun () -> target.Points) (fun oc -> target.Points <- oc) prevCollOpt collOpt - + /// Update the points of a Polyline, given previous and current view elements let inline updatePolylinePoints prevCollOpt collOpt (target: Polyline) = updatePoints (fun () -> target.Points) (fun oc -> target.Points <- oc) prevCollOpt collOpt - + /// Update the points of a PolyBezierSegment, given previous and current view elements let inline updatePolyBezierSegmentPoints prevCollOpt collOpt (target: PolyBezierSegment) = updatePoints (fun () -> target.Points) (fun oc -> target.Points <- oc) prevCollOpt collOpt - + /// Update the points of a PolyLineSegment, given previous and current view elements let inline updatePolyLineSegmentPoints prevCollOpt collOpt (target: PolyLineSegment) = updatePoints (fun () -> target.Points) (fun oc -> target.Points <- oc) prevCollOpt collOpt - + /// Update the points of a PolyQuadraticBezierSegment, given previous and current view elements let inline updatePolyQuadraticBezierSegmentPoints prevCollOpt collOpt (target: PolyQuadraticBezierSegment) = updatePoints (fun () -> target.Points) (fun oc -> target.Points <- oc) prevCollOpt collOpt - + /// Update the stroke dash values of a Shape, given previous and current float list let inline updateShapeStrokeDashArray prevCollOpt collOpt (target: Xamarin.Forms.Shapes.Shape) = let targetColl = @@ -402,24 +402,24 @@ module Collections = updateItems prevCollOpt collOpt targetColl ViewHelpers.tryGetKey ViewHelpers.canReuseView ViewElementHolder (fun _ curr holder -> holder.ViewElement <- curr) - + let inline getCollection<'T> (coll: IEnumerable) (set: ObservableCollection<'T> -> unit) = - match coll with + match coll with | :? ObservableCollection<'T> as oc -> oc | _ -> let oc = ObservableCollection<'T>() in set oc; oc - + /// Update the items in a ItemsView control, given previous and current view elements let inline updateItemsViewItems prevCollOpt collOpt (target: ItemsView) = let targetColl = getCollection target.ItemsSource (fun oc -> target.ItemsSource <- oc) updateViewElementHolderItems prevCollOpt collOpt targetColl (fun _ _ _ -> ()) - + /// Update the items in a ItemsView<'T> control, given previous and current view elements - let inline updateItemsViewOfTItems<'T when 'T :> BindableObject> prevCollOpt collOpt (target: ItemsView<'T>) = + let inline updateItemsViewOfTItems<'T when 'T :> BindableObject> prevCollOpt collOpt (target: ItemsView<'T>) = let targetColl = getCollection target.ItemsSource (fun oc -> target.ItemsSource <- oc) updateViewElementHolderItems prevCollOpt collOpt targetColl (fun _ _ _ -> ()) - + /// Update the items in a SearchHandler control, given previous and current view elements - let inline updateSearchHandlerItems _ collOpt (target: SearchHandler) = + let inline updateSearchHandlerItems _ collOpt (target: SearchHandler) = let targetColl = List() updateViewElementHolderItems ValueNone collOpt targetColl (fun _ _ _ -> ()) target.ItemsSource <- targetColl @@ -430,22 +430,30 @@ module Collections = target.ShortName <- currShortName target.ViewElement <- currKey updateViewElementHolderItems (ValueSome prevColl) (ValueSome currColl) target (fun _ _ _ -> ()) - + let targetColl = getCollection target.ItemsSource (fun oc -> target.ItemsSource <- oc) updateItems prevCollOpt collOpt targetColl (fun (key, _, _) -> ValueSome key) (fun (_, prevHeader, _) (_, currHeader, _) -> ViewHelpers.canReuseView prevHeader currHeader) ViewElementHolderGroup updateViewElementHolderGroup (fun _ _ _ -> ()) - + /// Update the selected items in a SelectableItemsView control, given previous and current indexes - let inline updateSelectableItemsViewSelectedItems (prevCollOptOpt: int[] option voption) (collOptOpt: int[] option voption) (target: SelectableItemsView) = + let inline updateSelectableItemsViewSelectedItems (prevCollOptOpt: int[] option voption) (collOptOpt: int[] option voption) (target: SelectableItemsView) = let prevCollOpt = match prevCollOptOpt with ValueNone | ValueSome None -> ValueNone | ValueSome (Some x) -> ValueSome x let collOpt = match collOptOpt with ValueNone | ValueSome None -> ValueNone | ValueSome (Some x) -> ValueSome x let targetColl = getCollection target.SelectedItems (fun oc -> target.SelectedItems <- oc) - + let findItem idx = let itemsSource = target.ItemsSource :?> IList itemsSource.[idx] :> obj - - updateItems prevCollOpt collOpt targetColl (fun _ -> ValueNone) (fun x y -> x = y) findItem (fun _ _ _ -> ()) (fun _ _ _ -> ()) \ No newline at end of file + + updateItems prevCollOpt collOpt targetColl (fun _ -> ValueNone) (fun x y -> x = y) findItem (fun _ _ _ -> ()) (fun _ _ _ -> ()) + + // Update the collection of gradient stops of a GradientBrush, given previous and current values + let inline updateGradientBrushGradientStops (prevCollOpt: ViewElement[] voption) (collOpt: ViewElement[] voption) (target: GradientBrush) = + let targetColl = + match target.GradientStops with + | null -> let oc = GradientStopCollection() in target.GradientStops <- oc; oc + | oc -> oc + updateChildren prevCollOpt collOpt targetColl (fun c -> c.Create() :?> GradientStop) updateChild (fun _ _ _ -> ()) \ No newline at end of file diff --git a/Fabulous.XamarinForms/src/Fabulous.XamarinForms.Core/ViewUpdaters.fs b/Fabulous.XamarinForms/src/Fabulous.XamarinForms.Core/ViewUpdaters.fs index 42d312b5a..4d32de36a 100644 --- a/Fabulous.XamarinForms/src/Fabulous.XamarinForms.Core/ViewUpdaters.fs +++ b/Fabulous.XamarinForms/src/Fabulous.XamarinForms.Core/ViewUpdaters.fs @@ -579,16 +579,7 @@ module ViewUpdaters = let handler = getHandler() prevValue.ValueChanged.RemoveHandler(handler) currValue.ValueChanged.AddHandler(handler) - tryLinkIndicatorViewToCarouselView target currValue - - // This function could be automatically generated by CodeGen, but the BindingProperty field StepperPositionProperty is currently marked private, preventing that. - // See https://github.com/xamarin/Xamarin.Forms/issues/10148 - let updateStepperPosition prevStepperPositionOpt currStepperPositionOpt (target: Xamarin.Forms.Stepper) = - match prevStepperPositionOpt, currStepperPositionOpt with - | ValueSome prevValue, ValueSome currValue when prevValue = currValue -> () - | _, ValueSome currValue -> target.StepperPosition <- currValue - | ValueSome _, ValueNone -> target.StepperPosition <- 0 - | ValueNone, ValueNone -> () + tryLinkIndicatorViewToCarouselView target currValue let updateIndicatorViewIndicatorProperty prevValueOpt currValueOpt (target: Xamarin.Forms.IndicatorView) = updateDirectViewElementDataTemplate diff --git a/Fabulous.XamarinForms/src/Fabulous.XamarinForms/Xamarin.Forms.Core.json b/Fabulous.XamarinForms/src/Fabulous.XamarinForms/Xamarin.Forms.Core.json index 4f40967ba..7324ae6f3 100644 --- a/Fabulous.XamarinForms/src/Fabulous.XamarinForms/Xamarin.Forms.Core.json +++ b/Fabulous.XamarinForms/src/Fabulous.XamarinForms/Xamarin.Forms.Core.json @@ -410,6 +410,9 @@ }, { "source": "TextDecorations" + }, + { + "source": "TextTransform" } ], "primaryConstructorMembers": [ @@ -433,6 +436,38 @@ "Command" ] }, + { + "type": "Xamarin.Forms.DragGestureRecognizer", + "properties": [ + { + "source": "CanDrag" + } + ], + "events": [ + { + "source": "DragStarting" + }, + { + "source": "DragCompleted" + } + ] + }, + { + "type": "Xamarin.Forms.DropGestureRecognizer", + "properties": [ + { + "source": "AllowDrop" + } + ], + "events": [ + { + "source": "DragOver" + }, + { + "source": "Drop" + } + ] + }, { "type": "Xamarin.Forms.PanGestureRecognizer", "properties": [ @@ -631,6 +666,9 @@ { "source": "IsTabStop" }, + { + "source": "IsVisible" + }, { "source": null, "name": "Route", @@ -699,6 +737,11 @@ }, { "type": "Xamarin.Forms.FlyoutItem", + "properties": [ + { + "source": "IsVisible" + } + ], "primaryConstructorMembers": [ "Items" ] @@ -741,6 +784,9 @@ { "source": "AnchorY" }, + { + "source": "Background" + }, { "source": "BackgroundColor" }, @@ -989,6 +1035,9 @@ "type": "Xamarin.Forms.TabbedPage", "baseGenericConstraint": "Xamarin.Forms.Page", "properties": [ + { + "source": "BarBackground" + }, { "source": "BarBackgroundColor" }, @@ -1027,6 +1076,9 @@ { "type": "Xamarin.Forms.NavigationPage", "properties": [ + { + "source": "BarBackground" + }, { "source": "BarBackgroundColor" }, @@ -1079,6 +1131,12 @@ { "type": "Xamarin.Forms.Shell", "properties": [ + { + "source": "FlyoutBackdrop" + }, + { + "source": "FlyoutBackground" + }, { "source": "FlyoutBackgroundColor" }, @@ -1245,6 +1303,9 @@ "source": "ImageSource", "shortName": "image" }, + { + "source": "TextTransform" + }, { "source": "Padding" }, @@ -1305,6 +1366,9 @@ { "source": "Format" }, + { + "source": "TextTransform" + }, { "source": "MaximumDate" }, @@ -1420,6 +1484,9 @@ }, { "source": "TextColor" + }, + { + "source": "TextTransform" } ], "events": [ @@ -1956,6 +2023,9 @@ { "source": "TextDecorations" }, + { + "source": "TextTransform" + }, { "source": "TextType" }, @@ -2300,6 +2370,9 @@ "inputType": "Fabulous.XamarinForms.InputTypes.FontSize", "convertModelToValue": "ViewConverters.convertFabulousFontSizeToXamarinFormsDouble (target.GetType())" }, + { + "source": "HorizontalTextAlignment" + }, { "source": "ItemsSource", "shortName": "items", @@ -2311,11 +2384,17 @@ { "source": "TextColor" }, + { + "source": "TextTransform" + }, { "source": "Title" }, { "source": "TitleColor" + }, + { + "source": "VerticalTextAlignment" } ], "events": [ @@ -2402,10 +2481,6 @@ "inputType": "float * float", "updateCode": "ViewUpdaters.updateStepperMinimumMaximum" }, - { - "source": "StepperPosition", - "updateCode": "ViewUpdaters.updateStepperPosition" - }, { "source": "Value" } @@ -2498,6 +2573,9 @@ { "source": "TextColor" }, + { + "source": "TextTransform" + }, { "source": "Time" } @@ -2701,6 +2779,9 @@ { "source": "TextColor" }, + { + "source": "TextTransform" + }, { "source": "VerticalTextAlignment" } @@ -3196,9 +3277,7 @@ "type": "Xamarin.Forms.Shapes.Transform", "properties": [ { - "_comment": "We're currently forced to set the default value even if it's a BindableProperty because the field is marked internal and we can't access it. It will be solved by https://github.com/xamarin/Xamarin.Forms/pull/11543.", - "source": "Value", - "defaultValue": "Xamarin.Forms.Shapes.Matrix()" + "source": "Value" } ] }, @@ -3341,6 +3420,9 @@ { "source": "StrokeLineJoin" }, + { + "source": "StrokeMiterLimitProperty" + }, { "source": "StrokeThickness" } @@ -3415,6 +3497,61 @@ "source": "RadiusY" } ] + }, + { + "type": "Xamarin.Forms.Brush", + "canBeInstantiated": false + }, + { + "type": "Xamarin.Forms.GradientBrush", + "properties": [ + { + "source": "GradientStops", + "inputType": "ViewElement list", + "updateCode": "Collections.updateGradientBrushGradientStops" + } + ] + }, + { + "type": "Xamarin.Forms.GradientStop", + "properties": [ + { + "source": "Color" + }, + { + "source": "Offset" + } + ] + }, + { + "type": "Xamarin.Forms.LinearGradientBrush", + "properties": [ + { + "source": "StartPoint" + }, + { + "source": "EndPoint" + } + ] + }, + { + "type": "Xamarin.Forms.RadialGradientBrush", + "properties": [ + { + "source": "Center" + }, + { + "source": "Radius" + } + ] + }, + { + "type": "Xamarin.Forms.SolidColorBrush", + "properties": [ + { + "source": "Color" + } + ] } ] } \ No newline at end of file diff --git a/Fabulous.XamarinForms/templates/content/blank/.template.config/template.json b/Fabulous.XamarinForms/templates/content/blank/.template.config/template.json index e84d11edf..b431e924b 100644 --- a/Fabulous.XamarinForms/templates/content/blank/.template.config/template.json +++ b/Fabulous.XamarinForms/templates/content/blank/.template.config/template.json @@ -412,7 +412,7 @@ "type": "parameter", "dataType": "string", "replaces": "XamarinFormsSdk", - "defaultValue": "4.7.0.1179" + "defaultValue": "4.8.0.1269" }, "FabulousPkgsVersion": { "type": "parameter", diff --git a/Packages.targets b/Packages.targets index a2f0be4d8..ea697ccd8 100644 --- a/Packages.targets +++ b/Packages.targets @@ -7,9 +7,9 @@ - + - + @@ -40,8 +40,8 @@ - - + + diff --git a/paket.dependencies b/paket.dependencies index dd75b159f..cdebbba05 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -32,8 +32,8 @@ group neutral group generator framework: netstandard2.0 source https://www.nuget.org/api/v2 - nuget Xamarin.Forms 4.7.0.1080 - nuget Xamarin.Forms.Maps 4.7.0.1080 + nuget Xamarin.Forms 4.8.0.1269 + nuget Xamarin.Forms.Maps 4.8.0.1269 nuget Xamarin.Forms.PancakeView 1.3.6 nuget SkiaSharp.Views.Forms 1.68.1 nuget Plugin.MediaManager.Forms 0.9.6 @@ -45,8 +45,8 @@ group androidapp framework: monoandroid9.0 source https://www.nuget.org/api/v2 nuget FSharp.Core - nuget Xamarin.Forms ~> 4.7.0 - nuget Xamarin.Forms.Maps ~> 4.7.0 + nuget Xamarin.Forms ~> 4.8.0 + nuget Xamarin.Forms.Maps ~> 4.8.0 nuget Xamarin.Android.FSharp.ResourceProvider nuget Newtonsoft.Json nuget FSharp.Data @@ -70,7 +70,7 @@ group androidxapp framework: monoandroid10.0 source https://www.nuget.org/api/v2 nuget FSharp.Core - nuget Xamarin.Forms ~> 4.7.0 + nuget Xamarin.Forms ~> 4.8.0 nuget Newtonsoft.Json nuget Xamarin.Android.FSharp.ResourceProvider nuget Xamarin.Essentials @@ -81,8 +81,8 @@ group iosapp framework: xamarinios10 source https://www.nuget.org/api/v2 nuget FSharp.Core - nuget Xamarin.Forms ~> 4.7.0 - nuget Xamarin.Forms.Maps ~> 4.7.0 + nuget Xamarin.Forms ~> 4.8.0 + nuget Xamarin.Forms.Maps ~> 4.8.0 nuget Newtonsoft.Json nuget FSharp.Data nuget Xamarin.Essentials @@ -96,8 +96,8 @@ group macosapp framework: xamarinmac20 source https://www.nuget.org/api/v2 nuget FSharp.Core - nuget Xamarin.Forms ~> 4.7.0 - nuget Xamarin.Forms.Maps ~> 4.7.0 + nuget Xamarin.Forms ~> 4.8.0 + nuget Xamarin.Forms.Maps ~> 4.8.0 nuget Newtonsoft.Json nuget FSharp.Data nuget Xamarin.Essentials @@ -111,10 +111,10 @@ group wpfapp framework: net472 source https://www.nuget.org/api/v2 nuget FSharp.Core - nuget Xamarin.Forms ~> 4.7.0 - nuget Xamarin.Forms.Platform.WPF ~> 4.7.0 - nuget Xamarin.Forms.Maps ~> 4.7.0 - nuget Xamarin.Forms.Maps.WPF ~> 4.7.0 + nuget Xamarin.Forms ~> 4.8.0 + nuget Xamarin.Forms.Platform.WPF ~> 4.8.0 + nuget Xamarin.Forms.Maps ~> 4.8.0 + nuget Xamarin.Forms.Maps.WPF ~> 4.8.0 nuget Newtonsoft.Json nuget FSharp.Data nuget Xamarin.Essentials @@ -128,10 +128,10 @@ group gtkapp framework: net471 source https://www.nuget.org/api/v2 nuget FSharp.Core - nuget Xamarin.Forms ~> 4.7.0 - nuget Xamarin.Forms.Platform.GTK ~> 4.7.0 - nuget Xamarin.Forms.Maps ~> 4.7.0 - nuget Xamarin.Forms.Maps.GTK ~> 4.7.0 + nuget Xamarin.Forms ~> 4.8.0 + nuget Xamarin.Forms.Platform.GTK ~> 4.8.0 + nuget Xamarin.Forms.Maps ~> 4.8.0 + nuget Xamarin.Forms.Maps.GTK ~> 4.8.0 nuget Newtonsoft.Json nuget FSharp.Data nuget Xamarin.Essentials diff --git a/paket.lock b/paket.lock index 74a555aec..9606d9fb3 100644 --- a/paket.lock +++ b/paket.lock @@ -226,15 +226,15 @@ NUGET Xamarin.FFImageLoading.Forms (2.4.11.982) Xamarin.FFImageLoading (>= 2.4.11.982) Xamarin.Forms (>= 3.3.0.912540) - Xamarin.Forms (4.7.0.1179) + Xamarin.Forms (4.8.0.1269) Xamarin.Android.Support.CustomTabs (>= 28.0.0.3) Xamarin.Android.Support.Design (>= 28.0.0.3) Xamarin.Android.Support.v4 (>= 28.0.0.3) Xamarin.Android.Support.v7.AppCompat (>= 28.0.0.3) Xamarin.Android.Support.v7.CardView (>= 28.0.0.3) - Xamarin.Forms.Maps (4.7.0.1179) + Xamarin.Forms.Maps (4.8.0.1269) Xamarin.Android.Support.v7.AppCompat (>= 28.0.0.3) - Xamarin.Forms (>= 4.7.0.1179) + Xamarin.Forms (>= 4.8.0.1269) Xamarin.GooglePlayServices.Maps (>= 71.1610) Xamarin.Forms.PancakeView (1.4.2) System.ComponentModel (>= 4.3) @@ -435,7 +435,7 @@ NUGET Xamarin.AndroidX.CustomView (>= 1.0.0.1) Xamarin.Essentials (1.5.3.2) Xamarin.AndroidX.Browser (>= 1.0) - Xamarin.Forms (4.7.0.1179) + Xamarin.Forms (4.8.0.1269) Xamarin.AndroidX.Browser (>= 1.0.0.1) Xamarin.AndroidX.Legacy.Support.V4 (>= 1.0.0.1) Xamarin.AndroidX.Lifecycle.LiveData (>= 2.1.0.1) @@ -1060,9 +1060,9 @@ NUGET Xamarin.FFImageLoading.Forms (2.4.11.982) Xamarin.FFImageLoading (>= 2.4.11.982) Xamarin.Forms (>= 3.3.0.912540) - Xamarin.Forms (4.7.0.1080) - Xamarin.Forms.Maps (4.7.0.1080) - Xamarin.Forms (>= 4.7.0.1080) + Xamarin.Forms (4.8.0.1269) + Xamarin.Forms.Maps (4.8.0.1269) + Xamarin.Forms (>= 4.8.0.1269) Xamarin.Forms.PancakeView (1.3.6) Xamarin.Forms (>= 3.6.0.220655) @@ -1108,19 +1108,19 @@ NUGET Xamarin.FFImageLoading.Forms (2.4.11.982) Xamarin.FFImageLoading (>= 2.4.11.982) Xamarin.Forms (>= 3.3.0.912540) - Xamarin.Forms (4.7.0.1179) - Xamarin.Forms.Maps (4.7.0.1179) - Xamarin.Forms (>= 4.7.0.1179) - Xamarin.Forms.Maps.GTK (4.7.0.1179) - Xamarin.Forms (>= 4.7.0.1179) - Xamarin.Forms.Maps (>= 4.7.0.1179) + Xamarin.Forms (4.8.0.1269) + Xamarin.Forms.Maps (4.8.0.1269) + Xamarin.Forms (>= 4.8.0.1269) + Xamarin.Forms.Maps.GTK (4.8.0.1269) + Xamarin.Forms (>= 4.8.0.1269) + Xamarin.Forms.Maps (>= 4.8.0.1269) Xamarin.Forms.PancakeView (1.4.2) System.ComponentModel (>= 4.3) Xamarin.Forms (>= 3.6.0.220655) Xamarin.Forms.Platform.WPF (>= 3.6.0.220655) - Xamarin.Forms.Platform.GTK (4.7.0.1179) + Xamarin.Forms.Platform.GTK (4.8.0.1269) OpenTK (>= 3.0.1) - Xamarin.Forms (>= 4.7.0.1179) + Xamarin.Forms (>= 4.8.0.1269) Xamarin.Forms.Platform.WPF (4.6.0.800) OpenTK (>= 3.0.1) OpenTK.GLControl (>= 3.0.1) @@ -1163,9 +1163,9 @@ NUGET Xamarin.FFImageLoading.Forms (2.4.11.982) Xamarin.FFImageLoading (>= 2.4.11.982) Xamarin.Forms (>= 3.3.0.912540) - Xamarin.Forms (4.7.0.1179) - Xamarin.Forms.Maps (4.7.0.1179) - Xamarin.Forms (>= 4.7.0.1179) + Xamarin.Forms (4.8.0.1269) + Xamarin.Forms.Maps (4.8.0.1269) + Xamarin.Forms (>= 4.8.0.1269) Xamarin.Forms.PancakeView (1.4.2) System.ComponentModel (>= 4.3) Xamarin.Forms (>= 3.6.0.220655) @@ -1207,9 +1207,9 @@ NUGET Xamarin.FFImageLoading.Forms (2.4.11.982) Xamarin.FFImageLoading (>= 2.4.11.982) Xamarin.Forms (>= 3.3.0.912540) - Xamarin.Forms (4.7.0.1179) - Xamarin.Forms.Maps (4.7.0.1179) - Xamarin.Forms (>= 4.7.0.1179) + Xamarin.Forms (4.8.0.1269) + Xamarin.Forms.Maps (4.8.0.1269) + Xamarin.Forms (>= 4.8.0.1269) Xamarin.Forms.PancakeView (1.4.2) System.ComponentModel (>= 4.3) Xamarin.Forms (>= 3.6.0.220655) @@ -1284,16 +1284,16 @@ NUGET Xamarin.FFImageLoading.Forms (2.4.11.982) Xamarin.FFImageLoading (>= 2.4.11.982) Xamarin.Forms (>= 3.3.0.912540) - Xamarin.Forms (4.7.0.1179) - Xamarin.Forms.Maps (4.7.0.1179) - Xamarin.Forms (>= 4.7.0.1179) - Xamarin.Forms.Maps.WPF (4.7.0.1179) + Xamarin.Forms (4.8.0.1269) + Xamarin.Forms.Maps (4.8.0.1269) + Xamarin.Forms (>= 4.8.0.1269) + Xamarin.Forms.Maps.WPF (4.8.0.1269) Microsoft.Maps.MapControl.WPF (>= 1.0.0.3) Xamarin.Forms.PancakeView (1.4.2) System.ComponentModel (>= 4.3) Xamarin.Forms (>= 3.6.0.220655) Xamarin.Forms.Platform.WPF (>= 3.6.0.220655) - Xamarin.Forms.Platform.WPF (4.7.0.1179) + Xamarin.Forms.Platform.WPF (4.8.0.1269) OpenTK (>= 3.0.1) OpenTK.GLControl (>= 3.0.1) - Xamarin.Forms (>= 4.7.0.1179) + Xamarin.Forms (>= 4.8.0.1269)