Class TextBlock
Implements control that can draw text
Inherited Members
Namespace: EmptyKeys.UserInterface.Controls
Assembly: EmptyKeys.UserInterface.dll
Syntax
public class TextBlock : Control
Constructors
TextBlock()
Initializes a new instance of the TextBlock class.
Declaration
public TextBlock()
Fields
TextAlignmentProperty
The text alignment dependency property
Declaration
public static readonly DependencyProperty TextAlignmentProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
TextProperty
The text property
Declaration
public static readonly DependencyProperty TextProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
TextWrappingProperty
The text wrapping property
Declaration
public static readonly DependencyProperty TextWrappingProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
Text
Gets or sets the text.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | The text. |
TextAlignment
Gets or sets the text alignment.
Declaration
public TextAlignment TextAlignment { get; set; }
Property Value
Type | Description |
---|---|
TextAlignment | The text alignment. |
TextWrapping
Gets or sets the text wrapping.
Declaration
public TextWrapping TextWrapping { get; set; }
Property Value
Type | Description |
---|---|
TextWrapping | The text wrapping. |
Methods
ArrangeOverride(Size)
Arrange layout pass - overrider method for children
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
Type | Name | Description |
---|---|---|
EmptyKeys.UserInterface.Size | finalSize | The final size. |
Returns
Type | Description |
---|---|
EmptyKeys.UserInterface.Size |
Overrides
MeasureOverride(Size)
Measure layout pass
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
EmptyKeys.UserInterface.Size | availableSize | available size for element |
Returns
Type | Description |
---|---|
EmptyKeys.UserInterface.Size |
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. |