Skip to content

Add SelectedContentControl to HeaderedControls library #811

@michael-hawker

Description

@michael-hawker

Describe the bug

We should add the SelectedContentControl 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

---

Expected behavior

Scenario: If you need to drive tabbed documents separately from a TabView.

For instance, if you look at Edge itself:

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions