Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application title bar disappeared - UWP app

I have na uwp app (published in Windows/Microsoft Store), and the app title bar is normally this: enter image description here

I was doing some tests in my app (to test the fluent design system) and I made some changes and I did not notice, because now it appears like this: enter image description here

The name of my app has disappeared and the ellipsis (...) that is included in the header of the page also does not appear.

How can I resolve this?

like image 988
Fernando Sousa Avatar asked Oct 27 '17 15:10

Fernando Sousa


People also ask

Is Microsoft abandoning UWP?

Microsoft continues to baby-step around the obvious, but it has officially deprecated the Universal Windows Platform (UWP) as it pushes the desktop-focused Windows App SDK (formerly called Project Reunion) and WinUI 3 as the future of Windows application development.

How do I fix UWP app not opening?

Run the Troubleshooter for Windows Store Apps The Windows Store Apps troubleshooter is one included with Microsoft's flagship OS to fix errors that pertain to UWP apps. As this is a UWP issue, running that troubleshooter might resolve the “This app can't open” issue for some users at least.

How do I find my UWP app?

If the file location is the WindowsApps folder in Program Files, or Windows 10 refuses to open the folder, then it is a UWP App, because Win32 apps are stored in their own folder in Program Files (x86) and 64bit applications are stored in their own folder in Program Files . . .


2 Answers

It happened to me too exactly when I was testing fluent design system!

To recreate the issue. Simply Add

// Extend acrylic
extendAcrylicIntoTitleBar(); to OnLaunched at App.xamel.cs

Then add following code to App.xamel.cs

/// Extend acrylic into the title bar. 
private void extendAcrylicIntoTitleBar()
{
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
ApplicationViewTitleBar titleBar = 
ApplicationView.GetForCurrentView().TitleBar;
titleBar.ButtonBackgroundColor = Colors.Transparent;
titleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
}

Next you need to fix the missing using by hitting Ctrl + . key.

At this point the title bar disappear. Even removing the extendAcrylicIntoTitleBar() function will not solve the issue!

The title bar will appear again if I remove following

using Windows.UI;
using Windows.UI.ViewManagement;
using Windows.ApplicationModel.Core;

I am not sure if it is a issue. That seems to be the way fluent design works

Above test is done according to
https://learn.microsoft.com/en-us/windows/uwp/design/style/acrylic#acrylic-theme-resources

like image 108
user8888180 Avatar answered Oct 11 '22 22:10

user8888180


The last value is cached in the registry. Try deleting this:

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\<GUID_PublisherID>\PersistedTitleBarData\<GUID_PublisherID>!App]
"AppVersion"=hex(b):00,00,00,00,00,00,01,00
"ExtendViewIntoTitleBar"=dword:00000001

Also saved nearby is last window position, and splash screen info.


enter image description here

like image 39
UWPGuest Avatar answered Oct 11 '22 21:10

UWPGuest