public static void ConfigureChildWindow(WindowBase window) { var model = FullscreenApplication.Current?.MainModel; if (model != null) { window.Width = model.WindowWidth; window.Height = model.WindowHeight; if (window.FindName("GridMain") is Grid mainGrid) { mainGrid.Width = model.ViewportWidth; } } }