dotnetmonitor.com |
|
|||||||||||||||||
| AutoScale refers in general to recalculating
sizes and positions for controls without reliance on an outer layout container
or engine doing the calculation. This is done for environment changes like
font, DPI etc.
For Everett the default code spit was :
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
AutoScaleBase size attempts to store the size of the font rendered at the DPI of the machine. As is clearly apparent the Size type only stores integer values, from here the problem of conversion accuracy stems. After repeated changes, rounding errors can introduce noticable and at times, unacceptable loss of accuracy.
For Whidbey, the default code spit is now
this.AutoScaleDimensions = new System.Drawing.SizeF(6.0F, 13.0F);
We now store the dimensions of the font in a SizeF which leads to much greater accuracy. In addition we offer three AutoScaleModes.
Interestingly, both of these autoscale approaches coexist. The two members controlling these two systems are below
n/a means that that property combination is not achievable. Property sets on one side set the property on the other. For AutoScale set to False, AutoScaleMode will be set to Font |
|||||||||||||||||
|
|||||||||||||||||