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