[NUI] Add ChildAdded, ChildRemoved, PropertySet events (#288)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextLabel.cs
1 /*
2  * Copyright(c) 2017 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 extern alias TizenSystemSettings;
19 using TizenSystemSettings.Tizen.System;
20 using System;
21 using System.Globalization;
22 using System.ComponentModel;
23 namespace Tizen.NUI.BaseComponents
24 {
25
26     /// <summary>
27     /// A control which renders a short text string.<br />
28     /// Text labels are lightweight, non-editable, and do not respond to the user input.<br />
29     /// </summary>
30     /// <since_tizen> 3 </since_tizen>
31     public class TextLabel : View
32     {
33         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
34         private string textLabelSid = null;
35         private bool systemlangTextFlag = false;
36         internal TextLabel(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextLabel_SWIGUpcast(cPtr), cMemoryOwn)
37         {
38             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
39         }
40
41         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextLabel obj)
42         {
43             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
44         }
45
46         /// <summary>
47         /// Downcasts a handle to textLabel handle
48         /// </summary>
49         /// <param name="handle"></param>
50         /// <returns></returns>
51         /// <since_tizen> 3 </since_tizen>
52         /// Please do not use! this will be deprecated!
53         /// Instead please use as keyword.
54         [Obsolete("Please do not use! This will be deprecated! Please use as keyword instead! " +
55             "Like: " +
56             "BaseHandle handle = new TextLabel(\"Hello World!\"); " +
57             "TextLabel label = handle as TextLabel")]
58         [EditorBrowsable(EditorBrowsableState.Never)]
59         public static TextLabel DownCast(BaseHandle handle)
60         {
61             TextLabel ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextLabel;
62
63             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
64             return ret;
65         }
66
67         /// <summary>
68         /// Dispose.
69         /// </summary>
70         /// <since_tizen> 3 </since_tizen>
71         protected override void Dispose(DisposeTypes type)
72         {
73             if (disposed)
74             {
75                 return;
76             }
77
78             if(type == DisposeTypes.Explicit)
79             {
80                 //Called by User
81                 //Release your own managed resources here.
82                 //You should release all of your own disposable objects here.
83             }
84
85             //Release your own unmanaged resources here.
86             //You should not access any managed member here except static instance.
87             //because the execution order of Finalizes is non-deterministic.
88
89             if (swigCPtr.Handle != global::System.IntPtr.Zero)
90             {
91                 if (swigCMemOwn)
92                 {
93                     swigCMemOwn = false;
94                     NDalicPINVOKE.delete_TextLabel(swigCPtr);
95                 }
96                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
97             }
98
99             base.Dispose(type);
100         }
101
102         internal new class Property
103         {
104             internal static readonly int RENDERING_BACKEND = NDalicPINVOKE.TextLabel_Property_RENDERING_BACKEND_get();
105             internal static readonly int TEXT = NDalicPINVOKE.TextLabel_Property_TEXT_get();
106             internal static readonly int FONT_FAMILY = NDalicPINVOKE.TextLabel_Property_FONT_FAMILY_get();
107             internal static readonly int FONT_STYLE = NDalicPINVOKE.TextLabel_Property_FONT_STYLE_get();
108             internal static readonly int POINT_SIZE = NDalicPINVOKE.TextLabel_Property_POINT_SIZE_get();
109             internal static readonly int MULTI_LINE = NDalicPINVOKE.TextLabel_Property_MULTI_LINE_get();
110             internal static readonly int HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TextLabel_Property_HORIZONTAL_ALIGNMENT_get();
111             internal static readonly int VERTICAL_ALIGNMENT = NDalicPINVOKE.TextLabel_Property_VERTICAL_ALIGNMENT_get();
112             internal static readonly int TEXT_COLOR = NDalicPINVOKE.TextLabel_Property_TEXT_COLOR_get();
113             internal static readonly int SHADOW_OFFSET = NDalicPINVOKE.TextLabel_Property_SHADOW_OFFSET_get();
114             internal static readonly int SHADOW_COLOR = NDalicPINVOKE.TextLabel_Property_SHADOW_COLOR_get();
115             internal static readonly int UNDERLINE_ENABLED = NDalicPINVOKE.TextLabel_Property_UNDERLINE_ENABLED_get();
116             internal static readonly int UNDERLINE_COLOR = NDalicPINVOKE.TextLabel_Property_UNDERLINE_COLOR_get();
117             internal static readonly int UNDERLINE_HEIGHT = NDalicPINVOKE.TextLabel_Property_UNDERLINE_HEIGHT_get();
118             internal static readonly int ENABLE_MARKUP = NDalicPINVOKE.TextLabel_Property_ENABLE_MARKUP_get();
119             internal static readonly int ENABLE_AUTO_SCROLL = NDalicPINVOKE.TextLabel_Property_ENABLE_AUTO_SCROLL_get();
120             internal static readonly int AUTO_SCROLL_SPEED = NDalicPINVOKE.TextLabel_Property_AUTO_SCROLL_SPEED_get();
121             internal static readonly int AUTO_SCROLL_LOOP_COUNT = NDalicPINVOKE.TextLabel_Property_AUTO_SCROLL_LOOP_COUNT_get();
122             internal static readonly int AUTO_SCROLL_GAP = NDalicPINVOKE.TextLabel_Property_AUTO_SCROLL_GAP_get();
123             internal static readonly int LINE_SPACING = NDalicPINVOKE.TextLabel_Property_LINE_SPACING_get();
124             internal static readonly int UNDERLINE = NDalicPINVOKE.TextLabel_Property_UNDERLINE_get();
125             internal static readonly int SHADOW = NDalicPINVOKE.TextLabel_Property_SHADOW_get();
126             internal static readonly int EMBOSS = NDalicPINVOKE.TextLabel_Property_EMBOSS_get();
127             internal static readonly int OUTLINE = NDalicPINVOKE.TextLabel_Property_OUTLINE_get();
128             internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextLabel_Property_PIXEL_SIZE_get();
129             internal static readonly int ELLIPSIS = NDalicManualPINVOKE.TextLabel_Property_ELLIPSIS_get();
130             internal static readonly int AUTO_SCROLL_STOP_MODE = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_STOP_MODE_get();
131             internal static readonly int AUTO_SCROLL_LOOP_DELAY = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get();
132             internal static readonly int LINE_COUNT = NDalicManualPINVOKE.TextLabel_Property_LINE_COUNT_get();
133             internal static readonly int LINE_WRAP_MODE = NDalicManualPINVOKE.TextLabel_Property_LINE_WRAP_MODE_get();
134             internal static readonly int TEXT_DIRECTION = NDalicManualPINVOKE.TextLabel_Property_TEXT_DIRECTION_get();
135             internal static readonly int VERTICAL_LINE_ALIGNMENT = NDalicManualPINVOKE.TextLabel_Property_VERTICAL_LINE_ALIGNMENT_get();
136         }
137
138         /// <summary>
139         /// Creates the TextLabel control.
140         /// </summary>
141         /// <since_tizen> 3 </since_tizen>
142         public TextLabel() : this(NDalicPINVOKE.TextLabel_New__SWIG_0(), true)
143         {
144             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145
146         }
147
148         /// <summary>
149         /// Creates the TextLabel control.
150         /// </summary>
151         /// <param name="text">The text to display</param>
152         /// <since_tizen> 3 </since_tizen>
153         public TextLabel(string text) : this(NDalicPINVOKE.TextLabel_New__SWIG_1(text), true)
154         {
155             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
156
157         }
158         internal TextLabel(TextLabel handle) : this(NDalicPINVOKE.new_TextLabel__SWIG_1(TextLabel.getCPtr(handle)), true)
159         {
160             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161         }
162
163         /// <summary>
164         /// The TranslatableText property.<br />
165         /// The text can set the SID value.<br />
166         /// </summary>
167         /// <exception cref='ArgumentNullException'>
168         /// ResourceManager about multilingual is null.
169         /// </exception>
170         /// <since_tizen> 4 </since_tizen>
171         public string TranslatableText
172         {
173             get
174             {
175                 return textLabelSid;
176             }
177             set
178             {
179                 if (NUIApplication.MultilingualResourceManager == null)
180                 {
181                     throw new ArgumentNullException("ResourceManager about multilingual is null");
182                 }
183                 string translatableText = null;
184                 textLabelSid = value;
185                 translatableText = NUIApplication.MultilingualResourceManager?.GetString(textLabelSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
186                 if (translatableText != null)
187                 {
188                     Text = translatableText;
189                     if (systemlangTextFlag == false)
190                     {
191                         SystemSettings.LocaleLanguageChanged += new WeakEventHandler<LocaleLanguageChangedEventArgs>(SystemSettings_LocaleLanguageChanged).Handler;
192                         systemlangTextFlag = true;
193                     }
194                 }
195                 else
196                 {
197                     Text = "";
198                 }
199                 NotifyPropertyChanged();
200             }
201         }
202         private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
203         {
204             Text = NUIApplication.MultilingualResourceManager?.GetString(textLabelSid, new CultureInfo(e.Value.Replace("_", "-")));
205         }
206
207         /// <summary>
208         /// The Text property.<br />
209         /// The text to display in the UTF-8 format.<br />
210         /// </summary>
211         /// <since_tizen> 3 </since_tizen>
212         public string Text
213         {
214             get
215             {
216                 string temp;
217                 GetProperty(TextLabel.Property.TEXT).Get(out temp);
218                 return temp;
219             }
220             set
221             {
222                 SetProperty(TextLabel.Property.TEXT, new Tizen.NUI.PropertyValue(value));
223                 NotifyPropertyChanged();
224             }
225         }
226
227         /// <summary>
228         /// The FontFamily property.<br />
229         /// The requested font family to use.<br />
230         /// </summary>
231         /// <since_tizen> 3 </since_tizen>
232         public string FontFamily
233         {
234             get
235             {
236                 string temp;
237                 GetProperty(TextLabel.Property.FONT_FAMILY).Get(out temp);
238                 return temp;
239             }
240             set
241             {
242                 SetProperty(TextLabel.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
243                 NotifyPropertyChanged();
244             }
245         }
246
247         /// <summary>
248         /// The FontStyle property.<br />
249         /// The requested font style to use.<br />
250         /// </summary>
251         /// <since_tizen> 3 </since_tizen>
252         public PropertyMap FontStyle
253         {
254             get
255             {
256                 PropertyMap temp = new PropertyMap();
257                 GetProperty(TextLabel.Property.FONT_STYLE).Get(temp);
258                 return temp;
259             }
260             set
261             {
262                 SetProperty(TextLabel.Property.FONT_STYLE, new Tizen.NUI.PropertyValue(value));
263                 NotifyPropertyChanged();
264             }
265         }
266
267         /// <summary>
268         /// The PointSize property.<br />
269         /// The size of font in points.<br />
270         /// </summary>
271         /// <since_tizen> 3 </since_tizen>
272         public float PointSize
273         {
274             get
275             {
276                 float temp = 0.0f;
277                 GetProperty(TextLabel.Property.POINT_SIZE).Get(out temp);
278                 return temp;
279             }
280             set
281             {
282                 SetProperty(TextLabel.Property.POINT_SIZE, new Tizen.NUI.PropertyValue(value));
283                 NotifyPropertyChanged();
284             }
285         }
286
287         /// <summary>
288         /// The MultiLine property.<br />
289         /// The single-line or multi-line layout option.<br />
290         /// </summary>
291         /// <since_tizen> 3 </since_tizen>
292         public bool MultiLine
293         {
294             get
295             {
296                 bool temp = false;
297                 GetProperty(TextLabel.Property.MULTI_LINE).Get(out temp);
298                 return temp;
299             }
300             set
301             {
302                 SetProperty(TextLabel.Property.MULTI_LINE, new Tizen.NUI.PropertyValue(value));
303                 NotifyPropertyChanged();
304             }
305         }
306
307         /// <summary>
308         /// The HorizontalAlignment property.<br />
309         /// The line horizontal alignment.<br />
310         /// </summary>
311         /// <since_tizen> 3 </since_tizen>
312         public HorizontalAlignment HorizontalAlignment
313         {
314             get
315             {
316                 string temp;
317                 if (GetProperty(TextLabel.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
318                 {
319                     NUILog.Error("HorizontalAlignment get error!");
320                 }
321                 switch (temp)
322                 {
323                     case "BEGIN":
324                         return HorizontalAlignment.Begin;
325                     case "CENTER":
326                         return HorizontalAlignment.Center;
327                     case "END":
328                         return HorizontalAlignment.End;
329                     default:
330                         return HorizontalAlignment.Begin;
331                 }
332             }
333             set
334             {
335                 string valueToString = "";
336                 switch (value)
337                 {
338                     case HorizontalAlignment.Begin:
339                     {
340                         valueToString = "BEGIN";
341                         break;
342                     }
343                     case HorizontalAlignment.Center:
344                     {
345                         valueToString = "CENTER";
346                         break;
347                     }
348                     case HorizontalAlignment.End:
349                     {
350                         valueToString = "END";
351                         break;
352                     }
353                     default:
354                     {
355                         valueToString = "BEGIN";
356                         break;
357                     }
358                 }
359                 SetProperty(TextLabel.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
360                 NotifyPropertyChanged();
361             }
362         }
363
364         /// <summary>
365         /// The VerticalAlignment property.<br />
366         /// The line vertical alignment.<br />
367         /// </summary>
368         /// <since_tizen> 3 </since_tizen>
369         public VerticalAlignment VerticalAlignment
370         {
371             get
372             {
373                 string temp;
374                 if (GetProperty(TextLabel.Property.VERTICAL_ALIGNMENT).Get(out temp) == false)
375                 {
376                     NUILog.Error("VerticalAlignment get error!");
377                 }
378
379                 switch (temp)
380                 {
381                     case "TOP":
382                         return VerticalAlignment.Top;
383                     case "CENTER":
384                         return VerticalAlignment.Center;
385                     case "BOTTOM":
386                         return VerticalAlignment.Bottom;
387                     default:
388                         return VerticalAlignment.Bottom;
389                 }
390             }
391             set
392             {
393                 string valueToString = "";
394                 switch (value)
395                 {
396                     case VerticalAlignment.Top:
397                     {
398                         valueToString = "TOP";
399                         break;
400                     }
401                     case VerticalAlignment.Center:
402                     {
403                         valueToString = "CENTER";
404                         break;
405                     }
406                     case VerticalAlignment.Bottom:
407                     {
408                         valueToString = "BOTTOM";
409                         break;
410                     }
411                     default:
412                     {
413                         valueToString = "BOTTOM";
414                         break;
415                     }
416                 }
417                 SetProperty(TextLabel.Property.VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
418                 NotifyPropertyChanged();
419             }
420         }
421
422         /// <summary>
423         /// The TextColor property.<br />
424         /// The color of the text.<br />
425         /// Animation framework can be used to change the color of the text when not using mark up.<br />
426         /// Cannot animate the color when text is auto scrolling.<br />
427         /// </summary>
428         /// <since_tizen> 3 </since_tizen>
429         public Color TextColor
430         {
431             get
432             {
433                 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
434                 GetProperty(TextLabel.Property.TEXT_COLOR).Get(temp);
435                 return temp;
436             }
437             set
438             {
439                 SetProperty(TextLabel.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
440                 NotifyPropertyChanged();
441             }
442         }
443
444         /// <summary>
445         /// The ShadowOffset property.<br />
446         /// The drop shadow offset 0 indicates no shadow.<br />
447         /// </summary>
448         /// <since_tizen> 3 </since_tizen>
449         public Vector2 ShadowOffset
450         {
451             get
452             {
453                 Vector2 temp = new Vector2(0.0f, 0.0f);
454                 GetProperty(TextLabel.Property.SHADOW_OFFSET).Get(temp);
455                 return temp;
456             }
457             set
458             {
459                 SetProperty(TextLabel.Property.SHADOW_OFFSET, new Tizen.NUI.PropertyValue(value));
460                 NotifyPropertyChanged();
461             }
462         }
463
464         /// <summary>
465         /// The ShadowColor property.<br />
466         /// The color of a drop shadow.<br />
467         /// </summary>
468         /// <since_tizen> 3 </since_tizen>
469         public Vector4 ShadowColor
470         {
471             get
472             {
473                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
474                 GetProperty(TextLabel.Property.SHADOW_COLOR).Get(temp);
475                 return temp;
476             }
477             set
478             {
479                 SetProperty(TextLabel.Property.SHADOW_COLOR, new Tizen.NUI.PropertyValue(value));
480                 NotifyPropertyChanged();
481             }
482         }
483
484         /// <summary>
485         /// The UnderlineEnabled property.<br />
486         /// The underline enabled flag.<br />
487         /// </summary>
488         /// <since_tizen> 3 </since_tizen>
489         public bool UnderlineEnabled
490         {
491             get
492             {
493                 bool temp = false;
494                 GetProperty(TextLabel.Property.UNDERLINE_ENABLED).Get(out temp);
495                 return temp;
496             }
497             set
498             {
499                 SetProperty(TextLabel.Property.UNDERLINE_ENABLED, new Tizen.NUI.PropertyValue(value));
500                 NotifyPropertyChanged();
501             }
502         }
503
504         /// <summary>
505         /// The UnderlineColor property.<br />
506         /// Overrides the underline height from font metrics.<br />
507         /// </summary>
508         /// <since_tizen> 3 </since_tizen>
509         public Vector4 UnderlineColor
510         {
511             get
512             {
513                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
514                 GetProperty(TextLabel.Property.UNDERLINE_COLOR).Get(temp);
515                 return temp;
516             }
517             set
518             {
519                 SetProperty(TextLabel.Property.UNDERLINE_COLOR, new Tizen.NUI.PropertyValue(value));
520                 NotifyPropertyChanged();
521             }
522         }
523
524         /// <summary>
525         /// The UnderlineHeight property.<br />
526         /// Overrides the underline height from font metrics.<br />
527         /// </summary>
528         /// <since_tizen> 3 </since_tizen>
529         public float UnderlineHeight
530         {
531             get
532             {
533                 float temp = 0.0f;
534                 GetProperty(TextLabel.Property.UNDERLINE_HEIGHT).Get(out temp);
535                 return temp;
536             }
537             set
538             {
539                 SetProperty(TextLabel.Property.UNDERLINE_HEIGHT, new Tizen.NUI.PropertyValue(value));
540                 NotifyPropertyChanged();
541             }
542         }
543
544         /// <summary>
545         /// The EnableMarkup property.<br />
546         /// Whether the mark-up processing is enabled.<br />
547         /// </summary>
548         /// <since_tizen> 3 </since_tizen>
549         public bool EnableMarkup
550         {
551             get
552             {
553                 bool temp = false;
554                 GetProperty(TextLabel.Property.ENABLE_MARKUP).Get(out temp);
555                 return temp;
556             }
557             set
558             {
559                 SetProperty(TextLabel.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue(value));
560                 NotifyPropertyChanged();
561             }
562         }
563
564         /// <summary>
565         /// The EnableAutoScroll property.<br />
566         /// Starts or stops auto scrolling.<br />
567         /// </summary>
568         /// <since_tizen> 3 </since_tizen>
569         public bool EnableAutoScroll
570         {
571             get
572             {
573                 bool temp = false;
574                 GetProperty(TextLabel.Property.ENABLE_AUTO_SCROLL).Get(out temp);
575                 return temp;
576             }
577             set
578             {
579                 SetProperty(TextLabel.Property.ENABLE_AUTO_SCROLL, new Tizen.NUI.PropertyValue(value));
580                 NotifyPropertyChanged();
581             }
582         }
583
584         /// <summary>
585         /// The AutoScrollSpeed property.<br />
586         /// Sets the speed of scrolling in pixels per second.<br />
587         /// </summary>
588         /// <since_tizen> 3 </since_tizen>
589         public int AutoScrollSpeed
590         {
591             get
592             {
593                 int temp = 0;
594                 GetProperty(TextLabel.Property.AUTO_SCROLL_SPEED).Get(out temp);
595                 return temp;
596             }
597             set
598             {
599                 SetProperty(TextLabel.Property.AUTO_SCROLL_SPEED, new Tizen.NUI.PropertyValue(value));
600                 NotifyPropertyChanged();
601             }
602         }
603
604         /// <summary>
605         /// The AutoScrollLoopCount property.<br />
606         /// Number of complete loops when scrolling enabled.<br />
607         /// </summary>
608         /// <since_tizen> 3 </since_tizen>
609         public int AutoScrollLoopCount
610         {
611             get
612             {
613                 int temp = 0;
614                 GetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_COUNT).Get(out temp);
615                 return temp;
616             }
617             set
618             {
619                 SetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_COUNT, new Tizen.NUI.PropertyValue(value));
620                 NotifyPropertyChanged();
621             }
622         }
623
624         /// <summary>
625         /// The AutoScrollGap property.<br />
626         /// Gap before scrolling wraps.<br />
627         /// </summary>
628         /// <since_tizen> 3 </since_tizen>
629         public float AutoScrollGap
630         {
631             get
632             {
633                 float temp = 0.0f;
634                 GetProperty(TextLabel.Property.AUTO_SCROLL_GAP).Get(out temp);
635                 return temp;
636             }
637             set
638             {
639                 SetProperty(TextLabel.Property.AUTO_SCROLL_GAP, new Tizen.NUI.PropertyValue(value));
640                 NotifyPropertyChanged();
641             }
642         }
643
644         /// <summary>
645         /// The LineSpacing property.<br />
646         /// The default extra space between lines in points.<br />
647         /// </summary>
648         /// <since_tizen> 3 </since_tizen>
649         public float LineSpacing
650         {
651             get
652             {
653                 float temp = 0.0f;
654                 GetProperty(TextLabel.Property.LINE_SPACING).Get(out temp);
655                 return temp;
656             }
657             set
658             {
659                 SetProperty(TextLabel.Property.LINE_SPACING, new Tizen.NUI.PropertyValue(value));
660                 NotifyPropertyChanged();
661             }
662         }
663
664         /// <summary>
665         /// The Underline property.<br />
666         /// The default underline parameters.<br />
667         /// </summary>
668         /// <since_tizen> 3 </since_tizen>
669         public PropertyMap Underline
670         {
671             get
672             {
673                 PropertyMap temp = new PropertyMap();
674                 GetProperty(TextLabel.Property.UNDERLINE).Get(temp);
675                 return temp;
676             }
677             set
678             {
679                 SetProperty(TextLabel.Property.UNDERLINE, new Tizen.NUI.PropertyValue(value));
680                 NotifyPropertyChanged();
681             }
682         }
683
684         /// <summary>
685         /// The Shadow property.<br />
686         /// The default shadow parameters.<br />
687         /// </summary>
688         /// <since_tizen> 3 </since_tizen>
689         public PropertyMap Shadow
690         {
691             get
692             {
693                 PropertyMap temp = new PropertyMap();
694                 GetProperty(TextLabel.Property.SHADOW).Get(temp);
695                 return temp;
696             }
697             set
698             {
699                 SetProperty(TextLabel.Property.SHADOW, new Tizen.NUI.PropertyValue(value));
700                 NotifyPropertyChanged();
701             }
702         }
703
704         /// <summary>
705         /// The Emboss property.<br />
706         /// The default emboss parameters.<br />
707         /// </summary>
708         /// <since_tizen> 3 </since_tizen>
709         public string Emboss
710         {
711             get
712             {
713                 string temp;
714                 GetProperty(TextLabel.Property.EMBOSS).Get( out temp);
715                 return temp;
716             }
717             set
718             {
719                 SetProperty(TextLabel.Property.EMBOSS, new Tizen.NUI.PropertyValue(value));
720                 NotifyPropertyChanged();
721             }
722         }
723
724         /// <summary>
725         /// The Outline property.<br />
726         /// The default outline parameters.<br />
727         /// </summary>
728         /// <since_tizen> 3 </since_tizen>
729         public PropertyMap Outline
730         {
731             get
732             {
733                 PropertyMap temp = new PropertyMap();
734                 GetProperty(TextLabel.Property.OUTLINE).Get(temp);
735                 return temp;
736             }
737             set
738             {
739                 SetProperty(TextLabel.Property.OUTLINE, new Tizen.NUI.PropertyValue(value));
740                 NotifyPropertyChanged();
741             }
742         }
743
744         /// <summary>
745         /// The PixelSize property.<br />
746         /// The size of font in pixels.<br />
747         /// </summary>
748         /// <since_tizen> 3 </since_tizen>
749         public float PixelSize
750         {
751             get
752             {
753                 float temp = 0.0f;
754                 GetProperty(TextLabel.Property.PIXEL_SIZE).Get(out temp);
755                 return temp;
756             }
757             set
758             {
759                 SetProperty(TextLabel.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue(value));
760                 NotifyPropertyChanged();
761             }
762         }
763
764         /// <summary>
765         /// The Ellipsis property.<br />
766         /// Enable or disable the ellipsis.<br />
767         /// </summary>
768         /// <since_tizen> 3 </since_tizen>
769         public bool Ellipsis
770         {
771             get
772             {
773                 bool temp = false;
774                 GetProperty(TextLabel.Property.ELLIPSIS).Get(out temp);
775                 return temp;
776             }
777             set
778             {
779                 SetProperty(TextLabel.Property.ELLIPSIS, new Tizen.NUI.PropertyValue(value));
780                 NotifyPropertyChanged();
781             }
782         }
783
784         /// <summary>
785         /// The AutoScrollLoopDelay property.<br />
786         /// Do something.<br />
787         /// </summary>
788         /// <since_tizen> 3 </since_tizen>
789         public float AutoScrollLoopDelay
790         {
791             get
792             {
793                 float temp = 0.0f;
794                 GetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_DELAY).Get(out temp);
795                 return temp;
796             }
797             set
798             {
799                 SetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_DELAY, new Tizen.NUI.PropertyValue(value));
800                 NotifyPropertyChanged();
801             }
802         }
803
804         /// <summary>
805         /// The AutoScrollStopMode property.<br />
806         /// Do something.<br />
807         /// </summary>
808         /// <since_tizen> 3 </since_tizen>
809         public AutoScrollStopMode AutoScrollStopMode
810         {
811             get
812             {
813                 string temp;
814                 if(GetProperty(TextLabel.Property.AUTO_SCROLL_STOP_MODE).Get(out temp) == false)
815                 {
816                     NUILog.Error("AutoScrollStopMode get error!");
817                 }
818                 switch (temp)
819                 {
820                     case "FINISH_LOOP":
821                     return AutoScrollStopMode.FinishLoop;
822                     case "IMMEDIATE":
823                     return AutoScrollStopMode.Immediate;
824                     default:
825                     return AutoScrollStopMode.FinishLoop;
826                 }
827             }
828             set
829             {
830                 SetProperty(TextLabel.Property.AUTO_SCROLL_STOP_MODE, new Tizen.NUI.PropertyValue((int)value));
831                 NotifyPropertyChanged();
832             }
833         }
834
835         /// <summary>
836         /// The line count of the text.
837         /// </summary>
838         /// <since_tizen> 3 </since_tizen>
839         public int LineCount
840         {
841             get
842             {
843                 int temp = 0;
844                 GetProperty(TextLabel.Property.LINE_COUNT).Get(out temp);
845                 return temp;
846             }
847         }
848
849         /// <summary>
850         /// The LineWrapMode property.<br />
851         /// line wrap mode when the text lines over layout width.<br />
852         /// </summary>
853         /// <since_tizen> 4 </since_tizen>
854         public LineWrapMode LineWrapMode
855         {
856             get
857             {
858                 int temp;
859                 if(GetProperty(TextLabel.Property.LINE_WRAP_MODE).Get(out temp) == false)
860                 {
861                     NUILog.Error("LineWrapMode get error!");
862                 }
863                 return (LineWrapMode)temp;
864             }
865             set
866             {
867                 SetProperty(TextLabel.Property.LINE_WRAP_MODE, new Tizen.NUI.PropertyValue((int)value));
868                 NotifyPropertyChanged();
869             }
870         }
871
872         /// <summary>
873         /// The text direction.
874         /// </summary>
875         /// <since_tizen> 5 </since_tizen>
876         public TextDirection TextDirection
877         {
878             get
879             {
880                 int temp = 0;
881                 GetProperty(TextLabel.Property.TEXT_DIRECTION).Get(out temp);
882                 return (TextDirection)temp;
883             }
884         }
885
886         /// <summary>
887         /// The text vertical line alignment.
888         /// </summary>
889         /// <since_tizen> 5 </since_tizen>
890         public VerticalLineAlignment VerticalLineAlignment
891         {
892             get
893             {
894                 int temp = 0;
895                 GetProperty(TextLabel.Property.VERTICAL_LINE_ALIGNMENT).Get(out temp);
896                 return (VerticalLineAlignment)temp;
897             }
898             set
899             {
900                 SetProperty(TextLabel.Property.VERTICAL_LINE_ALIGNMENT, new Tizen.NUI.PropertyValue((int)value));
901                 NotifyPropertyChanged();
902             }
903         }
904
905     }
906 }