dotnet / dotnet/wpf

SharedSizeGroup and Visibility.Collapsed

Open
#786 0 comments 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
* Windows version: 1803 (17763.437)
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes



**Problem description:**

https://stackoverflow.com/questions/9977344/grid-column-with-sharedsizegroup-does-not-reclaim-the-size-when-it-is-collapse

> I have the following xaml:
>
> ```xaml
> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
> Title="MainWindow" Height="350" Width="525">
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ```
> When you try this, the initial state the first column is 100 wide. When the button is pressed and the second grid is made visible, the first column is made 200 wide. However, when you press the button again, the column will still be 200 wide.


Apparently, it works with Visibility.Hidden but it doesn't with Visibility.Collapsed. Columns/rows don't get remeasured.

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.