【发布时间】:2020-03-18 20:57:41
【问题描述】:
我通常使用两台显示器和两种不同的分辨率。 1366x768 和 1920x1080。 我的问题是我的 WPF 应用程序在 1366x768 显示器上运行时不适合分辨率最高的显示器。 我找到了不同的解决方案,但没有一个对我有用。 我的最后一次尝试是:
Screen actualScreen = Screen.FromHandle(new WindowInteropHelper(App.Current.MainWindow).Handle);
App.Current.MainWindow.Height = actualScreen.Bounds.Height;
App.Current.MainWindow.Width = actualScreen.Bounds.Width;
有什么想法吗?
【问题讨论】:
标签: c# wpf screen-resolution