CommunityToolkit / CommunityToolkit/Windows
Ugly resizing behavior for SettingsCard Header
- Dominant language
- C#
- Stars
- 1.1k
- Forks
- 166
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
- **SettingsCardWrapThreshold** _might_ never be reached because the minimum width of the window
- there is no minimum width for **PART_HeaderPresenter**
- **HeaderPanel** uses `` while the other columns use **Auto**.
- **PART_ContentPresenter** has no **TextWrapping** property, the header and description do
Therefore the header will _always_ give way to the content, even if you set wrapping on a textblock in the content. This combination can lead to very ugly resizing behavior.
### Steps to reproduce
Use a SettingsCard with a Content with a very long piece of text that doesn't wrap (like a file path). You can set the property directly or with a TextBlock, it doesn't matter. Then resize the window, so that the width decreases. Watch the Header.
```xaml
```
### Expected behavior
Header can shrink, but not be hidden.
### Screenshots


### Code Platform
- [ ] UWP
- [x] WinAppSDK / WinUI 3
- [ ] Web Assembly (WASM)
- [ ] Android
- [ ] iOS
- [ ] MacOS
- [ ] Linux / GTK
### Windows Build Number
- [ ] Windows 10 1809 (Build 17763)
- [ ] Windows 10 1903 (Build 18362)
- [ ] Windows 10 1909 (Build 18363)
- [ ] Windows 10 2004 (Build 19041)
- [ ] Windows 10 20H2 (Build 19042)
- [ ] Windows 10 21H1 (Build 19043)
- [ ] Windows 10 21H2 (Build 19044)
- [ ] Windows 10 22H2 (Build 19045)
- [ ] Windows 11 21H2 (Build 22000)
- [x] Other (specify)
### Other Windows Build number
24H2
### App minimum and target SDK version
- [ ] Windows 10, version 1809 (Build 17763)
- [ ] Windows 10, version 1903 (Build 18362)
- [ ] Windows 10, version 1909 (Build 18363)
- [ ] Windows 10, version 2004 (Build 19041)
- [ ] Windows 10, version 2104 (Build 20348)
- [ ] Windows 11, version 22H2 (Build 22000)
- [ ] Other (specify)
### Device form factor
Desktop
### Additional context
- Most basic: set a minimum width on the header/column?
- (and/or) Add **TextWrapping** to **PART_ContentPresenter** ? But then ColumnWidth `*` will _still_ always give way to `Auto`. So it wouldn't fix it.
- Something else?
### Help us help you
Yes, but only if others can assist.
Contributor guide
Assessment
This issue has not been assessed yet.