New to Telerik Document ProcessingStart a free 30-day trial

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:

C#
public class PatternFill : IFill

Inheritance: objectPatternFill

Implements: IFill

Constructors

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

C#
public PatternFill(PatternType patternType, Color patternColor, Color backgroundColor)
Parameters:patternTypePatternType

Type of the pattern.

patternColorColor

Color of the pattern.

backgroundColorColor

Color of the background.

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

C#
public PatternFill(PatternType patternType, ThemableColor patternColor, ThemableColor backgroundColor)
Parameters:patternTypePatternType

Type of the pattern.

patternColorThemableColor

Color of the pattern.

backgroundColorThemableColor

Color of the background.

Fields

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

C#
public static readonly PatternFill Default

Properties

Gets the background color visible between pattern elements.

C#
public ThemableColor BackgroundColor { get; }
Property Value:

The color of the background.

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

C#
public ThemableColor PatternColor { get; }
Property Value:

The color of the pattern.

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

C#
public PatternType PatternType { get; }
Property Value:

The type of the pattern.

Methods

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

C#
public static IFill CreateSolidFill(Color color)
Parameters:colorColor

The color.

Returns:

IFill

The fill.

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

C#
public static IFill CreateSolidFill(ThemableColor color)
Parameters:colorThemableColor

The themable color.

Returns:

IFill

The fill.

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

C#
public override bool Equals(object obj)
Parameters:objobject

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)

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: object.GetHashCode()

Returns a string that represents the current object.

C#
public override string ToString()
Returns:

string

A string that represents the current object.

Overrides: object.ToString()