Skip to content
Andrew edited this page Apr 12, 2022 · 2 revisions

WPFScreenHelper

The main purpose of this library is to eliminate the dependency on Windows Forms libraries when developing in WPF. There is also an extension of methods to make it convenient to work with multiple monitor setups and dpi awareness in mind.

What's new

  • WpfBounds and WpfWorkingArea - same as original properties but returns values in unints instead of pixels.
  • ScaleFactor - property for each monitor that shows the current scale (dpi / 96.0)
  • Helper functions in WindowHelper to set window position\get window placement with respect of dpi

Examples

Look at WpfScreenHelper.DpiTestWpfApp test project to get idea how to play around WindowHelper class; everything else should be intuitive to use.

Clone this wiki locally