I used bits and pieces from this answer fooobar.com/questions/890726 / ... to help with the scaling issue. The key here is the ExecWB method. Scaling on the Windows desktop is not 1-1 for zooming in on a web browser. You will have to play with him. The pseudocode for the equation looks like this:
zoomLevel = (winDesktopZoom - 100) + _winDesktopZoom + 10
Note that you will need a link to SHDocVw.dll, which can be found on computers C: \ Windows \ SysWOW64 for x64 and in C: \ Windows \ System32 for x86 machines.
Itโs not very, but itโs the only thing Iโve found that it doesnโt reach http://awesomium.com , which actually matches the IE default settings (which are used by default to scale Windows Desktop) to control the web browser. Also note that Windows Desktop Zoom exists only for Vista, Win 7 and probably 2k8, as well as in Control Panel โ Display, but I have not tested Vista or 2k8. This does not exist for XP (any service pack).
To get Windows Desktop Zoom (for some reason this works on XP), I did:
var presentSource = PresentationSource.FromVisual(this); if (presentSource != null && presentSource.CompositionTarget != null && presentSource.CompositionTarget.TransformToDevice != null) { _zoomPercentage = Convert.ToInt32(100 * presentSource.CompositionTarget.TransformToDevice.M11); }
This logic is placed in the OnSourceInitialized override for this XAML window.
source share