Table of Contents

Class RDFormsTextBox

Namespace
RDCore.Forms.Avalonia.Controls
Assembly
RDCore.Forms.Avalonia.dll

A VB TextBox: a Avalonia.Controls.TextBox that shows a TextBox component.

public sealed class RDFormsTextBox : TextBox, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, INamed, IInputElement, IDataTemplateHost, ISetterValue
Inheritance
AvaloniaObject
Animatable
StyledElement
Visual
Layoutable
Interactive
InputElement
Control
TemplatedControl
TextBox
RDFormsTextBox
Implements
IDataContextProvider
ILogical
IThemeVariantHost
IResourceHost
IResourceNode
IStyleHost
ISetLogicalParent
ISetInheritanceParent
INamed
IInputElement
IDataTemplateHost
ISetterValue
Inherited Members
TextBox.IsInactiveSelectionHighlightEnabledProperty
TextBox.ClearSelectionOnLostFocusProperty
TextBox.AcceptsReturnProperty
TextBox.AcceptsTabProperty
TextBox.CaretIndexProperty
TextBox.IsReadOnlyProperty
TextBox.PasswordCharProperty
TextBox.SelectionBrushProperty
TextBox.SelectionForegroundBrushProperty
TextBox.CaretBrushProperty
TextBox.CaretBlinkIntervalProperty
TextBox.SelectionStartProperty
TextBox.SelectionEndProperty
TextBox.MaxLengthProperty
TextBox.MaxLinesProperty
TextBox.MinLinesProperty
TextBox.TextProperty
TextBox.TextAlignmentProperty
TextBox.HorizontalContentAlignmentProperty
TextBox.VerticalContentAlignmentProperty
TextBox.TextWrappingProperty
TextBox.LineHeightProperty
TextBox.PlaceholderTextProperty
TextBox.WatermarkProperty
TextBox.UseFloatingPlaceholderProperty
TextBox.UseFloatingWatermarkProperty
TextBox.PlaceholderForegroundProperty
TextBox.WatermarkForegroundProperty
TextBox.NewLineProperty
TextBox.InnerLeftContentProperty
TextBox.InnerRightContentProperty
TextBox.RevealPasswordProperty
TextBox.CanCutProperty
TextBox.CanCopyProperty
TextBox.CanPasteProperty
TextBox.IsUndoEnabledProperty
TextBox.UndoLimitProperty
TextBox.CanUndoProperty
TextBox.CanRedoProperty
TextBox.CopyingToClipboardEvent
TextBox.CuttingToClipboardEvent
TextBox.PastingFromClipboardEvent
TextBox.TextChangedEvent
TextBox.TextChangingEvent
TextBox.ClearSelection()
TextBox.GetLineCount()
TextBox.Cut()
TextBox.Copy()
TextBox.Paste()
TextBox.Clear()
TextBox.SelectAll()
TextBox.Undo()
TextBox.Redo()
TextBox.CutGesture
TextBox.CopyGesture
TextBox.PasteGesture
TextBox.IsInactiveSelectionHighlightEnabled
TextBox.ClearSelectionOnLostFocus
TextBox.AcceptsReturn
TextBox.AcceptsTab
TextBox.CaretIndex
TextBox.IsReadOnly
TextBox.PasswordChar
TextBox.SelectionBrush
TextBox.SelectionForegroundBrush
TextBox.CaretBrush
TextBox.CaretBlinkInterval
TextBox.SelectionStart
TextBox.SelectionEnd
TextBox.MaxLength
TextBox.MaxLines
TextBox.MinLines
TextBox.LineHeight
TextBox.Text
TextBox.SelectedText
TextBox.HorizontalContentAlignment
TextBox.VerticalContentAlignment
TextBox.TextAlignment
TextBox.PlaceholderText
TextBox.Watermark
TextBox.UseFloatingPlaceholder
TextBox.UseFloatingWatermark
TextBox.PlaceholderForeground
TextBox.WatermarkForeground
TextBox.InnerLeftContent
TextBox.InnerRightContent
TextBox.RevealPassword
TextBox.TextWrapping
TextBox.NewLine
TextBox.CanCut
TextBox.CanCopy
TextBox.CanPaste
TextBox.IsUndoEnabled
TextBox.UndoLimit
TextBox.CanUndo
TextBox.CanRedo
TextBox.CopyingToClipboard
TextBox.CuttingToClipboard
TextBox.PastingFromClipboard
TextBox.TextChanged
TextBox.TextChanging
TemplatedControl.BackgroundProperty
TemplatedControl.BackgroundSizingProperty
TemplatedControl.BorderBrushProperty
TemplatedControl.BorderThicknessProperty
TemplatedControl.CornerRadiusProperty
TemplatedControl.FontFamilyProperty
TemplatedControl.FontFeaturesProperty
TemplatedControl.FontSizeProperty
TemplatedControl.FontStyleProperty
TemplatedControl.FontWeightProperty
TemplatedControl.FontStretchProperty
TemplatedControl.ForegroundProperty
TemplatedControl.LetterSpacingProperty
TemplatedControl.PaddingProperty
TemplatedControl.TemplateProperty
TemplatedControl.IsTemplateFocusTargetProperty
TemplatedControl.TemplateAppliedEvent
TemplatedControl.GetIsTemplateFocusTarget(Control)
TemplatedControl.ApplyTemplate()
TemplatedControl.Background
TemplatedControl.BackgroundSizing
TemplatedControl.BorderBrush
TemplatedControl.BorderThickness
TemplatedControl.CornerRadius
TemplatedControl.FontFamily
TemplatedControl.FontFeatures
TemplatedControl.FontSize
TemplatedControl.FontStyle
TemplatedControl.FontWeight
TemplatedControl.FontStretch
TemplatedControl.Foreground
TemplatedControl.LetterSpacing
TemplatedControl.Padding
TemplatedControl.Template
TemplatedControl.TemplateApplied
Control.FocusAdornerProperty
Control.TagProperty
Control.ContextMenuProperty
Control.ContextFlyoutProperty
Control.RequestBringIntoViewEvent
Control.LoadedEvent
Control.UnloadedEvent
Control.SizeChangedEvent
Control.FocusAdorner
Control.DataTemplates
Control.ContextMenu
Control.ContextFlyout
Control.IsLoaded
Control.Tag
Control.Loaded
Control.Unloaded
Control.SizeChanged
InputElement.FocusableProperty
InputElement.IsEnabledProperty
InputElement.IsEffectivelyEnabledProperty
InputElement.CursorProperty
InputElement.IsKeyboardFocusWithinProperty
InputElement.IsFocusedProperty
InputElement.IsHitTestVisibleProperty
InputElement.IsPointerOverProperty
InputElement.IsTabStopProperty
InputElement.GotFocusEvent
InputElement.GettingFocusEvent
InputElement.LostFocusEvent
InputElement.LosingFocusEvent
InputElement.KeyDownEvent
InputElement.KeyUpEvent
InputElement.TabIndexProperty
InputElement.TextInputEvent
InputElement.TextInputMethodClientRequestedEvent
InputElement.PointerEnteredEvent
InputElement.PointerExitedEvent
InputElement.PointerMovedEvent
InputElement.PointerPressedEvent
InputElement.PointerReleasedEvent
InputElement.PointerCaptureLostEvent
InputElement.PointerWheelChangedEvent
InputElement.ContextRequestedEvent
InputElement.ContextCanceledEvent
InputElement.IsHoldingEnabledProperty
InputElement.IsHoldWithMouseEnabledProperty
InputElement.PinchEvent
InputElement.PinchEndedEvent
InputElement.PullGestureEvent
InputElement.PullGestureEndedEvent
InputElement.SwipeGestureEvent
InputElement.SwipeGestureEndedEvent
InputElement.ScrollGestureEvent
InputElement.ScrollGestureInertiaStartingEvent
InputElement.ScrollGestureEndedEvent
InputElement.PointerTouchPadGestureMagnifyEvent
InputElement.PointerTouchPadGestureRotateEvent
InputElement.PointerTouchPadGestureSwipeEvent
InputElement.TappedEvent
InputElement.RightTappedEvent
InputElement.HoldingEvent
InputElement.DoubleTappedEvent
InputElement.Focus(NavigationMethod, KeyModifiers)
InputElement.GetIsHoldingEnabled(StyledElement)
InputElement.GetIsHoldWithMouseEnabled(StyledElement)
InputElement.Focusable
InputElement.IsEnabled
InputElement.Cursor
InputElement.IsKeyboardFocusWithin
InputElement.IsFocused
InputElement.IsHitTestVisible
InputElement.IsPointerOver
InputElement.IsTabStop
InputElement.IsEffectivelyEnabled
InputElement.TabIndex
InputElement.KeyBindings
InputElement.GestureRecognizers
InputElement.GotFocus
InputElement.GettingFocus
InputElement.LostFocus
InputElement.LosingFocus
InputElement.KeyDown
InputElement.KeyUp
InputElement.TextInput
InputElement.TextInputMethodClientRequested
InputElement.PointerEntered
InputElement.PointerExited
InputElement.PointerMoved
InputElement.PointerPressed
InputElement.PointerReleased
InputElement.PointerCaptureLost
InputElement.PointerWheelChanged
InputElement.ContextRequested
InputElement.ContextCanceled
InputElement.Pinch
InputElement.PinchEnded
InputElement.PullGesture
InputElement.PullGestureEnded
InputElement.ScrollGesture
InputElement.ScrollGestureInertiaStarting
InputElement.ScrollGestureEnded
InputElement.PointerTouchPadGestureMagnify
InputElement.PointerTouchPadGestureRotate
InputElement.SwipeGesture
InputElement.SwipeGestureEnded
InputElement.PointerTouchPadGestureSwipe
InputElement.Tapped
InputElement.RightTapped
InputElement.Holding
InputElement.DoubleTapped
Interactive.RaiseEvent(RoutedEventArgs)
Layoutable.DesiredSizeProperty
Layoutable.WidthProperty
Layoutable.HeightProperty
Layoutable.MinWidthProperty
Layoutable.MaxWidthProperty
Layoutable.MinHeightProperty
Layoutable.MaxHeightProperty
Layoutable.MarginProperty
Layoutable.HorizontalAlignmentProperty
Layoutable.VerticalAlignmentProperty
Layoutable.UseLayoutRoundingProperty
Layoutable.UpdateLayout()
Layoutable.Measure(Size)
Layoutable.Arrange(Rect)
Layoutable.InvalidateMeasure()
Layoutable.InvalidateArrange()
Layoutable.Width
Layoutable.Height
Layoutable.MinWidth
Layoutable.MaxWidth
Layoutable.MinHeight
Layoutable.MaxHeight
Layoutable.Margin
Layoutable.HorizontalAlignment
Layoutable.VerticalAlignment
Layoutable.DesiredSize
Layoutable.IsMeasureValid
Layoutable.IsArrangeValid
Layoutable.UseLayoutRounding
Layoutable.EffectiveViewportChanged
Layoutable.LayoutUpdated
Visual.BoundsProperty
Visual.ClipToBoundsProperty
Visual.ClipProperty
Visual.IsVisibleProperty
Visual.OpacityProperty
Visual.OpacityMaskProperty
Visual.CacheModeProperty
Visual.EffectProperty
Visual.HasMirrorTransformProperty
Visual.RenderTransformProperty
Visual.RenderTransformOriginProperty
Visual.FlowDirectionProperty
Visual.VisualParentProperty
Visual.ZIndexProperty
Visual.GetFlowDirection(Visual)
Visual.SetFlowDirection(Visual, FlowDirection)
Visual.InvalidateVisual()
Visual.Render(DrawingContext)
Visual.Bounds
Visual.ClipToBounds
Visual.Clip
Visual.IsEffectivelyVisible
Visual.IsVisible
Visual.Opacity
Visual.OpacityMask
Visual.CacheMode
Visual.Effect
Visual.HasMirrorTransform
Visual.RenderTransform
Visual.RenderTransformOrigin
Visual.FlowDirection
Visual.ZIndex
Visual.AttachedToVisualTree
Visual.DetachedFromVisualTree
StyledElement.DataContextProperty
StyledElement.NameProperty
StyledElement.ParentProperty
StyledElement.TemplatedParentProperty
StyledElement.ThemeProperty
StyledElement.BeginInit()
StyledElement.EndInit()
StyledElement.ApplyStyling()
StyledElement.Name
StyledElement.Classes
StyledElement.DataContext
StyledElement.IsInitialized
StyledElement.Styles
StyledElement.StyleKey
StyledElement.Resources
StyledElement.TemplatedParent
StyledElement.Theme
StyledElement.Parent
StyledElement.ActualThemeVariant
StyledElement.AttachedToLogicalTree
StyledElement.DetachedFromLogicalTree
StyledElement.DataContextChanged
StyledElement.Initialized
StyledElement.ResourcesChanged
StyledElement.ActualThemeVariantChanged
Animatable.TransitionsProperty
Animatable.Transitions
AvaloniaObject.CheckAccess()
AvaloniaObject.VerifyAccess()
AvaloniaObject.ClearValue(AvaloniaProperty)
AvaloniaObject.ClearValue<T>(AvaloniaProperty<T>)
AvaloniaObject.ClearValue<T>(StyledProperty<T>)
AvaloniaObject.ClearValue<T>(DirectPropertyBase<T>)
AvaloniaObject.GetHashCode()
AvaloniaObject.GetValue(AvaloniaProperty)
AvaloniaObject.GetValue<T>(StyledProperty<T>)
AvaloniaObject.GetValue<T>(DirectPropertyBase<T>)
AvaloniaObject.GetBaseValue<T>(StyledProperty<T>)
AvaloniaObject.IsAnimating(AvaloniaProperty)
AvaloniaObject.IsSet(AvaloniaProperty)
AvaloniaObject.SetValue<T>(StyledProperty<T>, T, BindingPriority)
AvaloniaObject.SetValue<T>(DirectPropertyBase<T>, T)
AvaloniaObject.SetCurrentValue<T>(StyledProperty<T>, T)
AvaloniaObject.Bind(AvaloniaProperty, BindingBase)
AvaloniaObject.CoerceValue(AvaloniaProperty)
AvaloniaObject.this[AvaloniaProperty]
AvaloniaObject.this[IndexerDescriptor]
AvaloniaObject.Dispatcher
AvaloniaObject.PropertyChanged

Remarks

The component's Text is the box's: typing sets it, and a change to it from code shows in the box. Change is raised from the component's Text, whichever way it changed, and only when it changed, except that each step of a SelText raises one, whether or not it changed the text.

The component's SelStart and SelLength are the box's selection: a selection set from code shows in the box, and the user's sets them.

It raises KeyDown, KeyPress and KeyUp. A character typed is a KeyPress first, with its KeyAscii: a handler that sets it to 0 cancels the character, and one that sets another code types that character instead. Backspace is KeyAscii 8, and Ctrl+A is 1. Where its form's KeyPreview is True, the form raises each of them first: a KeyCode the form sets to 0 in KeyDown raises no KeyDown on the box, and the box's KeyPress has the KeyAscii the form's left. It raises Click, DblClick, GotFocus, LostFocus, MouseDown, MouseMove and MouseUp, MouseUp before Click.

Constructors

RDFormsTextBox(ComponentInstance)

Creates a box that shows a TextBox.

public RDFormsTextBox(ComponentInstance instance)

Parameters

instance ComponentInstance

The TextBox.

Exceptions

ArgumentNullException

instance is null.

ArgumentException

instance is not a TextBox.

Properties

SelLength

The component's SelLength: the number of characters selected, from SelStart.

public int SelLength { get; set; }

Property Value

int

Remarks

A value past the end of the text selects up to the end.

Exceptions

FormErrorException

Set below 0 or above 65535: 380, Invalid property value.

SelStart

The component's SelStart: where the selection starts, or the caret's place where nothing is selected; 0 is before the first character.

public int SelStart { get; set; }

Property Value

int

Remarks

A value past the end of the text puts the caret at the end. Setting it selects nothing.

Exceptions

FormErrorException

Set below 0 or above 65535: 380, Invalid property value.

SelText

The component's SelText: the selected text; "" where nothing is selected.

public string SelText { get; set; }

Property Value

string

Remarks

Setting it puts the text in place of the selection, or at the caret, and the caret after it, with nothing selected. Where the box has a MaxLength, what does not fit is left out. A Locked box takes it too. A single-line box raises Change once, even where its text does not change, and none where nothing is selected and a text other than "" does not fit at all. A multi-line box takes it in two steps, each with its Change: the selection is deleted, where there is one, then the text is inserted, where some of it fits.

Exceptions

ArgumentNullException

Set to null.

StyleKeyOverride

Gets the type by which the element is styled.

protected override Type StyleKeyOverride { get; }

Property Value

Type

Remarks

Usually controls are styled by their own type, but there are instances where you want an element to be styled by its base type, e.g. creating SpecialButton that derives from Button and adds extra functionality but is still styled as a regular Button. Override this property to change the style for a control class, returning the type that you wish the elements to be styled as.

Methods

OnKeyDown(KeyEventArgs)

Invoked when an unhandled Avalonia.Input.InputElement.KeyDownEvent reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnKeyDown(KeyEventArgs e)

Parameters

e KeyEventArgs

Data about the event.

OnPropertyChanged(AvaloniaPropertyChangedEventArgs)

Called when a avalonia property changes on the object.

protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)

Parameters

change AvaloniaPropertyChangedEventArgs

The property change details.

OnTextInput(TextInputEventArgs)

Invoked when an unhandled Avalonia.Input.InputElement.TextInputEvent reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnTextInput(TextInputEventArgs e)

Parameters

e TextInputEventArgs

Data about the event.