Table of Contents

Interface ICustomTextBox

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Provides access to the CustomTextBox methods and properties.

public interface ICustomTextBox : IDisposable

Properties

AllowEmptyText

Gets or sets a value indicating whether empty string is allowed in Text.

DataType

Gets or sets Type of the Text property.

DefaultFormat

Gets or sets default format used in value to string convertion.

DefaultText

Gets or sets default value for the Text property.

EmptyTextValue

Gets or sets data value in cases when Text property is empty.

FormatProvider

Gets or sets an object that supplies culture-specific formatting information.

IsNullOrEmpty

Gets whether Text is null or empty.

IsNullOrWhiteSpace

Gets whether Text is null or white space.

IsRequired

Gets or sets a value indicating whether Text is required to be not empty. This is an opposite of AllowEmptyText property.

MaxLength

Gets or sets the maximum number of characters the user can enter into the control.

MaxValue

Gets or sets the maximum value that can be entered in the control.

MinLength

Gets or sets the minimum number of characters the user must enter into the control.

MinValue

Gets or sets the minimum value that can be entered in the control.

NumberStyles

Gets or sets a bitwise combination of NumberStyles values that indicates the permitted format of the text.

Options

Gets or sets flags which customize behavior and visual style of the control.

ResetErrorBackgroundMethod

Gets or sets method which is used to clear error state if error backround color is used for reporting it.

ResetErrorForegroundMethod

Gets or sets method which is used to clear error state if error foreground color is used for reporting it.

Search

Gets or sets string search provider.

Text

Gets or sets the text associated with this control.

TextAsNumber

Gets or sets Text property value as object of a number type.

ValidatorErrorText

Gets or sets a text string that can be used as validator error message.

ValidatorReporter

Gets or sets validator reporter object or control.

Methods

DataTypeIsNumber()

Returns true if DataType is a number type.

GetDataTypeCode()

Returns TypeCode for the DataType property or String.

GetKnownErrorText(ValueValidatorKnownError)

Gets known error text.

GetLineText(long)

Returns the contents of a given line in the text control, not including any trailing newline character(s).

GetMinMaxRangeStr(string?)

Returns minimal and maximal possible values for the DataType as a range string and formats it using format.

GetNumberOfLines()

Returns the number of lines in the text control buffer.

GetRealMaxValue()

Gets "real" maxmimal value taking into account DataType and MinValue.

GetRealMinValue()

Gets "real" minimal value taking into account DataType and MinValue.

ReportErrorBadNumber(Action<string>?)

Reports an error if DataType is a number type and TextAsNumber is null.

ReportErrorEmptyText(Action<string>?)

Reports an error if Text property is empty and it is not allowed (AllowEmptyText is false).

ReportErrorMinMaxLength(Action<string>?)

Reports an error if length of the Text property value is less than MinLength or greater than MaxLength.

ReportErrorMinMaxValue(object?, Action<string>?)

Reports an error if value is less than MinValue or greater than MaxValue.

ReportValidatorError(bool, string?, Action<string>?)

Reports text validation error.

RunDefaultValidation(Action<string>?)

Runs default validation of the Text property.

SetTextAsByte(byte)

Converts value to string and assigns Text property with the converted value.

SetTextAsDateTime(DateTime)

Converts value to string and assigns Text property with the converted value.

SetTextAsDecimal(decimal)

Converts value to string and assigns Text property with the converted value.

SetTextAsDouble(double)

Converts value to string and assigns Text property with the converted value.

SetTextAsInt16(short)

Converts value to string and assigns Text property with the converted value.

SetTextAsInt32(int)

Converts value to string and assigns Text property with the converted value.

SetTextAsInt64(long)

Converts value to string and assigns Text property with the converted value.

SetTextAsObject(object?)

Converts value to string and assigns Text property with the converted value.

SetTextAsSByte(sbyte)

Converts value to string and assigns Text property with the converted value.

SetTextAsSingle(float)

Converts value to string and assigns Text property with the converted value.

SetTextAsUInt16(ushort)

Converts value to string and assigns Text property with the converted value.

SetTextAsUInt32(uint)

Converts value to string and assigns Text property with the converted value.

SetTextAsUInt64(ulong)

Converts value to string and assigns Text property with the converted value.

TextAsNumberOrDefault<T>(T)

Returns TextAsNumber or defValue if it is null.

Events

ErrorStatusChanged

Occurs when ReportValidatorError(bool, string?, Action<string>?) is called.