question

ShwetaH-8598 avatar image
0 Votes"
ShwetaH-8598 asked Castorix31 commented

How to set Icon and color for Winui3 Titlebar application?

Hi
i am creating a winui3 application i want these
1.how to add icon to top right corner of title bar window
2.how to remove window title
3.how to change title bar color

windows-app-sdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Castorix31 avatar image
1 Vote"
Castorix31 answered ShwetaH-8598 commented

With ExtendsContentIntoTitleBar + SetTitleBar (on Windows 10, with a Manifest for >=Windows 8 compatibility)
See : Title bar customization

A test (on Windows 10 21H1):

196080-customtitlebar-win10.gif



· 30
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Castorix31
Hi,
Thank you for prompt reply can you please send me the code of this exactly this is what i am looking for it wil be helpful.

0 Votes 0 ·

You can put anything as parameter of SetTitleBar

In my test :

  ExtendsContentIntoTitleBar = true;
  SetTitleBar(AppTitleBar);

XAML : AppTitleBar



0 Votes 0 ·

ExtendsContentIntoTitleBar = true;
SetTitleBar(AppTitleBar);
this line disabling right side buttons like close,maximize and minimize

0 Votes 0 ·
Show more comments

Hi @Castorix31 can we change the titlename dynamically when we navigate to Pages in Winui3?

0 Votes 0 ·

You can just change the title of the Window class (this.Title if you're inside the class)
For example, with a NavigationView and SelectionChanged event :


212401-navigationview-test.gif





0 Votes 0 ·