TextArea

Class
Namespace: RazorConsole.Components
Assembly: RazorConsole.Core

Definition

public class TextArea : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Constructors

1
NameTypeDescription
TextArea()Constructor—

Properties

25
NameTypeDescription
Behavior
IsFocusedChangedEventCallback<Boolean>—
Appearance
BackgroundColor—
CharacterStyleFunc<Int32, Style>—
HeightInt32—
PlaceholderForegroundColor—
RowStyleFunc<Int32, Style>—
WidthInt32—
Events
OnActivatePositionEventCallback<Int32>—
OnChangedEventCallback—
OnCommandEventCallback<KeyboardEventArgs>—
OnCopyEventCallback<String>—
OnOpenLinkEventCallback<String>—
OnPreviewKeySystem.Func<Microsoft.AspNetCore.Components.Web.KeyboardEventArgs,System.Threading.Tasks.Task{System.Boolean>}Sees each key first; return true to consume it. A consumed Tab does not move focus only when the returned task is already complete, so decide before the first real await, like preventDefault in a browser: input does not wait for an async handler before it applies the key's default action.
OnSubmitEventCallback<String>Called with the buffer's text when Enter submits. The buffer is cleared before this runs, so keys typed while an async handler awaits start the next message. To keep the text when submitting fails, set it back on Buffer in the handler.
Other
BufferTextSelectionState—
CanActivatePositionFunc<Int32, Boolean>—
CanSubmitBoolean—
ContinuationIndentInt32—
ContinuationIndentAtFunc<Int32, Int32>—
EditableBoolean—
FollowOutputBoolean—
HookString—
ManageTabBoolean—
PlaceholderString—
WordWrapBoolean—

Methods

3
NameTypeDescription
BuildRenderTree(RenderTreeBuilder)()MethodRenders the component to the supplied RenderTreeBuilder.
Dispose()Method—
OnParametersSet()MethodMethod invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.