For a Print Support App (or any WinUI 3 / Windows App SDK window) the resize behavior is controlled via the windowing APIs, not via the printer preferences entry point itself.
To restrict user resizing, use the AppWindowPresenter (typically OverlappedPresenter) associated with the app’s AppWindow:
- Get the
AppWindow for the current window.
- Cast its
Presenter to OverlappedPresenter.
- Configure the presenter:
- Set
IsResizable to false to prevent user resizing.
- Optionally set
PreferredMinimumWidth/Height and PreferredMaximumWidth/Height to constrain the size range.
Example (C# / Windows App SDK):
using Microsoft.UI.Windowing;
using Microsoft.UI.Xaml;
public sealed partial class MainWindow : Window
{
public MainWindow()
{
this.InitializeComponent();
var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
var windowId = Win32Interop.GetWindowIdFromWindow(hwnd);
var appWindow = AppWindow.GetFromWindowId(windowId);
if (appWindow.Presenter is OverlappedPresenter presenter)
{
presenter.IsResizable = false; // disable user resize
// Optional: constrain size if needed
presenter.PreferredMinimumWidth = 400;
presenter.PreferredMinimumHeight = 300;
presenter.PreferredMaximumWidth = 400;
presenter.PreferredMaximumHeight = 300;
}
}
}
Notes based on the platform behavior:
-
IsResizable = false hides the resize controls and prevents user resizing, but does not block programmatic calls to AppWindow.Resize.
-
PreferredMinimumHeight/Width and PreferredMaximumHeight/Width constrain both user resizing and AppWindow.Resize calls; the window cannot be resized outside that range.
- If a fixed-size dialog is desired, set min and max to the same values and keep
IsMaximizable false.
This approach lets the Print Support App’s printing-preferences window behave like a fixed-size dialog when invoked from printer properties.
References: