Skip to content

Canvas doesn't render in MAUI app on initial load #98

Answered by taublast
nathenxbrewer asked this question in Q&A
Discussion options

You must be logged in to vote

As i see both canvas and its content (controls:ColorSlider) do not present any width constraint.

If do not set either canvas horizontaloptions="fill" either widthrequest="something" it would try to adapt its width to content.
So if Colorsilder has no fixed with in that case you might see this behaviour. I suspect your content has horizontaloptions="fill" so with an auto-sized canvas that might present an issue for the first measurement.

So actually, this is by design. Again as stated in readme:

Some differences from Xamarin.Forms/Maui to notice:
*Layouts as other controls come with HorizontalOptions and VerticalOptions as Start and not Fill by default, so if your children do not request …

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by taublast
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #97 on October 25, 2024 13:52.