Class FixedDesktopSizeProvider
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
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
windowNativeWindowInfoThe native window; a Handle of
0means the primary monitor.sizeSizeThe desktop resolution in physical pixels, or Empty when unknown.