Screen Class

The screen of the output device (https://drafts.csswg.org/cssom-view/#the-screen-interface): the size of the viewport of the top-level browsing context (see ViewportOptions), or 0 when the window has no browsing context.

public sealed class Screen

Properties

NameDescription
AvailHeightGets the available height of the screen (https://drafts.csswg.org/cssom-view/#dom-screen-availheight): the height of the screen.
AvailWidthGets the available width of the screen (https://drafts.csswg.org/cssom-view/#dom-screen-availwidth): the width of the screen.
ColorDepthGets the number of bits used to represent the colors (https://drafts.csswg.org/cssom-view/#dom-screen-colordepth): 24, as recommended when it is unknown.
HeightGets the height of the screen in CSS pixels (https://drafts.csswg.org/cssom-view/#dom-screen-height).
OrientationGets the orientation of the screen (https://w3c.github.io/screen-orientation/#extensions-to-the-screen-interface).
PixelDepthGets the number of bits used to represent the colors (https://drafts.csswg.org/cssom-view/#dom-screen-pixeldepth): Screen.ColorDepth.
WidthGets the width of the screen in CSS pixels (https://drafts.csswg.org/cssom-view/#dom-screen-width).

AvailHeight

CssomView.cs

Gets the available height of the screen (https://drafts.csswg.org/cssom-view/#dom-screen-availheight): the height of the screen.

public int AvailHeight { get; }

AvailWidth

CssomView.cs

Gets the available width of the screen (https://drafts.csswg.org/cssom-view/#dom-screen-availwidth): the width of the screen.

public int AvailWidth { get; }

ColorDepth

CssomView.cs

Gets the number of bits used to represent the colors (https://drafts.csswg.org/cssom-view/#dom-screen-colordepth): 24, as recommended when it is unknown.

public uint ColorDepth { get; }

Gets the height of the screen in CSS pixels (https://drafts.csswg.org/cssom-view/#dom-screen-height).

public int Height { get; }

Gets the orientation of the screen (https://w3c.github.io/screen-orientation/#extensions-to-the-screen-interface).

public ScreenOrientation Orientation { get; }

PixelDepth

CssomView.cs

Gets the number of bits used to represent the colors (https://drafts.csswg.org/cssom-view/#dom-screen-pixeldepth): Screen.ColorDepth.

public uint PixelDepth { get; }

Gets the width of the screen in CSS pixels (https://drafts.csswg.org/cssom-view/#dom-screen-width).

public int Width { get; }