DynaPDF Manual - Page 27

Previous Page 26   Index   Next Page 28

Language Bindings
Page 27 of 821
The above settings are for Windows Forms Apps. Note that this is how it works today,
tomorrow you must maybe change other settings.
WPF and UWP apps come out of the box with high dpi support but using native code for UI
elements in WPF or UWP is difficult and not recommended. WPF and UWP apps function more
or less like a web site. When speed is no concern it is better use pure .Net code in these
environments.
Scrolling issues on high dpi devices
Scrolling issues are one of the major issues on high dpi devices. Almost every application scrolls
differently on Windows 10. Some scroll way to fast, others scroll too slow, and again others are
stuttering or have weird scroll behavior.
To make it even more complicated, every Windows 10 version has its own scroll issues. One of
the reasons why scrolling is so painful on Windows 10 is probably the lack of documentation.
No one really knows how scrolling can be implemented in a manner that works on low and
high dpi devices. The result is what we see today: almost all major web browsers use smooth
scrolling with different scroll speeds which are more or less useful, while normal applications
use arbitrary scroll techniques with a wide range of issues.
So, how to correctly implement device independent scrolling? I'm really sorry but I don't have
an answer.
I think the best way to avoid scrolling issues is to get users a chance to adjust the scrolling speed
in your application since the settings of the system are not helpful anymore.
If you use the rendering control of DynaPDF or the page cache then you can adjust the scroll
line delta with SetScrollLineDelta(). The example code of the viewer example tries to set this
value resolution independent as possible but it is usually best when the user has the ability to
change the value. Smooth scrolling is not yet supported.
Static contents in dpi aware applications
Something that must be considered when turning on high dpi support is that static contents like
the application icon or cursors must be delivered in different sizes since no scaling occurs.
Especially cursors are critical because an unscaled cursor made for Windows 7, for example,
becomes very small. Microsoft recommends to add at least icons and cursors for the resolutions
96, 120, 144, and 196 DPI for desktop apps. You'll find many tools in the internet which help to
create icons and curors in different sizes.
 

Previous topic: DPI Aware .Net applications, Enabling High DPI support in Windows Forms Apps

Next topic: Language bindings, Differences between DynaPDF interfaces