Skip to content

TitleBar API feedback #9700

Closed
Closed
@dotMorten

Description

@dotMorten

Summary

I'm looking at the new TitleBar, and while functionally and visually I LOVE it, I have some concerns about the API itself.

image

First of all, the naming of Header and Footer is very misleading. Those names typically refer to top/bottom items, and the entire control in-of-itself is a header control. I looked at those properties and couldn't at all guess what they really were for, until I saw this image:
image
Generally I'd prefer naming that allows you do an informed guess what they do, and in the community call several people were confused about this.

So these are left/right, and I'm not actually sure if Header is before or after those buttons (illustration doesn't make that clear). Header also clashes with the Title here, adding extra confusion.

My second (albeit slightly lesser) concern is the use of Pane and Back buttons. It's extremely opinionated, and I worry we're gonna get too many apps looking too identical. I'd rather this was a Button collection of sorts instead, where I could choose to add some buttons, or choose to just put them in the "Headers" content (pending a better name). If I needed a 3rd button there I'm out of luck.

Then there's the TitlebarTemplateSettings class:
image

I find this a bit weird. When I think template, I think control templates, but this appears to just be a way to set the app icon - why not just set the icon on the TitleBar directly? But more importantly I think that this should be a Window property (not AppWindow, but Window Window!) that also applies if I don't use the TitleBar.

Another approach is perhaps providing a MUCH simpler titlebar control that just takes care of allowing you to interact with buttons and textboxes etc, while still being able to drag the rest, but you own the entire content as a single content item. Then you add a secondary subclass of that titlebar that adds this more opionated version to cover some common scenarios.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-TitleBarIssues related to custom window title bars.closed-FixedDescribed behavior has been fixed.needs-triageIssue needs to be triaged by the area ownersteam-ControlsIssue for the Controls team

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions