WPF High Resolution Issues

I created a simple WPF test program for a web browser with images and text in the canvas, with windows set to 96 dpi.

Then I switched to 120 dpi and: - (((The display is dirty, the image is resized, and part of the canvas is missing ...

When I used Winforms, I set the AutoScaleMode property to None, and the windows retain their size, and controls that have an inherited font are not blurry and not too large ...

What can I do to simulate this (good) behavior in W¨F?

+3
source share
3 answers

, "- WPF... application". WPF -, XBAP. Silverlight? WPF, ? .

WPF DPI. : , , , WPF . WinForms- ", DPI , , ", WPF; , , , , , .

WPF , , " ", . , , , 96dpi, 120dpi 144dpi. , - , , .

, , , DPI, . , DPI. , , .

, - . () (BMP/GIF/JPG/PNG) - , - , , . , . , - , , 16x16 ( 96 ), 32x32 , XAML Image Width = "16" Height = "16", , . 20x20 120dpi 24x24 144dpi, 32x32- , 16x16, , ( WPF, , , .)

- . , . , , , , , .

+1

, (px). , WPF. .

+1

MaxHeight WPF .NET 4, , StaticResource, DPI, . MaxHeight Height, DPI. , .NET 4 (, , ).

+1

All Articles