🧪 TitleBar #454
Replies: 19 comments 27 replies
-
Wow... I am really looking forward to this experiment |
Beta Was this translation helpful? Give feedback.
-
Working branch with an initial PR to get the logic into the sample app. Once tested, we can spin this out into a dedicated Labs Experiment: https://github.com/CommunityToolkit/Tooling-Windows-Submodule/pull/88/files |
Beta Was this translation helpful? Give feedback.
-
One more questions... |
Beta Was this translation helpful? Give feedback.
-
100% agree. I think this will make it a lot easier to get a basic app up and running, just like the days of UWP. It was great being able to make an app look good in 5 minutes. I'm all for it! |
Beta Was this translation helpful? Give feedback.
-
I would be a fan of this and probably use it, if not directly, at least as an inspiration. Must haves would be the following two aspects:
Header and Footer are not suggestive as namings because this terminology is mainly used for content that's displayed vertically, not horizontally but it might work well anyway. Header is not necessary, I consider, and, without it, we can have another name for Footer, maybe one of these ideas:
Tab support would be awesome, but maybe added later. One question I would have, any chance this issue can get fixed with the reusable control? Great idea, @niels9001 , it's nice to see contributions like this that might help the community. I also see it as a step into the right direction of having consistent titlebars across Windows native apps. |
Beta Was this translation helpful? Give feedback.
-
I can see different modes in the provided images, if we use the NavigationView with Top mode and have all those options (Header, Footer, SearchBox, Icon etc.), what will the situation be? How will the elements act? |
Beta Was this translation helpful? Give feedback.
-
Hi @niels9001 There are some things that should be considered
Right-to-left languages create their apps in two ways: 1.The whole app from right to left == In this option, the titlebar and content are created from right to left 2.TitleBar from left to right and content from right to left In these cases, it is better for the navigation view to function properly |
Beta Was this translation helpful? Give feedback.
-
Experiment is in draft PR.. I believe I have the fundamentals + UI logic working for both UWP and WASDK :-)! Would love to get feedback! |
Beta Was this translation helpful? Give feedback.
-
Hi @niels9001 Isn't it better to set the icon and title in the AppWindow and window itself?
|
Beta Was this translation helpful? Give feedback.
-
As mentioned, the words "header" and "footer" are a no-go. They sound too "vertical". MS docs has a page on using a fully custom titlebar, with examples. We can/should follow that as much as possible. It's a personal preference of mine to use Spacings in favor of margins. In my (recent) experience, |
Beta Was this translation helpful? Give feedback.
-
The UWP TitleBar customization APIs are pretty good, but they do miss a few things. Namely, there is no reliable way to know whether the user wants to see their accent color in the TitleBar: I've seen many users complaining because UWP apps specifically don't respect this preference. The article above shows a way to adjust the setting from the registry, which could make respecting this preference viable for WinUI 3 apps. Not sure how the API would look like, something along the lines of Another alternative would be having an |
Beta Was this translation helpful? Give feedback.
-
@niels9001 the "original" value/type isn't a bool but an enum: |
Beta Was this translation helpful? Give feedback.
-
Hi @Jay-o-Way 2.how should we use tabview in titlebar? A static method?without xaml? Which define draggable area for a tabview?
|
Beta Was this translation helpful? Give feedback.
-
i created a blank project with tabbed titlebar, and it seems that working fine😁 Tabbed Titlebar is done with TabStripFooter, this means our drag region defined inside TabStripFooter. |
Beta Was this translation helpful? Give feedback.
-
also, for using wasdk v1.4 i used VisualTreeHelper for finding AddButton and TabViewListView for calculating Drag Regions, code is simple but should we use VisualTreeHelper or we can just copy Style from https://github.com/microsoft/microsoft-ui-xaml/blob/winui3/release/1.4-stable/controls/dev/TabView/TabView.xaml? |
Beta Was this translation helpful? Give feedback.
-
Hey @ghost1372, lots of questions! :) I don't know the answer for the most of them. Niels should be able to answer more. My thoughts:
|
Beta Was this translation helpful? Give feedback.
-
This is looking great! One piece of feedback - it would be nice if it would be possible for this control to natively support:
I'm working on a few enterprise applications where the application is a "floating" status pane, where we still want the user to grab/drag it like they're used to with normal windows, but we don't want them closing the window. Disabling is an option, but there's also space constraints which make it less than ideal to show the caption buttons. |
Beta Was this translation helpful? Give feedback.
-
TitleBar
Problem Statement
With the refreshed design of Windows 11, the preferred window titlebar has changed as well. To replicate this experience, can be time consuming and requires a lot of XAML + code-behind to get right.
Inspiration
Proposed Solution
A control, defined in XAML, that contains all required properties to create a modern titlebar experience. It would automatically handle all the required code behind APIs (like
ExtendContentIntoTitlebar
) for both UWP and WinAppSDKProperties:
AutoSuggestBox
)CoreApplicationView
Layouts
XAML
When the window is smaller, the
Title
andSubTitle
components should collapse:Expanded
mode: 48px heightCompact
mode (default): 32px heightWorking branch: https://github.com/CommunityToolkit/Tooling-Windows-Submodule/pull/88/files
Open Questions
Header
property to display custom content left of theIcon
?TabView
type of layouts in a V1?API Reference Docs
[- Expander](https://learn.microsoft.com/en-us/windows/apps/develop/title-bar?tabs=wasdk)
References
https://learn.microsoft.com/en-us/windows/apps/design/basics/titlebar-design
Beta Was this translation helpful? Give feedback.
All reactions