We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
You cannot set the background color of a TitleBar by setting its Background property or setting AppWindow.TitleBar.BackgroundColor
<WindowsSdkPackageVersion>10.0.19041.35-preview</WindowsSdkPackageVersion>
Add this code in MainWindow.xaml.cs
public MainWindow() { this.InitializeComponent(); ExtendsContentIntoTitleBar = true; AppWindow.TitleBar.BackgroundColor = Colors.Red; }
Add this code to MainWindow.xaml:
<Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <TitleBar Title="Title" Subtitle="SubTitle" IsBackButtonVisible="True" IsPaneToggleButtonVisible="True" Background="Red"> <TitleBar.IconSource> <FontIconSource Glyph="" /> </TitleBar.IconSource> </TitleBar> <Grid Grid.Row="1" Background="Aqua"> </Grid> </Grid>
Run the project. Although the TitleBar background is set in two places, the background is still transparent
The workaround to this to add a control below the title bar with the background
This project has a sample of the bug https://github.com/brunosonnino/TitleBarBugs/tree/main/3%20-%20TitleBarBackground
The title bar should change colors
WinUI 3 - Windows App SDK 1.6 Experimental 2: 1.6.240701003-experimental2
Windows 11 (22H2): Build 22621
No response
The text was updated successfully, but these errors were encountered:
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
You cannot set the background color of a TitleBar by setting its Background property or setting AppWindow.TitleBar.BackgroundColor
Steps to reproduce the bug
Add this code in MainWindow.xaml.cs
Add this code to MainWindow.xaml:
Run the project. Although the TitleBar background is set in two places, the background is still transparent
The workaround to this to add a control below the title bar with the background
This project has a sample of the bug https://github.com/brunosonnino/TitleBarBugs/tree/main/3%20-%20TitleBarBackground
Expected behavior
The title bar should change colors
Screenshots
NuGet package version
WinUI 3 - Windows App SDK 1.6 Experimental 2: 1.6.240701003-experimental2
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response
The text was updated successfully, but these errors were encountered: