dotnet / dotnet/wpf

Inconsistent behaviours when animating grid width/height (with reproducible demo)

Open
#3,680 5 comments 1 reaction 0 assignees View on GitHub
Bug
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

* .NET Core Version: Not tested
* Windows version: Newest Win10 2004
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Currently only tested under .NET Framework 4.7.2/4,8

**Problem description:**
For a 12x4 grid with a textblock in each cell, If I animate many of the row and column definitions of a grid at the same time, the animation can be started and sometimes completed, but the program stucks very quickly.
However, for a 4x12 grid with the same animation code, the program never stucks.
Hint: The 12x4 grid program will also not stuck if the textblock is replaced with a border.

**Actual behavior:**
Please run my demo.

**Expected behavior:**
I think during calculations and rendering, row and column definitions of a grid should be treated similarly. So why program works fine for a certain grid layout, but stucks for its transpose? Am I doing something wrong or this is a bug?

**Minimal repro:**
[WpfApp1_nonstuck.zip](https://github.com/dotnet/wpf/files/5426467/WpfApp1_nonstuck.zip)
[WpfApp1_stuck.zip](https://github.com/dotnet/wpf/files/5426468/WpfApp1_stuck.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.