xamarin / XamarinCommunityToolkit

The Xamarin Community Toolkit is a collection of Animations, Behaviors, Converters, and Effects for mobile development with Xamarin.Forms. It simplifies and demonstrates common developer tasks building iOS, Android, and UWP apps with Xamarin.Forms.
MIT License
1.59k stars 472 forks source link

[Bug] Expander - content is moving during the expand/collapse animation #419

Open Reveon opened 4 years ago

Reveon commented 4 years ago

Description

Content is moving when the Expander is running collapse or expand animation. This has impact especially on images where different aspect settings cause different issues. It also seems to cut label in the bottom. See the gif animation bellow.

Steps to Reproduce

  1. Run the repro sample
  2. Expand and collapse included expanders

Expected Behavior

Content should always stay in the same location during the expand/collapse animation and its size should stay the same.

Actual Behavior

Content is moving/jumping while the animation is running. Images are getting smaller/larger.

Basic Information

Screenshots

Expander

Reproduction Link

ExpanderContentMoving.zip

rmarinho commented 4 years ago

hey @AndreiMisiukevich i think this might a enhancement no? Would be possible to size the items, and then expand them? or maybe fade them in ?

AndreiMisiukevich commented 4 years ago

hey @rmarinho

Yes, definitely it might be. Need to try some approaches.

Fading in would be the easiest way, I believe, but not sure that it will look good (If I understood your idea correctly) :)

Reveon commented 4 years ago

I think that the content should just stay in the same position and keep its size because current behavior can lead to some really weird effects. Especially if there are more images with different aspect settings. I think that on iOS this was mostly fine.

rmarinho commented 4 years ago

Yeah i think we need to think a little bit on this, and see other examples maybe.

But for sure we would need some kind of ExpandMode

AndreiMisiukevich commented 4 years ago

@rmarinho please add "a/expander" label

shawyunz commented 3 years ago

Could add a ScrollView as a workaround:

<DataTemplate>
<ScrollView>
<Image/>
</ScrollView>
</DataTemplate>

ExpanderTest