Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Window_and_Application_API_Spec.md #96

Merged
merged 8 commits into from
Aug 18, 2020

Conversation

marb2000
Copy link

Reusing the SetTitleBar method and adding a new Windows.UI.Xaml.Window.TitleBar class to allow customize the TitleBar in WinUI 3 in Desktop

Reusing the SetTitleBar method and adding a new Windows.UI.Xaml.Window.TitleBar class to allow customize the TitleBar in WinUI 3 in Desktop
@marb2000 marb2000 requested a review from a team as a code owner August 14, 2020 23:28
@mdtauk
Copy link

mdtauk commented Aug 14, 2020

Thank you for working on Titlebar customisation!!

I have a question about some of the properties from the current UWP implementation...

// using Windows.UI.ViewManagement;

var titleBar = ApplicationView.GetForCurrentView().TitleBar;

// Set active window colors
titleBar.ForegroundColor = Windows.UI.Colors.White;
titleBar.BackgroundColor = Windows.UI.Colors.Green;
titleBar.ButtonForegroundColor = Windows.UI.Colors.White;
titleBar.ButtonBackgroundColor = Windows.UI.Colors.SeaGreen;
titleBar.ButtonHoverForegroundColor = Windows.UI.Colors.White;
titleBar.ButtonHoverBackgroundColor = Windows.UI.Colors.DarkSeaGreen;
titleBar.ButtonPressedForegroundColor = Windows.UI.Colors.Gray;
titleBar.ButtonPressedBackgroundColor = Windows.UI.Colors.LightGreen;

// Set inactive window colors
titleBar.InactiveForegroundColor = Windows.UI.Colors.Gray;
titleBar.InactiveBackgroundColor = Windows.UI.Colors.SeaGreen;
titleBar.ButtonInactiveForegroundColor = Windows.UI.Colors.Gray;
titleBar.ButtonInactiveBackgroundColor = Windows.UI.Colors.SeaGreen;

Will it be possible to set the colours for the Window Control buttons in both UWP and WinUI Desktop applications?

When introducing custom UI to stand in for the Titlebar, ensuring the control buttons remain visible will be important to maintain, but I did not see any mention of these properties with your proposal update.

https://docs.microsoft.com/en-us/windows/uwp/design/shell/title-bar

@marb2000
Copy link
Author

marb2000 commented Aug 18, 2020

@mdtauk Q: Will it be possible to set the colours for the Window Control buttons in both UWP and WinUI Desktop applications?

A: It won't be possible in this 2020 year. However, there is a workstream working in the Windowing story of project Reunion and we hope this unify the windowing story for UWP and Desktop. Right now, we are creating in XAML an abstraction layer for UWP and Desktop based on CoreWindow and Window Handles, in the future this abstraction layer could use the outcome of the Project Reunion's windowing.

@mdtauk
Copy link

mdtauk commented Aug 18, 2020

@mdtauk Q: Will it be possible to set the colours for the Window Control buttons in both UWP and WinUI Desktop applications?

A: It won't be possible in this 2020 year. However, there is a workstream working in the Windowing story of project Reunion and we hope this unify the windowing story for UWP and Desktop. Right now, we are creating in XAML an abstraction layer for UWP and Desktop based on CoreWindow and Window Handles, in the future this abstraction layer could use the outcome of the Project Reunion's windowing.

Ah fair enough then. Its good that desktop will get some of the modern Titlebar manipulations, if not all of them right away

@marb2000 marb2000 merged commit 019bffa into Win32 Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants