ScreenCharactersHeight Property

Returns the approximate height of the display, in character lines. The default value is 6.

public virtual int ScreenCharactersHeight {
   get
}

Remarks

This value can be derived from the assumed character size and actual screen pixel size. The algorithm for determining the height uses a combination of the default sizes (from the .config file), device-specific sizes (again, in the .config file) and explicit headers sent by the devices. These values are not necessarily exact (that is, for height, especially for variable-width fonts, these values are approximate). Some devices might rely on internal default values.

This value is calculated using the following algorithm.

if this["screenCharactersHeight"] is not null, 
   then return this["screenCharactersHeight"]; 
else, if this["screenPixelsHeight'] is not null and this["characterHeight"] is not null, 
   then return this["screenPixelsHeight"]/ this["characterHeight"]; 
else, if this["screenPixelsHeight"] is not null, 
   then return this["screenPixelsHeight"]/this["defaultCharacterHeight"]; 
else, if this["characterHeight"] is not null, 
   then return this["defaultScreenPixelsHeight"]/this["characterHeight"]; 
else, return this["defaultScreenCharactersHeight"].

Note   You cannot rely on the following statement.

   this.ScreenCharactersHeight == this["screenCharactersHeight"]

See Also

Applies to: MobileCapabilities Class