Table of Contents

Interface IRepeaterBuilder

Namespace
BSGameLib.UI.Builder
Assembly
BSGameLib.UI.dll

A repeater, the Repeater element of a view file, built in C#. It draws one row per item in a list.

public interface IRepeaterBuilder : IControlBuilder<IRepeaterBuilder>
Inherited Members

Methods

BindItems(string)

Binds the rows to the view model property propertyName, which holds the list of items.

IRepeaterBuilder BindItems(string propertyName)

Parameters

propertyName string

Returns

IRepeaterBuilder

BindSelectedItem(string)

Binds the selected item to the view model property propertyName, and writes it back as the selection changes.

IRepeaterBuilder BindSelectedItem(string propertyName)

Parameters

propertyName string

Returns

IRepeaterBuilder

Horizontal()

Lays the rows out left to right.

IRepeaterBuilder Horizontal()

Returns

IRepeaterBuilder

Vertical()

Lays the rows out top to bottom.

IRepeaterBuilder Vertical()

Returns

IRepeaterBuilder

WithActivateCommand(string)

Sets the view model's ICommand property run when a row is double-clicked or activated with Enter.

IRepeaterBuilder WithActivateCommand(string command)

Parameters

command string

Returns

IRepeaterBuilder

WithBorderColor(string)

Sets the color of a border drawn around the whole list.

IRepeaterBuilder WithBorderColor(string colorHex)

Parameters

colorHex string

Returns

IRepeaterBuilder

WithBorderThickness(int)

Sets the border's width in pixels. Has no effect without a border color.

IRepeaterBuilder WithBorderThickness(int thickness)

Parameters

thickness int

Returns

IRepeaterBuilder

WithFillColor(string)

Sets a flat fill drawn behind every row.

IRepeaterBuilder WithFillColor(string colorHex)

Parameters

colorHex string

Returns

IRepeaterBuilder

WithFocusColor(string)

Sets the outline drawn around the selected row while the list has keyboard focus.

IRepeaterBuilder WithFocusColor(string colorHex)

Parameters

colorHex string

Returns

IRepeaterBuilder

WithHoverColor(string)

Sets the fill drawn behind the row under the pointer.

IRepeaterBuilder WithHoverColor(string colorHex)

Parameters

colorHex string

Returns

IRepeaterBuilder

WithItemSpacing(int)

Sets the gap in pixels between rows.

IRepeaterBuilder WithItemSpacing(int spacing)

Parameters

spacing int

Returns

IRepeaterBuilder

WithItemTemplate(Action<IRepeaterItemTemplateBuilder>)

The layout each item is drawn with. Bindings inside it resolve against the item, not the view model, so BindText("Name") reads each item's own Name.

IRepeaterBuilder WithItemTemplate(Action<IRepeaterItemTemplateBuilder> configure)

Parameters

configure Action<IRepeaterItemTemplateBuilder>

Returns

IRepeaterBuilder

WithMaxExtent(int)

Sets the largest the list may grow along its orientation, in pixels. Rows past that are scrolled to.

IRepeaterBuilder WithMaxExtent(int extent)

Parameters

extent int

Returns

IRepeaterBuilder

WithPadding(Spacing)

Sets the padding inside the list, around the rows.

IRepeaterBuilder WithPadding(Spacing spacing)

Parameters

spacing Spacing

Returns

IRepeaterBuilder

WithPadding(int)

Sets the same padding on all four sides, in pixels.

IRepeaterBuilder WithPadding(int padding)

Parameters

padding int

Returns

IRepeaterBuilder

WithPadding(int, int)

Sets the horizontal and vertical padding, in pixels.

IRepeaterBuilder WithPadding(int horizontalPadding, int verticalPadding)

Parameters

horizontalPadding int
verticalPadding int

Returns

IRepeaterBuilder

WithPadding(int, int, int, int)

Sets the left, top, right and bottom padding, in pixels.

IRepeaterBuilder WithPadding(int leftPadding, int topPadding, int rightPadding, int bottomPadding)

Parameters

leftPadding int
topPadding int
rightPadding int
bottomPadding int

Returns

IRepeaterBuilder

WithScrollIndicatorColor(string)

Sets the color of the scroll indicator shown when the rows do not all fit.

IRepeaterBuilder WithScrollIndicatorColor(string colorHex)

Parameters

colorHex string

Returns

IRepeaterBuilder

WithSelectionColor(string)

Sets the fill drawn behind the selected row.

IRepeaterBuilder WithSelectionColor(string colorHex)

Parameters

colorHex string

Returns

IRepeaterBuilder

WithSelectionMarkerColor(string)

Sets the color of the marker drawn down the left edge of the selected row.

IRepeaterBuilder WithSelectionMarkerColor(string colorHex)

Parameters

colorHex string

Returns

IRepeaterBuilder

WithSelectionMarkerThickness(int)

Sets the width in pixels of the selected row's left-edge marker.

IRepeaterBuilder WithSelectionMarkerThickness(int thickness)

Parameters

thickness int

Returns

IRepeaterBuilder

WithSize(int, int)

Sets the list's size in pixels. A height caps how tall the list grows.

IRepeaterBuilder WithSize(int width, int height)

Parameters

width int
height int

Returns

IRepeaterBuilder

WithStretch(bool)

Sets whether the list takes the size its parent layout gives it, rather than sizing to its rows.

IRepeaterBuilder WithStretch(bool stretch)

Parameters

stretch bool

Returns

IRepeaterBuilder