RSS

Writing WinForms code that scales to High DPI

23 Jun

In this post, I will try to collate different guidelines and pointers to readings that can help in building/fixing High DPI (HDPI) issues in WinForms

1. Automatic Scaling in Windows Forms

2. Creating a DPI aware application (MSDN documentation)

3. This post on SO has a documentation of some of the design guidelines – How to write WinForms code that auto-scales to system font and dpi settings? and this Creating a DPI-Aware Application

4. Take care of properly scaling Images – Make use of DpiHelper Class. For example, make use of LogicalToDeviceUnits to scale images properly for different DPIs

5. Try avoiding using the Designer. Use the built-in layout controls – specifically, the FlowLaypoutPanel and TableLayoutPanel

Most of the above points were helpful to me and should cover the most important things to keep in mind while working on HDPI. If you are starting fresh, you have various option like using WPF and building new Modern style UI on Windows 8 machines for which the framework handles the major things for you. 

Advertisements
 
Leave a comment

Posted by on June 23, 2014 in Uncategorized

 

Tags: ,

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: