Table of Contents

Class ScreenDetailed

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The ScreenDetailed interface of the Window Management API represents detailed information about one specific screen available to the user's device.
[Value("ScreenDetailed")]
public class ScreenDetailed : Screen
Inheritance
ScreenDetailed
Inherited Members

Remarks

ScreenDetailed objects can be accessed via the Screens and CurrentScreen properties.

-Window Management API

See also on MDN

Constructors

ScreenDetailed()

public ScreenDetailed()

Properties

AvailLeft

NOTE
Experimental
The availLeft read-only property of the
ScreenDetailed interface is a number representing the x-coordinate (left-hand edge) of the available screen area inside the OS virtual screen arrangement, relative to the multi-screen origin.
[Value("availLeft")]
public long AvailLeft { get; }

Property Value

long

A number.

Remarks

This is equal to the Left property, plus the width of any OS UI element drawn on the left of the screen. Windows cannot be placed in those areas, so availLeft is useful for giving you the left boundary of the actual area available to open or place windows.

NOTE

A non-standard implementation of the availLeft property is available on the Screen interface in all browsers. See the Non-standard example below for usage details, and see the Screen reference page for browser support information relating to the non-standard implementation.

-Window Management API

See also on MDN

AvailTop

NOTE
Experimental
The availTop read-only property of the
ScreenDetailed interface is a number representing the y-coordinate (top edge) of the available screen area inside the OS virtual screen arrangement, relative to the multi-screen origin.
[Value("availTop")]
public long AvailTop { get; }

Property Value

long

A number.

Remarks

This is equal to the Top property, plus the height of any OS UI element drawn at the top of the screen. Windows cannot be placed in those areas, so availTop is useful for giving you the top boundary of the actual area available to open or place windows.

NOTE

A non-standard implementation of the availTop property is available on the Screen interface in all browsers. See the Non-standard example below for usage details, and see the Screen reference page for browser support information relating to the non-standard implementation.

-Window Management API

See also on MDN

DevicePixelRatio

NOTE
Experimental
The devicePixelRatio read-only property of the
ScreenDetailed interface is a number representing the screen's {{glossary("device pixel")}} ratio.
[Value("devicePixelRatio")]
public Number DevicePixelRatio { get; }

Property Value

Number

A number.

Remarks

This is the same as the value returned by DevicePixelRatio, except that Window.devicePixelRatio:

-Window Management API

See also on MDN

IsInternal

NOTE
Experimental
The isInternal read-only property of the
ScreenDetailed interface is a boolean indicating whether the screen is internal to the device or external. External devices are generally manufactured separately from the device they are attached to and can be connected and disconnected as needed, whereas internal screens are part of the device and not intended to be disconnected.
[Value("isInternal")]
public bool IsInternal { get; }

Property Value

bool

A boolean value — true if the screen is internal, and false if it is external.

Remarks

IsPrimary

NOTE
Experimental
The isPrimary read-only property of the
ScreenDetailed interface is a boolean indicating whether the screen is set as the operating system (OS) primary screen or not.
[Value("isPrimary")]
public bool IsPrimary { get; }

Property Value

bool

A boolean value — true if the screen is primary, and false if it is secondary.

Remarks

The OS hosting the browser will have one primary screen, and one or more secondary screens. The primary screen can usually be specified by the user via OS settings, and generally contains OS UI features such as the taskbar/icon dock. The primary screen may change for a number of reasons, such as a screen being unplugged.

-Window Management API

See also on MDN

Label

NOTE
Experimental
The label read-only property of the
ScreenDetailed interface is a string providing a descriptive label for the screen, for example "Built-in Retina Display".
[Value("label")]
public string Label { get; }

Property Value

string

A string.

Remarks

This is useful for constructing a list of options to display to the user if you want them to choose a screen to display content on.

-Window Management API

See also on MDN

Left

NOTE
Experimental
The left read-only property of the
ScreenDetailed interface is a number representing the x-coordinate (left-hand edge) of the total screen area inside the OS virtual screen arrangement, relative to the multi-screen origin.
[Value("left")]
public long Left { get; }

Property Value

long

A number.

Remarks

This is equal to the true left-hand edge, ignoring any OS UI element drawn at the left of the screen. Windows cannot be placed in those areas; to get the left-hand coordinate of the screen area that windows can be placed in, use AvailLeft.

NOTE

In Firefox, a non-standard implementation of the left property is available on the Screen interface. See the Non-standard example below for usage details, and see the Screen reference page for browser support information relating to the non-standard implementation.

-Window Management API

See also on MDN

Top

NOTE
Experimental
The top read-only property of the
ScreenDetailed interface is a number representing the y-coordinate (top edge) of the total screen area inside the OS virtual screen arrangement, relative to the multi-screen origin.
[Value("top")]
public long Top { get; }

Property Value

long

A number.

Remarks

This is equal to the true top edge, ignoring any OS UI element drawn at the top of the screen. Windows cannot be placed in those areas; to get the top coordinate of the screen area that windows can be placed in, use AvailTop.

NOTE

In Firefox, a non-standard implementation of the top property is available on the Screen interface. See the Non-standard example below for usage details, and see the Screen reference page for browser support information relating to the non-standard implementation.

-Window Management API

See also on MDN