Table of Contents

Class ChatTranscriptBuilder

Namespace
SharpConsoleUI.Builders
Assembly
SharpConsoleUI.dll

Fluent builder for ChatTranscriptControl.

public sealed class ChatTranscriptBuilder : IControlBuilder<ChatTranscriptControl>
Inheritance
ChatTranscriptBuilder
Implements
Inherited Members
Extension Methods

Methods

AnimateMessages(bool)

Sets whether message panels animate their expand/collapse. Defaults to true.

public ChatTranscriptBuilder AnimateMessages(bool animate = true)

Parameters

animate bool

Returns

ChatTranscriptBuilder

Build()

Builds and returns the configured ChatTranscriptControl.

public ChatTranscriptControl Build()

Returns

ChatTranscriptControl

WithAutoScroll(bool)

Sets whether the transcript auto-scrolls to follow the newest message. Defaults to true.

public ChatTranscriptBuilder WithAutoScroll(bool autoScroll = true)

Parameters

autoScroll bool

Returns

ChatTranscriptBuilder

WithColorRole(ColorRole, ThemeMode?)

Sets the control's semantic colour role.

public ChatTranscriptBuilder WithColorRole(ColorRole role, ThemeMode? mode = null)

Parameters

role ColorRole

The semantic role determining the control's colours.

mode ThemeMode?

Optional ThemeMode override. When null, the active theme's mode is used.

Returns

ChatTranscriptBuilder

WithMargin(int)

Sets a uniform margin on all four sides.

public ChatTranscriptBuilder WithMargin(int margin)

Parameters

margin int

Returns

ChatTranscriptBuilder

WithMargin(int, int, int, int)

Sets the margin with individual values for each side.

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

Parameters

left int
top int
right int
bottom int

Returns

ChatTranscriptBuilder

WithName(string)

Sets the control name for lookup.

public ChatTranscriptBuilder WithName(string name)

Parameters

name string

Returns

ChatTranscriptBuilder

WithRoleStyle(ChatRole, ChatRoleStyle)

Sets the visual style used for messages of the given role.

public ChatTranscriptBuilder WithRoleStyle(ChatRole role, ChatRoleStyle style)

Parameters

role ChatRole

The role to configure.

style ChatRoleStyle

The style to apply.

Returns

ChatTranscriptBuilder

Operators

implicit operator ChatTranscriptControl(ChatTranscriptBuilder)

Implicit conversion to ChatTranscriptControl.

public static implicit operator ChatTranscriptControl(ChatTranscriptBuilder builder)

Parameters

builder ChatTranscriptBuilder

Returns

ChatTranscriptControl