Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for MAUI #919

Closed
wants to merge 52 commits into from
Closed

Conversation

TimLariviere
Copy link
Member

Now that MAUI Release Candidate 1 is released, I'm taking a stab at supporting it.

IDE support on macOS is completely absent but running via command line works.

// iOS
dotnet build -t:Run -f net6.0-ios -p:_DeviceName=:v2:udid=59F2133A-63ED-4791-A795-8F23C61E678B

// Android
dotnet build -t:Run -f net6.0-android

// Mac Catalyst
dotnet build -t:Run -f net6.0-maccatalyst

@TimLariviere
Copy link
Member Author

TimLariviere commented Jun 21, 2022

@edgarfgp If you want to play with it, this branch is ready for experimentations
You'll have to open Fabulous-Maui.sln. The main sln doesn't seem Maui friendly

@edgarfgp
Copy link
Member

Thanks so much . I will play a long and see if we can make some progress . :)

@TimLariviere
Copy link
Member Author

Managed to get the label displayed

@TimLariviere
Copy link
Member Author

Trying to make some progress on the Maui support. Getting closer to get a running sample, but still quite far from having anything usable.

Current state:
I can display a Label and a Button inside a Window. The button sends the events correctly but Maui isn't updating the UI despite calling handler.UpdateValue("Text").
Also, VStack/HStack are not displaying anything.

@TimLariviere
Copy link
Member Author

TimLariviere commented Aug 12, 2022

... and the IDEs crashing when I'm debugging aren't making anything easier.

@TimLariviere
Copy link
Member Author

TimLariviere commented Aug 13, 2022

Was missing the synchronization with the main thread. Now it's working 🎉

Simulator.Screen.Recording.-.iPhone.11.-.2022-08-13.at.08.30.28.mp4

@edgarfgp
Copy link
Member

Nice . Let me know if there is any thing I can help ?

@edgarfgp
Copy link
Member

While adding support for Maui . Could we review the Light and Dark support for text images , maybe also the styling ?

@TimLariviere
Copy link
Member Author

TimLariviere commented Aug 15, 2022

Nice . Let me know if there is any thing I can help ?

Thanks for asking :)
Right now, I'm still struggling to understand how controls work in Maui.
If you feel like it, I can use another brain to reverse-engineer Maui to get the Hello World sample running 😄

This commented code is the sample I want to get working:
https://github.com/fsprojects/Fabulous/pull/919/files#diff-d7b680c6fd70cff6508141ef3a2b3414f496d8f4ef5101b06910b120fb585c47R62-R91

While adding support for Maui . Could we review the Light and Dark support for text images , maybe also the styling ?

Sure. Do you have an idea how you would do it differently?

@TimLariviere
Copy link
Member Author

Small update: got StackLayout to work 🎉

@TimLariviere
Copy link
Member Author

image

@TimLariviere
Copy link
Member Author

dotnet/maui#5835

@TimLariviere
Copy link
Member Author

Still have some layout issues, but I made some progress

@TimLariviere
Copy link
Member Author

I ported the TicTacToe sample. It's not exactly the same than the XF one because Maui.Core lacks some features: OnSizeAllocated and RequestedThemeChanged.

@TimLariviere
Copy link
Member Author

The direct support for Maui (without Maui.Controls & XAML) has been moved to https://github.com/fsharp-mobile/Fabulous.Maui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants