question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to set Window Title in XAML

See original GitHub issue

Describe the bug

In WinUI3preview3, unable to build a project if set the Window Title in XAML.

Steps to reproduce the bug

  1. Create a new Blank App, Packaged (WinUI in Desktop)
  2. 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">
  1. Build the solution
  2. See an exception:

MainWindow.xaml(8,5): XamlCompiler error WMC0612: The XAML Binary Format (XBF) generator reported syntax error '0x09C4' : Property Not Found

  1. 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";
    }
  1. 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:closed
  • Created 3 years ago
  • Reactions:25
  • Comments:44 (17 by maintainers)

github_iconTop GitHub Comments

19reactions
marb2000commented, Oct 11, 2021

Unfortunately, per the latest engineering plan, the bug fix won’t make the v1.0 Stable release (GA) and was moved to v1.1

14reactions
younky-yangcommented, Nov 18, 2021

This is ridiculous as a so basic function doesn’t work on the official version 1.0.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found