Skip to content

TitleBar sample is orphaned in UITests.Shared and never compiled into SamplesAppΒ #24878

Open

Description

@MartinZikmund

On which page? πŸ“„

Microsoft.UI.Xaml.Controls/TitleBarTests/TitleBarPage (and TitleBarPageWindow), which should be in SamplesApp but is not.

What's wrong? ❗

The TitleBar control sample files live in src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TitleBarTests/:

  • TitleBarPage.xaml / .xaml.cs
  • TitleBarPageWindow.xaml / .xaml.cs

They were added in 89701b8 ("test: Add sample UI for TitleBar"), but UITests.Shared stopped being a project in 25a7bc4 ("chore: Replace UITests.Shared shproj with .props"). Samples now live in src/SamplesApp/SamplesApp.Samples/, which globs only its own folder.

On current master (c83e458):

  • No .csproj, .props, .targets, .projitems, .sln* or .slnf mentions UITests.Shared.
  • git ls-tree -r master src/SamplesApp/UITests.Shared lists only these 4 files.
  • SamplesApp.Samples has no TitleBar control sample (only window-level AppWindow.TitleBar samples under Microsoft/UI/Windowing).

So the sample never shows up in SamplesApp and has never been compiled. A later fix (d5dde14, guard the RTL P/Invoke) also landed on the dead copy.

Confirmed by code inspection of master, not by a build.

Any feedback? πŸ’¬

Suggested fix:

  1. Move the 4 files to src/SamplesApp/SamplesApp.Samples/Microsoft/UI/Xaml/Controls/TitleBarTests/ (check the neighbouring folders for the current naming).
  2. Fix the namespaces if needed, and make sure the code-behind has [Sample].
  3. Build the Skia desktop head (and ideally the others), fixing whatever breaks, since this code was never compiled.
  4. Delete the now-empty UITests.Shared folder.
  5. Run dotnet xstyler -f on the moved XAML files.

Activity

  1. added
    kind/bug
    good first issue
    triage/untriaged
    area/tests πŸ§ͺ
    difficulty/starter πŸš€
    project/samples
    on Oct 1, 2026
  2. PanotAbhay commented on Oct 3, 2026

    @PanotAbhay

    Hi, I would like to be assigned on this issue. I've requested a PR that updates two documentation files that still names the old .NET versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/tests πŸ§ͺdifficulty/starter πŸš€good first issuekind/bugproject/samplestriage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions