Class TextValidateField
Masked text editor that validates input through a ITextValidateProvider.
public class TextValidateField : View, IDisposable, ISupportInitializeNotification, ISupportInitialize, IDesignable, IValue<string>, IValue
- Inheritance
-
TextValidateField
- Implements
- Derived
- Inherited Members
- Extension Methods
Remarks
Default key bindings:
| Key | Action |
|---|---|
| Left | Moves the cursor left. |
| Right | Moves the cursor right. |
| Home | Moves the cursor to the start. |
| End | Moves the cursor to the end. |
| Delete | Deletes the character at the cursor. |
| Backspace | Deletes the character before the cursor. |
Constructors
- TextValidateField()
Initializes a new instance of the TextValidateField class.
Properties
- IsValid
This property returns true if the input is valid.
- Provider
Provider
- SuppressValueEvents
Gets or sets whether value change events are suppressed. Subclasses set this to true when programmatically updating the provider to prevent re-entrant event firing.
- Text
Text
Methods
- EnableForDesign()
Causes the View to enable design-time mode. This typically means that the view will load demo data and be configured to allow for design-time manipulation.
- HandleProviderTextChanged(string, string)
Called when the provider's text changes through user input (InsertAt/Delete). The base implementation raises ValueChanging and ValueChanged events following the Cancellable Work Pattern.
- OnDrawingContent(DrawContext?)
Called when the View's content is to be drawn. The default implementation does nothing.
- OnHasFocusChanged(bool, View?, View?)
Invoked after HasFocus has changed. This method is called before the HasFocusChanged event is raised.
- OnKeyDownNotHandled(Key)
Called when the user has pressed key it wasn't handled by KeyDown and was not bound to a key binding.
- OnMouseEvent(Mouse)
Called when a mouse event occurs within the view's Viewport.
- OnValueChanged(ValueChangedEventArgs<string?>)
Called when Value has changed. Allows derived classes to react to value changes.
- OnValueChanging(ValueChangingEventArgs<string?>)
Called when Value is about to change. Allows derived classes to cancel the change.
Events
- ValueChanged
Raised when Value has changed.
- ValueChangedUntyped
Raised when Value has changed, providing the value as an un-typed object.
- ValueChanging
Raised when Value is about to change. Set Handled to true to cancel the change.