Class UriTextBox
A HintTextBox designed specifically for entering URIs.
public class UriTextBox : HintTextBox
- Inheritance
-
UriTextBox
- Inherited Members
- Extension Methods
Remarks
Will turn red for invalid input and green for valid input. Will not allow focus to be lost for invalid input.
Constructors
UriTextBox()
public UriTextBox()
Properties
AllowRelative
When set to true
relative URIs are accepted.
public bool AllowRelative { get; set; }
Property Value
HttpOnly
When set to true
only URIs starting with "http:" or "https:" will be considered valid.
public bool HttpOnly { get; set; }
Property Value
IsValid
Indicates whether the currently entered text is a valid URI.
public bool IsValid { get; }
Property Value
Uri
The Uri represented by this text box.
[Browsable(false)]
public Uri? Uri { get; set; }
Property Value
Remarks
It is always safe to set this property. It is safe to read this property after validation has been performed.
Exceptions
Methods
OnDragDrop(DragEventArgs)
Raises the DragDrop event.
protected override void OnDragDrop(DragEventArgs drgevent)
Parameters
drgevent
DragEventArgsA DragEventArgs that contains the event data.
OnDragEnter(DragEventArgs)
Raises the DragEnter event.
protected override void OnDragEnter(DragEventArgs drgevent)
Parameters
drgevent
DragEventArgsA DragEventArgs that contains the event data.
ValidateUri(string)
Checks if a text represents a valid Uri.
protected virtual bool ValidateUri(string text)
Parameters
text
stringText to check.