Xamarincommunitytoolkit: [Bug] Expander - System.ArgumentException: 'NaN is not a valid value for Height'

Created on 23 Sep 2020  路  8Comments  路  Source: xamarin/XamarinCommunityToolkit

Description

When tapping the Expander header, mostly in rapid order, I get a System.ArgumentException 'NaN is not a valid value for Height'.

Steps to Reproduce

  1. ContentPage with a Grid with a ScrollView with a StackLayout with BindableLayout.ItemsSource.
  2. BindableLayout.ItemTemplate with a DataTemplate with the Expander control.
  3. ItemSource has multiple items.
  4. Tap First Expander Header, then second Expander header.
  5. I get NaN is not a valid value for Height'.

Expected Behavior

Not getting System.ArgumentException when tapping Expander Header.

Actual Behavior

Sometimes getting the 'NaN is not a valid value for Height' System.ArgumentException.

Basic Information

  • Version with issue: 4.6.0.726
  • Last known good version: 4.6.0.726
  • IDE: Visual Studio 2019 16.5.4
  • Platform Target Frameworks: Android, iOS

    • iOS: 13.16.0.13

    • Android: 10.2.0.100

  • Affected Devices: Android

Workaround

No workaround.

Tried:

  • Removing CollectionView
  • Setting MinimumHeightRequest
  • Trigger ForceUpdateSizeCommand with Expander Header Command
expander bug ready-to-implement

All 8 comments

Found a potential workaround.
Before: <Expander CollapseAnimationLength="0" ExpandAnimationLength="0">
Workaround: <Expander CollapseAnimationLength="10" ExpandAnimationLength="10">

Hi @SirJohnK we moved the Expander for the XamarinFommunityToolkit, so i moved your issue here to be better tracked.

Found a potential workaround.
Before: <Expander CollapseAnimationLength="0" ExpandAnimationLength="0">
Workaround: <Expander CollapseAnimationLength="10" ExpandAnimationLength="10">

Hi) Thanks for the report
So the bug occurs only with zero animation length, right?

Found a potential workaround.
Before: <Expander CollapseAnimationLength="0" ExpandAnimationLength="0">
Workaround: <Expander CollapseAnimationLength="10" ExpandAnimationLength="10">

Hi) Thanks for the report
So the bug occurs only with zero animation length, right?

Yes, it seems like it. I wanted a non animation expansion, but a really low "AnimationLength" will also do the trick! 馃憤

Then We should coerce the value to be not less than 1)

Will you take this @AndreiMisiukevich? You can definitely say no of course. Just making sure that not everyone is waiting for you to do it

Will you take this @AndreiMisiukevich? You can definitely say no of course. Just making sure that not everyone is waiting for you to do it

I will do it

You are just waiting for October so you can join in Hacktoberfest... 馃槤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jsmarcus picture jsmarcus  路  5Comments

davidbritch picture davidbritch  路  4Comments

knocte picture knocte  路  5Comments

jfversluis picture jfversluis  路  6Comments

SunnyMukherjee picture SunnyMukherjee  路  3Comments