Skip to content

Bug: WinUI TitleBar - Resize behavior broken if TitleBar.IconSource is set #10374

@marcofranzen99

Description

@marcofranzen99

Describe the bug

If you set the TitleBar.IconSource, the window resizing does not work properly.
The window cannot be resized correctly from the top edge of the window. The content at the bottom is cut off when the window is dragged smaller and a black bar appears at the bottom when the window is dragged larger.

Steps to reproduce the bug

  1. Use Custom Title Bar as described here and set IconSource to a SymbolIconSource, for example. But this can also be reproduced with ImageIconSource.
<TitleBar.IconSource>
    <SymbolIconSource Symbol="Home" />
</TitleBar.IconSource>
  1. Drag the window larger from the top edge
  2. See that there is a black border at the bottom

Expected behavior

The resizing works in the same way as without the custom TitleBar or without the TitleBar.IconSource

Screenshots

devenv_JlpxMIcfBf.mp4

NuGet package version

WinUI 3 - Windows App SDK 1.7 Preview 1: 1.7.250208002-preview1

Windows version

Windows 11 (24H2): Build 26100

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-TitleBarIssues related to custom window title bars.bugSomething isn't workingfix-releasedThe fix has been in a release (experimental, preview, stable, or servicing).

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions