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.

Preview 4 SetTitleBar- standard max, min and close buttons not selectable

See original GitHub issue

Describe the bug With a custom titlebar set in a preview 4 Desktop app the standard minimize, maximize and close buttons are visible but not actually selectable. Window is draggable via the custom titlebar as expected.

Steps to reproduce the bug Steps to reproduce the behavior:

  1. Create a WinUI 3 desktop app based upon preview 4
  2. Define a UIElement for the custom titlebar.
    <Grid x:Name="AppTitleBar" Grid.Row="0" Background="Transparent" Visibility="Collapsed"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition/> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Image Source="Images/hpe-eaas-logo-transparent.png" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Width="20" Height="20" Margin="5,0"/> <TextBlock Text="EaaS Q2C Platform" Foreground="White" Grid.Column="1" VerticalAlignment="Center" Style="{StaticResource CaptionTextBlockStyle}" Margin="31,0,0,0"/> <Image Source="Images/hpe-element.png" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Height="20"/> </Grid>
  3. Use the required extend and set methods: ExtendsContentIntoTitleBar = true; SetTitleBar(AppTitleBar);

Expected behavior Standard buttons are both visible and selectable.

Screenshots image

Version Info Microsoft.WinUI v3.0.0-preview4.210210.4 Win 10 version 20H2

Device form factor Saw the problem?
Desktop

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
RythenGlythcommented, Mar 22, 2021

If someone still has this error you can fix it for now (until it will eventually work) by adding IsHitTestVisible="False" to the Custom Title bar in your case AppTitleBar

2reactions
marb2000commented, Mar 4, 2021

Reopening per internal conversation. This is a bug that should be fixed. @pratikone I’m assigning this to you given you are working on it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Title bar customization - Windows apps
Windows provides a default title bar for every window and lets you to ... Close, Minimize, and Maximize buttons) are still available and ......
Read more >
UWP start application fullscreen and don't show minimize ...
Current.SetTitleBar(null); has no effect. It just resets the title bar back to default in case you had set a custom element as title...
Read more >
Minimize, Restore Down and Close buttons not showing in ...
Hi, Is anyone else having this issue. While in print preview the report Minimize, Restore Down and Close buttons disappear.
Read more >
Minimize, Maximize and Close Buttons Missing From Google ...
Close, Minimize, Maximize buttons not working – In some cases, Close, ... This tutorial will apply for computers, laptops, desktops, ...
Read more >
Hide Excel Title bar, maximize, minimize, close buttons
successfully to hide the Title Bar (min, max, close, menu buttons) in Excel 2013/2016 running Win 7/Win 10 and it has been working...
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