Class ScreenDetailed
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalScreenDetailed 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.
Constructors
ScreenDetailed()
public ScreenDetailed()
Properties
AvailLeft
NOTE
ExperimentalavailLeft read-only property of theScreenDetailed 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
availLeftproperty is available on theScreeninterface in all browsers. See the Non-standard example below for usage details, and see theScreenreference page for browser support information relating to the non-standard implementation.
AvailTop
NOTE
ExperimentalavailTop read-only property of theScreenDetailed 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
availTopproperty is available on theScreeninterface in all browsers. See the Non-standard example below for usage details, and see theScreenreference page for browser support information relating to the non-standard implementation.
DevicePixelRatio
NOTE
ExperimentaldevicePixelRatio read-only property of theScreenDetailed 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:
IsInternal
NOTE
ExperimentalisInternal read-only property of theScreenDetailed 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 —
trueif the screen is internal, andfalseif it is external.
Remarks
IsPrimary
NOTE
ExperimentalisPrimary read-only property of theScreenDetailed 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 —
trueif the screen is primary, andfalseif 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.
Label
NOTE
Experimentallabel read-only property of theScreenDetailed 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.
Left
NOTE
Experimentalleft read-only property of theScreenDetailed 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
leftproperty is available on theScreeninterface. See the Non-standard example below for usage details, and see theScreenreference page for browser support information relating to the non-standard implementation.
Top
NOTE
Experimentaltop read-only property of theScreenDetailed 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
topproperty is available on theScreeninterface. See the Non-standard example below for usage details, and see theScreenreference page for browser support information relating to the non-standard implementation.