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
animatebool
Returns
Build()
Builds and returns the configured ChatTranscriptControl.
public ChatTranscriptControl Build()
Returns
WithAutoScroll(bool)
Sets whether the transcript auto-scrolls to follow the newest message. Defaults to true.
public ChatTranscriptBuilder WithAutoScroll(bool autoScroll = true)
Parameters
autoScrollbool
Returns
WithColorRole(ColorRole, ThemeMode?)
Sets the control's semantic colour role.
public ChatTranscriptBuilder WithColorRole(ColorRole role, ThemeMode? mode = null)
Parameters
roleColorRoleThe semantic role determining the control's colours.
modeThemeMode?Optional ThemeMode override. When null, the active theme's mode is used.
Returns
WithMargin(int)
Sets a uniform margin on all four sides.
public ChatTranscriptBuilder WithMargin(int margin)
Parameters
marginint
Returns
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
Returns
WithName(string)
Sets the control name for lookup.
public ChatTranscriptBuilder WithName(string name)
Parameters
namestring
Returns
WithRoleStyle(ChatRole, ChatRoleStyle)
Sets the visual style used for messages of the given role.
public ChatTranscriptBuilder WithRoleStyle(ChatRole role, ChatRoleStyle style)
Parameters
roleChatRoleThe role to configure.
styleChatRoleStyleThe style to apply.
Returns
Operators
implicit operator ChatTranscriptControl(ChatTranscriptBuilder)
Implicit conversion to ChatTranscriptControl.
public static implicit operator ChatTranscriptControl(ChatTranscriptBuilder builder)
Parameters
builderChatTranscriptBuilder