Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: New property on Grid to suppress RowSpacing/ColumnSpacing for blank rows/columns #9491

Open
bjorn-malmo opened this issue Mar 26, 2024 · 1 comment
Labels
area-Layouts feature proposal New feature proposal team-Controls Issue for the Controls team

Comments

@bjorn-malmo
Copy link

Proposal: New property on Grid to suppress RowSpacing/ColumnSpacing for blank rows/columns

Summary

A new property name SuppressRowSpacingOnBlankRow="true" would skip the spacing between adjacent rows where resulting Height == 0.

Rationale

The RowSpacing is great for creating good looking layouts, but when rows are hidden (their content's Visibility=Collapsed or Height=0) and the resulting row's Height is 0, the space between all rows are no longer equal.
It would be great to be able to automatically remove the space between adjacent rows when one of them is empty.
The workaround today is to set RowSpacing="0" and use Margin="x, y" on content element. However, this is more cumbersome and forfeits the idea of the RowSpacing property.
Adding a new property for this behavior would be backwards compatible with the current behavior.
The same goes for Columns.

Scope

Must be backwards compatible with current behavior

Important Notes

Open Questions

@bjorn-malmo bjorn-malmo added the feature proposal New feature proposal label Mar 26, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Mar 26, 2024
@duncanmacmichael duncanmacmichael added area-Layouts and removed needs-triage Issue needs to be triaged by the area owners labels Apr 16, 2024
@bpulliam bpulliam added the team-Controls Issue for the Controls team label May 2, 2024
@Tiktack
Copy link

Tiktack commented Sep 15, 2024

I believe that new property is not required. It should be default behavior. I cannot imagine a case, when current behavior can be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Layouts feature proposal New feature proposal team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

4 participants