a3f6f99b0aee260697e4c6c19e621a1e082cf810
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextLabel.cs
1 /*
2  * Copyright(c) 2018 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 using Tizen.NUI.Binding;
24
25 namespace Tizen.NUI.BaseComponents
26 {
27
28     /// <summary>
29     /// A control which renders a short text string.<br />
30     /// Text labels are lightweight, non-editable, and do not respond to the user input.<br />
31     /// </summary>
32     /// <since_tizen> 3 </since_tizen>
33     public class TextLabel : View
34     {
35         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
36         [EditorBrowsable(EditorBrowsableState.Never)]
37         public static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
38         {
39             var textLabel = (TextLabel)bindable;
40             if (newValue != null)
41             {
42                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.TEXT, new Tizen.NUI.PropertyValue((string)newValue));
43             }
44         },
45         defaultValueCreator: (bindable) =>
46         {
47             var textLabel = (TextLabel)bindable;
48             string temp;
49             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.TEXT).Get(out temp);
50             return temp;
51         });
52         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
53         [EditorBrowsable(EditorBrowsableState.Never)]
54         public static readonly BindableProperty FontFamilyProperty = BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
55         {
56             var textLabel = (TextLabel)bindable;
57             if (newValue != null)
58             {
59                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue((string)newValue));
60             }
61         },
62         defaultValueCreator: (bindable) =>
63         {
64             var textLabel = (TextLabel)bindable;
65             string temp;
66             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.FONT_FAMILY).Get(out temp);
67             return temp;
68         });
69         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
70         [EditorBrowsable(EditorBrowsableState.Never)]
71         public static readonly BindableProperty FontStyleProperty = BindableProperty.Create(nameof(FontStyle), typeof(PropertyMap), typeof(TextLabel), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
72         {
73             var textLabel = (TextLabel)bindable;
74             if (newValue != null)
75             {
76                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.FONT_STYLE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
77             }
78         },
79         defaultValueCreator: (bindable) =>
80         {
81             var textLabel = (TextLabel)bindable;
82             PropertyMap temp = new PropertyMap();
83             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.FONT_STYLE).Get(temp);
84             return temp;
85         });
86         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
87         [EditorBrowsable(EditorBrowsableState.Never)]
88         public static readonly BindableProperty PointSizeProperty = BindableProperty.Create(nameof(PointSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (bindable, oldValue, newValue) =>
89         {
90             var textLabel = (TextLabel)bindable;
91             if (newValue != null)
92             {
93                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.POINT_SIZE, new Tizen.NUI.PropertyValue((float)newValue));
94             }
95         },
96         defaultValueCreator: (bindable) =>
97         {
98             var textLabel = (TextLabel)bindable;
99             float temp = 0.0f;
100             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.POINT_SIZE).Get(out temp);
101             return temp;
102         });
103         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
104         [EditorBrowsable(EditorBrowsableState.Never)]
105         public static readonly BindableProperty MultiLineProperty = BindableProperty.Create(nameof(MultiLine), typeof(bool), typeof(TextLabel), false, propertyChanged: (bindable, oldValue, newValue) =>
106         {
107             var textLabel = (TextLabel)bindable;
108             if (newValue != null)
109             {
110                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.MULTI_LINE, new Tizen.NUI.PropertyValue((bool)newValue));
111             }
112         },
113         defaultValueCreator: (bindable) =>
114         {
115             var textLabel = (TextLabel)bindable;
116             bool temp = false;
117             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.MULTI_LINE).Get(out temp);
118             return temp;
119         });
120         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
121         [EditorBrowsable(EditorBrowsableState.Never)]
122         public static readonly BindableProperty HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment), typeof(TextLabel), HorizontalAlignment.Begin, propertyChanged: (bindable, oldValue, newValue) =>
123         {
124             var textLabel = (TextLabel)bindable;
125             string valueToString = "";
126             if (newValue != null)
127             {
128                 switch ((HorizontalAlignment)newValue)
129                 {
130                     case HorizontalAlignment.Begin: { valueToString = "BEGIN"; break; }
131                     case HorizontalAlignment.Center: { valueToString = "CENTER"; break; }
132                     case HorizontalAlignment.End: { valueToString = "END"; break; }
133                     default: { valueToString = "BEGIN"; break; }
134                 }
135                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
136             }
137         },
138         defaultValueCreator: (bindable) =>
139         {
140             var textLabel = (TextLabel)bindable;
141             string temp;
142             if (Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
143             {
144                 NUILog.Error("HorizontalAlignment get error!");
145             }
146             switch (temp)
147             {
148                 case "BEGIN": return HorizontalAlignment.Begin;
149                 case "CENTER": return HorizontalAlignment.Center;
150                 case "END": return HorizontalAlignment.End;
151                 default: return HorizontalAlignment.Begin;
152             }
153         });
154         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
155         [EditorBrowsable(EditorBrowsableState.Never)]
156         public static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.Create(nameof(VerticalAlignment), typeof(VerticalAlignment), typeof(TextLabel), VerticalAlignment.Bottom, propertyChanged: (bindable, oldValue, newValue) =>
157         {
158             var textLabel = (TextLabel)bindable;
159             string valueToString = "";
160             if (newValue != null)
161             {
162                 switch ((VerticalAlignment)newValue)
163                 {
164                     case VerticalAlignment.Top: { valueToString = "TOP"; break; }
165                     case VerticalAlignment.Center: { valueToString = "CENTER"; break; }
166                     case VerticalAlignment.Bottom: { valueToString = "BOTTOM"; break; }
167                     default: { valueToString = "BOTTOM"; break; }
168                 }
169                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
170             }
171         },
172         defaultValueCreator: (bindable) =>
173         {
174             var textLabel = (TextLabel)bindable;
175             string temp;
176             if (Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.VERTICAL_ALIGNMENT).Get(out temp) == false)
177             {
178                 NUILog.Error("VerticalAlignment get error!");
179             }
180
181             switch (temp)
182             {
183                 case "TOP": return VerticalAlignment.Top;
184                 case "CENTER": return VerticalAlignment.Center;
185                 case "BOTTOM": return VerticalAlignment.Bottom;
186                 default: return VerticalAlignment.Bottom;
187             }
188         });
189         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
190         [EditorBrowsable(EditorBrowsableState.Never)]
191         public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(TextLabel), Color.Transparent, propertyChanged: (bindable, oldValue, newValue) =>
192         {
193             var textLabel = (TextLabel)bindable;
194             if (newValue != null)
195             {
196                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue((Color)newValue));
197             }
198         },
199         defaultValueCreator: (bindable) =>
200         {
201             var textLabel = (TextLabel)bindable;
202             Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
203             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.TEXT_COLOR).Get(temp);
204             return temp;
205         });
206         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
207         [EditorBrowsable(EditorBrowsableState.Never)]
208         public static readonly BindableProperty EnableMarkupProperty = BindableProperty.Create("EnableMarkup", typeof(bool), typeof(TextLabel), false, propertyChanged: (bindable, oldValue, newValue) =>
209         {
210             var textLabel = (TextLabel)bindable;
211             if (newValue != null)
212             {
213                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue((bool)newValue));
214             }
215         },
216         defaultValueCreator: (bindable) =>
217         {
218             var textLabel = (TextLabel)bindable;
219             bool temp = false;
220             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.ENABLE_MARKUP).Get(out temp);
221             return temp;
222         });
223         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
224         [EditorBrowsable(EditorBrowsableState.Never)]
225         public static readonly BindableProperty EnableAutoScrollProperty = BindableProperty.Create(nameof(EnableAutoScroll), typeof(bool), typeof(TextLabel), false, propertyChanged: (bindable, oldValue, newValue) =>
226         {
227             var textLabel = (TextLabel)bindable;
228             if (newValue != null)
229             {
230                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.ENABLE_AUTO_SCROLL, new Tizen.NUI.PropertyValue((bool)newValue));
231             }
232         },
233         defaultValueCreator: (bindable) =>
234         {
235             var textLabel = (TextLabel)bindable;
236             bool temp = false;
237             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.ENABLE_AUTO_SCROLL).Get(out temp);
238             return temp;
239         });
240         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
241         [EditorBrowsable(EditorBrowsableState.Never)]
242         public static readonly BindableProperty AutoScrollSpeedProperty = BindableProperty.Create(nameof(AutoScrollSpeed), typeof(int), typeof(TextLabel), default(int), propertyChanged: (bindable, oldValue, newValue) =>
243         {
244             var textLabel = (TextLabel)bindable;
245             if (newValue != null)
246             {
247                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_SPEED, new Tizen.NUI.PropertyValue((int)newValue));
248             }
249         },
250         defaultValueCreator: (bindable) =>
251         {
252             var textLabel = (TextLabel)bindable;
253             int temp = 0;
254             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_SPEED).Get(out temp);
255             return temp;
256         });
257         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
258         [EditorBrowsable(EditorBrowsableState.Never)]
259         public static readonly BindableProperty AutoScrollLoopCountProperty = BindableProperty.Create(nameof(AutoScrollLoopCount), typeof(int), typeof(TextLabel), default(int), propertyChanged: (bindable, oldValue, newValue) =>
260         {
261             var textLabel = (TextLabel)bindable;
262             if (newValue != null)
263             {
264                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_LOOP_COUNT, new Tizen.NUI.PropertyValue((int)newValue));
265             }
266         },
267         defaultValueCreator: (bindable) =>
268         {
269             var textLabel = (TextLabel)bindable;
270             int temp = 0;
271             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_LOOP_COUNT).Get(out temp);
272             return temp;
273         });
274         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
275         [EditorBrowsable(EditorBrowsableState.Never)]
276         public static readonly BindableProperty AutoScrollGapProperty = BindableProperty.Create(nameof(AutoScrollGap), typeof(float), typeof(TextLabel), default(float), propertyChanged: (bindable, oldValue, newValue) =>
277         {
278             var textLabel = (TextLabel)bindable;
279             if (newValue != null)
280             {
281                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_GAP, new Tizen.NUI.PropertyValue((float)newValue));
282             }
283         },
284         defaultValueCreator: (bindable) =>
285         {
286             var textLabel = (TextLabel)bindable;
287             float temp = 0.0f;
288             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_GAP).Get(out temp);
289             return temp;
290         });
291         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
292         [EditorBrowsable(EditorBrowsableState.Never)]
293         public static readonly BindableProperty LineSpacingProperty = BindableProperty.Create(nameof(LineSpacing), typeof(float), typeof(TextLabel), default(float), propertyChanged: (bindable, oldValue, newValue) =>
294         {
295             var textLabel = (TextLabel)bindable;
296             if (newValue != null)
297             {
298                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.LINE_SPACING, new Tizen.NUI.PropertyValue((float)newValue));
299             }
300         },
301         defaultValueCreator: (bindable) =>
302         {
303             var textLabel = (TextLabel)bindable;
304             float temp = 0.0f;
305             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.LINE_SPACING).Get(out temp);
306             return temp;
307         });
308         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
309         [EditorBrowsable(EditorBrowsableState.Never)]
310         public static readonly BindableProperty UnderlineProperty = BindableProperty.Create(nameof(Underline), typeof(PropertyMap), typeof(TextLabel), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
311         {
312             var textLabel = (TextLabel)bindable;
313             if (newValue != null)
314             {
315                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.UNDERLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
316             }
317         },
318         defaultValueCreator: (bindable) =>
319         {
320             var textLabel = (TextLabel)bindable;
321             PropertyMap temp = new PropertyMap();
322             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.UNDERLINE).Get(temp);
323             return temp;
324         });
325         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
326         [EditorBrowsable(EditorBrowsableState.Never)]
327         public static readonly BindableProperty ShadowProperty = BindableProperty.Create(nameof(Shadow), typeof(PropertyMap), typeof(TextLabel), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
328         {
329             var textLabel = (TextLabel)bindable;
330             if (newValue != null)
331             {
332                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.SHADOW, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
333             }
334         },
335         defaultValueCreator: (bindable) =>
336         {
337             var textLabel = (TextLabel)bindable;
338             PropertyMap temp = new PropertyMap();
339             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.SHADOW).Get(temp);
340             return temp;
341         });
342         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
343         [EditorBrowsable(EditorBrowsableState.Never)]
344         public static readonly BindableProperty EmbossProperty = BindableProperty.Create(nameof(Emboss), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
345         {
346             var textLabel = (TextLabel)bindable;
347             if (newValue != null)
348             {
349                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.EMBOSS, new Tizen.NUI.PropertyValue((string)newValue));
350             }
351         },
352         defaultValueCreator: (bindable) =>
353         {
354             var textLabel = (TextLabel)bindable;
355             string temp;
356             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.EMBOSS).Get(out temp);
357             return temp;
358         });
359         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
360         [EditorBrowsable(EditorBrowsableState.Never)]
361         public static readonly BindableProperty OutlineProperty = BindableProperty.Create(nameof(Outline), typeof(PropertyMap), typeof(TextLabel), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
362         {
363             var textLabel = (TextLabel)bindable;
364             if (newValue != null)
365             {
366                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.OUTLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
367             }
368         },
369         defaultValueCreator: (bindable) =>
370         {
371             var textLabel = (TextLabel)bindable;
372             PropertyMap temp = new PropertyMap();
373             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.OUTLINE).Get(temp);
374             return temp;
375         });
376         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
377         [EditorBrowsable(EditorBrowsableState.Never)]
378         public static readonly BindableProperty PixelSizeProperty = BindableProperty.Create(nameof(PixelSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (bindable, oldValue, newValue) =>
379         {
380             var textLabel = (TextLabel)bindable;
381             if (newValue != null)
382             {
383                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue((float)newValue));
384             }
385         },
386         defaultValueCreator: (bindable) =>
387         {
388             var textLabel = (TextLabel)bindable;
389             float temp = 0.0f;
390             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.PIXEL_SIZE).Get(out temp);
391             return temp;
392         });
393         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
394         [EditorBrowsable(EditorBrowsableState.Never)]
395         public static readonly BindableProperty EllipsisProperty = BindableProperty.Create(nameof(Ellipsis), typeof(bool), typeof(TextLabel), false, propertyChanged: (bindable, oldValue, newValue) =>
396         {
397             var textLabel = (TextLabel)bindable;
398             if (newValue != null)
399             {
400                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.ELLIPSIS, new Tizen.NUI.PropertyValue((bool)newValue));
401             }
402         },
403         defaultValueCreator: (bindable) =>
404         {
405             var textLabel = (TextLabel)bindable;
406             bool temp = false;
407             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.ELLIPSIS).Get(out temp);
408             return temp;
409         });
410         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
411         [EditorBrowsable(EditorBrowsableState.Never)]
412         public static readonly BindableProperty AutoScrollLoopDelayProperty = BindableProperty.Create(nameof(AutoScrollLoopDelay), typeof(float), typeof(TextLabel), default(float), propertyChanged: (bindable, oldValue, newValue) =>
413         {
414             var textLabel = (TextLabel)bindable;
415             if (newValue != null)
416             {
417                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_LOOP_DELAY, new Tizen.NUI.PropertyValue((float)newValue));
418             }
419         },
420         defaultValueCreator: (bindable) =>
421         {
422             var textLabel = (TextLabel)bindable;
423             float temp = 0.0f;
424             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_LOOP_DELAY).Get(out temp);
425             return temp;
426         });
427         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
428         [EditorBrowsable(EditorBrowsableState.Never)]
429         public static readonly BindableProperty AutoScrollStopModeProperty = BindableProperty.Create(nameof(AutoScrollStopMode), typeof(AutoScrollStopMode), typeof(TextLabel), AutoScrollStopMode.FinishLoop, propertyChanged: (bindable, oldValue, newValue) =>
430         {
431             var textLabel = (TextLabel)bindable;
432             if (newValue != null)
433             {
434                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_STOP_MODE, new Tizen.NUI.PropertyValue((int)newValue));
435             }
436         },
437         defaultValueCreator: (bindable) =>
438         {
439             var textLabel = (TextLabel)bindable;
440             string temp;
441             if (Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_STOP_MODE).Get(out temp) == false)
442             {
443                 NUILog.Error("AutoScrollStopMode get error!");
444             }
445             switch (temp)
446             {
447                 case "FINISH_LOOP": return AutoScrollStopMode.FinishLoop;
448                 case "IMMEDIATE": return AutoScrollStopMode.Immediate;
449                 default: return AutoScrollStopMode.FinishLoop;
450             }
451         });
452         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
453         [EditorBrowsable(EditorBrowsableState.Never)]
454         public static readonly BindableProperty LineWrapModeProperty = BindableProperty.Create(nameof(LineWrapMode), typeof(LineWrapMode), typeof(TextLabel), LineWrapMode.Word, propertyChanged: (bindable, oldValue, newValue) =>
455         {
456             var textLabel = (TextLabel)bindable;
457             if (newValue != null)
458             {
459                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.LINE_WRAP_MODE, new Tizen.NUI.PropertyValue((int)newValue));
460             }
461         },
462         defaultValueCreator: (bindable) =>
463         {
464             var textLabel = (TextLabel)bindable;
465             int temp;
466             if (false == Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.LINE_WRAP_MODE).Get(out temp))
467             {
468                 NUILog.Error("LineWrapMode get error!");
469             }
470             return (LineWrapMode)temp;
471         });
472         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
473         [EditorBrowsable(EditorBrowsableState.Never)]
474         public static readonly BindableProperty VerticalLineAlignmentProperty = BindableProperty.Create(nameof(VerticalLineAlignment), typeof(VerticalLineAlignment), typeof(TextLabel), VerticalLineAlignment.Bottom, propertyChanged: (bindable, oldValue, newValue) =>
475         {
476             var textLabel = (TextLabel)bindable;
477             if (newValue != null)
478             {
479                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.VERTICAL_LINE_ALIGNMENT, new Tizen.NUI.PropertyValue((int)newValue));
480             }
481         },
482         defaultValueCreator: (bindable) =>
483         {
484             var textLabel = (TextLabel)bindable;
485             int temp = 0;
486             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.VERTICAL_LINE_ALIGNMENT).Get(out temp);
487             return (VerticalLineAlignment)temp;
488         });
489         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
490         [EditorBrowsable(EditorBrowsableState.Never)]
491         public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(MatchSystemLanguageDirection), typeof(bool), typeof(TextLabel), false, propertyChanged: (bindable, oldValue, newValue) =>
492         {
493             var textLabel = (TextLabel)bindable;
494             if (newValue != null)
495             {
496                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.MATCH_SYSTEM_LANGUAGE_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
497             }
498         },
499         defaultValueCreator: (bindable) =>
500         {
501             var textLabel = (TextLabel)bindable;
502             bool temp = false;
503             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.MATCH_SYSTEM_LANGUAGE_DIRECTION).Get(out temp);
504             return temp;
505         });
506
507         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
508         private string textLabelSid = null;
509         private bool systemlangTextFlag = false;
510
511         /// <summary>
512         /// Creates the TextLabel control.
513         /// </summary>
514         /// <since_tizen> 3 </since_tizen>
515         public TextLabel() : this(NDalicPINVOKE.TextLabel_New__SWIG_0(), true)
516         {
517             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
518         }
519
520         /// <summary>
521         /// Creates the TextLabel control.
522         /// </summary>
523         /// <param name="text">The text to display</param>
524         /// <since_tizen> 3 </since_tizen>
525         public TextLabel(string text) : this(NDalicPINVOKE.TextLabel_New__SWIG_1(text), true)
526         {
527             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
528         }
529
530         internal TextLabel(TextLabel handle) : this(NDalicPINVOKE.new_TextLabel__SWIG_1(TextLabel.getCPtr(handle)), true)
531         {
532             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
533         }
534
535         internal TextLabel(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextLabel_SWIGUpcast(cPtr), cMemoryOwn)
536         {
537             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
538         }
539
540         /// <summary>
541         /// The TranslatableText property.<br />
542         /// The text can set the SID value.<br />
543         /// </summary>
544         /// <exception cref='ArgumentNullException'>
545         /// ResourceManager about multilingual is null.
546         /// </exception>
547         /// <since_tizen> 4 </since_tizen>
548         public string TranslatableText
549         {
550             get
551             {
552                 return textLabelSid;
553             }
554             set
555             {
556                 if (NUIApplication.MultilingualResourceManager == null)
557                 {
558                     throw new ArgumentNullException("ResourceManager about multilingual is null");
559                 }
560                 string translatableText = null;
561                 textLabelSid = value;
562                 translatableText = NUIApplication.MultilingualResourceManager?.GetString(textLabelSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
563                 if (translatableText != null)
564                 {
565                     Text = translatableText;
566                     if (systemlangTextFlag == false)
567                     {
568                         SystemSettings.LocaleLanguageChanged += new WeakEventHandler<LocaleLanguageChangedEventArgs>(SystemSettings_LocaleLanguageChanged).Handler;
569                         systemlangTextFlag = true;
570                     }
571                 }
572                 else
573                 {
574                     Text = "";
575                 }
576                 NotifyPropertyChanged();
577             }
578         }
579
580         /// <summary>
581         /// The Text property.<br />
582         /// The text to display in the UTF-8 format.<br />
583         /// </summary>
584         /// <since_tizen> 3 </since_tizen>
585         public string Text
586         {
587             get
588             {
589                 return (string)GetValue(TextProperty);
590             }
591             set
592             {
593                 SetValue(TextProperty, value);
594                 NotifyPropertyChanged();
595             }
596         }
597
598         /// <summary>
599         /// The FontFamily property.<br />
600         /// The requested font family to use.<br />
601         /// </summary>
602         /// <since_tizen> 3 </since_tizen>
603         public string FontFamily
604         {
605             get
606             {
607                 return (string)GetValue(FontFamilyProperty);
608             }
609             set
610             {
611                 SetValue(FontFamilyProperty, value);
612                 NotifyPropertyChanged();
613             }
614         }
615
616         /// <summary>
617         /// The FontStyle property.<br />
618         /// The requested font style to use.<br />
619         /// </summary>
620         /// <since_tizen> 3 </since_tizen>
621         public PropertyMap FontStyle
622         {
623             get
624             {
625                 return (PropertyMap)GetValue(FontStyleProperty);
626             }
627             set
628             {
629                 SetValue(FontStyleProperty, value);
630                 NotifyPropertyChanged();
631             }
632         }
633
634         /// <summary>
635         /// The PointSize property.<br />
636         /// The size of font in points.<br />
637         /// </summary>
638         /// <since_tizen> 3 </since_tizen>
639         public float PointSize
640         {
641             get
642             {
643                 return (float)GetValue(PointSizeProperty);
644             }
645             set
646             {
647                 SetValue(PointSizeProperty, value);
648                 NotifyPropertyChanged();
649             }
650         }
651
652         /// <summary>
653         /// The MultiLine property.<br />
654         /// The single-line or multi-line layout option.<br />
655         /// </summary>
656         /// <since_tizen> 3 </since_tizen>
657         public bool MultiLine
658         {
659             get
660             {
661                 return (bool)GetValue(MultiLineProperty);
662             }
663             set
664             {
665                 SetValue(MultiLineProperty, value);
666                 NotifyPropertyChanged();
667             }
668         }
669
670         /// <summary>
671         /// The HorizontalAlignment property.<br />
672         /// The line horizontal alignment.<br />
673         /// </summary>
674         /// <since_tizen> 3 </since_tizen>
675         public HorizontalAlignment HorizontalAlignment
676         {
677             get
678             {
679                 return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
680             }
681             set
682             {
683                 SetValue(HorizontalAlignmentProperty, value);
684                 NotifyPropertyChanged();
685             }
686         }
687
688         /// <summary>
689         /// The VerticalAlignment property.<br />
690         /// The line vertical alignment.<br />
691         /// </summary>
692         /// <since_tizen> 3 </since_tizen>
693         public VerticalAlignment VerticalAlignment
694         {
695             get
696             {
697                 return (VerticalAlignment)GetValue(VerticalAlignmentProperty);
698             }
699             set
700             {
701                 SetValue(VerticalAlignmentProperty, value);
702                 NotifyPropertyChanged();
703             }
704         }
705
706         /// <summary>
707         /// The TextColor property.<br />
708         /// The color of the text.<br />
709         /// Animation framework can be used to change the color of the text when not using mark up.<br />
710         /// Cannot animate the color when text is auto scrolling.<br />
711         /// </summary>
712         /// <since_tizen> 3 </since_tizen>
713         public Color TextColor
714         {
715             get
716             {
717                 return (Color)GetValue(TextColorProperty);
718             }
719             set
720             {
721                 SetValue(TextColorProperty, value);
722                 NotifyPropertyChanged();
723             }
724         }
725
726         /// <summary>
727         /// The ShadowOffset property.<br />
728         /// The drop shadow offset 0 indicates no shadow.<br />
729         /// </summary>
730         /// <since_tizen> 3 </since_tizen>
731         [Obsolete("Please do not use! This will be deprecated! Please use Shadow property instead!")]
732         [EditorBrowsable(EditorBrowsableState.Never)]
733         public Vector2 ShadowOffset
734         {
735             get
736             {
737                 PropertyMap map = new PropertyMap();
738                 GetProperty(TextLabel.Property.SHADOW).Get(map);
739                 Vector2 shadowOffset = new Vector2();
740                 map.Find(TextLabel.Property.SHADOW, "offset")?.Get(shadowOffset);
741                 return shadowOffset;
742             }
743             set
744             {
745                 PropertyMap temp = new PropertyMap();
746                 temp.Insert("offset", new PropertyValue(value));
747                 SetValue(ShadowProperty, temp);
748                 NotifyPropertyChanged();
749             }
750         }
751
752         /// <summary>
753         /// The ShadowColor property.<br />
754         /// The color of a drop shadow.<br />
755         /// </summary>
756         /// <since_tizen> 3 </since_tizen>
757         [Obsolete("Please do not use! This will be deprecated! Please use Shadow property instead!")]
758         [EditorBrowsable(EditorBrowsableState.Never)]
759         public Vector4 ShadowColor
760         {
761             get
762             {
763                 PropertyMap map = new PropertyMap();
764                 GetProperty(TextLabel.Property.SHADOW).Get(map);
765                 Vector4 shadowColor = new Vector4();
766                 map.Find(TextLabel.Property.SHADOW, "color")?.Get(shadowColor);
767                 return shadowColor;
768             }
769             set
770             {
771                 PropertyMap temp = new PropertyMap();
772                 temp.Insert("color", new PropertyValue(value));
773                 SetValue(ShadowProperty, temp);
774                 NotifyPropertyChanged();
775             }
776         }
777
778         /// <summary>
779         /// The UnderlineEnabled property.<br />
780         /// The underline enabled flag.<br />
781         /// </summary>
782         /// <since_tizen> 3 </since_tizen>
783         [Obsolete("Please do not use! This will be deprecated! Please use Underline property instead!")]
784         [EditorBrowsable(EditorBrowsableState.Never)]
785         public bool UnderlineEnabled
786         {
787             get
788             {
789                 PropertyMap map = new PropertyMap();
790                 GetProperty(TextLabel.Property.UNDERLINE).Get(map);
791                 bool underlineEnabled = false;
792                 map.Find(TextLabel.Property.UNDERLINE, "enable")?.Get(out underlineEnabled);
793                 return underlineEnabled;
794             }
795             set
796             {
797                 PropertyMap temp = new PropertyMap();
798                 temp.Insert("enable", new PropertyValue(value));
799                 SetValue(UnderlineProperty, temp);
800                 NotifyPropertyChanged();
801             }
802         }
803
804         /// <summary>
805         /// The UnderlineColor property.<br />
806         /// Overrides the underline height from font metrics.<br />
807         /// </summary>
808         /// <since_tizen> 3 </since_tizen>
809         [Obsolete("Please do not use! This will be deprecated! Please use Underline property instead!")]
810         [EditorBrowsable(EditorBrowsableState.Never)]
811         public Vector4 UnderlineColor
812         {
813             get
814             {
815                 PropertyMap map = new PropertyMap();
816                 GetProperty(TextLabel.Property.UNDERLINE).Get(map);
817                 Vector4 underlineColor = new Vector4();
818                 map.Find(TextLabel.Property.UNDERLINE, "color")?.Get(underlineColor);
819                 return underlineColor;
820             }
821             set
822             {
823                 PropertyMap temp = new PropertyMap();
824                 temp.Insert("color", new PropertyValue(value));
825                 SetValue(UnderlineProperty, temp);
826                 NotifyPropertyChanged();
827             }
828         }
829
830         /// <summary>
831         /// The UnderlineHeight property.<br />
832         /// Overrides the underline height from font metrics.<br />
833         /// </summary>
834         /// <since_tizen> 3 </since_tizen>
835         [Obsolete("Please do not use! This will be deprecated! Please use Underline property instead!")]
836         [EditorBrowsable(EditorBrowsableState.Never)]
837         public float UnderlineHeight
838         {
839             get
840             {
841                 PropertyMap map = new PropertyMap();
842                 GetProperty(TextLabel.Property.UNDERLINE).Get(map);
843                 float underlineHeight = 0.0f;
844                 map.Find(TextLabel.Property.UNDERLINE, "height")?.Get(out underlineHeight);
845                 return underlineHeight;
846             }
847             set
848             {
849                 PropertyMap temp = new PropertyMap();
850                 temp.Insert("height", new PropertyValue(value));
851                 SetValue(UnderlineProperty, temp);
852                 NotifyPropertyChanged();
853             }
854         }
855
856         /// <summary>
857         /// The EnableMarkup property.<br />
858         /// Whether the mark-up processing is enabled.<br />
859         /// </summary>
860         /// <since_tizen> 3 </since_tizen>
861         public bool EnableMarkup
862         {
863             get
864             {
865                 return (bool)GetValue(EnableMarkupProperty);
866             }
867             set
868             {
869                 SetValue(EnableMarkupProperty, value);
870                 NotifyPropertyChanged();
871             }
872         }
873
874         /// <summary>
875         /// The EnableAutoScroll property.<br />
876         /// Starts or stops auto scrolling.<br />
877         /// </summary>
878         /// <since_tizen> 3 </since_tizen>
879         public bool EnableAutoScroll
880         {
881             get
882             {
883                 return (bool)GetValue(EnableAutoScrollProperty);
884             }
885             set
886             {
887                 SetValue(EnableAutoScrollProperty, value);
888                 NotifyPropertyChanged();
889             }
890         }
891
892         /// <summary>
893         /// The AutoScrollSpeed property.<br />
894         /// Sets the speed of scrolling in pixels per second.<br />
895         /// </summary>
896         /// <since_tizen> 3 </since_tizen>
897         public int AutoScrollSpeed
898         {
899             get
900             {
901                 return (int)GetValue(AutoScrollSpeedProperty);
902             }
903             set
904             {
905                 SetValue(AutoScrollSpeedProperty, value);
906                 NotifyPropertyChanged();
907             }
908         }
909
910         /// <summary>
911         /// The AutoScrollLoopCount property.<br />
912         /// Number of complete loops when scrolling enabled.<br />
913         /// </summary>
914         /// <since_tizen> 3 </since_tizen>
915         public int AutoScrollLoopCount
916         {
917             get
918             {
919                 return (int)GetValue(AutoScrollLoopCountProperty);
920             }
921             set
922             {
923                 SetValue(AutoScrollLoopCountProperty, value);
924                 NotifyPropertyChanged();
925             }
926         }
927
928         /// <summary>
929         /// The AutoScrollGap property.<br />
930         /// Gap before scrolling wraps.<br />
931         /// </summary>
932         /// <since_tizen> 3 </since_tizen>
933         public float AutoScrollGap
934         {
935             get
936             {
937                 return (float)GetValue(AutoScrollGapProperty);
938             }
939             set
940             {
941                 SetValue(AutoScrollGapProperty, value);
942                 NotifyPropertyChanged();
943             }
944         }
945
946         /// <summary>
947         /// The LineSpacing property.<br />
948         /// The default extra space between lines in points.<br />
949         /// </summary>
950         /// <since_tizen> 3 </since_tizen>
951         public float LineSpacing
952         {
953             get
954             {
955                 return (float)GetValue(LineSpacingProperty);
956             }
957             set
958             {
959                 SetValue(LineSpacingProperty, value);
960                 NotifyPropertyChanged();
961             }
962         }
963
964         /// <summary>
965         /// The Underline property.<br />
966         /// The default underline parameters.<br />
967         /// </summary>
968         /// <since_tizen> 3 </since_tizen>
969         public PropertyMap Underline
970         {
971             get
972             {
973                 return (PropertyMap)GetValue(UnderlineProperty);
974             }
975             set
976             {
977                 SetValue(UnderlineProperty, value);
978                 NotifyPropertyChanged();
979             }
980         }
981
982         /// <summary>
983         /// The Shadow property.<br />
984         /// The default shadow parameters.<br />
985         /// </summary>
986         /// <since_tizen> 3 </since_tizen>
987         public PropertyMap Shadow
988         {
989             get
990             {
991                 return (PropertyMap)GetValue(ShadowProperty);
992             }
993             set
994             {
995                 SetValue(ShadowProperty, value);
996                 NotifyPropertyChanged();
997             }
998         }
999
1000         /// <summary>
1001         /// The Emboss property.<br />
1002         /// The default emboss parameters.<br />
1003         /// </summary>
1004         /// <since_tizen> 3 </since_tizen>
1005         public string Emboss
1006         {
1007             get
1008             {
1009                 return (string)GetValue(EmbossProperty);
1010             }
1011             set
1012             {
1013                 SetValue(EmbossProperty, value);
1014                 NotifyPropertyChanged();
1015             }
1016         }
1017
1018         /// <summary>
1019         /// The Outline property.<br />
1020         /// The default outline parameters.<br />
1021         /// </summary>
1022         /// <since_tizen> 3 </since_tizen>
1023         public PropertyMap Outline
1024         {
1025             get
1026             {
1027                 return (PropertyMap)GetValue(OutlineProperty);
1028             }
1029             set
1030             {
1031                 SetValue(OutlineProperty, value);
1032                 NotifyPropertyChanged();
1033             }
1034         }
1035
1036         /// <summary>
1037         /// The PixelSize property.<br />
1038         /// The size of font in pixels.<br />
1039         /// </summary>
1040         /// <since_tizen> 3 </since_tizen>
1041         public float PixelSize
1042         {
1043             get
1044             {
1045                 return (float)GetValue(PixelSizeProperty);
1046             }
1047             set
1048             {
1049                 SetValue(PixelSizeProperty, value);
1050                 NotifyPropertyChanged();
1051             }
1052         }
1053
1054         /// <summary>
1055         /// The Ellipsis property.<br />
1056         /// Enable or disable the ellipsis.<br />
1057         /// </summary>
1058         /// <since_tizen> 3 </since_tizen>
1059         public bool Ellipsis
1060         {
1061             get
1062             {
1063                 return (bool)GetValue(EllipsisProperty);
1064             }
1065             set
1066             {
1067                 SetValue(EllipsisProperty, value);
1068                 NotifyPropertyChanged();
1069             }
1070         }
1071
1072         /// <summary>
1073         /// The AutoScrollLoopDelay property.<br />
1074         /// Do something.<br />
1075         /// </summary>
1076         /// <since_tizen> 3 </since_tizen>
1077         public float AutoScrollLoopDelay
1078         {
1079             get
1080             {
1081                 return (float)GetValue(AutoScrollLoopDelayProperty);
1082             }
1083             set
1084             {
1085                 SetValue(AutoScrollLoopDelayProperty, value);
1086                 NotifyPropertyChanged();
1087             }
1088         }
1089
1090         /// <summary>
1091         /// The AutoScrollStopMode property.<br />
1092         /// Do something.<br />
1093         /// </summary>
1094         /// <since_tizen> 3 </since_tizen>
1095         public AutoScrollStopMode AutoScrollStopMode
1096         {
1097             get
1098             {
1099                 return (AutoScrollStopMode)GetValue(AutoScrollStopModeProperty);
1100             }
1101             set
1102             {
1103                 SetValue(AutoScrollStopModeProperty, value);
1104                 NotifyPropertyChanged();
1105             }
1106         }
1107
1108         /// <summary>
1109         /// The line count of the text.
1110         /// </summary>
1111         /// <since_tizen> 3 </since_tizen>
1112         public int LineCount
1113         {
1114             get
1115             {
1116                 int temp = 0;
1117                 GetProperty(TextLabel.Property.LINE_COUNT).Get(out temp);
1118                 return temp;
1119             }
1120         }
1121
1122         /// <summary>
1123         /// The LineWrapMode property.<br />
1124         /// line wrap mode when the text lines over layout width.<br />
1125         /// </summary>
1126         /// <since_tizen> 4 </since_tizen>
1127         public LineWrapMode LineWrapMode
1128         {
1129             get
1130             {
1131                 return (LineWrapMode)GetValue(LineWrapModeProperty);
1132             }
1133             set
1134             {
1135                 SetValue(LineWrapModeProperty, value);
1136                 NotifyPropertyChanged();
1137             }
1138         }
1139
1140         /// <summary>
1141         /// The direction of the text such as left to right or right to left.
1142         /// </summary>
1143         /// <since_tizen> 5 </since_tizen>
1144         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1145         [EditorBrowsable(EditorBrowsableState.Never)]
1146         public TextDirection TextDirection
1147         {
1148             get
1149             {
1150                 int temp = 0;
1151                 GetProperty(TextLabel.Property.TEXT_DIRECTION).Get(out temp);
1152                 return (TextDirection)temp;
1153             }
1154         }
1155
1156         /// <summary>
1157         /// The vertical line alignment of the text.
1158         /// </summary>
1159         /// <since_tizen> 5 </since_tizen>
1160         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1161         [EditorBrowsable(EditorBrowsableState.Never)]
1162         public VerticalLineAlignment VerticalLineAlignment
1163         {
1164             get
1165             {
1166                 return (VerticalLineAlignment)GetValue(VerticalLineAlignmentProperty);
1167             }
1168             set
1169             {
1170                 SetValue(VerticalLineAlignmentProperty, value);
1171                 NotifyPropertyChanged();
1172             }
1173         }
1174
1175         /// <summary>
1176         /// The text alignment to match the direction of the system language.
1177         /// </summary>
1178         /// <since_tizen> 5 </since_tizen>
1179         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1180         [EditorBrowsable(EditorBrowsableState.Never)]
1181         public bool MatchSystemLanguageDirection
1182         {
1183             get
1184             {
1185                 return (bool)GetValue(MatchSystemLanguageDirectionProperty);
1186             }
1187             set
1188             {
1189                 SetValue(MatchSystemLanguageDirectionProperty, value);
1190                 NotifyPropertyChanged();
1191             }
1192         }
1193
1194         /// Downcasts a handle to textLabel handle
1195         /// </summary>
1196         /// <param name="handle"></param>
1197         /// <returns></returns>
1198         /// <since_tizen> 3 </since_tizen>
1199         /// Please do not use! this will be deprecated!
1200         /// Instead please use as keyword.
1201         [Obsolete("Please do not use! This will be deprecated! Please use as keyword instead! " +
1202             "Like: " +
1203             "BaseHandle handle = new TextLabel(\"Hello World!\"); " +
1204             "TextLabel label = handle as TextLabel")]
1205         [EditorBrowsable(EditorBrowsableState.Never)]
1206         public static TextLabel DownCast(BaseHandle handle)
1207         {
1208             TextLabel ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextLabel;
1209
1210             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1211             return ret;
1212         }
1213
1214         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextLabel obj)
1215         {
1216             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1217         }
1218
1219         /// <summary>
1220         /// Dispose.
1221         /// </summary>
1222         /// <since_tizen> 3 </since_tizen>
1223         protected override void Dispose(DisposeTypes type)
1224         {
1225             if (disposed)
1226             {
1227                 return;
1228             }
1229
1230             if (type == DisposeTypes.Explicit)
1231             {
1232                 //Called by User
1233                 //Release your own managed resources here.
1234                 //You should release all of your own disposable objects here.
1235             }
1236
1237             //Release your own unmanaged resources here.
1238             //You should not access any managed member here except static instance.
1239             //because the execution order of Finalizes is non-deterministic.
1240
1241             if (swigCPtr.Handle != global::System.IntPtr.Zero)
1242             {
1243                 if (swigCMemOwn)
1244                 {
1245                     swigCMemOwn = false;
1246                     NDalicPINVOKE.delete_TextLabel(swigCPtr);
1247                 }
1248                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1249             }
1250
1251             base.Dispose(type);
1252         }
1253
1254         /// <summary>
1255         /// Invoked whenever the binding context of the textlabel changes. Implement this method to add class handling for this event.
1256         /// </summary>
1257         protected override void OnBindingContextChanged()
1258         {
1259             base.OnBindingContextChanged();
1260         }
1261
1262         private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
1263         {
1264             Text = NUIApplication.MultilingualResourceManager?.GetString(textLabelSid, new CultureInfo(e.Value.Replace("_", "-")));
1265         }
1266
1267         internal new class Property
1268         {
1269             internal static readonly int RENDERING_BACKEND = NDalicPINVOKE.TextLabel_Property_RENDERING_BACKEND_get();
1270             internal static readonly int TEXT = NDalicPINVOKE.TextLabel_Property_TEXT_get();
1271             internal static readonly int FONT_FAMILY = NDalicPINVOKE.TextLabel_Property_FONT_FAMILY_get();
1272             internal static readonly int FONT_STYLE = NDalicPINVOKE.TextLabel_Property_FONT_STYLE_get();
1273             internal static readonly int POINT_SIZE = NDalicPINVOKE.TextLabel_Property_POINT_SIZE_get();
1274             internal static readonly int MULTI_LINE = NDalicPINVOKE.TextLabel_Property_MULTI_LINE_get();
1275             internal static readonly int HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TextLabel_Property_HORIZONTAL_ALIGNMENT_get();
1276             internal static readonly int VERTICAL_ALIGNMENT = NDalicPINVOKE.TextLabel_Property_VERTICAL_ALIGNMENT_get();
1277             internal static readonly int TEXT_COLOR = NDalicPINVOKE.TextLabel_Property_TEXT_COLOR_get();
1278             internal static readonly int ENABLE_MARKUP = NDalicPINVOKE.TextLabel_Property_ENABLE_MARKUP_get();
1279             internal static readonly int ENABLE_AUTO_SCROLL = NDalicPINVOKE.TextLabel_Property_ENABLE_AUTO_SCROLL_get();
1280             internal static readonly int AUTO_SCROLL_SPEED = NDalicPINVOKE.TextLabel_Property_AUTO_SCROLL_SPEED_get();
1281             internal static readonly int AUTO_SCROLL_LOOP_COUNT = NDalicPINVOKE.TextLabel_Property_AUTO_SCROLL_LOOP_COUNT_get();
1282             internal static readonly int AUTO_SCROLL_GAP = NDalicPINVOKE.TextLabel_Property_AUTO_SCROLL_GAP_get();
1283             internal static readonly int LINE_SPACING = NDalicPINVOKE.TextLabel_Property_LINE_SPACING_get();
1284             internal static readonly int UNDERLINE = NDalicPINVOKE.TextLabel_Property_UNDERLINE_get();
1285             internal static readonly int SHADOW = NDalicPINVOKE.TextLabel_Property_SHADOW_get();
1286             internal static readonly int EMBOSS = NDalicPINVOKE.TextLabel_Property_EMBOSS_get();
1287             internal static readonly int OUTLINE = NDalicPINVOKE.TextLabel_Property_OUTLINE_get();
1288             internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextLabel_Property_PIXEL_SIZE_get();
1289             internal static readonly int ELLIPSIS = NDalicManualPINVOKE.TextLabel_Property_ELLIPSIS_get();
1290             internal static readonly int AUTO_SCROLL_STOP_MODE = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_STOP_MODE_get();
1291             internal static readonly int AUTO_SCROLL_LOOP_DELAY = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get();
1292             internal static readonly int LINE_COUNT = NDalicManualPINVOKE.TextLabel_Property_LINE_COUNT_get();
1293             internal static readonly int LINE_WRAP_MODE = NDalicManualPINVOKE.TextLabel_Property_LINE_WRAP_MODE_get();
1294             internal static readonly int TEXT_DIRECTION = NDalicManualPINVOKE.TextLabel_Property_TEXT_DIRECTION_get();
1295             internal static readonly int VERTICAL_LINE_ALIGNMENT = NDalicManualPINVOKE.TextLabel_Property_VERTICAL_LINE_ALIGNMENT_get();
1296             internal static readonly int MATCH_SYSTEM_LANGUAGE_DIRECTION = NDalicManualPINVOKE.TextLabel_Property_MATCH_SYSTEM_LANGUAGE_DIRECTION_get();
1297         }
1298     }
1299 }