dotnet / dotnet/wpf

Column span fails for Pixel columns into Auto columns (under certain conditions)

Open
#528 1 comment 0 reactions 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: 3.0.0-preview3-27503-5
* Windows version: (`10.0.17134`)
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes

**Problem description:**
A Grid column set to Pixel width that is then spanned into an Auto width column to its right gets a bad final size, and in practice ignores the size set on it. If an Auto column is spanned into, it should "absorb" the required space, i.e. it should measure the content, subtract what the fixed size says its size is, and the remainder should be the width of the Auto column.

**Actual behavior:**
The Pixel width column is unaffected by size (if the size is smaller than the measured size of the child), and ignores its ColumnSpan.

**Expected behavior:**
The Pixel width column should span into the Auto column to its right, with the aggregate width for the two columns equaling the desired size for the content, such that the Pixel size gets precisely that width and the Auto column absorbing the rest.

**Minimal repro:**
```












```

Notice how you can set the width of column with index = 1 to any number smaller than the measured size of its child ("SomeText") and nothing happens. It is not spanning into the Auto column to the right, nor does it care what the size is. This seems very wrong to me. A Pixel column + an Auto column should, taken together, be capable of accommodating a child that is spanning across them, and the Auto column should absorb the remaining space.

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.