Class TextBoxBase
Implements abstract base features for controls with text input
Inherited Members
Namespace: EmptyKeys.UserInterface.Controls.Primitives
Assembly: EmptyKeys.UserInterface.dll
Syntax
public abstract class TextBoxBase : Control
Fields
CaretBrushProperty
The caret brush property
Declaration
public static readonly DependencyProperty CaretBrushProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ContentElementName
The content element name in control template (ScrollViewer type in default template)
Declaration
public const string ContentElementName = "PART_ScrollViewer"
Field Value
Type | Description |
---|---|
System.String |
HorizontalScrollBarVisibilityProperty
The horizontal scroll bar visibility property
Declaration
public static readonly DependencyProperty HorizontalScrollBarVisibilityProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
IsReadOnlyProperty
is read only property
Declaration
public static readonly DependencyProperty IsReadOnlyProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
IsUndoEnabledProperty
The is undo enabled property
Declaration
public static readonly DependencyProperty IsUndoEnabledProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
SelectionBrushProperty
The selection brush property
Declaration
public static readonly DependencyProperty SelectionBrushProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
SelectionOpacityProperty
The selection opacity property
Declaration
public static readonly DependencyProperty SelectionOpacityProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
TextAlignmentProperty
The text alignment dependency property
Declaration
public static readonly DependencyProperty TextAlignmentProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
UndoLimitProperty
The undo limit property
Declaration
public static readonly DependencyProperty UndoLimitProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
VerticalScrollBarVisibilityProperty
The vertical scroll bar visibility property
Declaration
public static readonly DependencyProperty VerticalScrollBarVisibilityProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
CaretBrush
Gets or sets the caret brush.
Declaration
public Brush CaretBrush { get; set; }
Property Value
Type | Description |
---|---|
Brush | The caret brush. |
ExtentHeight
Gets the height of the extent.
Declaration
public float ExtentHeight { get; }
Property Value
Type | Description |
---|---|
System.Single | The height of the extent. |
ExtentWidth
Gets the width of the extent.
Declaration
public float ExtentWidth { get; }
Property Value
Type | Description |
---|---|
System.Single | The width of the extent. |
HorizontalOffset
Gets the horizontal offset.
Declaration
public float HorizontalOffset { get; }
Property Value
Type | Description |
---|---|
System.Single | The horizontal offset. |
HorizontalScrollBarVisibility
Gets or sets the horizontal scroll bar visibility.
Declaration
public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }
Property Value
Type | Description |
---|---|
ScrollBarVisibility | The horizontal scroll bar visibility. |
IsReadOnly
Gets or sets a value indicating whether this instance is read only.
Declaration
public bool IsReadOnly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsUndoEnabled
Gets or sets a value indicating whether this instance is undo enabled.
Declaration
public bool IsUndoEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
SelectionBrush
Gets or sets the selection brush.
Declaration
public Brush SelectionBrush { get; set; }
Property Value
Type | Description |
---|---|
Brush | The selection brush. |
SelectionOpacity
Gets or sets the selection opacity.
Declaration
public float SelectionOpacity { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The selection opacity. |
TextAlignment
Gets or sets the text alignment.
Declaration
public TextAlignment TextAlignment { get; set; }
Property Value
Type | Description |
---|---|
TextAlignment | The text alignment. |
UndoLimit
Gets or sets the undo limit.
Declaration
public int UndoLimit { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The undo limit. |
VerticalOffset
Gets the vertical offset.
Declaration
public float VerticalOffset { get; }
Property Value
Type | Description |
---|---|
System.Single | The vertical offset. |
VerticalScrollBarVisibility
Gets or sets the vertical scroll bar visibility.
Declaration
public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }
Property Value
Type | Description |
---|---|
ScrollBarVisibility | The vertical scroll bar visibility. |
ViewportHeight
Gets the height of the viewport.
Declaration
public float ViewportHeight { get; }
Property Value
Type | Description |
---|---|
System.Single | The height of the viewport. |
ViewportWidth
Gets the width of the viewport.
Declaration
public float ViewportWidth { get; }
Property Value
Type | Description |
---|---|
System.Single | The width of the viewport. |
Methods
OnApplyTemplate()
Called when [apply template].
Declaration
public override void OnApplyTemplate()
Overrides
OnDraw(Renderer, Double, Single)
Called when [draw].
Declaration
protected override void OnDraw(Renderer spriterenderer, double elapsedGameTime, float opacity)
Parameters
Type | Name | Description |
---|---|---|
EmptyKeys.UserInterface.Renderers.Renderer | spriterenderer | The sprite renderer. |
System.Double | elapsedGameTime | The elapsed game time. |
System.Single | opacity | The opacity. |
Overrides
OnKeyDown(KeyEventArgs)
Raises the KeyDown event.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
KeyEventArgs | e | The KeyEventArgs instance containing the event data. |
Overrides
OnLostFocus(Object, RoutedEventArgs)
Called when [lost focus].
Declaration
protected override void OnLostFocus(object sender, RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
RoutedEventArgs | e | The RoutedEventArgs instance containing the event data. |
Overrides
OnMouseDoubleClick(MouseButtonEventArgs)
Raises the MouseDoubleClick event.
Declaration
protected override void OnMouseDoubleClick(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseButtonEventArgs | e | The MouseButtonEventArgs instance containing the event data. |
Overrides
OnMouseDown(MouseButtonEventArgs)
Raises the MouseDown event.
Declaration
protected override void OnMouseDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseButtonEventArgs | e | The MouseButtonEventArgs instance containing the event data. |
Overrides
OnMouseMove(Object, MouseEventArgs)
Called when [mouse move].
Declaration
protected override void OnMouseMove(object sender, MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
MouseEventArgs | e | The MouseEventArgs instance containing the event data. |
Overrides
OnMouseUp(Object, MouseButtonEventArgs)
Called when [mouse up].
Declaration
protected override void OnMouseUp(object sender, MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
MouseButtonEventArgs | e | The MouseButtonEventArgs instance containing the event data. |
Overrides
OnTouchDown(TouchEventArgs)
Raises the TouchDown event.
Declaration
protected override void OnTouchDown(TouchEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TouchEventArgs | e | The TouchEventArgs instance containing the event data. |
Overrides
SelectAll()
Selects all.
Declaration
public void SelectAll()