-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d61f6f4
commit 82e8a69
Showing
3 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/Fabulous.Maui/Compatibility/Views/Layouts/_CompatLayoutOfView.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,31 @@ | ||
namespace Fabulous.Maui.Compatibility | ||
|
||
open System.Runtime.CompilerServices | ||
open Fabulous | ||
open Fabulous.StackAllocatedCollections | ||
open Microsoft.Maui | ||
|
||
type IFabCompatLayoutOfView = | ||
inherit IFabCompatLayout | ||
|
||
module CompatLayoutOfView = | ||
let Children = | ||
Attributes.defineListWidgetCollection "LayoutOfWidget_Children" (fun target -> (target :?> Microsoft.Maui.Controls.Layout).Children) | ||
|
||
[<Extension>] | ||
type CollectionBuilderExtensions = | ||
[<Extension>] | ||
static member inline Yield | ||
( | ||
_: CollectionBuilder<'msg, #IFabCompatLayoutOfView, IView>, | ||
x: WidgetBuilder<'msg, 'itemType> | ||
) : Content<'msg> = | ||
{ Widgets = MutStackArray1.One(x.Compile()) } | ||
|
||
[<Extension>] | ||
static member inline Yield | ||
( | ||
_: CollectionBuilder<'msg, #IFabCompatLayoutOfView, IView>, | ||
x: WidgetBuilder<'msg, Memo.Memoized<#IView>> | ||
) : Content<'msg> = | ||
{ Widgets = MutStackArray1.One(x.Compile()) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
src/Fabulous.Maui/Core/Views/Controls/Partials/_ButtonStroke.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters