Table of Contents

Class FixedDesktopSizeProvider

Namespace
Icy.Rendering.Display
Assembly
IcyUI.dll

An IDesktopSizeProvider that always reports the same size, or always reports it as unknown.

public sealed class FixedDesktopSizeProvider : IDesktopSizeProvider
Inheritance
FixedDesktopSizeProvider
Implements
Inherited Members
Extension Methods

Remarks

Used as the fallback on platforms without a dedicated provider (see GetProvider()), and useful for tests or for forcing a size.

Constructors

FixedDesktopSizeProvider(Size?)

Initializes a new instance of the FixedDesktopSizeProvider class.

public FixedDesktopSizeProvider(Size? size = null)

Parameters

size Size?

The size to report, or null (the default) to always report the size as unknown.

Methods

TryGetDesktopSize(in NativeWindowInfo, out Size)

Tries to get the desktop resolution of the monitor window is on.

public bool TryGetDesktopSize(in NativeWindowInfo window, out Size size)

Parameters

window NativeWindowInfo

The native window; a Handle of 0 means the primary monitor.

size Size

The desktop resolution in physical pixels, or Empty when unknown.

Returns

bool

true if the size is known; otherwise false. Implementations must not throw.