Class
PatternFill

Defines a cell background fill using pattern types, foreground colors, and background colors.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public class PatternFill : IFill

Inheritance: objectPatternFill

Implements: IFill

Constructors

PatternFill(PatternType, Color, Color)

Initializes a new PatternFill with the specified pattern type, foreground color, and background color.

Declaration

cs-api-definition
public PatternFill(PatternType patternType, Color patternColor, Color backgroundColor)

Parameters

patternType

PatternType

Type of the pattern.

patternColor

Color

Color of the pattern.

backgroundColor

Color

Color of the background.

PatternFill(PatternType, ThemableColor, ThemableColor)

Initializes a new PatternFill with the specified pattern type and themable colors.

Declaration

cs-api-definition
public PatternFill(PatternType patternType, ThemableColor patternColor, ThemableColor backgroundColor)

Parameters

patternType

PatternType

Type of the pattern.

patternColor

ThemableColor

Color of the pattern.

backgroundColor

ThemableColor

Color of the background.

Fields

Default

Provides a transparent solid fill used as the default for cells with no background.

Declaration

cs-api-definition
public static readonly PatternFill Default

Field Value

PatternFill

Properties

BackgroundColor

Gets the background color visible between pattern elements.

Declaration

cs-api-definition
public ThemableColor BackgroundColor { get; }

Property Value

ThemableColor

The color of the background.

PatternColor

Gets the foreground color used for the pattern elements, such as stripes or dots.

Declaration

cs-api-definition
public ThemableColor PatternColor { get; }

Property Value

ThemableColor

The color of the pattern.

PatternType

Gets the pattern style applied to the fill, such as solid, striped, or crosshatch.

Declaration

cs-api-definition
public PatternType PatternType { get; }

Property Value

PatternType

The type of the pattern.

Methods

CreateSolidFill(Color)

Creates a solid fill with the specified color, commonly used for cell backgrounds.

Declaration

cs-api-definition
public static IFill CreateSolidFill(Color color)

Parameters

color

Color

The color.

Returns

IFill

The fill.

CreateSolidFill(ThemableColor)

Creates a solid fill with the specified themable color, allowing theme-based color changes.

Declaration

cs-api-definition
public static IFill CreateSolidFill(ThemableColor color)

Parameters

color

ThemableColor

The themable color.

Returns

IFill

The fill.

Equals(object)

Determines whether the specified object is equal to the current object.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to compare with the current object.

Returns

bool

True if the specified object is equal to the current object; otherwise, false.

Overrides object.Equals(object)

GetHashCode()

Serves as a hash function for a particular type.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

Overrides object.GetHashCode()

ToString()

Returns a string that represents the current object.

Declaration

cs-api-definition
public override string ToString()

Returns

string

A string that represents the current object.

Overrides object.ToString()