Skip to the content.

PromptPlus API:Style

Build Publish License NuGet Downloads

Back to List Api

Style

Namespace: PPlus

Represents the Style : Colors and overflow strategy.

public struct Style

Inheritance ObjectValueTypeStyle
Implements IEquatable<Style>

Properties

Background

Gets the background color.

public Color Background { get; }

Property Value

Color

Default

Gets a Style with the default colors and overflow.None

public static Style Default { get; }

Property Value

Style

Foreground

Gets the foreground color.

public Color Foreground { get; }

Property Value

Color

OverflowCrop

Gets a Style with the default colors and overflow Crop.

public static Style OverflowCrop { get; }

Property Value

Style

OverflowEllipsis

Gets a Style with the default colors and overflow Ellipsis.

public static Style OverflowEllipsis { get; }

Property Value

Style

OverflowStrategy

Gets the Overflow strategy.

public Overflow OverflowStrategy { get; }

Property Value

Overflow

Constructors

Style()

create a new Style with default foreground/background colors and none overflow strategy.

Style()

Style(Color, Overflow)

Create a new instance of Style with foreground, default backgroundcolors and overflow strategy.

Style(Color foreground, Overflow overflowStrategy)

Parameters

foreground Color
Color foreground

overflowStrategy Overflow
Overflow Strategy

Style(Color, Color, Overflow)

Create a new instance of Style with foreground/background colors and overflow strategy.

Style(Color foreground, Color background, Overflow overflowStrategy)

Parameters

foreground Color
Color foreground

background Color
Color background

overflowStrategy Overflow
Overflow Strategy

Methods

Combine(Style)

Combines this style with another one.

Style Combine(Style other)

Parameters

other Style
The item to combine with this.

Returns

A new style representing a combination of this and the other one.

Equals(Style)

Checks if two Style instances are not equal.

bool Equals(Style other)

Parameters

other Style
The Style instance to compare.

Returns

true if the two Style are not equal, otherwise false.

Equals(Object)

bool Equals(object obj)

Parameters

obj Object

Returns

Boolean

GetHashCode()

int GetHashCode()

Returns

Int32


Back to List Api