DisplayFeature Class

A display feature of the screen (https://drafts.csswg.org/css-viewport/#display-feature-override), such as the fold of a foldable device or the hinge between two screens, which splits the viewport in segments.

public sealed class DisplayFeature : IEquatable<DisplayFeature>
Implements

Constructors

NameDescription
DisplayFeature(DisplayFeatureOrientation, double, double)A display feature of the screen (https://drafts.csswg.org/css-viewport/#display-feature-override), such as the fold of a foldable device or the hinge between two screens, which splits the viewport in segments.

DisplayFeature(DisplayFeatureOrientation, double, double)

ViewportSegments.cs

A display feature of the screen (https://drafts.csswg.org/css-viewport/#display-feature-override), such as the fold of a foldable device or the hinge between two screens, which splits the viewport in segments.

public DisplayFeature(DisplayFeatureOrientation Orientation, double Offset, double MaskLength)

Parameters

Orientation DisplayFeatureOrientation
The orientation of the feature.
Offset double
The distance in CSS pixels from the left edge (vertical feature) or the top edge (horizontal feature) of the viewport.
MaskLength double
The width (vertical feature) or the height (horizontal feature) of the feature in CSS pixels: the area that the viewport does not display.

Properties

NameDescription
MaskLengthThe width (vertical feature) or the height (horizontal feature) of the feature in CSS pixels: the area that the viewport does not display.
OffsetThe distance in CSS pixels from the left edge (vertical feature) or the top edge (horizontal feature) of the viewport.
OrientationThe orientation of the feature.

The width (vertical feature) or the height (horizontal feature) of the feature in CSS pixels: the area that the viewport does not display.

public double MaskLength { get; init; }

Property value

double

The distance in CSS pixels from the left edge (vertical feature) or the top edge (horizontal feature) of the viewport.

public double Offset { get; init; }

Property value

double

The orientation of the feature.

public DisplayFeatureOrientation Orientation { get; init; }

Methods

NameDescription
Deconstruct(DisplayFeatureOrientation, double, double)
Equals(DisplayFeature?)
Equals(object?)
GetHashCode()
ToString()

Deconstruct(DisplayFeatureOrientation, double, double)

public void Deconstruct(out DisplayFeatureOrientation Orientation, out double Offset, out double MaskLength)

Parameters

Orientation DisplayFeatureOrientation
Offset double
MaskLength double

No documentation is available.

Equals overloads

Equals(DisplayFeature?)

public bool Equals(DisplayFeature? other)
Parameters
other DisplayFeature?
Returns

bool

No documentation is available.

Equals(object?)

public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(DisplayFeature?, DisplayFeature?)
operator !=(DisplayFeature?, DisplayFeature?)

operator ==(DisplayFeature?, DisplayFeature?)

public static bool operator ==(DisplayFeature? left, DisplayFeature? right)

Parameters

left DisplayFeature?
right DisplayFeature?

Returns

bool

No documentation is available.

operator !=(DisplayFeature?, DisplayFeature?)

public static bool operator !=(DisplayFeature? left, DisplayFeature? right)

Parameters

left DisplayFeature?
right DisplayFeature?

Returns

bool

No documentation is available.