Skip to content

Setting a value of NaN to StaggeredLayout.DesiredColumnWidth will cause the app to become unresponsive #4063

@winston-de

Description

@winston-de

Describe the bug

Setting a value of NaN for StaggeredLayout.DesiredColumnWidth will cause the app to become unresponsive. Sometimes it will even give the good ol' " has stopped responding" dialog.

  • Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:

Steps to Reproduce

  • Can this be reproduced in the Sample App? (Either in a sample as-is or with new XAML pasted in the editor.) If so, please provide custom XAML or steps to reproduce. If not, let us know why it can't be reproduced (e.g. more complex setup, environment, dependencies, etc...)

Steps to reproduce the behavior:

  1. Go to staggered layout control
  2. Go to xaml tab
  3. Find the staggered layout definition, and set DesiredColumnWidth to NaN
  4. App will become unresponsive, and will eventually crash
<controls:StaggeredLayout DesiredColumnWidth="NaN"
                          ColumnSpacing="5"
                          RowSpacing="5"/>

Expected behavior

If using NaN is not possible, there should be an exception or notification that says this. Also, I don't see anything in the docs about NaN being an invalid parameter.

Screenshots

2021-06-04-113729_Trim.mp4

Environment

NuGet Package(s):

Package Version(s):

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [ ] May 2020 Update (19041)
- [x] Insider Build (build number: 19043.1023)

App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [ ] May 2020 Update (19041)
- [ ] Insider Build (xxxxx)

Device form factor:
- [x] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio
- [ ] 2017 (version: )
- [ ] 2019 (version: )
- [ ] 2019 Preview (version: )

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions