Show / Hide Table of Contents

Class ColumnBuilder<TObject, TItem>

Class that describes a data selector for generating a data column within a table.

Inheritance
object
ColumnBuilder<TObject, TItem>
Implements
IColumnBuilder<TObject>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TheXDS.MCART.Types
Assembly: MCART.Wpf.FlowDocumentExtensions.dll
Syntax
public class ColumnBuilder<TObject, TItem> : IColumnBuilder<TObject>
Type Parameters
Name Description
TObject

Type of object from which the column information will be extracted.

TItem

Type of item to return for this column.

Constructors

| Edit this page View Source

ColumnBuilder(string, Func<TObject, TItem>)

Class that describes a data selector for generating a data column within a table.

Declaration
public ColumnBuilder(string header, Func<TObject, TItem> selector)
Parameters
Type Name Description
string header

Title of the column.

Func<TObject, TItem> selector

Data selection function.

Properties

| Edit this page View Source

Header

Title of the column.

Declaration
public string Header { get; }
Property Value
Type Description
string
| Edit this page View Source

Selector

Data selection function.

Declaration
public Func<TObject, TItem> Selector { get; }
Property Value
Type Description
Func<TObject, TItem>
| Edit this page View Source

Styles

Gets a collection of styles registered for this column.

Declaration
public IList<CellStyle<TItem>> Styles { get; }
Property Value
Type Description
IList<CellStyle<TItem>>

Methods

| Edit this page View Source

Content(TObject)

Content of the current row to be set in this column.

Declaration
public string Content(TObject obj)
Parameters
Type Name Description
TObject obj

Object from which to extract the content.

Returns
Type Description
string

The content in string format to place within the cell corresponding to this column in the current row.

| Edit this page View Source

CurrentStyle(TItem)

Gets a style to be used for the current item.

Declaration
public CellStyle<TItem>? CurrentStyle(TItem currentItem)
Parameters
Type Name Description
TItem currentItem

Value against which to evaluate the styles.

Returns
Type Description
CellStyle<TItem>

A style that can be applied to the value, or null if no style can be applied.

| Edit this page View Source

Style(object?)

Gets a style to be used on the cell in this column of the current row.

Declaration
public ICellStyle? Style(object? item)
Parameters
Type Name Description
object item
Returns
Type Description
ICellStyle

A style to apply to the generated cell, or null if a valid style cannot be obtained.

Implements

IColumnBuilder<TObject>

Extension Methods

Objects.ShallowCopyTo(object, object, Type)
ObjectExtensions.FieldsOf<T>(object)
ObjectExtensions.GetAttribute<T>(object)
ObjectExtensions.GetAttributes<T>(object)
ObjectExtensions.HasAttrValue<TAttribute, TValue>(object, out TValue)
ObjectExtensions.HasAttribute<T>(object)
ObjectExtensions.HasAttribute<T>(object, out T?)
ObjectExtensions.HasAttributes<T>(object, out IEnumerable<T>?)
ObjectExtensions.Is(object?, object?)
ObjectExtensions.IsEither(object, IEnumerable)
ObjectExtensions.IsEither(object, params object[])
ObjectExtensions.IsNeither(object, IEnumerable)
ObjectExtensions.IsNeither(object, params object[])
ObjectExtensions.IsNot(object?, object?)
ObjectExtensions.PropertiesOf<T>(object)
ObjectExtensions.WhichAre(object, IEnumerable<object>)
ObjectExtensions.WhichAre(object, params object[])
Common.IfNotNull<T>(T?, Action<T>)
Objects.Itself<T>(T)
Objects.ShallowCopyTo<T>(T, T)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX