-
Notifications
You must be signed in to change notification settings - Fork 794
Closed
Labels
area-AOTarea-AppWindowbugSomething isn't workingSomething isn't workingneeds-triageIssue needs to be triaged by the area ownersIssue needs to be triaged by the area owners
Description
Describe the bug
If you try to cast AppWindow.Presenter to OverlappedPresenter the app crashes, if you use "as OverlappedPresenter" it must return null because if you do like
OverlappedPresenter? overlapped = AppWindow.Presenter as OverlappedPresenter;
if (overlapped is not null)
{
overlapped.PreferredMinimumWidth = 1000;
overlapped.PreferredMinimumHeight = 900;
}
these settings won't be applied. I don't know how to/if it's possible to debug code in this mode, so I'm just assuming it returns null. This all works with NativeAOT off and/or debug mode.
Steps to reproduce the bug
Add the code above in a window class, add the AOT property in the project file and try it in both debug and release modes.
Expected behavior
To return an OverlappedPresenter object.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.7.0: 1.7.250310001
Windows version
Windows 11 (24H2): Build 26100
Additional context
No response
bogdan-patraucean
Metadata
Metadata
Assignees
Labels
area-AOTarea-AppWindowbugSomething isn't workingSomething isn't workingneeds-triageIssue needs to be triaged by the area ownersIssue needs to be triaged by the area owners