LogoLogo
HomeNewsSupportVideos
  • Welcome
  • Wisej.NET
  • Concepts
    • Getting Started
    • General Concepts
    • Architecture
    • Extensibility
    • AI Providers
    • Vector Databases
    • Usage Metrics
    • Logging & Error Handling
  • Markup
  • Components
    • API
      • SmartAdapter
        • SmartAudioTTSAdapter
        • SmartAudioWhisperAdapter
        • SmartCalendarAdapter
        • SmartChartAdapter
        • SmartChartJS3Adapter
        • SmartChatBoxAdapter
        • SmartComboBoxAdapter
        • SmartCopilotAdapter
        • SmartDataEntryAdapter
        • SmartDocumentAdapter
        • SmartFullCalendarAdapter
        • SmartObjectAdapter
        • SmartPictureBoxAdapter
        • SmartQueryAdapter
        • SmartRealtimeAdapter
        • SmartReportAdapter
        • SmartTextBoxAdapter
        • SmartAdapter.ExtendsAttribute
        • SmartAdapter.FieldNameAttribute
        • SmartAdapter.FieldPromptAttribute
        • SmartAdapter.FieldRectangleAttribute
        • SmartAdapter.WorksWithAttribute
      • SmartEndpoint
        • AmazonBedrockEndpoint
        • AnthropicEndpoint
        • AzureAIEndpoint
        • CerebrasEndpoint
        • DeepSeekEndpoint
        • GoogleAIEndpoint
        • GroqCloudEndpoint
        • GroqCloudEndpointWhisper
        • HuggingFaceEndpoint
        • HuggingFaceJavaScriptEndpoint
        • LocalAIEndpoint
        • LocalAIEndpointImageGen
        • LocalAIEndpointTTS
        • LocalAIEndpointWhisper
        • NvidiaAIEndpoint
        • OllamaEndpoint
        • OpenAIEndpoint
        • OpenAIEndpointDallE
        • OpenAIEndpointRealtime
        • OpenAIEndpointTTS
        • OpenAIEndpointWhisper
        • SambaNovaEndpoint
        • SmartHttpEndpoint
        • TogetherAIEndpoint
        • XAIEndpoint
        • SmartEndpoint.Metrics
        • SmartEndpoint.Response
      • SmartExtensions
      • SmartHub
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
      • SmartObject
      • SmartPrompt
        • SmartAgentPrompt
        • SmartParallelPrompt
        • SmartPrompt.Parameter
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
      • SmartRealtimeSession
      • SmartSession
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.Message
        • SmartSession.MessageCollection
        • SmartSession.MessageRole
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
        • SmartSession.TrimmingStrategy
      • SmartTool
        • SmartTool.IToolProvider
        • SmartTool.ToolAttribute
        • SmartTool.ToolContext
      • Markup
        • MarkupExtensions
      • Controls
        • UVLightOverlay
      • Embeddings
        • EmbeddedDocument
        • Embedding
        • Matches
        • Metadata
      • Helpers
        • ApiKeys
        • Markdown
        • TextTokenizer
      • Services
        • DefaultSessionTrimmingService
        • IDocumentConversionService
          • DefaultDocumentConversionService
        • IEmbeddingGenerationService
          • DefaultEmbeddingGenerationService
          • HuggingFaceEmbeddingGenerationService
        • IEmbeddingStorageService
          • AzureAISearchEmbeddingStorageService
          • ChromaEmbeddingStorageService
          • FileSystemEmbeddingStorageService
          • MemoryEmbeddingStorageService
          • PineconeEmbeddingStorageService
          • QdrantEmbeddingStorageService
        • IHttpClientService
          • DefaultHttpClientService
        • ILoggerService
          • DefaultLoggerService
        • IOCRService
          • DefaultOCRService
        • IRerankingService
          • DefaultRerankingService
          • LocalAIRerankingService
          • PineconeRerankingService
        • ISessionTrimmingService
          • DefaultSessionTrimmingService
        • ITextSplitterService
          • RecursiveCharacterTextSplitterService
          • TextSplitterServiceBase
        • ITokenizerService
          • DefaultTokenizerService
        • IWebSearchService
          • BingWebSearchService
          • BraveWebSearchService
          • GoogleWebSearchService
      • Tools
        • ArxivTools
        • ChartJS3Tools
        • DatabaseTools
        • DataTableFilterTools
        • DocumentSearchTools
        • DocumentTools
        • FullCalendarTools
        • IToolsContainer
        • MathTools
        • ToolsContainer
        • UtilityTools
        • WebSearchTools
    • Built-in Services
      • IOCRService
      • ILoggerService
      • ITextSplitterService
      • ITokenizerService
      • IHttpClientService
      • IWebSearchService
      • IRerankingService
      • ISessionTrimmingService
      • IDocumentConversionService
      • IEmbeddingStorageService
      • IEmbeddingGenerationService
    • Built-in SmartTools
      • ToolsContainer
      • MathTools
      • UtilityTools
      • DatabaseTools
      • DocumentTools
      • DocumentSearchTools
      • WebSearchTools
      • ChartJS3Tools
      • FullCalendarTools
    • Built-in SmartAdapters
      • SmartAdapter
      • SmartAudioTTSAdapter
      • SmartAudioWhisperAdapter
      • SmartCalendarAdapter
      • SmartChartAdapter
      • SmartChartJS3Adapter
      • SmartChatBoxAdapter
      • SmartComboBoxAdapter
      • SmartCopilotAdapter
      • SmartDataEntryAdapter
      • SmartDocumentAdapter
      • SmartFullCalendarAdapter
      • SmartObjectAdapter
      • SmartPictureBoxAdapter
      • SmartQueryAdapter
      • SmartRealtimeAdapter
      • SmartReportAdapter
      • SmartTextBoxAdapter
    • Configure Services
    • Using SmartHub
    • Using SmartTools
    • Using SmartPrompt
    • Using SmartSession
    • Using SmartRealTimeAdapter
    • UVLightOverlay Control
Powered by GitBook
On this page
  • Constructors
  • SmartTextBoxAdapter()
  • Properties
  • AcceptIconSource
  • ProcessingIconSource
  • SuggestionDelay
  • SuggestionStyle
  • Methods
  • GetEnableAutoCorrection(control)
  • GetEnableSuggestions(control)
  • GetEnableTranslation(control)
  • GetTranslateFromLanguage(control)
  • GetTranslateToLanguage(control)
  • GetUserPhrases(control)
  • GetUserRole(control)
  • OnControlCreated(control)
  • OnControlDisposed(control)
  • RunAsyncCore(control)
  • SetEnableAutoCorrection(control, value)
  • SetEnableSuggestions(control, value)
  • SetEnableTranslation(control, value)
  • SetTranslateFromLanguage(control, value)
  • SetTranslateToLanguage(control, value)
  • SetUserPhrases(control, phrases)
  • SetUserRole(control, value)
  • Implements
Export as PDF
  1. Components
  2. API
  3. SmartAdapter

SmartTextBoxAdapter

Wisej.AI.Adapters.SmartTextBoxAdapter

PreviousSmartReportAdapterNextSmartAdapter.ExtendsAttribute

Last updated 5 days ago

Namespace: Wisej.AI.Adapters

Assembly: Wisej.AI (3.5.0.0)

Enhances a TextBox control with several AI features, including suggestions, translation, and auto-correction.

public class SmartTextBoxAdapter : SmartAdapter, IExtenderProvider
Public Class SmartTextBoxAdapter
    Inherits SmartAdapter
    Implements IExtenderProvider

This class extends the functionality of a standard TextBox by providing AI-driven features such as text suggestions, automatic translation between specified languages, and auto-correction of text input. It uses SmartPrompt sessions to interact with AI services.

Constructors

SmartTextBoxAdapter()

Initializes a new instanced of .

Properties

AcceptIconSource

: Gets or sets the source of the icon displayed when a suggestion is accepted. (Default: null)

ProcessingIconSource

Methods

Determines whether the auto-correction feature is enabled for the specified control.

Parameter
Type
Description

control

The control to check.

Throws:

Determines whether the suggestions feature is enabled for the specified control.

Parameter
Type
Description

control

The control to check.

Throws:

Determines whether the translation feature is enabled for the specified control.

Parameter
Type
Description

control

The control to check.

Throws:

Gets the source language for the translation feature associated with the specified control.

Parameter
Type
Description

control

The control from which to retrieve the source language.

Throws:

Gets the target language for the translation feature associated with the specified control.

Parameter
Type
Description

control

The control from which to retrieve the target language.

Throws:

Gets the user-provided phrases associated with the specified control.

Parameter
Type
Description

control

The control from which to retrieve the user phrases.

Throws:

Gets the user role associated with the specified control.

Parameter
Type
Description

control

The control from which to retrieve the user role.

Throws:

Parameter
Type
Description

control

Parameter
Type
Description

control

Parameter
Type
Description

control

Parameter
Type
Description

control

value

Parameter
Type
Description

control

value

Parameter
Type
Description

control

value

Sets the source language for the translation feature associated with the specified control.

Parameter
Type
Description

control

The control to associate with the source language.

value

The source language as a string.

Throws:

Sets the target language for the translation feature associated with the specified control.

Parameter
Type
Description

control

The control to associate with the target language.

value

The target language as a string.

Throws:

Parameter
Type
Description

control

phrases

Parameter
Type
Description

control

value

Implements

Name
Description

Represents a provider that supplies tools.

: Gets or sets the source of the icon displayed during processing. (Default: "resource.wx/Wisej.AI/Icons/processing.svg")

SuggestionDelay

: Gets or sets the delay in milliseconds before suggestions are shown. (Default: 250)

SuggestionStyle

: Gets or sets the CSS style applied to suggestions. (Default: "opacity:0.4")

GetEnableAutoCorrection(control)

Returns: . True if auto-correction is enabled; otherwise, false.

Thrown when the control is null.

GetEnableSuggestions(control)

Returns: . True if suggestions are enabled; otherwise, false.

Thrown when the control is null.

GetEnableTranslation(control)

Returns: . True if translation is enabled; otherwise, false.

Thrown when the control is null.

GetTranslateFromLanguage(control)

Returns: . The source language as a string.

Thrown when the control is null.

GetTranslateToLanguage(control)

Returns: . The target language as a string.

Thrown when the control is null.

GetUserPhrases(control)

Returns: . An array of user phrases.

Thrown when the control is null.

GetUserRole(control)

Returns: . The user role as a string.

Thrown when the control is null.

OnControlCreated(control)

OnControlDisposed(control)

RunAsyncCore(control)

Returns: .

SetEnableAutoCorrection(control, value)

SetEnableSuggestions(control, value)

SetEnableTranslation(control, value)

SetTranslateFromLanguage(control, value)

Thrown when the control is null.

SetTranslateToLanguage(control, value)

Thrown when the control is null.

SetUserPhrases(control, phrases)

SetUserRole(control, value)

String
Int32
String
Boolean
ArgumentNullException
Boolean
ArgumentNullException
Boolean
ArgumentNullException
String
ArgumentNullException
String
ArgumentNullException
String[]
ArgumentNullException
String
ArgumentNullException
Task<Message>
ArgumentNullException
ArgumentNullException
Control
Control
Control
Control
Control
Control
Control
Control
Control
Control
Control
Boolean
Control
Boolean
Control
Boolean
Control
String
Control
String
Control
String[]
Control
String
IToolProvider
SmartAdapter
SmartTextBoxAdapter
SmartTextBoxAdapter
String