Skip to content

titlebar customization and AppWindowPresenterKind.FullScreen crashes winforms app #10451

@ivanjx

Description

@ivanjx

Describe the bug

when trying to enter full screen using the API, i keep experiencing crash on my packaged winforms app (with windowsappsdk nuget installed).

other modes such as Default, CompactOverlay, etc work just fine.

Steps to reproduce the bug

  1. create winforms app
  2. setup to use windows app sdk
  3. create msix installer project and reference the winforms app
  4. create a button
// in the form.
    AppWindow GetAppWindow()
    {
        return AppWindow.GetFromWindowId(
            Win32Interop.GetWindowIdFromWindow(this.Handle));
    }

// in the button.
GetAppWindow().SetPresenter(AppWindowPresenterKind.FullScreen);

Expected behavior

no crash

Screenshots

No response

NuGet package version

Windows App SDK 1.6.6: 1.6.250228001

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 24H2 (22621, October 2024 Update)

IDE

Visual Studio 2022

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions