Unable to set Window Title in XAML
See original GitHub issueDescribe the bug
In WinUI3preview3, unable to build a project if set the Window Title in XAML.
Steps to reproduce the bug
- Create a new
Blank App, Packaged (WinUI in Desktop)
- Change the content of
MainWindow.xaml
to add the following on line 8
<Window
x:Class="App68.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App68"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="my app"
mc:Ignorable="d">
- Build the solution
- See an exception:
MainWindow.xaml(8,5): XamlCompiler error WMC0612: The XAML Binary Format (XBF) generator reported syntax error '0x09C4' : Property Not Found
- Remove the change in the XAML file and set the window Title in the constructor. e.g.:
public MainWindow()
{
this.InitializeComponent();
this.Title = "my app";
}
- Run the app and see the title displayed correctly.
Expected behavior
It should be possible to set the Window Title in XAML.
Screenshots
Version Info
NuGet package version: Microsoft.WinUI 3.0.0-preview3.201113.0
Windows app type:
UWP | Win32 |
---|---|
Yes |
Windows 10 version | Saw the problem? |
---|---|
Insider Build (xxxxx) | |
May 2020 Update (19041) | Yes |
November 2019 Update (18363) | |
May 2019 Update (18362) | |
October 2018 Update (17763) | |
April 2018 Update (17134) | |
Fall Creators Update (16299) | |
Creators Update (15063) |
Device form factor | Saw the problem? |
---|---|
Desktop | Yes |
Xbox | |
Surface Hub | |
IoT |
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Reactions:25
- Comments:44 (17 by maintainers)
Top Results From Across the Web
WPF window title doesn't change from xaml
In Caliburn.Micro, you should set the DisplayName property of the Conductor to change the window title:
Read more >Title bar customization - Windows apps
In a XAML app, this property can be set in your app's OnLaunched method (App.xaml.cs), or in your app's first page. Tip. See...
Read more >Wpf Title bar - Microsoft Q&A
Hey! So I want to change the color of the WPF title bar(where the x and the other buttons are) but I came...
Read more >Unable to Access WPF Window Title by Class
Hi, I am trying to access WPF window title by its class id which i found from Au3Info.exe but it retunrs 0 but...
Read more >Binding to the Window Title in UWP - Nico's Digital Footprint
We can set a title but we can't bind to it, since the title property cannot be accessed in XAML. The default way...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Unfortunately, per the latest engineering plan, the bug fix won’t make the v1.0 Stable release (GA) and was moved to v1.1
This is ridiculous as a so basic function doesn’t work on the official version 1.0.