Open Isopod opened 3 years ago
Possibly related to #3307
Can confirm as well:
Is there any sort of crazy workaround we could do for this? Something to cause the shadow to recalculate it's size? This is also evident for the Terminal if you do About, close it, resize the window, then do About again
Have you tried calling UpdateLayout upon window resizing @zadjii-msft ?
Have you tried calling UpdateLayout upon window resizing @zadjii-msft ?
Unfortunately, yea. I tried adding a MyContentDialog().UpdateLayout()
call inside our Page
's SizeChanged
event, but unfortunately that doesn't seem to resize the SmokeLayerBackground
of the ContentDialog
. Something about PrepareSmokeLayer
not getting called during a resize?
Also tracked internally at MSFT:35583503
Seems that passing WM_SIZE
to the underlying CoreWindow
works.
#include <corewindow.h>
#include <winrt/Windows.UI.Core.h>
using namespace winrt::Windows::UI::Core;
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_SIZE:
{
HWND coreWindowInterop;
CoreWindow::GetForCurrentThread().as<ICoreWindowInterop>()->get_WindowHandle(&coreWindowInterop);
PostMessage(coreWindowInterop, message, wParam, lParam);
break;
}
}
}
Can confirm this solves the problem.
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This is still an issue. No one should need to rely on that janky workaround.
I think they aren't going to spend a lot of effort fixing this since XAML Islands v2 (for WinUI 3) is around the corner.
The dialog backdrop stays at its initial size even when the island window is resized while the dialog is open.
Steps to reproduce the bug
Expected behavior The backdrop should always cover the entire area.
Screenshots Video: https://imgur.com/a/AU93vh4
I hope it's clear what the problem is. I added some colored rectangles on the sides, because otherwise the backdrop is the same color as the window and you can't see it.
Version Info Windows Kit 10.0.18362.0