HypernovaDesktop Components · docs
Binarymission
WPFSmart Text Box › SmartTextBox

SmartTextBox

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Controls.InputControls

A custom text box control that is capable of rendering Watermark with image and text.

public class SmartTextBox : TextBox

Inherits from / implements: TextBox

Members at a glance

SmartTextBoxInitializes a new instance of the SmartTextBox class.
AlertClueImageSourceGets or sets the alert clue image.
AlertClueImageSourceOnErrorGets or sets the image that will be rendered when the control is in error mode (i.e. you could use this when the user has not set a mandatory data in teh control, etc.)
AlertFlagToolTipContentGets or sets the custom tooltip content for the alert flag visual.
ClearTextVisualContentGets or sets the content for the clear data button located at the right hand side corner of the control.
ClearTextVisualForegroundGets or sets the foreground brush for the clear text command visual that is rendered at the right hand side corner of the control.
ClearTextVisualOnHoverForegroundGets or sets the foreground brush for the clear text command visual that is rendered at the right hand side corner of the control, when mouse hovers on it.
DataEntryModeGets or sets the data entry mode.
DisallowedInputRegularExpressionGets or sets the custom regular expression string to be used, when deciding what text input is not allowed.
IsAlertClueImageRenderingEnabledGets or sets whether to render the alert clue image.
IsClearTextVisualAlwaysVisibleGets or sets whether the clear text visual is always shown in the control, irrespective of whether the user has any text typed into the control or not.
IsClearTextVisualRenderingFeatureEnabledGets or sets a value indicating whether this instance is clear text visual rendering feature enabled.
WatermarkContentGets or sets the watermark instance for the text box.
WatermarkContentTemplateGets or sets the watermark template to use, for rendering the watermark instance.
OnApplyTemplateIs called when a control template is applied.
AlertClueImageSourceOnErrorPropertyThe alert clue image source on error property
AlertClueImageSourcePropertyThe alert clue image source property
AlertFlagToolTipContentPropertyThe alert flag tool tip content property
ClearTextVisualContentPropertyThe clear text visual content property
ClearTextVisualForegroundPropertyThe clear text visual foreground property
ClearTextVisualOnHoverForegroundPropertyThe clear text visual on hover foreground property
DataEntryModePropertyThe data entry mode property
DisallowedInputRegularExpressionPropertyThe disallowed input regular expression property
IsAlertClueImageRenderingEnabledPropertyThe is alert clue image rendering enabled property
IsClearTextVisualAlwaysVisiblePropertyThe is clear text visual always visible property
IsClearTextVisualRenderingFeatureEnabledPropertyThe is clear text visual rendering feature enabled property
WatermarkContentPropertyThe watermark content property
WatermarkContentTemplatePropertyThe watermark content template property

Constructors

SmartTextBox

public SmartTextBox()

Initializes a new instance of the SmartTextBox class.

Properties

AlertClueImageSource

public BitmapSource AlertClueImageSource

Gets or sets the alert clue image.

Value. The alert clue image source.

AlertClueImageSourceOnError

public BitmapSource AlertClueImageSourceOnError

Gets or sets the image that will be rendered when the control is in error mode (i.e. you could use this when the user has not set a mandatory data in teh control, etc.)

Value. The alert clue image source on error.

AlertFlagToolTipContent

public object AlertFlagToolTipContent

Gets or sets the custom tooltip content for the alert flag visual.

Value. The content of the alert flag tool tip.

ClearTextVisualContent

public object ClearTextVisualContent

Gets or sets the content for the clear data button located at the right hand side corner of the control.

Value. The content of the clear text visual.

ClearTextVisualForeground

public Brush ClearTextVisualForeground

Gets or sets the foreground brush for the clear text command visual that is rendered at the right hand side corner of the control.

Value. The clear text visual foreground.

ClearTextVisualOnHoverForeground

public Brush ClearTextVisualOnHoverForeground

Gets or sets the foreground brush for the clear text command visual that is rendered at the right hand side corner of the control, when mouse hovers on it.

Value. The clear text visual on hover foreground.

DataEntryMode

public SmartTextBoxDataEntryMode DataEntryMode

Gets or sets the data entry mode.

Value. The data entry mode.

DisallowedInputRegularExpression

public string DisallowedInputRegularExpression

Gets or sets the custom regular expression string to be used, when deciding what text input is not allowed.

Value. The disallowed input regular expression.

IsAlertClueImageRenderingEnabled

public bool IsAlertClueImageRenderingEnabled

Gets or sets whether to render the alert clue image.

Value. true if this instance is alert clue image rendering enabled; otherwise, false .

IsClearTextVisualAlwaysVisible

public bool IsClearTextVisualAlwaysVisible

Gets or sets whether the clear text visual is always shown in the control, irrespective of whether the user has any text typed into the control or not.

Value. true if this instance is clear text visual always visible; otherwise, false .

IsClearTextVisualRenderingFeatureEnabled

public bool IsClearTextVisualRenderingFeatureEnabled

Gets or sets a value indicating whether this instance is clear text visual rendering feature enabled.

Value. true if this instance is clear text visual rendering feature enabled; otherwise, false .

WatermarkContent

public object WatermarkContent

Gets or sets the watermark instance for the text box.

Value. The content of the watermark.

WatermarkContentTemplate

public DataTemplate WatermarkContentTemplate

Gets or sets the watermark template to use, for rendering the watermark instance.

Value. The watermark content template.

Methods

OnApplyTemplate

public override void OnApplyTemplate()

Is called when a control template is applied.

Fields

AlertClueImageSourceOnErrorProperty

public static readonly DependencyProperty AlertClueImageSourceOnErrorProperty

The alert clue image source on error property

AlertClueImageSourceProperty

public static readonly DependencyProperty AlertClueImageSourceProperty

The alert clue image source property

AlertFlagToolTipContentProperty

public static readonly DependencyProperty AlertFlagToolTipContentProperty

The alert flag tool tip content property

ClearTextVisualContentProperty

public static readonly DependencyProperty ClearTextVisualContentProperty

The clear text visual content property

ClearTextVisualForegroundProperty

public static readonly DependencyProperty ClearTextVisualForegroundProperty

The clear text visual foreground property

ClearTextVisualOnHoverForegroundProperty

public static readonly DependencyProperty ClearTextVisualOnHoverForegroundProperty

The clear text visual on hover foreground property

DataEntryModeProperty

public static readonly DependencyProperty DataEntryModeProperty

The data entry mode property

DisallowedInputRegularExpressionProperty

public static readonly DependencyProperty DisallowedInputRegularExpressionProperty

The disallowed input regular expression property

IsAlertClueImageRenderingEnabledProperty

public static readonly DependencyProperty IsAlertClueImageRenderingEnabledProperty

The is alert clue image rendering enabled property

IsClearTextVisualAlwaysVisibleProperty

public static readonly DependencyProperty IsClearTextVisualAlwaysVisibleProperty

The is clear text visual always visible property

IsClearTextVisualRenderingFeatureEnabledProperty

public static readonly DependencyProperty IsClearTextVisualRenderingFeatureEnabledProperty

The is clear text visual rendering feature enabled property

WatermarkContentProperty

public static readonly DependencyProperty WatermarkContentProperty

The watermark content property

WatermarkContentTemplateProperty

public static readonly DependencyProperty WatermarkContentTemplateProperty

The watermark content template property