lepoco / wpfui

WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
https://wpfui.lepo.co
MIT License
7.72k stars 755 forks source link

Exeption thrown when ExtendsContentIntoTitleBar="True" WindowBackdropType="Mica" is added to UI:Window #531

Open Randle-Lanre opened 1 year ago

Randle-Lanre commented 1 year ago

Describe the bug

Managed Debugging Assistant 'PInvokeStackImbalance' : 'A call to PInvoke function 'Wpf.Ui!Wpf.Ui.Interop.User32::SetWindowLong' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature

To Reproduce

  1. Create a Wpf project in .net 4.8
  2. add WPFUI nuget package
  3. Change mainWindow to ui:UIwindow
  4. Change mainwindow code behind to inherit from INaviagtionWindow
  5. add ThemesDictionary and Controls Dictionary to Resource dictionary
  6. add ExtendsContentIntoTitleBar="True" to Mainwindow
  7. WindowBackdropType="Mica" to Mainwindow
  8. Dubug the application

Expected behavior

Unbalanced stack exception shouldn't be thrown

Screenshots

No response

OS version

Windows 11 and Windows 10

.NET version

4.8

WPF-UI NuGet version

2.0.3

Additional context

No response

HugoMskn commented 1 year ago

Untick this and it works just fine :) image

Jay-o-Way commented 5 months ago

Is this still an issue with the latest version?