CommunityToolkit / CommunityToolkit/Windows
Add SelectedContentControl to HeaderedControls library
- Dominant language
- C#
- Stars
- 1.1k
- Forks
- 166
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
We should add the [SelectedContentControl](https://gist.github.com/michael-hawker/7eb67ac1a7d6c25114b39bdd04163cbb) to the HeaderedControls library (after adding header/footer). Maybe we should have a labs test first, though this is a fairly straight-forward setup.
Initial discussion in Discord: https://discord.com/channels/372137812037730304/580484470877061120/1433674424024043540
Alternate implementation from @AndrewKeepCoding: https://github.com/AndrewKeepCoding/SelectedViewSampleApp
I built the code in the first link for XAML Studio, it's been working pretty good, I think. Tests would be good of course.
### Steps to reproduce
```text
---
```
### Expected behavior
Scenario: If you need to drive tabbed documents separately from a `TabView`.
For instance, if you look at Edge itself:
Between the tabs at the top and the document (webpage in this case) below, there's the address bar. With the existing `TabView` that has to be part of the document's view, it can't easily be centralized to the main parent container.
With the SelectedContentControl you could instead have the same collection drive both the TabView and the SCC with another control in a grid between or within the `Header` of the SCC.
### Screenshots
_No response_
### Code Platform
- [ ] UWP
- [ ] 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)
- [ ] Other (specify)
### Other Windows Build number
_No response_
### 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)
### Other SDK version
_No response_
### Visual Studio Version
_No response_
### Visual Studio Build Number
_No response_
### Device form factor
_No response_
### Additional context
_No response_
### Help us help you
Yes, but only if others can assist.
Contributor guide
Assessment
This issue has not been assessed yet.