Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Modifying the IsVisible property immediately after running an animation causes the animation to reset. For instance, running this code:
await _label.LayoutTo(new Rectangle(50f, 500f, _label.Bounds.Width, _label.Bounds.Height));
_button.IsVisible = false;
will cause the label to reset to its bounds before the animation. I have attached a simple project that demonstrates this behavior. I have verified the issue exists on Android and iOS. I have not tested Windows Phone. To see the bug, just simply press the "Animate" button in the attached sample.
Created attachment 9421 [details]
Sample that demonstrates the bug
We have checked this issue with the help of given sample app and observed that when we run the sample and click on "Animate" button then button "Animate" disappears, label goes to bottom of the screen and again come back to it's original position.
And we have also noticed that when we commented the line "_button.IsVisible = false;" in project and run the application again and click on "Animate" button then label goes to bottom of the screen and never back to it's original position.
Could you please have a look on screencast http:http://www.screencast.com/t/pES4AkrqSZ and confirm us if you are getting the same behaviour.
Xamarin.Forms : 18.104.22.16896
Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Xamarin 22.214.171.124 (d6a2cae)
Yes, this is the behavior I am seeing. As long as the line of code that sets the button visibility to false is commented out, the animation works correctly. Otherwise, it does not.
Changing status to new....not sure if I was supposed to do this after adding comments
Any updates on when this will be fixed?
I have checked this issue with X.Form: 126.96.36.19931-pre4 and I am still getting this issue.
Use TranslateTo not LayoutTo. LayoutTo is intended for layout internal usage and does not override the items final position in a managed layout.
To add slightly.
LayoutTo is actually affecting the layout, so when the parent layout re-lays out its children (which changing IsVisible will trigger) it will just ignore whatever you did with LayoutTo. TranslateTo changes the translation properties, which are POST layout transforms. A translation of 10, 10 for example will offset an item 10 pixels down and right from where it would normally be placed. This will be retained through layout cycles.