Screen Class
Definition
Represents a single display screen.
public class Screen
Methods
| Name | Description |
|---|---|
| Equals (2 overloads) | No summary available. |
| GetHashCode | No summary available. |
| ToString | No summary available. |
| TryGetPlatformHandle | Tries to get the platform handle for the Screen. |
Equals overloads
Equals Method
public bool Equals(Avalonia.Platform.Screen other)
Parameters
other Avalonia.Platform.Screen
Returns
bool
Equals Method
public bool Equals(object obj)
Parameters
obj object
Returns
bool
GetHashCode Method
public int GetHashCode()
Returns
int
ToString Method
public string ToString()
Returns
string
TryGetPlatformHandle Method
Tries to get the platform handle for the Screen.
public Avalonia.Platform.IPlatformHandle TryGetPlatformHandle()
Returns
Avalonia.Platform.IPlatformHandle
An Avalonia.Platform.IPlatformHandle describing the screen handle, or null if the handle could not be retrieved.
Properties
| Name | Description |
|---|---|
| Bounds | Gets the overall pixel-size and position of the screen. |
| CurrentOrientation | Gets the current orientation of a screen. |
| DisplayName | Gets the device name associated with a display. |
| IsPrimary | Gets a value indicating whether the screen is the primary one. |
| Scaling | Gets the scaling factor applied to the screen by the operating system. |
| WorkingArea | Gets the actual working-area pixel-size of the screen. |
Bounds Property
Gets the overall pixel-size and position of the screen.
public Avalonia.PixelRect Bounds { get; set; }
Remarks
This generally is the raw pixel counts in both the X and Y direction.
CurrentOrientation Property
Gets the current orientation of a screen.
public Avalonia.Platform.ScreenOrientation CurrentOrientation { get; set; }
DisplayName Property
Gets the device name associated with a display.
public string DisplayName { get; set; }
IsPrimary Property
Gets a value indicating whether the screen is the primary one.
public bool IsPrimary { get; set; }
Scaling Property
Gets the scaling factor applied to the screen by the operating system.
public double Scaling { get; set; }
Remarks
Multiply this value by 100 to get a percentage. Both X and Y scaling factors are assumed uniform.
WorkingArea Property
Gets the actual working-area pixel-size of the screen.
public Avalonia.PixelRect WorkingArea { get; set; }
Remarks
This area may be smaller than Bounds to account for notches and other block-out areas such as taskbars etc.