Class TextLabel
Definition
- Namespace:
- Tizen.NUI.BaseComponents
- Assembly:
- Tizen.NUI.dll
A control which renders a short text string.
Text labels are lightweight, non-editable, and do not respond to the user input.
public class TextLabel : View, INotifyPropertyChanged, IDisposable
- Inheritance
- Implements
-
System.ComponentModel.INotifyPropertyChangedSystem.IDisposable
Constructors
View SourceTextLabel()
Creates the TextLabel control.
Declaration
public TextLabel()
TextLabel(string)
Creates the TextLabel control.
Declaration
public TextLabel(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | The text to display |
Properties
View SourceAutoScrollGap
The AutoScrollGap property.
Gap before scrolling wraps.
Declaration
public float AutoScrollGap { get; set; }
Property Value
Type | Description |
---|---|
float |
AutoScrollLoopCount
The AutoScrollLoopCount property.
Number of complete loops when scrolling enabled.
Declaration
public int AutoScrollLoopCount { get; set; }
Property Value
Type | Description |
---|---|
int |
AutoScrollLoopDelay
The AutoScrollLoopDelay property.
The amount of time to delay the starting time of auto scrolling and further loops.
Declaration
public float AutoScrollLoopDelay { get; set; }
Property Value
Type | Description |
---|---|
float |
AutoScrollSpeed
The AutoScrollSpeed property.
Sets the speed of scrolling in pixels per second.
Declaration
public int AutoScrollSpeed { get; set; }
Property Value
Type | Description |
---|---|
int |
AutoScrollStopMode
The AutoScrollStopMode property.
The auto scrolling stop behaviour.
The default value is AutoScrollStopMode.FinishLoop.
Declaration
public AutoScrollStopMode AutoScrollStopMode { get; set; }
Property Value
Type | Description |
---|---|
AutoScrollStopMode |
Ellipsis
The Ellipsis property.
Enable or disable the ellipsis.
Declaration
public bool Ellipsis { get; set; }
Property Value
Type | Description |
---|---|
bool |
EllipsisPosition
The ellipsis position of the text.
Specifies which portion of the text should be replaced with an ellipsis when the text size exceeds the layout size.
Declaration
public EllipsisPosition EllipsisPosition { get; set; }
Property Value
Type | Description |
---|---|
EllipsisPosition |
Emboss
The Emboss property.
The default emboss parameters.
Declaration
public string Emboss { get; set; }
Property Value
Type | Description |
---|---|
string |
EnableAutoScroll
The EnableAutoScroll property.
Starts or stops auto scrolling.
Declaration
public bool EnableAutoScroll { get; set; }
Property Value
Type | Description |
---|---|
bool |
EnableMarkup
The EnableMarkup property.
Whether the mark-up processing is enabled.
Declaration
public bool EnableMarkup { get; set; }
Property Value
Type | Description |
---|---|
bool |
FontFamily
The FontFamily property.
The requested font family to use.
Declaration
public string FontFamily { get; set; }
Property Value
Type | Description |
---|---|
string |
FontSizeScale
The FontSizeScale property for scaling the specified font size up or down.
The default value is 1.0.
The given font size scale value is used for multiplying the specified font size before querying fonts.
If FontSizeScale.UseSystemSetting, will use the SystemSettings.FontSize internally.
Declaration
public float FontSizeScale { get; set; }
Property Value
Type | Description |
---|---|
float |
FontStyle
The FontStyle property.
The requested font style to use.
The fontStyle map contains the following keys :
width (string) | The width key defines occupied by each glyph. (values: ultraCondensed, extraCondensed, condensed, semiCondensed, normal, semiExpanded, expanded, extraExpanded, ultraExpanded) |
weight (string) | The weight key defines the thickness or darkness of the glyphs. (values: thin, ultraLight, extraLight, light, demiLight, semiLight, book, normal, regular, medium, demiBold, semiBold, bold, ultraBold, extraBold, black, heavy, extraBlack) |
slant (string) | The slant key defines whether to use italics. (values: normal, roman, italic, oblique) |
Declaration
public PropertyMap FontStyle { get; set; }
Property Value
Type | Description |
---|---|
PropertyMap |
HorizontalAlignment
The HorizontalAlignment property.
The line horizontal alignment.
Declaration
public HorizontalAlignment HorizontalAlignment { get; set; }
Property Value
Type | Description |
---|---|
HorizontalAlignment |
LineCount
Gets the line count of the text.
Declaration
public int LineCount { get; }
Property Value
Type | Description |
---|---|
int |
LineSpacing
The LineSpacing property.
The default extra space between lines in points.
Declaration
public float LineSpacing { get; set; }
Property Value
Type | Description |
---|---|
float |
LineWrapMode
The LineWrapMode property.
line wrap mode when the text lines over layout width.
Declaration
public LineWrapMode LineWrapMode { get; set; }
Property Value
Type | Description |
---|---|
LineWrapMode |
MatchSystemLanguageDirection
The text alignment to match the direction of the system language.
Declaration
public bool MatchSystemLanguageDirection { get; set; }
Property Value
Type | Description |
---|---|
bool |
MultiLine
The MultiLine property.
The single-line or multi-line layout option.
Declaration
public bool MultiLine { get; set; }
Property Value
Type | Description |
---|---|
bool |
Outline
The Outline property.
The default outline parameters.
The outline map contains the following keys :
color (Color) | The color of the outline (the default color is Color.White) |
width (float) | The width in pixels of the outline (If not provided then the outline is not enabled) |
Declaration
public PropertyMap Outline { get; set; }
Property Value
Type | Description |
---|---|
PropertyMap |
PixelSize
The PixelSize property.
The size of font in pixels.
Declaration
public float PixelSize { get; set; }
Property Value
Type | Description |
---|---|
float |
PointSize
The PointSize property.
The size of font in points.
Declaration
public float PointSize { get; set; }
Property Value
Type | Description |
---|---|
float |
Shadow
The Shadow property.
The default shadow parameters.
The shadow map contains the following keys :
color (Color) | The color of the shadow (the default color is Color.Black) |
offset (Vector2) | The offset in pixels of the shadow (If not provided then the shadow is not enabled) |
blurRadius (float) | The radius of the Gaussian blur for the soft shadow (If not provided then the soft shadow is not enabled) |
Declaration
public PropertyMap Shadow { get; set; }
Property Value
Type | Description |
---|---|
PropertyMap |
ShadowColor
The ShadowColor property.
The color of a drop shadow.
Declaration
[Obsolete("Do not use this ShadowColor(Deprecated). Use Shadow instead.")]
public Vector4 ShadowColor { get; set; }
Property Value
Type | Description |
---|---|
Vector4 |
Remarks
Deprecated.(API Level 6) Use Shadow instead. The property cascade chaining set is possible. For example, this (textLabel.ShadowColor.X = 0.1f;) is possible.
ShadowOffset
The ShadowOffset property.
The drop shadow offset 0 indicates no shadow.
Declaration
[Obsolete("Do not use this ShadowOffset(Deprecated). Use Shadow instead.")]
public Vector2 ShadowOffset { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Remarks
Deprecated.(API Level 6) Use Shadow instead. The property cascade chaining set is possible. For example, this (textLabel.ShadowOffset.X = 0.1f;) is possible.
Text
The Text property.
The text to display in the UTF-8 format.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
string |
TextColor
The TextColor property.
The color of the text.
Animation framework can be used to change the color of the text when not using mark up.
Cannot animate the color when text is auto scrolling.
Declaration
public Color TextColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
Remarks
The property cascade chaining set is possible. For example, this (textLabel.TextColor.X = 0.1f;) is possible.
TranslatableText
The TranslatableText property.
The text can set the SID value.
Declaration
public string TranslatableText { get; set; }
Property Value
Type | Description |
---|---|
string |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | ResourceManager about multilingual is null. |
Underline
The Underline property.
The default underline parameters.
The underline map contains the following keys :
enable (bool) | Whether the underline is enabled (the default value is false) |
color (Color) | The color of the underline (If not provided then the color of the text is used) |
height (float) | The height in pixels of the underline (the default value is 1.f) |
Declaration
public PropertyMap Underline { get; set; }
Property Value
Type | Description |
---|---|
PropertyMap |
UnderlineColor
The UnderlineColor property.
Overrides the underline height from font metrics.
Declaration
[Obsolete("Do not use this UnderlineColor(Deprecated). Use Underline instead.")]
public Vector4 UnderlineColor { get; set; }
Property Value
Type | Description |
---|---|
Vector4 |
Remarks
Deprecated.(API Level 6) Use Underline instead. The property cascade chaining set is possible. For example, this (textLabel.UnderlineColor.X = 0.1f;) is possible.
UnderlineEnabled
The UnderlineEnabled property.
The underline enabled flag.
Declaration
[Obsolete("Do not use this UnderlineEnabled(Deprecated). Use Underline instead.")]
public bool UnderlineEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Deprecated.(API Level 6) Use Underline instead.
UnderlineHeight
The UnderlineHeight property.
Overrides the underline height from font metrics.
Declaration
[Obsolete("Do not use this UnderlineHeight(Deprecated). Use Underline instead.")]
public float UnderlineHeight { get; set; }
Property Value
Type | Description |
---|---|
float |
Remarks
Deprecated.(API Level 6) Use Underline instead.
VerticalAlignment
The VerticalAlignment property.
The line vertical alignment.
Declaration
public VerticalAlignment VerticalAlignment { get; set; }
Property Value
Type | Description |
---|---|
VerticalAlignment |
Methods
View SourceOnBindingContextChanged()
Invoked whenever the binding context of the textlabel changes. Implement this method to add class handling for this event.
Declaration
protected override void OnBindingContextChanged()
Overrides
Events
View SourceAnchorClicked
The AnchorClicked signal is emitted when the anchor is clicked.
Declaration
public event EventHandler<AnchorClickedEventArgs> AnchorClicked
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><AnchorClickedEventArgs> |