Skip to content

Accidentally unusable on WinUI platform #271

Description

@ShimizuTheLotus

Describe the bug

H.NotifyIcon.TaskbarIcon throw exception at

#if !HAS_UNO
        var id = Win32Interop.GetWindowIdFromWindow(handle);
        var appWindow = AppWindow.GetFromWindowId(id);
        appWindow.IsShownInSwitchers = false;

        var presenter = (OverlappedPresenter)appWindow.Presenter;
        presenter.IsMaximizable = false;
        presenter.IsMinimizable = false;
        presenter.IsResizable = false;
        presenter.IsAlwaysOnTop = true;
     >>>presenter.SetBorderAndTitleBar(false, false);<<<
#endif

with exception Exception thrown at 0x00007FFEF9421ADA in WorkspaceExpander.exe: Microsoft C++ exception: wil::ResultException at memory location 0x000000A19E377120.

Steps to reproduce the bug

I'm not sure. I restored the NuGet packages, tried to run my program on x86 presets. It was just not workable on x86 presets at first. After I restore NuGet packages, both x64 and x86 presets are unusable.

Expected behavior

Program runable

Screenshots

NuGet package version

2.4.1

Platform

WinUI

IDE

Visual Studio 2026

Windows Version

Windows 11

WindowsAppSDK Version

2.3.1

WindowsAppSDK Type

Packaged

Manifest

Package.appxmanifest

Additional context

No response

Activity

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions