Open espenrl opened 5 months ago
Thanks @espenrl Which platform was this one? Are your MAUI workloads up to date?
Tested on
The new Compass's code is self contained so I copied Compass.cs
into my own project. Straight from the main branch.
@espenrl Aaah I get it now - you're explicitly setting the background to white. When you do that in MAUI the entire control will be white as you see. That's sort of expected. I don't believe we can override that behavior and only apply it to a child element in MAUI.
I logged https://github.com/dotnet/maui/issues/22802 in the hope that we can improve this
I logged dotnet/maui#22802 in the hope that we can improve this
It's funny I've been through the same thoughts and discussion. In the end I personally think it's good that Background
applies to the whole control. It aids debugging, being able to paint the whole control - it makes it easy to see how the control is placed in the layout.
Would it be an idea for the Compass control to have a Fill property? Akin to Path.Fill
, not the best example perhaps.
Fill would be my preferred property. I can see your argument, but my main issue with having Background fill the entire control is that it goes against how all the other frameworks handle it for templated controls. Imagine something as simple as a border with rounded corners... you wouldn't want the background to stick out outside those round corners.
Compass isn't initially hidden on startup when pointing north. I found that initializing _isVisible
to true
, as well as removing _isVisible = false;
from OnApplyTemplate()
helped solve this case.
Hi, I've tested the new Compass implementation in #570 and I want to give some feedback.
AutoHide
seems to work as it should, but the compass isn't initially hidden when map is initialized (map pointing north)AutoHide