Skip to content

[BUG] Window has no border and no drop shadow #5798

Open

Description

@CherryDT

Please confirm these before moving forward

  • I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
  • I have tested that this issue has not been fixed in the latest (beta or stable) release.
  • I have checked the FAQ section for solutions.
  • This issue is about a bug (if it is not, please use the correct template).

UniGetUI Version

2026.3.4

Windows version, edition, and architecture

WIndows 11 Pro 10.0.26300.9974 x64

Describe your issue

I originally wrote this as comment in #5725 but I assume it will not get noticed because the issue is already closed and I don't have permissions to reopen it, so I will instead hereby create a new issue.


Thanks, the corner fix works in 2026.3.4, but the border and shadow were still missing, see this screenshot where it looks almost indistinguishable from ChatGPT in the background:

image

Then I tested a change directly against the running UniGetUI window: calling DwmExtendFrameIntoClientArea with one physical pixel on all four sides immediately restored both the native accent-colored border and the drop shadow, while preserving the square corners and custom title bar!

image

The exact successful call was equivalent to:

MARGINS margins = {1, 1, 1, 1};
HRESULT hr = DwmExtendFrameIntoClientArea(hwnd, &margins);
// Returned S_OK.

No window-style changes or additional WM_NCACTIVATE handling were needed for this result.

Could you incorporate this frame extension after Avalonia initializes the native window? Since the existing WM_NCCALCSIZE handler makes the entire window client area, forwarding WM_NCPAINT alone appears insufficient - the DWM frame also needs to be extended into that area.

Please also check whether Avalonia resets the margins during maximize/restore or other window-state changes, and reapply them where needed. I verified the immediate live result; those lifecycle transitions still need verification.

Microsoft’s documentation for DwmExtendFrameIntoClientArea

Activity

  1. changed the title [-][BUG] (Enter your description here)[/-] [+][BUG] Window has no border and no drop shadow[/+] on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appearancebugSomething isn't workingpriority: lowCosmetic issue, edge case, or nice-to-have

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions