PdfTableColumnWidth Struct

The width of a column of a PdfTable: fixed, relative or automatic. The default value is PdfTableColumnWidth.Auto.

public readonly struct PdfTableColumnWidth : IEquatable<PdfTableColumnWidth>
Implements

Properties

NameDescription
AutoGets the width of the content of the column.
TypeGets how the width is computed.
ValueGets the width in points of a fixed column, the weight of a relative column, or 0 for an automatic column.

Gets the width of the content of the column.

public static PdfTableColumnWidth Auto { get; }

Property value

PdfTableColumnWidth

Gets how the width is computed.

public PdfTableColumnWidthType Type { get; }

Gets the width in points of a fixed column, the weight of a relative column, or 0 for an automatic column.

public double Value { get; }

Property value

double

Methods

NameDescription
Equals(PdfTableColumnWidth)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
Fixed(double)Creates a width in points.
GetHashCode()Returns the hash code for this instance.
Relative(double)Creates a share of the width left by the fixed and automatic columns.
ToString()Returns the fully qualified type name of this instance.

Equals overloads

Equals(PdfTableColumnWidth)

PdfTableColumnWidth.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(PdfTableColumnWidth other)
Parameters
other PdfTableColumnWidth
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

PdfTableColumnWidth.cs

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

Creates a width in points.

public static PdfTableColumnWidth Fixed(double points)

Parameters

points double
The width, 0 or more.

Returns

PdfTableColumnWidth The width.

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int A 32-bit signed integer that is the hash code for this instance.

Relative(double)

PdfTableColumnWidth.cs

Creates a share of the width left by the fixed and automatic columns.

public static PdfTableColumnWidth Relative(double weight = 1d)

Parameters

weight double
The weight of the column, more than 0: a column of weight 2 is twice as wide as a column of weight 1.

Returns

PdfTableColumnWidth The width.

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string The fully qualified type name.

Operators

NameDescription
operator ==(PdfTableColumnWidth, PdfTableColumnWidth)Indicates whether two widths are equal.
operator !=(PdfTableColumnWidth, PdfTableColumnWidth)Indicates whether two widths are different.

operator ==(PdfTableColumnWidth, PdfTableColumnWidth)

PdfTableColumnWidth.cs

Indicates whether two widths are equal.

public static bool operator ==(PdfTableColumnWidth left, PdfTableColumnWidth right)

Parameters

left PdfTableColumnWidth
The first width.
right PdfTableColumnWidth
The second width.

Returns

bool true when the widths are equal.

operator !=(PdfTableColumnWidth, PdfTableColumnWidth)

PdfTableColumnWidth.cs

Indicates whether two widths are different.

public static bool operator !=(PdfTableColumnWidth left, PdfTableColumnWidth right)

Parameters

left PdfTableColumnWidth
The first width.
right PdfTableColumnWidth
The second width.

Returns

bool true when the widths are different.