Completed
Last Updated: 21 May 2021 10:19 by ADMIN
Release LIB 2021.2.525 (25/05/2021)
Martin Ivanov
Created on: 24 Mar 2021 13:03
Category: Window
Type: Bug Report
1
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
{
	InitializeComponent();
	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;
	}
}

0 comments