Table of Contents

Class ImageControlBuilder

Namespace
SharpConsoleUI.Builders
Assembly
SharpConsoleUI.dll

Fluent builder for creating ImageControl instances.

public sealed class ImageControlBuilder : IControlBuilder<ImageControl>
Inheritance
ImageControlBuilder
Implements
Inherited Members
Extension Methods

Methods

Build()

Builds the ImageControl instance.

public ImageControl Build()

Returns

ImageControl

Fill()

Sets scale mode to Fill (uniform scale, cropping excess).

public ImageControlBuilder Fill()

Returns

ImageControlBuilder

Fit()

Sets scale mode to Fit (uniform scale preserving aspect ratio).

public ImageControlBuilder Fit()

Returns

ImageControlBuilder

NoScaling()

Sets scale mode to None (original size, no scaling).

public ImageControlBuilder NoScaling()

Returns

ImageControlBuilder

StickyBottom()

Makes the control stick to the bottom of the window.

public ImageControlBuilder StickyBottom()

Returns

ImageControlBuilder

StickyTop()

Makes the control stick to the top of the window.

public ImageControlBuilder StickyTop()

Returns

ImageControlBuilder

Stretch()

Sets scale mode to Stretch (ignores aspect ratio).

public ImageControlBuilder Stretch()

Returns

ImageControlBuilder

Visible(bool)

Sets the visibility.

public ImageControlBuilder Visible(bool visible = true)

Parameters

visible bool

Returns

ImageControlBuilder

WithAlignment(HorizontalAlignment)

Sets the horizontal alignment.

public ImageControlBuilder WithAlignment(HorizontalAlignment alignment)

Parameters

alignment HorizontalAlignment

Returns

ImageControlBuilder

WithMargin(int)

Sets uniform margin on all sides.

public ImageControlBuilder WithMargin(int margin)

Parameters

margin int

Returns

ImageControlBuilder

WithMargin(int, int, int, int)

Sets the margin.

public ImageControlBuilder WithMargin(int left, int top, int right, int bottom)

Parameters

left int
top int
right int
bottom int

Returns

ImageControlBuilder

WithName(string)

Sets the control name for lookup.

public ImageControlBuilder WithName(string name)

Parameters

name string

Returns

ImageControlBuilder

WithScaleMode(ImageScaleMode)

Sets the image scale mode.

public ImageControlBuilder WithScaleMode(ImageScaleMode scaleMode)

Parameters

scaleMode ImageScaleMode

Returns

ImageControlBuilder

WithSource(PixelBuffer)

Sets the pixel buffer source to display.

public ImageControlBuilder WithSource(PixelBuffer source)

Parameters

source PixelBuffer

Returns

ImageControlBuilder

WithStickyPosition(StickyPosition)

Sets the sticky position.

public ImageControlBuilder WithStickyPosition(StickyPosition position)

Parameters

position StickyPosition

Returns

ImageControlBuilder

WithTag(object)

Sets a tag object.

public ImageControlBuilder WithTag(object tag)

Parameters

tag object

Returns

ImageControlBuilder

WithVerticalAlignment(VerticalAlignment)

Sets the vertical alignment.

public ImageControlBuilder WithVerticalAlignment(VerticalAlignment alignment)

Parameters

alignment VerticalAlignment

Returns

ImageControlBuilder

Operators

implicit operator ImageControl(ImageControlBuilder)

Implicit conversion to ImageControl.

public static implicit operator ImageControl(ImageControlBuilder builder)

Parameters

builder ImageControlBuilder

Returns

ImageControl