[NUI] Property setter is changed (#1097)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextLabel.cs
1 /*
2  * Copyright(c) 2019 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         /// Only for XAML. No need of public API. Make hidden as inhouse API.
509         [EditorBrowsable(EditorBrowsableState.Never)]
510         public static readonly BindableProperty TextFitProperty = BindableProperty.Create(nameof(TextFit), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
511         {
512             var textLabel = (TextLabel)bindable;
513             if (newValue != null)
514             {
515                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.TEXT_FIT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
516             }
517         },
518         defaultValueCreator: (bindable) =>
519         {
520             var textLabel = (TextLabel)bindable;
521             PropertyMap temp = new PropertyMap();
522             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.TEXT_FIT).Get(temp);
523             return temp;
524         });
525
526         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
527         private string textLabelSid = null;
528         private bool systemlangTextFlag = false;
529
530         /// <summary>
531         /// Creates the TextLabel control.
532         /// </summary>
533         /// <since_tizen> 3 </since_tizen>
534         public TextLabel() : this(Interop.TextLabel.TextLabel_New__SWIG_0(), true)
535         {
536             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
537         }
538
539         /// <summary>
540         /// Creates the TextLabel with setting the status of shown or hidden.
541         /// </summary>
542         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
543         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
544         [EditorBrowsable(EditorBrowsableState.Never)]
545         public TextLabel(bool shown) : this(Interop.TextLabel.TextLabel_New__SWIG_0(), true)
546         {
547             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
548             SetVisible(shown);
549         }
550
551         /// <summary>
552         /// Creates the TextLabel control.
553         /// </summary>
554         /// <param name="text">The text to display</param>
555         /// <since_tizen> 3 </since_tizen>
556         public TextLabel(string text) : this(Interop.TextLabel.TextLabel_New__SWIG_1(text), true)
557         {
558             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
559         }
560
561         /// <summary>
562         /// Creates the TextLabel with setting the status of shown or hidden.
563         /// </summary>
564         /// <param name="text">The text to display</param>
565         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
566         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
567         [EditorBrowsable(EditorBrowsableState.Never)]
568         public TextLabel(string text, bool shown) : this(Interop.TextLabel.TextLabel_New__SWIG_1(text), true)
569         {
570             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
571             SetVisible(shown);
572         }
573
574         internal TextLabel(TextLabel handle, bool shown = true) : this(Interop.TextLabel.new_TextLabel__SWIG_1(TextLabel.getCPtr(handle)), true)
575         {
576             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
577
578             if (!shown)
579             {
580                 SetVisible(false);
581             }
582         }
583
584         internal TextLabel(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(Interop.TextLabel.TextLabel_SWIGUpcast(cPtr), cMemoryOwn)
585         {
586             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
587
588             if (!shown)
589             {
590                 SetVisible(false);
591             }
592         }
593
594         /// <summary>
595         /// The TranslatableText property.<br />
596         /// The text can set the SID value.<br />
597         /// </summary>
598         /// <exception cref='ArgumentNullException'>
599         /// ResourceManager about multilingual is null.
600         /// </exception>
601         /// <since_tizen> 4 </since_tizen>
602         public string TranslatableText
603         {
604             get
605             {
606                 return textLabelSid;
607             }
608             set
609             {
610                 if (NUIApplication.MultilingualResourceManager == null)
611                 {
612                     throw new ArgumentNullException("ResourceManager about multilingual is null");
613                 }
614                 string translatableText = null;
615                 textLabelSid = value;
616                 translatableText = NUIApplication.MultilingualResourceManager?.GetString(textLabelSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
617                 if (translatableText != null)
618                 {
619                     Text = translatableText;
620                     if (systemlangTextFlag == false)
621                     {
622                         SystemSettings.LocaleLanguageChanged += new WeakEventHandler<LocaleLanguageChangedEventArgs>(SystemSettings_LocaleLanguageChanged).Handler;
623                         systemlangTextFlag = true;
624                     }
625                 }
626                 else
627                 {
628                     Text = "";
629                 }
630                 NotifyPropertyChanged();
631             }
632         }
633
634         /// <summary>
635         /// The Text property.<br />
636         /// The text to display in the UTF-8 format.<br />
637         /// </summary>
638         /// <since_tizen> 3 </since_tizen>
639         public string Text
640         {
641             get
642             {
643                 return (string)GetValue(TextProperty);
644             }
645             set
646             {
647                 SetValue(TextProperty, value);
648                 NotifyPropertyChangedAndRequestLayout();
649             }
650         }
651
652         /// <summary>
653         /// The FontFamily property.<br />
654         /// The requested font family to use.<br />
655         /// </summary>
656         /// <since_tizen> 3 </since_tizen>
657         public string FontFamily
658         {
659             get
660             {
661                 return (string)GetValue(FontFamilyProperty);
662             }
663             set
664             {
665                 SetValue(FontFamilyProperty, value);
666                 NotifyPropertyChangedAndRequestLayout();
667             }
668         }
669
670         /// <summary>
671         /// The FontStyle property.<br />
672         /// The requested font style to use.<br />
673         /// </summary>
674         /// <since_tizen> 3 </since_tizen>
675         public PropertyMap FontStyle
676         {
677             get
678             {
679                 return (PropertyMap)GetValue(FontStyleProperty);
680             }
681             set
682             {
683                 SetValue(FontStyleProperty, value);
684                 NotifyPropertyChangedAndRequestLayout();
685             }
686         }
687
688         /// <summary>
689         /// The PointSize property.<br />
690         /// The size of font in points.<br />
691         /// </summary>
692         /// <since_tizen> 3 </since_tizen>
693         public float PointSize
694         {
695             get
696             {
697                 return (float)GetValue(PointSizeProperty);
698             }
699             set
700             {
701                 SetValue(PointSizeProperty, value);
702                 NotifyPropertyChangedAndRequestLayout();
703             }
704         }
705
706         /// <summary>
707         /// The MultiLine property.<br />
708         /// The single-line or multi-line layout option.<br />
709         /// </summary>
710         /// <since_tizen> 3 </since_tizen>
711         public bool MultiLine
712         {
713             get
714             {
715                 return (bool)GetValue(MultiLineProperty);
716             }
717             set
718             {
719                 SetValue(MultiLineProperty, value);
720                 NotifyPropertyChangedAndRequestLayout();
721             }
722         }
723
724         /// <summary>
725         /// The HorizontalAlignment property.<br />
726         /// The line horizontal alignment.<br />
727         /// </summary>
728         /// <since_tizen> 3 </since_tizen>
729         public HorizontalAlignment HorizontalAlignment
730         {
731             get
732             {
733                 return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
734             }
735             set
736             {
737                 SetValue(HorizontalAlignmentProperty, value);
738                 NotifyPropertyChanged();
739             }
740         }
741
742         /// <summary>
743         /// The VerticalAlignment property.<br />
744         /// The line vertical alignment.<br />
745         /// </summary>
746         /// <since_tizen> 3 </since_tizen>
747         public VerticalAlignment VerticalAlignment
748         {
749             get
750             {
751                 return (VerticalAlignment)GetValue(VerticalAlignmentProperty);
752             }
753             set
754             {
755                 SetValue(VerticalAlignmentProperty, value);
756                 NotifyPropertyChanged();
757             }
758         }
759
760         /// <summary>
761         /// The TextColor property.<br />
762         /// The color of the text.<br />
763         /// Animation framework can be used to change the color of the text when not using mark up.<br />
764         /// Cannot animate the color when text is auto scrolling.<br />
765         /// </summary>
766         /// <remarks>
767         /// The property cascade chaining set is possible. For example, this (textLabel.TextColor.X = 0.1f;) is possible.
768         /// </remarks>
769         /// <since_tizen> 3 </since_tizen>
770         public Color TextColor
771         {
772             get
773             {
774                 Color temp = (Color)GetValue(TextColorProperty);
775                 return new Color(OnTextColorChanged, temp.R, temp.G, temp.B, temp.A);
776             }
777             set
778             {
779                 SetValue(TextColorProperty, value);
780                 NotifyPropertyChanged();
781             }
782         }
783
784         /// <summary>
785         /// The ShadowOffset property.<br />
786         /// The drop shadow offset 0 indicates no shadow.<br />
787         /// </summary>
788         /// <since_tizen> 3 </since_tizen>
789         /// <remarks>
790         /// Deprecated.(API Level 6) Use Shadow instead.
791         /// The property cascade chaining set is possible. For example, this (textLabel.ShadowOffset.X = 0.1f;) is possible.
792         /// </remarks>
793         [Obsolete("Please do not use this ShadowOffset(Deprecated). Please use Shadow instead.")]
794         public Vector2 ShadowOffset
795         {
796             get
797             {
798                 Vector2 shadowOffset = new Vector2();
799                 Shadow.Find(TextLabel.Property.SHADOW, "offset")?.Get(shadowOffset);
800                 return new Vector2(OnShadowOffsetChanged, shadowOffset.X, shadowOffset.Y);
801             }
802             set
803             {
804                 PropertyMap temp = new PropertyMap();
805                 temp.Insert("offset", new PropertyValue(value));
806
807                 PropertyMap shadowMap = Shadow;
808                 shadowMap.Merge(temp);
809
810                 SetValue(ShadowProperty, shadowMap);
811                 NotifyPropertyChanged();
812             }
813         }
814
815         /// <summary>
816         /// The ShadowColor property.<br />
817         /// The color of a drop shadow.<br />
818         /// </summary>
819         /// <since_tizen> 3 </since_tizen>
820         /// <remarks>
821         /// Deprecated.(API Level 6) Use Shadow instead.
822         /// The property cascade chaining set is possible. For example, this (textLabel.ShadowColor.X = 0.1f;) is possible.
823         /// </remarks>
824         [Obsolete("Please do not use this ShadowColor(Deprecated). Please use Shadow instead.")]
825         public Vector4 ShadowColor
826         {
827             get
828             {
829                 Vector4 shadowColor = new Vector4();
830                 Shadow.Find(TextLabel.Property.SHADOW, "color")?.Get(shadowColor);
831                 return new Vector4(OnShadowColorChanged, shadowColor.X, shadowColor.Y, shadowColor.Z, shadowColor.W);
832             }
833             set
834             {
835                 PropertyMap temp = new PropertyMap();
836                 temp.Insert("color", new PropertyValue(value));
837
838                 PropertyMap shadowMap = Shadow;
839                 shadowMap.Merge(temp);
840
841                 SetValue(ShadowProperty, shadowMap);
842                 NotifyPropertyChanged();
843             }
844         }
845
846         /// <summary>
847         /// The UnderlineEnabled property.<br />
848         /// The underline enabled flag.<br />
849         /// </summary>
850         /// <since_tizen> 3 </since_tizen>
851         /// <remarks>
852         /// Deprecated.(API Level 6) Use Underline instead.
853         /// </remarks>
854         [Obsolete("Please do not use this UnderlineEnabled(Deprecated). Please use Underline instead.")]
855         public bool UnderlineEnabled
856         {
857             get
858             {
859                 bool underlineEnabled = false;
860                 Underline.Find(TextLabel.Property.UNDERLINE, "enable")?.Get(out underlineEnabled);
861                 return underlineEnabled;
862             }
863             set
864             {
865                 PropertyMap temp = new PropertyMap();
866                 temp.Add("enable", new PropertyValue(value));
867
868                 PropertyMap undelineMap = Underline;
869                 undelineMap.Merge(temp);
870
871                 SetValue(UnderlineProperty, undelineMap);
872                 NotifyPropertyChanged();
873
874             }
875         }
876
877         /// <summary>
878         /// The UnderlineColor property.<br />
879         /// Overrides the underline height from font metrics.<br />
880         /// </summary>
881         /// <since_tizen> 3 </since_tizen>
882         /// <remarks>
883         /// Deprecated.(API Level 6) Use Underline instead.
884         /// The property cascade chaining set is possible. For example, this (textLabel.UnderlineColor.X = 0.1f;) is possible.
885         /// </remarks>
886         [Obsolete("Please do not use this UnderlineColor(Deprecated). Please use Underline instead.")]
887         public Vector4 UnderlineColor
888         {
889             get
890             {
891                 Vector4 underlineColor = new Vector4();
892                 Underline.Find(TextLabel.Property.UNDERLINE, "color")?.Get(underlineColor);
893                 return new Vector4(OnUnderlineColorChanged, underlineColor.X, underlineColor.Y, underlineColor.Z, underlineColor.W);
894             }
895             set
896             {
897                 PropertyMap temp = new PropertyMap();
898                 temp.Insert("color", new PropertyValue(value));
899
900                 PropertyMap undelineMap = Underline;
901                 undelineMap.Merge(temp);
902
903                 SetValue(UnderlineProperty, undelineMap);
904                 NotifyPropertyChanged();
905             }
906         }
907
908         /// <summary>
909         /// The UnderlineHeight property.<br />
910         /// Overrides the underline height from font metrics.<br />
911         /// </summary>
912         /// <since_tizen> 3 </since_tizen>
913         /// <remarks>
914         /// Deprecated.(API Level 6) Use Underline instead.
915         /// </remarks>
916         [Obsolete("Please do not use this UnderlineHeight(Deprecated). Please use Underline instead.")]
917         public float UnderlineHeight
918         {
919             get
920             {
921                 float underlineHeight = 0.0f;
922                 Underline.Find(TextLabel.Property.UNDERLINE, "height")?.Get(out underlineHeight);
923                 return underlineHeight;
924             }
925             set
926             {
927                 PropertyMap temp = new PropertyMap();
928                 temp.Insert("height", new PropertyValue(value));
929
930                 PropertyMap undelineMap = Underline;
931                 undelineMap.Merge(temp);
932
933                 SetValue(UnderlineProperty, undelineMap);
934                 NotifyPropertyChanged();
935             }
936         }
937
938         /// <summary>
939         /// The EnableMarkup property.<br />
940         /// Whether the mark-up processing is enabled.<br />
941         /// </summary>
942         /// <since_tizen> 3 </since_tizen>
943         public bool EnableMarkup
944         {
945             get
946             {
947                 return (bool)GetValue(EnableMarkupProperty);
948             }
949             set
950             {
951                 SetValue(EnableMarkupProperty, value);
952                 NotifyPropertyChanged();
953             }
954         }
955
956         /// <summary>
957         /// The EnableAutoScroll property.<br />
958         /// Starts or stops auto scrolling.<br />
959         /// </summary>
960         /// <since_tizen> 3 </since_tizen>
961         public bool EnableAutoScroll
962         {
963             get
964             {
965                 return (bool)GetValue(EnableAutoScrollProperty);
966             }
967             set
968             {
969                 SetValue(EnableAutoScrollProperty, value);
970                 NotifyPropertyChanged();
971             }
972         }
973
974         /// <summary>
975         /// The AutoScrollSpeed property.<br />
976         /// Sets the speed of scrolling in pixels per second.<br />
977         /// </summary>
978         /// <since_tizen> 3 </since_tizen>
979         public int AutoScrollSpeed
980         {
981             get
982             {
983                 return (int)GetValue(AutoScrollSpeedProperty);
984             }
985             set
986             {
987                 SetValue(AutoScrollSpeedProperty, value);
988                 NotifyPropertyChanged();
989             }
990         }
991
992         /// <summary>
993         /// The AutoScrollLoopCount property.<br />
994         /// Number of complete loops when scrolling enabled.<br />
995         /// </summary>
996         /// <since_tizen> 3 </since_tizen>
997         public int AutoScrollLoopCount
998         {
999             get
1000             {
1001                 return (int)GetValue(AutoScrollLoopCountProperty);
1002             }
1003             set
1004             {
1005                 SetValue(AutoScrollLoopCountProperty, value);
1006                 NotifyPropertyChanged();
1007             }
1008         }
1009
1010         /// <summary>
1011         /// The AutoScrollGap property.<br />
1012         /// Gap before scrolling wraps.<br />
1013         /// </summary>
1014         /// <since_tizen> 3 </since_tizen>
1015         public float AutoScrollGap
1016         {
1017             get
1018             {
1019                 return (float)GetValue(AutoScrollGapProperty);
1020             }
1021             set
1022             {
1023                 SetValue(AutoScrollGapProperty, value);
1024                 NotifyPropertyChanged();
1025             }
1026         }
1027
1028         /// <summary>
1029         /// The LineSpacing property.<br />
1030         /// The default extra space between lines in points.<br />
1031         /// </summary>
1032         /// <since_tizen> 3 </since_tizen>
1033         public float LineSpacing
1034         {
1035             get
1036             {
1037                 return (float)GetValue(LineSpacingProperty);
1038             }
1039             set
1040             {
1041                 SetValue(LineSpacingProperty, value);
1042                 NotifyPropertyChangedAndRequestLayout();
1043             }
1044         }
1045
1046         /// <summary>
1047         /// The Underline property.<br />
1048         /// The default underline parameters.<br />
1049         /// </summary>
1050         /// <since_tizen> 3 </since_tizen>
1051         public PropertyMap Underline
1052         {
1053             get
1054             {
1055                 return (PropertyMap)GetValue(UnderlineProperty);
1056             }
1057             set
1058             {
1059                 SetValue(UnderlineProperty, value);
1060                 NotifyPropertyChanged();
1061             }
1062         }
1063
1064         /// <summary>
1065         /// The Shadow property.<br />
1066         /// The default shadow parameters.<br />
1067         /// </summary>
1068         /// <since_tizen> 3 </since_tizen>
1069         public PropertyMap Shadow
1070         {
1071             get
1072             {
1073                 return (PropertyMap)GetValue(ShadowProperty);
1074             }
1075             set
1076             {
1077                 SetValue(ShadowProperty, value);
1078                 NotifyPropertyChanged();
1079             }
1080         }
1081
1082         /// <summary>
1083         /// The Emboss property.<br />
1084         /// The default emboss parameters.<br />
1085         /// </summary>
1086         /// <since_tizen> 3 </since_tizen>
1087         public string Emboss
1088         {
1089             get
1090             {
1091                 return (string)GetValue(EmbossProperty);
1092             }
1093             set
1094             {
1095                 SetValue(EmbossProperty, value);
1096                 NotifyPropertyChanged();
1097             }
1098         }
1099
1100         /// <summary>
1101         /// The Outline property.<br />
1102         /// The default outline parameters.<br />
1103         /// </summary>
1104         /// <since_tizen> 3 </since_tizen>
1105         public PropertyMap Outline
1106         {
1107             get
1108             {
1109                 return (PropertyMap)GetValue(OutlineProperty);
1110             }
1111             set
1112             {
1113                 SetValue(OutlineProperty, value);
1114                 NotifyPropertyChanged();
1115             }
1116         }
1117
1118         /// <summary>
1119         /// The PixelSize property.<br />
1120         /// The size of font in pixels.<br />
1121         /// </summary>
1122         /// <since_tizen> 3 </since_tizen>
1123         public float PixelSize
1124         {
1125             get
1126             {
1127                 return (float)GetValue(PixelSizeProperty);
1128             }
1129             set
1130             {
1131                 SetValue(PixelSizeProperty, value);
1132                 NotifyPropertyChangedAndRequestLayout();
1133             }
1134         }
1135
1136         /// <summary>
1137         /// The Ellipsis property.<br />
1138         /// Enable or disable the ellipsis.<br />
1139         /// </summary>
1140         /// <since_tizen> 3 </since_tizen>
1141         public bool Ellipsis
1142         {
1143             get
1144             {
1145                 return (bool)GetValue(EllipsisProperty);
1146             }
1147             set
1148             {
1149                 SetValue(EllipsisProperty, value);
1150                 NotifyPropertyChanged();
1151             }
1152         }
1153
1154         /// <summary>
1155         /// The AutoScrollLoopDelay property.<br />
1156         /// Do something.<br />
1157         /// </summary>
1158         /// <since_tizen> 3 </since_tizen>
1159         public float AutoScrollLoopDelay
1160         {
1161             get
1162             {
1163                 return (float)GetValue(AutoScrollLoopDelayProperty);
1164             }
1165             set
1166             {
1167                 SetValue(AutoScrollLoopDelayProperty, value);
1168                 NotifyPropertyChanged();
1169             }
1170         }
1171
1172         /// <summary>
1173         /// The AutoScrollStopMode property.<br />
1174         /// Do something.<br />
1175         /// </summary>
1176         /// <since_tizen> 3 </since_tizen>
1177         public AutoScrollStopMode AutoScrollStopMode
1178         {
1179             get
1180             {
1181                 return (AutoScrollStopMode)GetValue(AutoScrollStopModeProperty);
1182             }
1183             set
1184             {
1185                 SetValue(AutoScrollStopModeProperty, value);
1186                 NotifyPropertyChanged();
1187             }
1188         }
1189
1190         /// <summary>
1191         /// The line count of the text.
1192         /// </summary>
1193         /// <since_tizen> 3 </since_tizen>
1194         public int LineCount
1195         {
1196             get
1197             {
1198                 int temp = 0;
1199                 GetProperty(TextLabel.Property.LINE_COUNT).Get(out temp);
1200                 return temp;
1201             }
1202         }
1203
1204         /// <summary>
1205         /// The LineWrapMode property.<br />
1206         /// line wrap mode when the text lines over layout width.<br />
1207         /// </summary>
1208         /// <since_tizen> 4 </since_tizen>
1209         public LineWrapMode LineWrapMode
1210         {
1211             get
1212             {
1213                 return (LineWrapMode)GetValue(LineWrapModeProperty);
1214             }
1215             set
1216             {
1217                 SetValue(LineWrapModeProperty, value);
1218                 NotifyPropertyChanged();
1219             }
1220         }
1221
1222         /// <summary>
1223         /// The direction of the text such as left to right or right to left.
1224         /// </summary>
1225         /// <since_tizen> 5 </since_tizen>
1226         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1227         [EditorBrowsable(EditorBrowsableState.Never)]
1228         public TextDirection TextDirection
1229         {
1230             get
1231             {
1232                 int temp = 0;
1233                 GetProperty(TextLabel.Property.TEXT_DIRECTION).Get(out temp);
1234                 return (TextDirection)temp;
1235             }
1236         }
1237
1238         /// <summary>
1239         /// The vertical line alignment of the text.
1240         /// </summary>
1241         /// <since_tizen> 5 </since_tizen>
1242         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1243         [EditorBrowsable(EditorBrowsableState.Never)]
1244         public VerticalLineAlignment VerticalLineAlignment
1245         {
1246             get
1247             {
1248                 return (VerticalLineAlignment)GetValue(VerticalLineAlignmentProperty);
1249             }
1250             set
1251             {
1252                 SetValue(VerticalLineAlignmentProperty, value);
1253                 NotifyPropertyChanged();
1254             }
1255         }
1256
1257         /// <summary>
1258         /// The text alignment to match the direction of the system language.
1259         /// </summary>
1260         /// <since_tizen> 6 </since_tizen>
1261         public bool MatchSystemLanguageDirection
1262         {
1263             get
1264             {
1265                 return (bool)GetValue(MatchSystemLanguageDirectionProperty);
1266             }
1267             set
1268             {
1269                 SetValue(MatchSystemLanguageDirectionProperty, value);
1270                 NotifyPropertyChanged();
1271             }
1272         }
1273
1274         /// <summary>
1275         /// The text fit parameters.<br />
1276         /// The textFit map contains the following keys :<br />
1277         /// - enable (bool type) : True to enable the text fit or false to disable(the default value is false)<br />
1278         /// - minSize (float type) : Minimum Size for text fit(the default value is 10.f)<br />
1279         /// - maxSize (float type) : Maximum Size for text fit(the default value is 100.f)<br />
1280         /// - stepSize (float type) : Step Size for font increase(the default value is 1.f)<br />
1281         /// - fontSize (string type) : The size type of font, You can choose between "pointSize" or "pixelSize". (the default value is "pointSize")<br />
1282         /// </summary>
1283         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1284         [EditorBrowsable(EditorBrowsableState.Never)]
1285         public PropertyMap TextFit
1286         {
1287             get
1288             {
1289                 return (PropertyMap)GetValue(TextFitProperty);
1290             }
1291             set
1292             {
1293                 SetValue(TextFitProperty, value);
1294                 NotifyPropertyChanged();
1295             }
1296         }
1297
1298         /// <summary>
1299         /// Downcasts a handle to textLabel handle
1300         /// </summary>
1301         /// <param name="handle"></param>
1302         /// <returns></returns>
1303         /// <since_tizen> 3 </since_tizen>
1304         /// Please do not use! this will be deprecated!
1305         /// Instead please use as keyword.
1306         [Obsolete("Please do not use! This will be deprecated! Please use as keyword instead! " +
1307             "Like: " +
1308             "BaseHandle handle = new TextLabel(\"Hello World!\"); " +
1309             "TextLabel label = handle as TextLabel")]
1310         [EditorBrowsable(EditorBrowsableState.Never)]
1311         public static TextLabel DownCast(BaseHandle handle)
1312         {
1313             TextLabel ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextLabel;
1314
1315             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1316             return ret;
1317         }
1318
1319         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextLabel obj)
1320         {
1321             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1322         }
1323
1324         /// <summary>
1325         /// Dispose.
1326         /// </summary>
1327         /// <since_tizen> 3 </since_tizen>
1328         protected override void Dispose(DisposeTypes type)
1329         {
1330             if (disposed)
1331             {
1332                 return;
1333             }
1334
1335             //Release your own unmanaged resources here.
1336             //You should not access any managed member here except static instance.
1337             //because the execution order of Finalizes is non-deterministic.
1338
1339             if (swigCPtr.Handle != global::System.IntPtr.Zero)
1340             {
1341                 if (swigCMemOwn)
1342                 {
1343                     swigCMemOwn = false;
1344                     Interop.TextLabel.delete_TextLabel(swigCPtr);
1345                 }
1346                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1347             }
1348
1349             base.Dispose(type);
1350         }
1351
1352         /// <summary>
1353         /// Invoked whenever the binding context of the textlabel changes. Implement this method to add class handling for this event.
1354         /// </summary>
1355         protected override void OnBindingContextChanged()
1356         {
1357             base.OnBindingContextChanged();
1358         }
1359
1360         private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
1361         {
1362             Text = NUIApplication.MultilingualResourceManager?.GetString(textLabelSid, new CultureInfo(e.Value.Replace("_", "-")));
1363         }
1364
1365         private void  NotifyPropertyChangedAndRequestLayout()
1366         {
1367             NotifyPropertyChanged();
1368             Layout?.RequestLayout();
1369         }
1370
1371         internal new class Property
1372         {
1373             internal static readonly int RENDERING_BACKEND = Interop.TextLabel.TextLabel_Property_RENDERING_BACKEND_get();
1374             internal static readonly int TEXT = Interop.TextLabel.TextLabel_Property_TEXT_get();
1375             internal static readonly int FONT_FAMILY = Interop.TextLabel.TextLabel_Property_FONT_FAMILY_get();
1376             internal static readonly int FONT_STYLE = Interop.TextLabel.TextLabel_Property_FONT_STYLE_get();
1377             internal static readonly int POINT_SIZE = Interop.TextLabel.TextLabel_Property_POINT_SIZE_get();
1378             internal static readonly int MULTI_LINE = Interop.TextLabel.TextLabel_Property_MULTI_LINE_get();
1379             internal static readonly int HORIZONTAL_ALIGNMENT = Interop.TextLabel.TextLabel_Property_HORIZONTAL_ALIGNMENT_get();
1380             internal static readonly int VERTICAL_ALIGNMENT = Interop.TextLabel.TextLabel_Property_VERTICAL_ALIGNMENT_get();
1381             internal static readonly int TEXT_COLOR = Interop.TextLabel.TextLabel_Property_TEXT_COLOR_get();
1382             internal static readonly int ENABLE_MARKUP = Interop.TextLabel.TextLabel_Property_ENABLE_MARKUP_get();
1383             internal static readonly int ENABLE_AUTO_SCROLL = Interop.TextLabel.TextLabel_Property_ENABLE_AUTO_SCROLL_get();
1384             internal static readonly int AUTO_SCROLL_SPEED = Interop.TextLabel.TextLabel_Property_AUTO_SCROLL_SPEED_get();
1385             internal static readonly int AUTO_SCROLL_LOOP_COUNT = Interop.TextLabel.TextLabel_Property_AUTO_SCROLL_LOOP_COUNT_get();
1386             internal static readonly int AUTO_SCROLL_GAP = Interop.TextLabel.TextLabel_Property_AUTO_SCROLL_GAP_get();
1387             internal static readonly int LINE_SPACING = Interop.TextLabel.TextLabel_Property_LINE_SPACING_get();
1388             internal static readonly int UNDERLINE = Interop.TextLabel.TextLabel_Property_UNDERLINE_get();
1389             internal static readonly int SHADOW = Interop.TextLabel.TextLabel_Property_SHADOW_get();
1390             internal static readonly int EMBOSS = Interop.TextLabel.TextLabel_Property_EMBOSS_get();
1391             internal static readonly int OUTLINE = Interop.TextLabel.TextLabel_Property_OUTLINE_get();
1392             internal static readonly int PIXEL_SIZE = Interop.TextLabel.TextLabel_Property_PIXEL_SIZE_get();
1393             internal static readonly int ELLIPSIS = Interop.TextLabel.TextLabel_Property_ELLIPSIS_get();
1394             internal static readonly int AUTO_SCROLL_STOP_MODE = Interop.TextLabel.TextLabel_Property_AUTO_SCROLL_STOP_MODE_get();
1395             internal static readonly int AUTO_SCROLL_LOOP_DELAY = Interop.TextLabel.TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get();
1396             internal static readonly int LINE_COUNT = Interop.TextLabel.TextLabel_Property_LINE_COUNT_get();
1397             internal static readonly int LINE_WRAP_MODE = Interop.TextLabel.TextLabel_Property_LINE_WRAP_MODE_get();
1398             internal static readonly int TEXT_DIRECTION = Interop.TextLabel.TextLabel_Property_TEXT_DIRECTION_get();
1399             internal static readonly int VERTICAL_LINE_ALIGNMENT = Interop.TextLabel.TextLabel_Property_VERTICAL_LINE_ALIGNMENT_get();
1400             internal static readonly int MATCH_SYSTEM_LANGUAGE_DIRECTION = Interop.TextLabel.TextLabel_Property_MATCH_SYSTEM_LANGUAGE_DIRECTION_get();
1401             internal static readonly int TEXT_FIT = Interop.TextLabel.TextLabel_Property_TEXT_FIT_get();
1402         }
1403
1404         private void OnShadowColorChanged(float x, float y, float z, float w)
1405         {
1406             ShadowColor = new Vector4(x, y, z, w);
1407         }
1408         private void OnShadowOffsetChanged(float x, float y)
1409         {
1410             ShadowOffset = new Vector2(x, y);
1411         }
1412         private void OnTextColorChanged(float r, float g, float b, float a)
1413         {
1414             TextColor = new Color(r, g, b, a);
1415         }
1416         private void OnUnderlineColorChanged(float x, float y, float z, float w)
1417         {
1418             UnderlineColor = new Vector4(x, y, z, w);
1419         }
1420
1421     }
1422 }