you can draw your own custom title bar, but the caption buttons in the top right cannot be changed. The CoreTitleBar class has properties that tell you the dimensions to draw your own title bar.
The caption buttons are automatically hidden if you go to full screen however.
EDIT: that code goes inside of App::OnLaunched() function
No, it was running on my own local app that I created to test it out. It seems like you can't inject it into running processes without doing some extra black magic.
And that link you posted above mentions that only color alteration is available to apps built with HTML. So it’s safe to assume we can change the title bar color using the WinRT API Windows.UI.ViewManagement which is progress! (Thinking about it, doesn’t the twitter app change the titlebar color when switching to dark mode?) 👍
You can from a c++ UWP but that MS link mentions (in the purple ‘note’ section) that only titlebar color is able to be manipulated from C# or HTML apps. I assumed (rightly or wrongly) that a PWA would be classified under this implementation.
Note Simple color customization is available to UWP apps using XAML, DirectX, and HTML. Full customization is available only to UWP apps using XAML.
I take that to mean only XAML apps can do full customization (so yep I was wrong about the implementation language being important, sorry I misread) still I don’t know how MS implemented the window? (If it does use XAML then maybe it’s possible for us to customise the titlebar, otherwise it might just be color we can alter)
2
u/State_ Nov 10 '18
I just played around with a UWP app using the following code w/ c++
This was the end result: https://i.imgur.com/Y5aVP0l.png
you can draw your own custom title bar, but the caption buttons in the top right cannot be changed. The CoreTitleBar class has properties that tell you the dimensions to draw your own title bar.
The caption buttons are automatically hidden if you go to full screen however.
EDIT: that code goes inside of App::OnLaunched() function