Sync upstream
[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         static TextLabel() { }
36
37         /// <summary>
38         /// StyleNameProperty
39         /// </summary>
40         [EditorBrowsable(EditorBrowsableState.Never)]
41         public static readonly BindableProperty TranslatableTextProperty = BindableProperty.Create(nameof(TranslatableText), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
42         {
43             var textLabel = (TextLabel)bindable;
44             if (newValue != null)
45             {
46                 textLabel.translatableText = (string)newValue;
47             }
48         },
49         defaultValueCreator: (bindable) =>
50         {
51             var textLabel = (TextLabel)bindable;
52             return textLabel.translatableText;
53         });
54         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
55         [EditorBrowsable(EditorBrowsableState.Never)]
56         public static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
57         {
58             var textLabel = (TextLabel)bindable;
59             if (newValue != null)
60             {
61                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.TEXT, new Tizen.NUI.PropertyValue((string)newValue));
62             }
63         },
64         defaultValueCreator: (bindable) =>
65         {
66             var textLabel = (TextLabel)bindable;
67             string temp;
68             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.TEXT).Get(out temp);
69             return temp;
70         });
71         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
72         [EditorBrowsable(EditorBrowsableState.Never)]
73         public static readonly BindableProperty FontFamilyProperty = BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
74         {
75             var textLabel = (TextLabel)bindable;
76             if (newValue != null)
77             {
78                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue((string)newValue));
79             }
80         },
81         defaultValueCreator: (bindable) =>
82         {
83             var textLabel = (TextLabel)bindable;
84             string temp;
85             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.FONT_FAMILY).Get(out temp);
86             return temp;
87         });
88         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
89         [EditorBrowsable(EditorBrowsableState.Never)]
90         public static readonly BindableProperty FontStyleProperty = BindableProperty.Create(nameof(FontStyle), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
91         {
92             var textLabel = (TextLabel)bindable;
93             if (newValue != null)
94             {
95                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.FONT_STYLE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
96             }
97         },
98         defaultValueCreator: (bindable) =>
99         {
100             var textLabel = (TextLabel)bindable;
101             PropertyMap temp = new PropertyMap();
102             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.FONT_STYLE).Get(temp);
103             return temp;
104         });
105         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
106         [EditorBrowsable(EditorBrowsableState.Never)]
107         public static readonly BindableProperty PointSizeProperty = BindableProperty.Create(nameof(PointSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (bindable, oldValue, newValue) =>
108         {
109             var textLabel = (TextLabel)bindable;
110             if (newValue != null)
111             {
112                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.POINT_SIZE, new Tizen.NUI.PropertyValue((float)newValue));
113             }
114         },
115         defaultValueCreator: (bindable) =>
116         {
117             var textLabel = (TextLabel)bindable;
118             float temp = 0.0f;
119             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.POINT_SIZE).Get(out temp);
120             return temp;
121         });
122         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
123         [EditorBrowsable(EditorBrowsableState.Never)]
124         public static readonly BindableProperty MultiLineProperty = BindableProperty.Create(nameof(MultiLine), typeof(bool), typeof(TextLabel), false, propertyChanged: (bindable, oldValue, newValue) =>
125         {
126             var textLabel = (TextLabel)bindable;
127             if (newValue != null)
128             {
129                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.MULTI_LINE, new Tizen.NUI.PropertyValue((bool)newValue));
130             }
131         },
132         defaultValueCreator: (bindable) =>
133         {
134             var textLabel = (TextLabel)bindable;
135             bool temp = false;
136             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.MULTI_LINE).Get(out temp);
137             return temp;
138         });
139         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
140         [EditorBrowsable(EditorBrowsableState.Never)]
141         public static readonly BindableProperty HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment), typeof(TextLabel), HorizontalAlignment.Begin, propertyChanged: (bindable, oldValue, newValue) =>
142         {
143             var textLabel = (TextLabel)bindable;
144             string valueToString = "";
145             if (newValue != null)
146             {
147                 valueToString = ((HorizontalAlignment)newValue).GetDescription<HorizontalAlignment>();
148                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
149             }
150         },
151         defaultValueCreator: (bindable) =>
152         {
153             var textLabel = (TextLabel)bindable;
154             string temp;
155             if (Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
156             {
157                 NUILog.Error("HorizontalAlignment get error!");
158             }
159             return temp.GetValueByDescription<HorizontalAlignment>();
160         });
161         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
162         [EditorBrowsable(EditorBrowsableState.Never)]
163         public static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.Create(nameof(VerticalAlignment), typeof(VerticalAlignment), typeof(TextLabel), VerticalAlignment.Bottom, propertyChanged: (bindable, oldValue, newValue) =>
164         {
165             var textLabel = (TextLabel)bindable;
166             string valueToString = "";
167             if (newValue != null)
168             {
169                 valueToString = ((VerticalAlignment)newValue).GetDescription<VerticalAlignment>();
170                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
171             }
172         },
173         defaultValueCreator: (bindable) =>
174         {
175             var textLabel = (TextLabel)bindable;
176             string temp;
177             if (Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.VERTICAL_ALIGNMENT).Get(out temp) == false)
178             {
179                 NUILog.Error("VerticalAlignment get error!");
180             }
181
182             return temp.GetValueByDescription<VerticalAlignment>();
183         });
184         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
185         [EditorBrowsable(EditorBrowsableState.Never)]
186         public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
187         {
188             var textLabel = (TextLabel)bindable;
189             if (newValue != null)
190             {
191                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue((Color)newValue));
192             }
193         },
194         defaultValueCreator: (bindable) =>
195         {
196             var textLabel = (TextLabel)bindable;
197             Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
198             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.TEXT_COLOR).Get(temp);
199             return temp;
200         });
201
202         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
203         [EditorBrowsable(EditorBrowsableState.Never)]
204         public static readonly BindableProperty EnableMarkupProperty = BindableProperty.Create(nameof(EnableMarkup), typeof(bool), typeof(TextLabel), false, propertyChanged: (bindable, oldValue, newValue) =>
205         {
206             var textLabel = (TextLabel)bindable;
207             if (newValue != null)
208             {
209                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue((bool)newValue));
210             }
211         },
212         defaultValueCreator: (bindable) =>
213         {
214             var textLabel = (TextLabel)bindable;
215             bool temp = false;
216             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.ENABLE_MARKUP).Get(out temp);
217             return temp;
218         });
219         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
220         [EditorBrowsable(EditorBrowsableState.Never)]
221         public static readonly BindableProperty EnableAutoScrollProperty = BindableProperty.Create(nameof(EnableAutoScroll), typeof(bool), typeof(TextLabel), false, propertyChanged: (bindable, oldValue, newValue) =>
222         {
223             var textLabel = (TextLabel)bindable;
224             if (newValue != null)
225             {
226                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.ENABLE_AUTO_SCROLL, new Tizen.NUI.PropertyValue((bool)newValue));
227             }
228         },
229         defaultValueCreator: (bindable) =>
230         {
231             var textLabel = (TextLabel)bindable;
232             bool temp = false;
233             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.ENABLE_AUTO_SCROLL).Get(out temp);
234             return temp;
235         });
236         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
237         [EditorBrowsable(EditorBrowsableState.Never)]
238         public static readonly BindableProperty AutoScrollSpeedProperty = BindableProperty.Create(nameof(AutoScrollSpeed), typeof(int), typeof(TextLabel), default(int), propertyChanged: (bindable, oldValue, newValue) =>
239         {
240             var textLabel = (TextLabel)bindable;
241             if (newValue != null)
242             {
243                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_SPEED, new Tizen.NUI.PropertyValue((int)newValue));
244             }
245         },
246         defaultValueCreator: (bindable) =>
247         {
248             var textLabel = (TextLabel)bindable;
249             int temp = 0;
250             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_SPEED).Get(out temp);
251             return temp;
252         });
253         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
254         [EditorBrowsable(EditorBrowsableState.Never)]
255         public static readonly BindableProperty AutoScrollLoopCountProperty = BindableProperty.Create(nameof(AutoScrollLoopCount), typeof(int), typeof(TextLabel), default(int), propertyChanged: (bindable, oldValue, newValue) =>
256         {
257             var textLabel = (TextLabel)bindable;
258             if (newValue != null)
259             {
260                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_LOOP_COUNT, new Tizen.NUI.PropertyValue((int)newValue));
261             }
262         },
263         defaultValueCreator: (bindable) =>
264         {
265             var textLabel = (TextLabel)bindable;
266             int temp = 0;
267             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_LOOP_COUNT).Get(out temp);
268             return temp;
269         });
270         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
271         [EditorBrowsable(EditorBrowsableState.Never)]
272         public static readonly BindableProperty AutoScrollGapProperty = BindableProperty.Create(nameof(AutoScrollGap), typeof(float), typeof(TextLabel), default(float), propertyChanged: (bindable, oldValue, newValue) =>
273         {
274             var textLabel = (TextLabel)bindable;
275             if (newValue != null)
276             {
277                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_GAP, new Tizen.NUI.PropertyValue((float)newValue));
278             }
279         },
280         defaultValueCreator: (bindable) =>
281         {
282             var textLabel = (TextLabel)bindable;
283             float temp = 0.0f;
284             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_GAP).Get(out temp);
285             return temp;
286         });
287         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
288         [EditorBrowsable(EditorBrowsableState.Never)]
289         public static readonly BindableProperty LineSpacingProperty = BindableProperty.Create(nameof(LineSpacing), typeof(float), typeof(TextLabel), default(float), propertyChanged: (bindable, oldValue, newValue) =>
290         {
291             var textLabel = (TextLabel)bindable;
292             if (newValue != null)
293             {
294                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.LINE_SPACING, new Tizen.NUI.PropertyValue((float)newValue));
295             }
296         },
297         defaultValueCreator: (bindable) =>
298         {
299             var textLabel = (TextLabel)bindable;
300             float temp = 0.0f;
301             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.LINE_SPACING).Get(out temp);
302             return temp;
303         });
304         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
305         [EditorBrowsable(EditorBrowsableState.Never)]
306         public static readonly BindableProperty UnderlineProperty = BindableProperty.Create(nameof(Underline), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
307         {
308             var textLabel = (TextLabel)bindable;
309             if (newValue != null)
310             {
311                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.UNDERLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
312             }
313         },
314         defaultValueCreator: (bindable) =>
315         {
316             var textLabel = (TextLabel)bindable;
317             PropertyMap temp = new PropertyMap();
318             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.UNDERLINE).Get(temp);
319             return temp;
320         });
321         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
322         [EditorBrowsable(EditorBrowsableState.Never)]
323         public static readonly BindableProperty ShadowProperty = BindableProperty.Create(nameof(Shadow), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
324         {
325             var textLabel = (TextLabel)bindable;
326             if (newValue != null)
327             {
328                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.SHADOW, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
329             }
330         },
331         defaultValueCreator: (bindable) =>
332         {
333             var textLabel = (TextLabel)bindable;
334             PropertyMap temp = new PropertyMap();
335             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.SHADOW).Get(temp);
336             return temp;
337         });
338         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
339         [EditorBrowsable(EditorBrowsableState.Never)]
340         public static readonly BindableProperty EmbossProperty = BindableProperty.Create(nameof(Emboss), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
341         {
342             var textLabel = (TextLabel)bindable;
343             if (newValue != null)
344             {
345                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.EMBOSS, new Tizen.NUI.PropertyValue((string)newValue));
346             }
347         },
348         defaultValueCreator: (bindable) =>
349         {
350             var textLabel = (TextLabel)bindable;
351             string temp;
352             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.EMBOSS).Get(out temp);
353             return temp;
354         });
355         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
356         [EditorBrowsable(EditorBrowsableState.Never)]
357         public static readonly BindableProperty OutlineProperty = BindableProperty.Create(nameof(Outline), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
358         {
359             var textLabel = (TextLabel)bindable;
360             if (newValue != null)
361             {
362                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.OUTLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
363             }
364         },
365         defaultValueCreator: (bindable) =>
366         {
367             var textLabel = (TextLabel)bindable;
368             PropertyMap temp = new PropertyMap();
369             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.OUTLINE).Get(temp);
370             return temp;
371         });
372         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
373         [EditorBrowsable(EditorBrowsableState.Never)]
374         public static readonly BindableProperty PixelSizeProperty = BindableProperty.Create(nameof(PixelSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (bindable, oldValue, newValue) =>
375         {
376             var textLabel = (TextLabel)bindable;
377             if (newValue != null)
378             {
379                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue((float)newValue));
380             }
381         },
382         defaultValueCreator: (bindable) =>
383         {
384             var textLabel = (TextLabel)bindable;
385             float temp = 0.0f;
386             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.PIXEL_SIZE).Get(out temp);
387             return temp;
388         });
389         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
390         [EditorBrowsable(EditorBrowsableState.Never)]
391         public static readonly BindableProperty EllipsisProperty = BindableProperty.Create(nameof(Ellipsis), typeof(bool), typeof(TextLabel), false, propertyChanged: (bindable, oldValue, newValue) =>
392         {
393             var textLabel = (TextLabel)bindable;
394             if (newValue != null)
395             {
396                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.ELLIPSIS, new Tizen.NUI.PropertyValue((bool)newValue));
397             }
398         },
399         defaultValueCreator: (bindable) =>
400         {
401             var textLabel = (TextLabel)bindable;
402             bool temp = false;
403             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.ELLIPSIS).Get(out temp);
404             return temp;
405         });
406         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
407         [EditorBrowsable(EditorBrowsableState.Never)]
408         public static readonly BindableProperty AutoScrollLoopDelayProperty = BindableProperty.Create(nameof(AutoScrollLoopDelay), typeof(float), typeof(TextLabel), default(float), propertyChanged: (bindable, oldValue, newValue) =>
409         {
410             var textLabel = (TextLabel)bindable;
411             if (newValue != null)
412             {
413                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_LOOP_DELAY, new Tizen.NUI.PropertyValue((float)newValue));
414             }
415         },
416         defaultValueCreator: (bindable) =>
417         {
418             var textLabel = (TextLabel)bindable;
419             float temp = 0.0f;
420             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_LOOP_DELAY).Get(out temp);
421             return temp;
422         });
423         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
424         [EditorBrowsable(EditorBrowsableState.Never)]
425         public static readonly BindableProperty AutoScrollStopModeProperty = BindableProperty.Create(nameof(AutoScrollStopMode), typeof(AutoScrollStopMode), typeof(TextLabel), AutoScrollStopMode.FinishLoop, propertyChanged: (bindable, oldValue, newValue) =>
426         {
427             var textLabel = (TextLabel)bindable;
428             if (newValue != null)
429             {
430                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_STOP_MODE, new Tizen.NUI.PropertyValue((int)newValue));
431             }
432         },
433         defaultValueCreator: (bindable) =>
434         {
435             var textLabel = (TextLabel)bindable;
436             string temp;
437             if (Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.AUTO_SCROLL_STOP_MODE).Get(out temp) == false)
438             {
439                 NUILog.Error("AutoScrollStopMode get error!");
440             }
441             return temp.GetValueByDescription<AutoScrollStopMode>();
442         });
443         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
444         [EditorBrowsable(EditorBrowsableState.Never)]
445         public static readonly BindableProperty LineWrapModeProperty = BindableProperty.Create(nameof(LineWrapMode), typeof(LineWrapMode), typeof(TextLabel), LineWrapMode.Word, propertyChanged: (bindable, oldValue, newValue) =>
446         {
447             var textLabel = (TextLabel)bindable;
448             if (newValue != null)
449             {
450                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.LINE_WRAP_MODE, new Tizen.NUI.PropertyValue((int)newValue));
451             }
452         },
453         defaultValueCreator: (bindable) =>
454         {
455             var textLabel = (TextLabel)bindable;
456             int temp;
457             if (false == Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.LINE_WRAP_MODE).Get(out temp))
458             {
459                 NUILog.Error("LineWrapMode get error!");
460             }
461             return (LineWrapMode)temp;
462         });
463         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
464         [EditorBrowsable(EditorBrowsableState.Never)]
465         public static readonly BindableProperty VerticalLineAlignmentProperty = BindableProperty.Create(nameof(VerticalLineAlignment), typeof(VerticalLineAlignment), typeof(TextLabel), VerticalLineAlignment.Bottom, propertyChanged: (bindable, oldValue, newValue) =>
466         {
467             var textLabel = (TextLabel)bindable;
468             if (newValue != null)
469             {
470                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.VERTICAL_LINE_ALIGNMENT, new Tizen.NUI.PropertyValue((int)newValue));
471             }
472         },
473         defaultValueCreator: (bindable) =>
474         {
475             var textLabel = (TextLabel)bindable;
476             int temp = 0;
477             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.VERTICAL_LINE_ALIGNMENT).Get(out temp);
478             return (VerticalLineAlignment)temp;
479         });
480         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
481         [EditorBrowsable(EditorBrowsableState.Never)]
482         public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(MatchSystemLanguageDirection), typeof(bool), typeof(TextLabel), false, propertyChanged: (bindable, oldValue, newValue) =>
483         {
484             var textLabel = (TextLabel)bindable;
485             if (newValue != null)
486             {
487                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.MATCH_SYSTEM_LANGUAGE_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
488             }
489         },
490         defaultValueCreator: (bindable) =>
491         {
492             var textLabel = (TextLabel)bindable;
493             bool temp = false;
494             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.MATCH_SYSTEM_LANGUAGE_DIRECTION).Get(out temp);
495             return temp;
496         });
497
498         /// Only for XAML. No need of public API. Make hidden as inhouse API.
499         [EditorBrowsable(EditorBrowsableState.Never)]
500         public static readonly BindableProperty TextFitProperty = BindableProperty.Create(nameof(TextFit), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
501         {
502             var textLabel = (TextLabel)bindable;
503             if (newValue != null)
504             {
505                 Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.TEXT_FIT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
506             }
507         },
508         defaultValueCreator: (bindable) =>
509         {
510             var textLabel = (TextLabel)bindable;
511             PropertyMap temp = new PropertyMap();
512             Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.TEXT_FIT).Get(temp);
513             return temp;
514         });
515
516         private string textLabelSid = null;
517         private bool systemlangTextFlag = false;
518
519         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
520         [EditorBrowsable(EditorBrowsableState.Never)]
521         public TextLabelStyle Style => ViewStyle as TextLabelStyle;
522
523         /// <summary>
524         /// Creates the TextLabel control.
525         /// </summary>
526         /// <since_tizen> 3 </since_tizen>
527         public TextLabel() : this(Interop.TextLabel.TextLabel_New__SWIG_0(), true)
528         {
529             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
530         }
531
532         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
533         [EditorBrowsable(EditorBrowsableState.Never)]
534         public TextLabel(TextLabelStyle viewStyle) : this(Interop.TextLabel.TextLabel_New__SWIG_0(), true, viewStyle)
535         {
536         }
537
538         /// <summary>
539         /// Creates the TextLabel with setting the status of shown or hidden.
540         /// </summary>
541         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
542         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
543         [EditorBrowsable(EditorBrowsableState.Never)]
544         public TextLabel(bool shown) : this(Interop.TextLabel.TextLabel_New__SWIG_0(), true)
545         {
546             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
547             SetVisible(shown);
548         }
549
550         /// <summary>
551         /// Creates the TextLabel control.
552         /// </summary>
553         /// <param name="text">The text to display</param>
554         /// <since_tizen> 3 </since_tizen>
555         public TextLabel(string text) : this(Interop.TextLabel.TextLabel_New__SWIG_1(text), true)
556         {
557             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
558         }
559
560         /// <summary>
561         /// Creates the TextLabel with setting the status of shown or hidden.
562         /// </summary>
563         /// <param name="text">The text to display</param>
564         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
565         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
566         [EditorBrowsable(EditorBrowsableState.Never)]
567         public TextLabel(string text, bool shown) : this(Interop.TextLabel.TextLabel_New__SWIG_1(text), true)
568         {
569             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
570             SetVisible(shown);
571         }
572
573         internal TextLabel(TextLabel handle, bool shown = true) : this(Interop.TextLabel.new_TextLabel__SWIG_1(TextLabel.getCPtr(handle)), true)
574         {
575             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
576
577             if (!shown)
578             {
579                 SetVisible(false);
580             }
581         }
582
583         internal TextLabel(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : base(Interop.TextLabel.TextLabel_SWIGUpcast(cPtr), cMemoryOwn, viewStyle)
584         {
585             if (!shown)
586             {
587                 SetVisible(false);
588             }
589         }
590
591         internal TextLabel(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(Interop.TextLabel.TextLabel_SWIGUpcast(cPtr), cMemoryOwn)
592         {
593             if (!shown)
594             {
595                 SetVisible(false);
596             }
597         }
598
599         /// <summary>
600         /// The TranslatableText property.<br />
601         /// The text can set the SID value.<br />
602         /// </summary>
603         /// <exception cref='ArgumentNullException'>
604         /// ResourceManager about multilingual is null.
605         /// </exception>
606         /// <since_tizen> 4 </since_tizen>
607         public string TranslatableText
608         {
609             get
610             {
611                 return (string)GetValue(TranslatableTextProperty);
612             }
613             set
614             {
615                 SetValue(TranslatableTextProperty, value);
616             }
617         }
618         private string translatableText
619         {
620             get
621             {
622                 string temp = (string)GetValue(TranslatableTextProperty);
623                 return textLabelSid;
624             }
625             set
626             {
627                 if (NUIApplication.MultilingualResourceManager == null)
628                 {
629                     throw new ArgumentNullException("ResourceManager about multilingual is null");
630                 }
631                 string translatableText = null;
632                 textLabelSid = value;
633                 translatableText = NUIApplication.MultilingualResourceManager?.GetString(textLabelSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
634                 if (translatableText != null)
635                 {
636                     Text = translatableText;
637                     if (systemlangTextFlag == false)
638                     {
639                         SystemSettings.LocaleLanguageChanged += new WeakEventHandler<LocaleLanguageChangedEventArgs>(SystemSettings_LocaleLanguageChanged).Handler;
640                         systemlangTextFlag = true;
641                     }
642                 }
643                 else
644                 {
645                     Text = "";
646                 }
647                 NotifyPropertyChanged();
648             }
649         }
650
651         /// <summary>
652         /// The Text property.<br />
653         /// The text to display in the UTF-8 format.<br />
654         /// </summary>
655         /// <since_tizen> 3 </since_tizen>
656         public string Text
657         {
658             get
659             {
660                 return (string)GetValue(TextProperty);
661             }
662             set
663             {
664                 SetValue(TextProperty, value);
665                 NotifyPropertyChangedAndRequestLayout();
666             }
667         }
668
669         /// <summary>
670         /// The FontFamily property.<br />
671         /// The requested font family to use.<br />
672         /// </summary>
673         /// <since_tizen> 3 </since_tizen>
674         public string FontFamily
675         {
676             get
677             {
678                 return (string)GetValue(FontFamilyProperty);
679             }
680             set
681             {
682                 SetValue(FontFamilyProperty, value);
683                 NotifyPropertyChangedAndRequestLayout();
684             }
685         }
686
687         /// <summary>
688         /// The FontStyle property.<br />
689         /// The requested font style to use.<br />
690         /// </summary>
691         /// <since_tizen> 3 </since_tizen>
692         public PropertyMap FontStyle
693         {
694             get
695             {
696                 return (PropertyMap)GetValue(FontStyleProperty);
697             }
698             set
699             {
700                 SetValue(FontStyleProperty, value);
701                 NotifyPropertyChangedAndRequestLayout();
702             }
703         }
704
705         /// <summary>
706         /// The PointSize property.<br />
707         /// The size of font in points.<br />
708         /// </summary>
709         /// <since_tizen> 3 </since_tizen>
710         public float PointSize
711         {
712             get
713             {
714                 return (float)GetValue(PointSizeProperty);
715             }
716             set
717             {
718                 SetValue(PointSizeProperty, value);
719                 NotifyPropertyChangedAndRequestLayout();
720             }
721         }
722
723         /// <summary>
724         /// The MultiLine property.<br />
725         /// The single-line or multi-line layout option.<br />
726         /// </summary>
727         /// <since_tizen> 3 </since_tizen>
728         public bool MultiLine
729         {
730             get
731             {
732                 return (bool)GetValue(MultiLineProperty);
733             }
734             set
735             {
736                 SetValue(MultiLineProperty, value);
737                 NotifyPropertyChangedAndRequestLayout();
738             }
739         }
740
741         /// <summary>
742         /// The HorizontalAlignment property.<br />
743         /// The line horizontal alignment.<br />
744         /// </summary>
745         /// <since_tizen> 3 </since_tizen>
746         public HorizontalAlignment HorizontalAlignment
747         {
748             get
749             {
750                 return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
751             }
752             set
753             {
754                 SetValue(HorizontalAlignmentProperty, value);
755                 NotifyPropertyChanged();
756             }
757         }
758
759         /// <summary>
760         /// The VerticalAlignment property.<br />
761         /// The line vertical alignment.<br />
762         /// </summary>
763         /// <since_tizen> 3 </since_tizen>
764         public VerticalAlignment VerticalAlignment
765         {
766             get
767             {
768                 return (VerticalAlignment)GetValue(VerticalAlignmentProperty);
769             }
770             set
771             {
772                 SetValue(VerticalAlignmentProperty, value);
773                 NotifyPropertyChanged();
774             }
775         }
776
777         /// <summary>
778         /// The TextColor property.<br />
779         /// The color of the text.<br />
780         /// Animation framework can be used to change the color of the text when not using mark up.<br />
781         /// Cannot animate the color when text is auto scrolling.<br />
782         /// </summary>
783         /// <remarks>
784         /// The property cascade chaining set is possible. For example, this (textLabel.TextColor.X = 0.1f;) is possible.
785         /// </remarks>
786         /// <since_tizen> 3 </since_tizen>
787         public Color TextColor
788         {
789             get
790             {
791                 Color temp = (Color)GetValue(TextColorProperty);
792                 return new Color(OnTextColorChanged, temp.R, temp.G, temp.B, temp.A);
793             }
794             set
795             {
796                 SetValue(TextColorProperty, value);
797                 NotifyPropertyChanged();
798             }
799         }
800
801         /// <summary>
802         /// The ShadowOffset property.<br />
803         /// The drop shadow offset 0 indicates no shadow.<br />
804         /// </summary>
805         /// <since_tizen> 3 </since_tizen>
806         /// <remarks>
807         /// Deprecated.(API Level 6) Use Shadow instead.
808         /// The property cascade chaining set is possible. For example, this (textLabel.ShadowOffset.X = 0.1f;) is possible.
809         /// </remarks>
810         [Obsolete("Please do not use this ShadowOffset(Deprecated). Please use Shadow instead.")]
811         public Vector2 ShadowOffset
812         {
813             get
814             {
815                 Vector2 shadowOffset = new Vector2();
816                 Shadow.Find(TextLabel.Property.SHADOW, "offset")?.Get(shadowOffset);
817                 return new Vector2(OnShadowOffsetChanged, shadowOffset.X, shadowOffset.Y);
818             }
819             set
820             {
821                 PropertyMap temp = new PropertyMap();
822                 temp.Insert("offset", new PropertyValue(value));
823
824                 PropertyMap shadowMap = Shadow;
825                 shadowMap.Merge(temp);
826
827                 SetValue(ShadowProperty, shadowMap);
828                 NotifyPropertyChanged();
829             }
830         }
831
832         /// <summary>
833         /// The ShadowColor property.<br />
834         /// The color of a drop shadow.<br />
835         /// </summary>
836         /// <since_tizen> 3 </since_tizen>
837         /// <remarks>
838         /// Deprecated.(API Level 6) Use Shadow instead.
839         /// The property cascade chaining set is possible. For example, this (textLabel.ShadowColor.X = 0.1f;) is possible.
840         /// </remarks>
841         [Obsolete("Please do not use this ShadowColor(Deprecated). Please use Shadow instead.")]
842         public Vector4 ShadowColor
843         {
844             get
845             {
846                 Vector4 shadowColor = new Vector4();
847                 Shadow.Find(TextLabel.Property.SHADOW, "color")?.Get(shadowColor);
848                 return new Vector4(OnShadowColorChanged, shadowColor.X, shadowColor.Y, shadowColor.Z, shadowColor.W);
849             }
850             set
851             {
852                 PropertyMap temp = new PropertyMap();
853                 temp.Insert("color", new PropertyValue(value));
854
855                 PropertyMap shadowMap = Shadow;
856                 shadowMap.Merge(temp);
857
858                 SetValue(ShadowProperty, shadowMap);
859                 NotifyPropertyChanged();
860             }
861         }
862
863         /// <summary>
864         /// The UnderlineEnabled property.<br />
865         /// The underline enabled flag.<br />
866         /// </summary>
867         /// <since_tizen> 3 </since_tizen>
868         /// <remarks>
869         /// Deprecated.(API Level 6) Use Underline instead.
870         /// </remarks>
871         [Obsolete("Please do not use this UnderlineEnabled(Deprecated). Please use Underline instead.")]
872         public bool UnderlineEnabled
873         {
874             get
875             {
876                 bool underlineEnabled = false;
877                 Underline.Find(TextLabel.Property.UNDERLINE, "enable")?.Get(out underlineEnabled);
878                 return underlineEnabled;
879             }
880             set
881             {
882                 PropertyMap temp = new PropertyMap();
883                 temp.Add("enable", new PropertyValue(value));
884
885                 PropertyMap undelineMap = Underline;
886                 undelineMap.Merge(temp);
887
888                 SetValue(UnderlineProperty, undelineMap);
889                 NotifyPropertyChanged();
890
891             }
892         }
893
894         /// <summary>
895         /// The UnderlineColor property.<br />
896         /// Overrides the underline height from font metrics.<br />
897         /// </summary>
898         /// <since_tizen> 3 </since_tizen>
899         /// <remarks>
900         /// Deprecated.(API Level 6) Use Underline instead.
901         /// The property cascade chaining set is possible. For example, this (textLabel.UnderlineColor.X = 0.1f;) is possible.
902         /// </remarks>
903         [Obsolete("Please do not use this UnderlineColor(Deprecated). Please use Underline instead.")]
904         public Vector4 UnderlineColor
905         {
906             get
907             {
908                 Vector4 underlineColor = new Vector4();
909                 Underline.Find(TextLabel.Property.UNDERLINE, "color")?.Get(underlineColor);
910                 return new Vector4(OnUnderlineColorChanged, underlineColor.X, underlineColor.Y, underlineColor.Z, underlineColor.W);
911             }
912             set
913             {
914                 PropertyMap temp = new PropertyMap();
915                 temp.Insert("color", new PropertyValue(value));
916
917                 PropertyMap undelineMap = Underline;
918                 undelineMap.Merge(temp);
919
920                 SetValue(UnderlineProperty, undelineMap);
921                 NotifyPropertyChanged();
922             }
923         }
924
925         /// <summary>
926         /// The UnderlineHeight property.<br />
927         /// Overrides the underline height from font metrics.<br />
928         /// </summary>
929         /// <since_tizen> 3 </since_tizen>
930         /// <remarks>
931         /// Deprecated.(API Level 6) Use Underline instead.
932         /// </remarks>
933         [Obsolete("Please do not use this UnderlineHeight(Deprecated). Please use Underline instead.")]
934         public float UnderlineHeight
935         {
936             get
937             {
938                 float underlineHeight = 0.0f;
939                 Underline.Find(TextLabel.Property.UNDERLINE, "height")?.Get(out underlineHeight);
940                 return underlineHeight;
941             }
942             set
943             {
944                 PropertyMap temp = new PropertyMap();
945                 temp.Insert("height", new PropertyValue(value));
946
947                 PropertyMap undelineMap = Underline;
948                 undelineMap.Merge(temp);
949
950                 SetValue(UnderlineProperty, undelineMap);
951                 NotifyPropertyChanged();
952             }
953         }
954
955         /// <summary>
956         /// The EnableMarkup property.<br />
957         /// Whether the mark-up processing is enabled.<br />
958         /// </summary>
959         /// <since_tizen> 3 </since_tizen>
960         public bool EnableMarkup
961         {
962             get
963             {
964                 return (bool)GetValue(EnableMarkupProperty);
965             }
966             set
967             {
968                 SetValue(EnableMarkupProperty, value);
969                 NotifyPropertyChanged();
970             }
971         }
972
973         /// <summary>
974         /// The EnableAutoScroll property.<br />
975         /// Starts or stops auto scrolling.<br />
976         /// </summary>
977         /// <since_tizen> 3 </since_tizen>
978         public bool EnableAutoScroll
979         {
980             get
981             {
982                 return (bool)GetValue(EnableAutoScrollProperty);
983             }
984             set
985             {
986                 SetValue(EnableAutoScrollProperty, value);
987                 NotifyPropertyChanged();
988             }
989         }
990
991         /// <summary>
992         /// The AutoScrollSpeed property.<br />
993         /// Sets the speed of scrolling in pixels per second.<br />
994         /// </summary>
995         /// <since_tizen> 3 </since_tizen>
996         public int AutoScrollSpeed
997         {
998             get
999             {
1000                 return (int)GetValue(AutoScrollSpeedProperty);
1001             }
1002             set
1003             {
1004                 SetValue(AutoScrollSpeedProperty, value);
1005                 NotifyPropertyChanged();
1006             }
1007         }
1008
1009         /// <summary>
1010         /// The AutoScrollLoopCount property.<br />
1011         /// Number of complete loops when scrolling enabled.<br />
1012         /// </summary>
1013         /// <since_tizen> 3 </since_tizen>
1014         public int AutoScrollLoopCount
1015         {
1016             get
1017             {
1018                 return (int)GetValue(AutoScrollLoopCountProperty);
1019             }
1020             set
1021             {
1022                 SetValue(AutoScrollLoopCountProperty, value);
1023                 NotifyPropertyChanged();
1024             }
1025         }
1026
1027         /// <summary>
1028         /// The AutoScrollGap property.<br />
1029         /// Gap before scrolling wraps.<br />
1030         /// </summary>
1031         /// <since_tizen> 3 </since_tizen>
1032         public float AutoScrollGap
1033         {
1034             get
1035             {
1036                 return (float)GetValue(AutoScrollGapProperty);
1037             }
1038             set
1039             {
1040                 SetValue(AutoScrollGapProperty, value);
1041                 NotifyPropertyChanged();
1042             }
1043         }
1044
1045         /// <summary>
1046         /// The LineSpacing property.<br />
1047         /// The default extra space between lines in points.<br />
1048         /// </summary>
1049         /// <since_tizen> 3 </since_tizen>
1050         public float LineSpacing
1051         {
1052             get
1053             {
1054                 return (float)GetValue(LineSpacingProperty);
1055             }
1056             set
1057             {
1058                 SetValue(LineSpacingProperty, value);
1059                 NotifyPropertyChangedAndRequestLayout();
1060             }
1061         }
1062
1063         /// <summary>
1064         /// The Underline property.<br />
1065         /// The default underline parameters.<br />
1066         /// </summary>
1067         /// <since_tizen> 3 </since_tizen>
1068         public PropertyMap Underline
1069         {
1070             get
1071             {
1072                 return (PropertyMap)GetValue(UnderlineProperty);
1073             }
1074             set
1075             {
1076                 SetValue(UnderlineProperty, value);
1077                 NotifyPropertyChanged();
1078             }
1079         }
1080
1081         /// <summary>
1082         /// The Shadow property.<br />
1083         /// The default shadow parameters.<br />
1084         /// </summary>
1085         /// <since_tizen> 3 </since_tizen>
1086         public PropertyMap Shadow
1087         {
1088             get
1089             {
1090                 return (PropertyMap)GetValue(ShadowProperty);
1091             }
1092             set
1093             {
1094                 SetValue(ShadowProperty, value);
1095                 NotifyPropertyChanged();
1096             }
1097         }
1098
1099         /// <summary>
1100         /// The Emboss property.<br />
1101         /// The default emboss parameters.<br />
1102         /// </summary>
1103         /// <since_tizen> 3 </since_tizen>
1104         public string Emboss
1105         {
1106             get
1107             {
1108                 return (string)GetValue(EmbossProperty);
1109             }
1110             set
1111             {
1112                 SetValue(EmbossProperty, value);
1113                 NotifyPropertyChanged();
1114             }
1115         }
1116
1117         /// <summary>
1118         /// The Outline property.<br />
1119         /// The default outline parameters.<br />
1120         /// </summary>
1121         /// <since_tizen> 3 </since_tizen>
1122         public PropertyMap Outline
1123         {
1124             get
1125             {
1126                 return (PropertyMap)GetValue(OutlineProperty);
1127             }
1128             set
1129             {
1130                 SetValue(OutlineProperty, value);
1131                 NotifyPropertyChanged();
1132             }
1133         }
1134
1135         /// <summary>
1136         /// The PixelSize property.<br />
1137         /// The size of font in pixels.<br />
1138         /// </summary>
1139         /// <since_tizen> 3 </since_tizen>
1140         public float PixelSize
1141         {
1142             get
1143             {
1144                 return (float)GetValue(PixelSizeProperty);
1145             }
1146             set
1147             {
1148                 SetValue(PixelSizeProperty, value);
1149                 NotifyPropertyChangedAndRequestLayout();
1150             }
1151         }
1152
1153         /// <summary>
1154         /// The Ellipsis property.<br />
1155         /// Enable or disable the ellipsis.<br />
1156         /// </summary>
1157         /// <since_tizen> 3 </since_tizen>
1158         public bool Ellipsis
1159         {
1160             get
1161             {
1162                 return (bool)GetValue(EllipsisProperty);
1163             }
1164             set
1165             {
1166                 SetValue(EllipsisProperty, value);
1167                 NotifyPropertyChanged();
1168             }
1169         }
1170
1171         /// <summary>
1172         /// The AutoScrollLoopDelay property.<br />
1173         /// Do something.<br />
1174         /// </summary>
1175         /// <since_tizen> 3 </since_tizen>
1176         public float AutoScrollLoopDelay
1177         {
1178             get
1179             {
1180                 return (float)GetValue(AutoScrollLoopDelayProperty);
1181             }
1182             set
1183             {
1184                 SetValue(AutoScrollLoopDelayProperty, value);
1185                 NotifyPropertyChanged();
1186             }
1187         }
1188
1189         /// <summary>
1190         /// The AutoScrollStopMode property.<br />
1191         /// Do something.<br />
1192         /// </summary>
1193         /// <since_tizen> 3 </since_tizen>
1194         public AutoScrollStopMode AutoScrollStopMode
1195         {
1196             get
1197             {
1198                 return (AutoScrollStopMode)GetValue(AutoScrollStopModeProperty);
1199             }
1200             set
1201             {
1202                 SetValue(AutoScrollStopModeProperty, value);
1203                 NotifyPropertyChanged();
1204             }
1205         }
1206
1207         /// <summary>
1208         /// The line count of the text.
1209         /// </summary>
1210         /// <since_tizen> 3 </since_tizen>
1211         public int LineCount
1212         {
1213             get
1214             {
1215                 int temp = 0;
1216                 GetProperty(TextLabel.Property.LINE_COUNT).Get(out temp);
1217                 return temp;
1218             }
1219         }
1220
1221         /// <summary>
1222         /// The LineWrapMode property.<br />
1223         /// line wrap mode when the text lines over layout width.<br />
1224         /// </summary>
1225         /// <since_tizen> 4 </since_tizen>
1226         public LineWrapMode LineWrapMode
1227         {
1228             get
1229             {
1230                 return (LineWrapMode)GetValue(LineWrapModeProperty);
1231             }
1232             set
1233             {
1234                 SetValue(LineWrapModeProperty, value);
1235                 NotifyPropertyChanged();
1236             }
1237         }
1238
1239         /// <summary>
1240         /// The direction of the text such as left to right or right to left.
1241         /// </summary>
1242         /// <since_tizen> 5 </since_tizen>
1243         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1244         [EditorBrowsable(EditorBrowsableState.Never)]
1245         public TextDirection TextDirection
1246         {
1247             get
1248             {
1249                 int temp = 0;
1250                 GetProperty(TextLabel.Property.TEXT_DIRECTION).Get(out temp);
1251                 return (TextDirection)temp;
1252             }
1253         }
1254
1255         /// <summary>
1256         /// The vertical line alignment of the text.
1257         /// </summary>
1258         /// <since_tizen> 5 </since_tizen>
1259         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1260         [EditorBrowsable(EditorBrowsableState.Never)]
1261         public VerticalLineAlignment VerticalLineAlignment
1262         {
1263             get
1264             {
1265                 return (VerticalLineAlignment)GetValue(VerticalLineAlignmentProperty);
1266             }
1267             set
1268             {
1269                 SetValue(VerticalLineAlignmentProperty, value);
1270                 NotifyPropertyChanged();
1271             }
1272         }
1273
1274         /// <summary>
1275         /// The text alignment to match the direction of the system language.
1276         /// </summary>
1277         /// <since_tizen> 6 </since_tizen>
1278         public bool MatchSystemLanguageDirection
1279         {
1280             get
1281             {
1282                 return (bool)GetValue(MatchSystemLanguageDirectionProperty);
1283             }
1284             set
1285             {
1286                 SetValue(MatchSystemLanguageDirectionProperty, value);
1287                 NotifyPropertyChanged();
1288             }
1289         }
1290
1291         /// <summary>
1292         /// The text fit parameters.<br />
1293         /// The textFit map contains the following keys :<br />
1294         /// - enable (bool type) : True to enable the text fit or false to disable(the default value is false)<br />
1295         /// - minSize (float type) : Minimum Size for text fit(the default value is 10.f)<br />
1296         /// - maxSize (float type) : Maximum Size for text fit(the default value is 100.f)<br />
1297         /// - stepSize (float type) : Step Size for font increase(the default value is 1.f)<br />
1298         /// - fontSize (string type) : The size type of font, You can choose between "pointSize" or "pixelSize". (the default value is "pointSize")<br />
1299         /// </summary>
1300         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1301         [EditorBrowsable(EditorBrowsableState.Never)]
1302         public PropertyMap TextFit
1303         {
1304             get
1305             {
1306                 return (PropertyMap)GetValue(TextFitProperty);
1307             }
1308             set
1309             {
1310                 SetValue(TextFitProperty, value);
1311                 NotifyPropertyChanged();
1312             }
1313         }
1314
1315         /// <summary>
1316         /// Downcasts a handle to textLabel handle
1317         /// </summary>
1318         /// <param name="handle"></param>
1319         /// <returns></returns>
1320         /// <since_tizen> 3 </since_tizen>
1321         /// Please do not use! this will be deprecated!
1322         /// Instead please use as keyword.
1323         [Obsolete("Please do not use! This will be deprecated! Please use as keyword instead! " +
1324             "Like: " +
1325             "BaseHandle handle = new TextLabel(\"Hello World!\"); " +
1326             "TextLabel label = handle as TextLabel")]
1327         [EditorBrowsable(EditorBrowsableState.Never)]
1328         public static TextLabel DownCast(BaseHandle handle)
1329         {
1330             TextLabel ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextLabel;
1331
1332             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1333             return ret;
1334         }
1335
1336         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextLabel obj)
1337         {
1338             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1339         }
1340
1341         /// This will not be public opened.
1342         [EditorBrowsable(EditorBrowsableState.Never)]
1343         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
1344         {
1345             Interop.TextLabel.delete_TextLabel(swigCPtr);
1346         }
1347
1348         /// <summary>
1349         /// Get attribues, it is abstract function and must be override.
1350         /// </summary>
1351         /// <since_tizen> 6 </since_tizen>
1352         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1353         [EditorBrowsable(EditorBrowsableState.Never)]
1354         protected override ViewStyle GetViewStyle()
1355         {
1356             return new TextLabelStyle();
1357         }
1358
1359         internal static readonly BindableProperty TranslatableTextSelectorProperty = BindableProperty.Create("TranslatableTextSelector", typeof(Selector<string>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
1360         {
1361             var textLabel = (TextLabel)bindable;
1362             textLabel.TranslatableTextSelector.Clone((Selector<string>)newValue);
1363         },
1364         defaultValueCreator: (bindable) =>
1365         {
1366             var textLabel = (TextLabel)bindable;
1367             return textLabel.TranslatableTextSelector;
1368         });
1369         internal static readonly BindableProperty TextSelectorProperty = BindableProperty.Create("TextSelector", typeof(Selector<string>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
1370         {
1371             var textLabel = (TextLabel)bindable;
1372             textLabel.textSelector.Clone((Selector<string>)newValue);
1373         },
1374         defaultValueCreator: (bindable) =>
1375         {
1376             var textLabel = (TextLabel)bindable;
1377             return textLabel.textSelector;
1378         });
1379         internal static readonly BindableProperty FontFamilySelectorProperty = BindableProperty.Create("FontFamilySelector", typeof(Selector<string>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
1380         {
1381             var textLabel = (TextLabel)bindable;
1382             textLabel.fontFamilySelector.Clone((Selector<string>)newValue);
1383         },
1384         defaultValueCreator: (bindable) =>
1385         {
1386             var textLabel = (TextLabel)bindable;
1387             return textLabel.fontFamilySelector;
1388         });
1389         internal static readonly BindableProperty PointSizeSelectorProperty = BindableProperty.Create("PointSizeSelector", typeof(Selector<float?>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
1390         {
1391             var textLabel = (TextLabel)bindable;
1392             textLabel.pointSizeSelector.Clone((Selector<float?>)newValue);
1393         },
1394         defaultValueCreator: (bindable) =>
1395         {
1396             var textLabel = (TextLabel)bindable;
1397             return textLabel.pointSizeSelector;
1398         });
1399         internal static readonly BindableProperty TextColorSelectorProperty = BindableProperty.Create("TextColorSelector", typeof(Selector<Color>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
1400         {
1401             var textLabel = (TextLabel)bindable;
1402             textLabel.textColorSelector.Clone((Selector<Color>)newValue);
1403         },
1404         defaultValueCreator: (bindable) =>
1405         {
1406             var textLabel = (TextLabel)bindable;
1407             return textLabel.textColorSelector;
1408         });
1409
1410         private TriggerableSelector<string> translatableTextSelector;
1411         private TriggerableSelector<string> TranslatableTextSelector
1412         {
1413             get
1414             {
1415                 if (null == translatableTextSelector)
1416                 {
1417                     translatableTextSelector = new TriggerableSelector<string>(this, TranslatableTextProperty);
1418                 }
1419                 return translatableTextSelector;
1420             }
1421         }
1422
1423         private TriggerableSelector<string> _textSelector;
1424         private TriggerableSelector<string> textSelector
1425         {
1426             get
1427             {
1428                 if (null == _textSelector)
1429                 {
1430                     _textSelector = new TriggerableSelector<string>(this, TextProperty);
1431                 }
1432                 return _textSelector;
1433             }
1434         }
1435
1436         private TriggerableSelector<string> _fontFamilySelector;
1437         private TriggerableSelector<string> fontFamilySelector
1438         {
1439             get
1440             {
1441                 if (null == _fontFamilySelector)
1442                 {
1443                     _fontFamilySelector = new TriggerableSelector<string>(this, FontFamilyProperty);
1444                 }
1445                 return _fontFamilySelector;
1446             }
1447         }
1448
1449         private TriggerableSelector<Color> _textColorSelector;
1450         private TriggerableSelector<Color> textColorSelector
1451         {
1452             get
1453             {
1454                 if (null == _textColorSelector)
1455                 {
1456                     _textColorSelector = new TriggerableSelector<Color>(this, TextColorProperty);
1457                 }
1458                 return _textColorSelector;
1459             }
1460         }
1461
1462         private TriggerableSelector<float?> _pointSizeSelector;
1463         private TriggerableSelector<float?> pointSizeSelector
1464         {
1465             get
1466             {
1467                 if (null == _pointSizeSelector)
1468                 {
1469                     _pointSizeSelector = new TriggerableSelector<float?>(this, PointSizeProperty);
1470                 }
1471                 return _pointSizeSelector;
1472             }
1473         }
1474
1475         /// <summary>
1476         /// Invoked whenever the binding context of the textlabel changes. Implement this method to add class handling for this event.
1477         /// </summary>
1478         protected override void OnBindingContextChanged()
1479         {
1480             base.OnBindingContextChanged();
1481         }
1482
1483         private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
1484         {
1485             Text = NUIApplication.MultilingualResourceManager?.GetString(textLabelSid, new CultureInfo(e.Value.Replace("_", "-")));
1486         }
1487
1488         private void  NotifyPropertyChangedAndRequestLayout()
1489         {
1490             NotifyPropertyChanged();
1491             Layout?.RequestLayout();
1492         }
1493
1494         internal new class Property
1495         {
1496             internal static readonly int RENDERING_BACKEND = Interop.TextLabel.TextLabel_Property_RENDERING_BACKEND_get();
1497             internal static readonly int TEXT = Interop.TextLabel.TextLabel_Property_TEXT_get();
1498             internal static readonly int FONT_FAMILY = Interop.TextLabel.TextLabel_Property_FONT_FAMILY_get();
1499             internal static readonly int FONT_STYLE = Interop.TextLabel.TextLabel_Property_FONT_STYLE_get();
1500             internal static readonly int POINT_SIZE = Interop.TextLabel.TextLabel_Property_POINT_SIZE_get();
1501             internal static readonly int MULTI_LINE = Interop.TextLabel.TextLabel_Property_MULTI_LINE_get();
1502             internal static readonly int HORIZONTAL_ALIGNMENT = Interop.TextLabel.TextLabel_Property_HORIZONTAL_ALIGNMENT_get();
1503             internal static readonly int VERTICAL_ALIGNMENT = Interop.TextLabel.TextLabel_Property_VERTICAL_ALIGNMENT_get();
1504             internal static readonly int TEXT_COLOR = Interop.TextLabel.TextLabel_Property_TEXT_COLOR_get();
1505             internal static readonly int ENABLE_MARKUP = Interop.TextLabel.TextLabel_Property_ENABLE_MARKUP_get();
1506             internal static readonly int ENABLE_AUTO_SCROLL = Interop.TextLabel.TextLabel_Property_ENABLE_AUTO_SCROLL_get();
1507             internal static readonly int AUTO_SCROLL_SPEED = Interop.TextLabel.TextLabel_Property_AUTO_SCROLL_SPEED_get();
1508             internal static readonly int AUTO_SCROLL_LOOP_COUNT = Interop.TextLabel.TextLabel_Property_AUTO_SCROLL_LOOP_COUNT_get();
1509             internal static readonly int AUTO_SCROLL_GAP = Interop.TextLabel.TextLabel_Property_AUTO_SCROLL_GAP_get();
1510             internal static readonly int LINE_SPACING = Interop.TextLabel.TextLabel_Property_LINE_SPACING_get();
1511             internal static readonly int UNDERLINE = Interop.TextLabel.TextLabel_Property_UNDERLINE_get();
1512             internal static readonly int SHADOW = Interop.TextLabel.TextLabel_Property_SHADOW_get();
1513             internal static readonly int EMBOSS = Interop.TextLabel.TextLabel_Property_EMBOSS_get();
1514             internal static readonly int OUTLINE = Interop.TextLabel.TextLabel_Property_OUTLINE_get();
1515             internal static readonly int PIXEL_SIZE = Interop.TextLabel.TextLabel_Property_PIXEL_SIZE_get();
1516             internal static readonly int ELLIPSIS = Interop.TextLabel.TextLabel_Property_ELLIPSIS_get();
1517             internal static readonly int AUTO_SCROLL_STOP_MODE = Interop.TextLabel.TextLabel_Property_AUTO_SCROLL_STOP_MODE_get();
1518             internal static readonly int AUTO_SCROLL_LOOP_DELAY = Interop.TextLabel.TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get();
1519             internal static readonly int LINE_COUNT = Interop.TextLabel.TextLabel_Property_LINE_COUNT_get();
1520             internal static readonly int LINE_WRAP_MODE = Interop.TextLabel.TextLabel_Property_LINE_WRAP_MODE_get();
1521             internal static readonly int TEXT_DIRECTION = Interop.TextLabel.TextLabel_Property_TEXT_DIRECTION_get();
1522             internal static readonly int VERTICAL_LINE_ALIGNMENT = Interop.TextLabel.TextLabel_Property_VERTICAL_LINE_ALIGNMENT_get();
1523             internal static readonly int MATCH_SYSTEM_LANGUAGE_DIRECTION = Interop.TextLabel.TextLabel_Property_MATCH_SYSTEM_LANGUAGE_DIRECTION_get();
1524             internal static readonly int TEXT_FIT = Interop.TextLabel.TextLabel_Property_TEXT_FIT_get();
1525         }
1526
1527         private void OnShadowColorChanged(float x, float y, float z, float w)
1528         {
1529             ShadowColor = new Vector4(x, y, z, w);
1530         }
1531         private void OnShadowOffsetChanged(float x, float y)
1532         {
1533             ShadowOffset = new Vector2(x, y);
1534         }
1535         private void OnTextColorChanged(float r, float g, float b, float a)
1536         {
1537             TextColor = new Color(r, g, b, a);
1538         }
1539         private void OnUnderlineColorChanged(float x, float y, float z, float w)
1540         {
1541             UnderlineColor = new Vector4(x, y, z, w);
1542         }
1543
1544     }
1545 }