Skip to content

ViewPortOptions

Namespace: PuppeteerSharp

public record ViewPortOptions : IEquatable<ViewPortOptions>

View port options used on SetViewportAsync(ViewPortOptions).

Inheritance: object

Implements: IEquatable<ViewPortOptions>

View source

public static ViewPortOptions Default { get; }

Default Viewport.

Value: ViewPortOptions

View source

public double DeviceScaleFactor { get; set; }

Gets or sets the device scale factor.

Value: double — Specify device scale factor (can be thought of as dpr). Defaults to 1.

View source

public bool HasTouch { get; set; }

Gets or sets if viewport supports touch events.

Value: bool — Specifies if viewport supports touch events. Defaults to false.

View source

public int Height { get; set; }

Gets or sets the height.

Value: int — The page height in pixels.

View source

public bool IsLandscape { get; set; }

Gets or sets if viewport is in landscape mode.

Value: bool — Specifies if viewport is in landscape mode. Defaults to false.

View source

public bool IsMobile { get; set; }

Gets or sets whether the meta viewport tag is taken into account.

Value: bool — Whether the meta viewport tag is taken into account. Defaults to false.

View source

public int Width { get; set; }

Gets or sets the width.

Value: int — The page width in pixels.

View source

Made with love by Dario Kondratiuk