dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.98k stars 1.72k forks source link

LayoutTo does not work in .NET MAUI #15439

Open MSicc opened 1 year ago

MSicc commented 1 year ago

Description

LayoutTo is not moving the item to the new coordinates.

Steps to Reproduce

Click the button in the sample repo. Normally, the .NET Bot should be moving around. Instead, only the complementary animations are running (see button click event).

TranslateTo is working but commented and can be used as reference.

It worked in Xamarin.Forms, I discovered this while porting one of my apps to MAUI.

Link to public reproduction project repository

https://github.com/MSicc/MauiLayoutToBugRepo

Version with bug

7.0.49

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, macOS, I was not able test on other platforms

Affected platform versions

iOS 16, macOS 13.4, Android Level 33

Did you find any workaround?

not yet.

Relevant log output

-

Notes

All that LayoutTo does is sets the Bounds on the VisualElement. I don't think this really works on MAUI and the new Layout system. We'll need to see how/why this worked on Xamarin.Forms and then translate this to a comparable experience, or, obsolete this in favor of TranslateTo

jsuarezruiz commented 1 year ago

cc @hartez

mlyrstad commented 1 year ago

I just noticed the same thing, migrating a Xamarin component to Maui which uses LayoutTo. Stopped working.

ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

vallgrenerik commented 1 year ago

I'm also running in to this problem. @MSicc did you find any work around? This is a blocker for us. In our Xamarin.Forms application We are animating a BoxView over a gradient to simulate a rising/falling intensity. See attached video on how the application works in Xamarin.Forms. Any idea how to go around this problem? @jsuarezruiz

https://github.com/dotnet/maui/assets/26163937/8cdafcb0-dc32-4c8a-8495-a22b4039e0c6

In our MAUI version of the application, the BoxView won't move.

MSicc commented 1 year ago

Nope, sorry šŸ˜ž

vallgrenerik commented 1 year ago

@jfversluis Do you have any internal status of this issue? Or maybe any alternative solution?

vallgrenerik commented 11 months ago

I'm trying again, @jsuarezruiz , @davidortinau , @maddymontaquila any feedback/progress work arounds on this issue?

vallgrenerik commented 11 months ago

@jamesmontemagno & @jfversluis I'm trying to pull attention to this issue. Can you check with anyone? :)

hartez commented 11 months ago

The issue is on our backlog, and we will address it when we have the resources to do so. Unfortunately, at the moment I don't have any more information than that.

vallgrenerik commented 11 months ago

Thanks for the reply @hartez! A fix for this in .NET 8, is that possible or is that unrealistic? šŸ˜Š

hartez commented 11 months ago

A servicing fix is possible, but a fix for the GA release is unlikely.

Zhanglirong-Winnie commented 7 months ago

Verified this issue with VSM 17.6.7 (build 400). Can repro this issue with sample project. https://github.com/MSicc/MauiLayoutToBugRepo

InquisitorJax commented 4 months ago

looking forward to this being fixed - app is using this core animation method quite a bit :(