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

StackPanel applies Spacing to InfoBar when IsOpen is false #9507

Closed
SnowyWreath opened this issue Apr 1, 2024 · 3 comments
Closed

StackPanel applies Spacing to InfoBar when IsOpen is false #9507

SnowyWreath opened this issue Apr 1, 2024 · 3 comments
Labels
area-Layouts team-Controls Issue for the Controls team

Comments

@SnowyWreath
Copy link

Describe the bug

Similar to #916, StackPanel is still applying spacing between an InfoBar and its neighbors when the InfoBar is not open.

Steps to reproduce the bug

<StackPanel Spacing="24">
   <InfoBar IsOpen="True" Title="This is a title" />
   <InfoBar IsOpen="False" Title="This is a title" />
   <InfoBar IsOpen="False" Title="This is a title" />
   <InfoBar IsOpen="False" Title="This is a title" />
   <InfoBar IsOpen="True" Title="This is a title" />
</StackPanel>

Expected behavior

Spacing should only be applied between an InfoBar and a neighbor when the InfoBar is open. When an InfoBar is closed, it is collapsed for all intents and purposes, even though the control's Visibility is still equal to Visible.

Screenshots

No response

NuGet package version

None

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

@SnowyWreath SnowyWreath added the bug Something isn't working label Apr 1, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Apr 1, 2024
Copy link

github-actions bot commented Apr 1, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@kmgallahan
Copy link
Contributor

My reply to #9500 applies the same here:

Would it be better to have a zero size when IsActive is False?

No. Visibility=Collapsed means collapsed. If the control collapses as a side effect of IsActive=false then others will show up to complain that the ProgressRing should retain its size when IsActive=false for their scenarios.

Just substitute IsOpen=false for IsActive=false.

Introducing side effects that are only beneficial for some scenarios is a bad idea.

@codendone codendone added area-Layouts team-Controls Issue for the Controls team and removed bug Something isn't working needs-triage Issue needs to be triaged by the area owners labels Apr 12, 2024
@ranjeshj
Copy link
Contributor

@kmgallahan is correct. We only ignore spacing for Visibility=Collapsed items. You should be able to use that property to get the desired behavior.

@ranjeshj ranjeshj closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Layouts team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

4 participants