wpf - XAML sizes not accurate -
from understanding, wpf allows designer set size of (in case rectangle) , displayed on screen size user. example, square should display on screen 1 inch. see frameworkelement.width property on msdn.
<rectangle width="1 in" height="1 in" fill="{staticresource st}" /> <drawingbrush alignmentx="left" alignmenty="top"> <drawinggroup x:key="snellent"> <drawinggroup.children> <geometrydrawing brush="black" geometry="f1 m0,0 3,0 1.5,1.5 90 0 1 3,3 h2 l2,4 3,4 3,5 0,5 0,4 1,4 1,1 0,1 m5,5 " /> <geometrydrawing brush="black" geometry="f1 m0,0 5,0 5,5 0,5 0,0" /> </....> --close tags
on particular machine (win 7, 24 in monitor, 1920 x 1080 resolution) square larger 1 inch; 1 1/16 inches. (a 3 inch rectangle 3 1/8 inches.) if change resolution on monitor 1o 1280x720, 1 inch rectangle changes 1 9/16 (3 inches 4 5/8).
please explain me why is. understanding wpf kept images @ specified size regardless of monitor size or screen resolution. on correct resolution monitor size sizes off.
wpf respects logical dpi os reports, though might not match actual size of monitor. monitor can choose make bigger or smaller pixels standard of 96 dpi, still report logical 96 dpi compatibility.
what wpf adjusts dpi set in windows, or "make easier read what's on screen" option. 100% 96 dpi, 125% 120 dpi , 150% 144 dpi. should same size no matter of pick, it's monitor how big it's going end being.
Comments
Post a Comment