Last Updated: 24 Mar 2021 13:03 by ADMIN
Martin Ivanov
Created on: 24 Mar 2021 13:03
Category: Window
Type: Bug Report
Window: Wrong size when the window is maximized and the screen resolution is changed

If you open the window on a specific resolution, maximize it and then change the resolution to a bigger one, the window size is not updated. The window stays in the original resolution of the screen.

To work this around subscribe to the SystemEvents.DisplaySettingsChanged event and reset the WindowState of RadWindow.

public MainWindow() // where MainWindow is RadWindow
	SystemEvents.DisplaySettingsChanged += SystemEvents_DisplaySettingsChanged;

private void SystemEvents_DisplaySettingsChanged(object sender, EventArgs e)
	if (this.WindowState == WindowState.Maximized)
		this.WindowState = WindowState.Normal;
		this.WindowState = WindowState.Maximized;