Table of Contents

Class UriTextBox

Namespace
NanoByte.Common.EtoControls
Assembly
NanoByte.Common.EtoForms.dll

A Eto.Forms.TextBox designed specifically for entering URIs.

public class UriTextBox : TextBox, IHandlerSource, IDisposable, IBindable, IMouseInputSource, IKeyboardInputSource, ICallbackSource
Inheritance
object
Widget
BindableWidget
Control
CommonControl
TextControl
TextBox
UriTextBox
Implements
IHandlerSource
IBindable
IMouseInputSource
IKeyboardInputSource
ICallbackSource
Inherited Members
TextBox.TextChangingEvent
TextBox.OnTextChanging(TextChangingEventArgs)
TextBox.SelectAll()
TextBox.GetCharacterIndex(PointF)
TextBox.GetCallback()
TextBox.ReadOnly
TextBox.MaxLength
TextBox.PlaceholderText
TextBox.ShowBorder
TextBox.TextAlignment
TextBox.CaretIndex
TextBox.Selection
TextBox.SelectedText
TextBox.AutoSelectMode
TextBox.AlwaysShowSelection
TextBox.TextChanging
TextBox.ReadOnlyChanged
TextControl.TextChangedEvent
TextControl.Text
TextControl.TextColor
TextControl.TextBinding
TextControl.TextChanged
CommonControl.Font
Control.SizeChangedEvent
Control.KeyDownEvent
Control.KeyUpEvent
Control.TextInputEvent
Control.MouseDownEvent
Control.MouseUpEvent
Control.MouseMoveEvent
Control.MouseLeaveEvent
Control.MouseEnterEvent
Control.MouseDoubleClickEvent
Control.MouseWheelEvent
Control.GotFocusEvent
Control.LostFocusEvent
Control.ShownEvent
Control.ThemeChangedEvent
Control.DragDropEvent
Control.DragOverEvent
Control.DragEnterEvent
Control.DragLeaveEvent
Control.DragEndEvent
Control.EnabledChangedEvent
Control.OnKeyDown(KeyEventArgs)
Control.OnKeyUp(KeyEventArgs)
Control.OnTextInput(TextInputEventArgs)
Control.OnMouseDown(MouseEventArgs)
Control.OnMouseUp(MouseEventArgs)
Control.OnMouseMove(MouseEventArgs)
Control.OnMouseLeave(MouseEventArgs)
Control.OnMouseEnter(MouseEventArgs)
Control.OnMouseDoubleClick(MouseEventArgs)
Control.OnMouseWheel(MouseEventArgs)
Control.OnDragLeave(DragEventArgs)
Control.OnDragEnd(DragEventArgs)
Control.Invalidate()
Control.Invalidate(Rectangle)
Control.UpdateLayout()
Control.GetPreferredSize()
Control.GetPreferredSize(SizeF)
Control.CaptureMouse()
Control.ReleaseMouseCapture()
Control.Detach()
Control.AttachNative()
Control.DetachNative()
Control.Focus()
Control.SuspendLayout()
Control.ResumeLayout()
Control.PointFromScreen(PointF)
Control.PointToScreen(PointF)
Control.RectangleToScreen(RectangleF)
Control.RectangleFromScreen(RectangleF)
Control.DoDragDrop(DataObject, DragEffects)
Control.DoDragDrop(DataObject, DragEffects, Image, PointF)
Control.TriggerStyleChanged()
Control.OnApplyCascadingStyles()
Control.Print()
Control.IsDesignMode
Control.Handler
Control.Gestures
Control.Loaded
Control.VisualControls
Control.Tag
Control.LogicalParent
Control.IsVisualControl
Control.Size
Control.IsMouseCaptured
Control.Width
Control.Height
Control.Enabled
Control.Visible
Control.Parent
Control.VisualParent
Control.IsAttached
Control.BackgroundColor
Control.HasFocus
Control.IsSuspended
Control.ParentWindow
Control.SupportedPlatformCommands
Control.Bounds
Control.Location
Control.Cursor
Control.ToolTip
Control.TabIndex
Control.TabStop
Control.AllowDrop
Control.ContextMenu
Control.SizeChanged
Control.KeyDown
Control.KeyUp
Control.TextInput
Control.MouseDown
Control.MouseUp
Control.MouseMove
Control.MouseLeave
Control.MouseEnter
Control.MouseDoubleClick
Control.MouseWheel
Control.GotFocus
Control.LostFocus
Control.Shown
Control.ThemeChanged
Control.PreLoad
Control.Load
Control.LoadComplete
Control.UnLoad
Control.DragDrop
Control.DragOver
Control.DragEnter
Control.DragLeave
Control.DragEnd
Control.EnabledChanged
BindableWidget.Unbind()
BindableWidget.UpdateBindings(BindingUpdateMode)
BindableWidget.Parents
BindableWidget.DataContext
BindableWidget.Bindings
BindableWidget.IsDataContextChanging
BindableWidget.DataContextChanged
Widget.Initialize()
Widget.Dispose()
Widget.ToString()
Widget.Platform
Widget.NativeHandle
Widget.Properties
Widget.ID
Widget.Style
Widget.ControlObject
Widget.IsDisposed
Widget.StyleChanged
Extension Methods

Remarks

Will turn red for invalid input and green for valid input. Accepts dropped files and URIs.

Constructors

UriTextBox()

Creates a new URI text box.

public UriTextBox()

Properties

AllowRelative

When set to true relative URIs are accepted.

public bool AllowRelative { get; set; }

Property Value

bool

HttpOnly

When set to true only URIs starting with "http:" or "https:" will be considered valid.

public bool HttpOnly { get; set; }

Property Value

bool

IsValid

Indicates whether the currently entered text is a valid URI.

public bool IsValid { get; }

Property Value

bool

Uri

The Uri represented by this text box.

public Uri? Uri { get; set; }

Property Value

Uri

Remarks

It is always safe to set this property. It is safe to read this property if IsValid is true.

Exceptions

UriFormatException

Trying to read while Eto.Forms.TextControl.Text is not a well-formed Uri.

Methods

OnDragDrop(DragEventArgs)

Raises the Eto.Forms.Control.DragDrop event.

protected override void OnDragDrop(DragEventArgs e)

Parameters

e DragEventArgs

Event arguments

OnDragEnter(DragEventArgs)

Raises the Eto.Forms.Control.DragEnter event.

protected override void OnDragEnter(DragEventArgs e)

Parameters

e DragEventArgs

Event arguments

OnDragOver(DragEventArgs)

Raises the Eto.Forms.Control.DragOver event.

protected override void OnDragOver(DragEventArgs e)

Parameters

e DragEventArgs

Event arguments

ValidateUri(string?)

Checks if a text represents a valid Uri.

protected virtual bool ValidateUri(string? text)

Parameters

text string

Text to check.

Returns

bool