abb797d8f7771d403e24df158cb692815b001bf1
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextLabelBindableProperty.cs
1 /*
2  * Copyright(c) 2021 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 System.ComponentModel;
20 using Tizen.NUI.Binding;
21
22 namespace Tizen.NUI.BaseComponents
23 {
24     /// <summary>
25     /// A control which renders a short text string.<br />
26     /// Text labels are lightweight, non-editable, and do not respond to the user input.<br />
27     /// </summary>
28     /// <since_tizen> 3 </since_tizen>
29     public partial class TextLabel
30     {
31         /// <summary>
32         /// StyleNameProperty
33         /// </summary>
34         [EditorBrowsable(EditorBrowsableState.Never)]
35         public static readonly BindableProperty TranslatableTextProperty = BindableProperty.Create(nameof(TranslatableText), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
36         {
37             var textLabel = (TextLabel)bindable;
38
39             if (newValue is Selector<string> selector)
40             {
41                 textLabel.TranslatableTextSelector = selector;
42             }
43             else
44             {
45                 textLabel.selectorData?.TranslatableText?.Reset(textLabel);
46                 textLabel.SetTranslatableText((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: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
57         {
58             var textLabel = (TextLabel)bindable;
59
60             if (newValue is Selector<string> selector)
61             {
62                 textLabel.TextSelector = selector;
63             }
64             else
65             {
66                 textLabel.selectorData?.Text?.Reset(textLabel);
67                 textLabel.SetText((string)newValue);
68             }
69         }),
70         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
71         {
72             var textLabel = (TextLabel)bindable;
73
74             return Object.InternalGetPropertyString(textLabel.SwigCPtr, TextLabel.Property.TEXT);
75         }));
76         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
77         [EditorBrowsable(EditorBrowsableState.Never)]
78         public static readonly BindableProperty FontFamilyProperty = BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
79         {
80             var textLabel = (TextLabel)bindable;
81
82             if (newValue is Selector<string> selector)
83             {
84                 textLabel.FontFamilySelector = selector;
85             }
86             else
87             {
88                 textLabel.selectorData?.FontFamily?.Reset(textLabel);
89                 textLabel.SetFontFamily((string)newValue);
90             }
91         }),
92         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
93         {
94             var textLabel = (TextLabel)bindable;
95             return textLabel.InternalFontFamily;
96         }));
97         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
98         [EditorBrowsable(EditorBrowsableState.Never)]
99         public static readonly BindableProperty FontStyleProperty = BindableProperty.Create(nameof(FontStyle), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
100         {
101             var textLabel = (TextLabel)bindable;
102             if (newValue != null)
103             {
104                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontStyle, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
105                 textLabel.RequestLayout();
106             }
107         }),
108         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
109         {
110             var textLabel = (TextLabel)bindable;
111             PropertyMap temp = new PropertyMap();
112             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontStyle).Get(temp);
113             return temp;
114         }));
115         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
116         [EditorBrowsable(EditorBrowsableState.Never)]
117         public static readonly BindableProperty PointSizeProperty = BindableProperty.Create(nameof(PointSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
118         {
119             var textLabel = (TextLabel)bindable;
120
121             if (newValue is Selector<float?> selector)
122             {
123                 textLabel.PointSizeSelector = selector;
124             }
125             else
126             {
127                 textLabel.selectorData?.PointSize?.Reset(textLabel);
128                 textLabel.SetPointSize((float?)newValue);
129             }
130         }),
131         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
132         {
133             var textLabel = (TextLabel)bindable;
134
135             return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.PointSize);
136         }));
137         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
138         [EditorBrowsable(EditorBrowsableState.Never)]
139         public static readonly BindableProperty MultiLineProperty = BindableProperty.Create(nameof(MultiLine), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
140         {
141             var textLabel = (TextLabel)bindable;
142             if (newValue != null)
143             {
144
145                 Object.InternalSetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.MultiLine, (bool)newValue);
146                 textLabel.RequestLayout();
147             }
148         }),
149         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
150         {
151             var textLabel = (TextLabel)bindable;
152
153             return Object.InternalGetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.MultiLine);
154         }));
155         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
156         [EditorBrowsable(EditorBrowsableState.Never)]
157         public static readonly BindableProperty HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment), typeof(TextLabel), HorizontalAlignment.Begin, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
158         {
159             var textLabel = (TextLabel)bindable;
160             if (newValue != null)
161             {
162
163                 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.HorizontalAlignment, (int)newValue);
164             }
165         }),
166         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
167         {
168             var textLabel = (TextLabel)bindable;
169             string temp;
170
171             temp = Object.InternalGetPropertyString(textLabel.SwigCPtr, TextLabel.Property.HorizontalAlignment);
172             if (System.String.IsNullOrEmpty(temp))
173             {
174                 return HorizontalAlignment.Begin; // Return default value.
175             }
176
177             if (temp.Equals("BEGIN"))
178             {
179                 return HorizontalAlignment.Begin;
180             }
181             else if (temp.Equals("CENTER"))
182             {
183                 return HorizontalAlignment.Center;
184             }
185             else
186             {
187                 return HorizontalAlignment.End;
188             }
189         }));
190         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
191         [EditorBrowsable(EditorBrowsableState.Never)]
192         public static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.Create(nameof(VerticalAlignment), typeof(VerticalAlignment), typeof(TextLabel), VerticalAlignment.Bottom, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
193         {
194             var textLabel = (TextLabel)bindable;
195             if (newValue != null)
196             {
197
198                 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.VerticalAlignment, (int)newValue);
199             }
200         }),
201         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
202         {
203             var textLabel = (TextLabel)bindable;
204             string temp;
205
206             temp = Object.InternalGetPropertyString(textLabel.SwigCPtr, TextLabel.Property.VerticalAlignment);
207             if (System.String.IsNullOrEmpty(temp))
208             {
209                 return VerticalAlignment.Top; // Return default value.
210             }
211
212             if (temp.Equals("TOP"))
213             {
214                 return VerticalAlignment.Top;
215             }
216             else if (temp.Equals("CENTER"))
217             {
218                 return VerticalAlignment.Center;
219             }
220             else
221             {
222                 return VerticalAlignment.Bottom;
223             }
224         }));
225         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
226         [EditorBrowsable(EditorBrowsableState.Never)]
227         public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
228         {
229             var textLabel = (TextLabel)bindable;
230
231             if (newValue is Selector<Color> selector)
232             {
233                 textLabel.TextColorSelector = selector;
234             }
235             else
236             {
237                 textLabel.selectorData?.TextColor?.Reset(textLabel);
238                 textLabel.SetTextColor((Color)newValue);
239             }
240         }),
241         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
242         {
243             var textLabel = (TextLabel)bindable;
244
245             if (textLabel.internalTextColor == null)
246             {
247                 textLabel.internalTextColor = new Color(0, 0, 0, 0);
248             }
249             Object.InternalRetrievingPropertyVector4(textLabel.SwigCPtr, TextLabel.Property.TextColor, textLabel.internalTextColor.SwigCPtr);
250             return textLabel.internalTextColor;
251         }));
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 EnableMarkupProperty = BindableProperty.Create(nameof(EnableMarkup), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
256         {
257             var textLabel = (TextLabel)bindable;
258             if (newValue != null)
259             {
260
261                 Object.InternalSetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.EnableMarkup, (bool)newValue);
262             }
263         }),
264         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
265         {
266             var textLabel = (TextLabel)bindable;
267
268             return Object.InternalGetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.EnableMarkup);
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 EnableAutoScrollProperty = BindableProperty.Create(nameof(EnableAutoScroll), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
273         {
274             var textLabel = (TextLabel)bindable;
275             if (newValue != null)
276             {
277
278                 Object.InternalSetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.EnableAutoScroll, (bool)newValue);
279             }
280         }),
281         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
282         {
283             var textLabel = (TextLabel)bindable;
284
285             return Object.InternalGetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.EnableAutoScroll);
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 AutoScrollSpeedProperty = BindableProperty.Create(nameof(AutoScrollSpeed), typeof(int), typeof(TextLabel), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
290         {
291             var textLabel = (TextLabel)bindable;
292             if (newValue != null)
293             {
294
295                 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.AutoScrollSpeed, (int)newValue);
296             }
297         }),
298         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
299         {
300             var textLabel = (TextLabel)bindable;
301
302             return Object.InternalGetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.AutoScrollSpeed);
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 AutoScrollLoopCountProperty = BindableProperty.Create(nameof(AutoScrollLoopCount), typeof(int), typeof(TextLabel), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
307         {
308             var textLabel = (TextLabel)bindable;
309             if (newValue != null)
310             {
311
312                 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopCount, (int)newValue);
313             }
314         }),
315         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
316         {
317             var textLabel = (TextLabel)bindable;
318
319             return Object.InternalGetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopCount);
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 AutoScrollGapProperty = BindableProperty.Create(nameof(AutoScrollGap), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
324         {
325             var textLabel = (TextLabel)bindable;
326             if (newValue != null)
327             {
328
329                 Object.InternalSetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.AutoScrollGap, (float)newValue);
330             }
331         }),
332         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
333         {
334             var textLabel = (TextLabel)bindable;
335
336             return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.AutoScrollGap);
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 LineSpacingProperty = BindableProperty.Create(nameof(LineSpacing), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
341         {
342             var textLabel = (TextLabel)bindable;
343             if (newValue != null)
344             {
345
346                 Object.InternalSetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.LineSpacing, (float)newValue);
347                 textLabel.RequestLayout();
348             }
349         }),
350         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
351         {
352             var textLabel = (TextLabel)bindable;
353
354             return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.LineSpacing);
355         }));
356         [EditorBrowsable(EditorBrowsableState.Never)]
357         public static readonly BindableProperty RelativeLineHeightProperty = BindableProperty.Create(nameof(RelativeLineHeight), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
358         {
359             var textLabel = (TextLabel)bindable;
360             if (newValue != null)
361             {
362
363                 Object.InternalSetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.RelativeLineHeight, (float)newValue);
364             }
365         }),
366         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
367         {
368             var textLabel = (TextLabel)bindable;
369
370             return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.RelativeLineHeight);
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 UnderlineProperty = BindableProperty.Create(nameof(Underline), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
375         {
376             var textLabel = (TextLabel)bindable;
377             if (newValue != null)
378             {
379                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.UNDERLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
380             }
381         }),
382         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
383         {
384             var textLabel = (TextLabel)bindable;
385             PropertyMap temp = new PropertyMap();
386             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.UNDERLINE).Get(temp);
387             return temp;
388         }));
389
390         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
391         [EditorBrowsable(EditorBrowsableState.Never)]
392         public static readonly BindableProperty ShadowProperty = BindableProperty.Create(nameof(Shadow), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
393         {
394             var textLabel = (TextLabel)bindable;
395             if (newValue != null)
396             {
397                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
398             }
399         }),
400         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
401         {
402             var textLabel = (TextLabel)bindable;
403             PropertyMap temp = new PropertyMap();
404             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
405             return temp;
406         }));
407         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
408         [EditorBrowsable(EditorBrowsableState.Never)]
409         public static readonly BindableProperty TextShadowProperty = BindableProperty.Create(nameof(TextShadow), typeof(TextShadow), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
410         {
411             var textLabel = (TextLabel)bindable;
412
413             if (newValue is Selector<TextShadow> selector)
414             {
415                 textLabel.TextShadowSelector = selector;
416             }
417             else
418             {
419                 textLabel.selectorData?.TextShadow?.Reset(textLabel);
420                 textLabel.SetTextShadow((TextShadow)newValue);
421             }
422         }),
423         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
424         {
425             var textLabel = (TextLabel)bindable;
426             PropertyMap temp = new PropertyMap();
427             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
428             return temp.Empty() ? null : new TextShadow(temp);
429         }));
430         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
431         [EditorBrowsable(EditorBrowsableState.Never)]
432         public static readonly BindableProperty EmbossProperty = BindableProperty.Create(nameof(Emboss), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
433         {
434             var textLabel = (TextLabel)bindable;
435             if (newValue != null)
436             {
437
438                 Object.InternalSetPropertyString(textLabel.SwigCPtr, TextLabel.Property.EMBOSS, (string)newValue);
439             }
440         }),
441         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
442         {
443             var textLabel = (TextLabel)bindable;
444
445             return Object.InternalGetPropertyString(textLabel.SwigCPtr, TextLabel.Property.EMBOSS);
446         }));
447         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
448         [EditorBrowsable(EditorBrowsableState.Never)]
449         public static readonly BindableProperty OutlineProperty = BindableProperty.Create(nameof(Outline), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
450         {
451             var textLabel = (TextLabel)bindable;
452             if (newValue != null)
453             {
454                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.OUTLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
455             }
456         }),
457         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
458         {
459             var textLabel = (TextLabel)bindable;
460             PropertyMap temp = new PropertyMap();
461             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.OUTLINE).Get(temp);
462             return temp;
463         }));
464         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
465         [EditorBrowsable(EditorBrowsableState.Never)]
466         public static readonly BindableProperty PixelSizeProperty = BindableProperty.Create(nameof(PixelSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
467         {
468             var textLabel = (TextLabel)bindable;
469
470             if (newValue is Selector<float?> selector)
471             {
472                 textLabel.PixelSizeSelector = selector;
473             }
474             else
475             {
476                 textLabel.selectorData?.PixelSize?.Reset(textLabel);
477                 textLabel.SetPixelSize((float?)newValue);
478             }
479         }),
480         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
481         {
482             var textLabel = (TextLabel)bindable;
483
484             return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.PixelSize);
485         }));
486         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
487         [EditorBrowsable(EditorBrowsableState.Never)]
488         public static readonly BindableProperty EllipsisProperty = BindableProperty.Create(nameof(Ellipsis), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
489         {
490             var textLabel = (TextLabel)bindable;
491             if (newValue != null)
492             {
493
494                 Object.InternalSetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.ELLIPSIS, (bool)newValue);
495             }
496         }),
497         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
498         {
499             var textLabel = (TextLabel)bindable;
500
501             return Object.InternalGetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.ELLIPSIS);
502         }));
503         /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
504         [EditorBrowsable(EditorBrowsableState.Never)]
505         public static readonly BindableProperty EllipsisPositionProperty = BindableProperty.Create(nameof(EllipsisPosition), typeof(EllipsisPosition), typeof(TextLabel), EllipsisPosition.End, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
506         {
507             var textLabel = (TextLabel)bindable;
508             if (newValue != null)
509             {
510
511                 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.EllipsisPosition, (int)newValue);
512             }
513         }),
514         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
515         {
516             var textLabel = (TextLabel)bindable;
517
518             return (EllipsisPosition)Object.InternalGetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.EllipsisPosition);
519         }));
520         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
521         [EditorBrowsable(EditorBrowsableState.Never)]
522         public static readonly BindableProperty AutoScrollLoopDelayProperty = BindableProperty.Create(nameof(AutoScrollLoopDelay), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
523         {
524             var textLabel = (TextLabel)bindable;
525             if (newValue != null)
526             {
527
528                 Object.InternalSetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopDelay, (float)newValue);
529             }
530         }),
531         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
532         {
533             var textLabel = (TextLabel)bindable;
534
535             return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopDelay);
536         }));
537         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
538         [EditorBrowsable(EditorBrowsableState.Never)]
539         public static readonly BindableProperty AutoScrollStopModeProperty = BindableProperty.Create(nameof(AutoScrollStopMode), typeof(AutoScrollStopMode), typeof(TextLabel), AutoScrollStopMode.FinishLoop, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
540         {
541             var textLabel = (TextLabel)bindable;
542             if (newValue != null)
543             {
544
545                 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.AutoScrollStopMode, (int)newValue);
546             }
547         }),
548         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
549         {
550             var textLabel = (TextLabel)bindable;
551             string temp;
552
553             temp = Object.InternalGetPropertyString(textLabel.SwigCPtr, TextLabel.Property.AutoScrollStopMode);
554             return temp.GetValueByDescription<AutoScrollStopMode>();
555         }));
556         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
557         [EditorBrowsable(EditorBrowsableState.Never)]
558         public static readonly BindableProperty LineWrapModeProperty = BindableProperty.Create(nameof(LineWrapMode), typeof(LineWrapMode), typeof(TextLabel), LineWrapMode.Word, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
559         {
560             var textLabel = (TextLabel)bindable;
561             if (newValue != null)
562             {
563
564                 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.LineWrapMode, (int)newValue);
565             }
566         }),
567         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
568         {
569             var textLabel = (TextLabel)bindable;
570
571             return (LineWrapMode)Object.InternalGetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.LineWrapMode);
572         }));
573         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
574         [EditorBrowsable(EditorBrowsableState.Never)]
575         public static readonly BindableProperty VerticalLineAlignmentProperty = BindableProperty.Create(nameof(VerticalLineAlignment), typeof(VerticalLineAlignment), typeof(TextLabel), VerticalLineAlignment.Bottom, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
576         {
577             var textLabel = (TextLabel)bindable;
578             if (newValue != null)
579             {
580
581                 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.VerticalLineAlignment, (int)newValue);
582             }
583         }),
584         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
585         {
586             var textLabel = (TextLabel)bindable;
587
588             return (VerticalLineAlignment)Object.InternalGetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.VerticalLineAlignment);
589         }));
590         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
591         [EditorBrowsable(EditorBrowsableState.Never)]
592         public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(MatchSystemLanguageDirection), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
593         {
594             var textLabel = (TextLabel)bindable;
595             if (newValue != null)
596             {
597
598                 Object.InternalSetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.MatchSystemLanguageDirection, (bool)newValue);
599             }
600         }),
601         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
602         {
603             var textLabel = (TextLabel)bindable;
604
605             return Object.InternalGetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.MatchSystemLanguageDirection);
606         }));
607         /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
608         [EditorBrowsable(EditorBrowsableState.Never)]
609         public static readonly BindableProperty CharacterSpacingProperty = BindableProperty.Create(nameof(CharacterSpacing), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
610         {
611             var textLabel = (TextLabel)bindable;
612             if (newValue != null)
613             {
614
615                 Object.InternalSetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.CharacterSpacing, (float)newValue);
616             }
617         }),
618         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
619         {
620             var textLabel = (TextLabel)bindable;
621
622             return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.CharacterSpacing);
623         }));
624         /// Only for XAML. No need of public API. Make hidden as inhouse API.
625         [EditorBrowsable(EditorBrowsableState.Never)]
626         public static readonly BindableProperty TextFitProperty = BindableProperty.Create(nameof(TextFit), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
627         {
628             var textLabel = (TextLabel)bindable;
629             if (newValue != null)
630             {
631                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextFit, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
632             }
633         }),
634         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
635         {
636             var textLabel = (TextLabel)bindable;
637             PropertyMap temp = new PropertyMap();
638             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextFit).Get(temp);
639             return temp;
640         }));
641
642         /// Only for XAML. No need of public API. Make hidden as inhouse API.
643         [EditorBrowsable(EditorBrowsableState.Never)]
644         public static readonly BindableProperty MinLineSizeProperty = BindableProperty.Create(nameof(MinLineSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
645         {
646             var textLabel = (TextLabel)bindable;
647             if (newValue != null)
648             {
649
650                 Object.InternalSetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.MinLineSize, (float)newValue);
651                 textLabel.RequestLayout();
652             }
653         }),
654         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
655         {
656             var textLabel = (TextLabel)bindable;
657
658             return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.MinLineSize);
659         }));
660
661         [EditorBrowsable(EditorBrowsableState.Never)]
662         public static readonly BindableProperty FontSizeScaleProperty = BindableProperty.Create(nameof(FontSizeScale), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
663         {
664             var textLabel = (TextLabel)bindable;
665             if (newValue != null)
666             {
667                 textLabel.InternalFontSizeScale = (float)newValue;
668             }
669         }),
670         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
671         {
672             var textLabel = (TextLabel)bindable;
673             return textLabel.InternalFontSizeScale;
674         }));
675
676         [EditorBrowsable(EditorBrowsableState.Never)]
677         public static readonly BindableProperty EnableFontSizeScaleProperty = BindableProperty.Create(nameof(EnableFontSizeScale), typeof(bool), typeof(TextLabel), default(bool), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
678         {
679             var textLabel = (TextLabel)bindable;
680             if (newValue != null)
681             {
682
683                 Object.InternalSetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.EnableFontSizeScale, (bool)newValue);
684                 textLabel.RequestLayout();
685             }
686         }),
687         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
688         {
689             var textLabel = (TextLabel)bindable;
690
691             return Object.InternalGetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.EnableFontSizeScale);
692         }));
693
694         /// <summary>
695         /// ShadowOffsetProperty
696         /// </summary>
697         [EditorBrowsable(EditorBrowsableState.Never)]
698         public static readonly BindableProperty ShadowOffsetProperty = BindableProperty.Create(nameof(ShadowOffset), typeof(Tizen.NUI.Vector2), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
699         {
700             var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
701             if (newValue != null)
702             {
703                 instance.InternalShadowOffset = (Tizen.NUI.Vector2)newValue;
704             }
705         },
706         defaultValueCreator: (bindable) =>
707         {
708             var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
709             return instance.InternalShadowOffset;
710         });
711
712         /// <summary>
713         /// ShadowColorProperty
714         /// </summary>
715         [EditorBrowsable(EditorBrowsableState.Never)]
716         public static readonly BindableProperty ShadowColorProperty = BindableProperty.Create(nameof(ShadowColor), typeof(Tizen.NUI.Vector4), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
717         {
718             var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
719             if (newValue != null)
720             {
721                 instance.InternalShadowColor = (Tizen.NUI.Vector4)newValue;
722             }
723         },
724         defaultValueCreator: (bindable) =>
725         {
726             var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
727             return instance.InternalShadowColor;
728         });
729
730         /// <summary>
731         /// UnderlineEnabledProperty
732         /// </summary>
733         [EditorBrowsable(EditorBrowsableState.Never)]
734         public static readonly BindableProperty UnderlineEnabledProperty = BindableProperty.Create(nameof(UnderlineEnabled), typeof(bool), typeof(TextLabel), false, propertyChanged: (bindable, oldValue, newValue) =>
735         {
736             var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
737             if (newValue != null)
738             {
739                 instance.InternalUnderlineEnabled = (bool)newValue;
740             }
741         },
742         defaultValueCreator: (bindable) =>
743         {
744             var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
745             return instance.InternalUnderlineEnabled;
746         });
747
748         /// <summary>
749         /// UnderlineColorProperty
750         /// </summary>
751         [EditorBrowsable(EditorBrowsableState.Never)]
752         public static readonly BindableProperty UnderlineColorProperty = BindableProperty.Create(nameof(UnderlineColor), typeof(Tizen.NUI.Vector4), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
753         {
754             var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
755             if (newValue != null)
756             {
757                 instance.InternalUnderlineColor = (Tizen.NUI.Vector4)newValue;
758             }
759         },
760         defaultValueCreator: (bindable) =>
761         {
762             var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
763             return instance.InternalUnderlineColor;
764         });
765
766         /// <summary>
767         /// UnderlineHeightProperty
768         /// </summary>
769         [EditorBrowsable(EditorBrowsableState.Never)]
770         public static readonly BindableProperty UnderlineHeightProperty = BindableProperty.Create(nameof(UnderlineHeight), typeof(float), typeof(TextLabel), 0.0f, propertyChanged: (bindable, oldValue, newValue) =>
771         {
772             var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
773             if (newValue != null)
774             {
775                 instance.InternalUnderlineHeight = (float)newValue;
776             }
777         },
778         defaultValueCreator: (bindable) =>
779         {
780             var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
781             return instance.InternalUnderlineHeight;
782         });
783
784         internal Selector<string> TranslatableTextSelector
785         {
786             get => GetSelector<string>(selectorData?.TranslatableText, TextLabel.TranslatableTextProperty);
787             set
788             {
789                 selectorData?.TranslatableText?.Reset(this);
790                 if (value == null) return;
791
792                 if (value.HasAll()) SetTranslatableText(value.All);
793                 else EnsureSelectorData().TranslatableText = new TriggerableSelector<string>(this, value, SetTranslatableText, true);
794             }
795         }
796
797         internal Selector<string> TextSelector
798         {
799             get => GetSelector<string>(selectorData?.Text, TextLabel.TextProperty);
800             set
801             {
802                 selectorData?.Text?.Reset(this);
803                 if (value == null) return;
804
805                 if (value.HasAll()) SetText(value.All);
806                 else EnsureSelectorData().Text = new TriggerableSelector<string>(this, value, SetText, true);
807             }
808         }
809
810         internal Selector<string> FontFamilySelector
811         {
812             get => GetSelector<string>(selectorData?.FontFamily, TextLabel.FontFamilyProperty);
813             set
814             {
815                 selectorData?.FontFamily?.Reset(this);
816                 if (value == null) return;
817
818                 if (value.HasAll()) SetFontFamily(value.All);
819                 else EnsureSelectorData().FontFamily = new TriggerableSelector<string>(this, value, SetFontFamily, true);
820             }
821         }
822
823         internal Selector<float?> PointSizeSelector
824         {
825             get => GetSelector<float?>(selectorData?.PointSize, TextLabel.PointSizeProperty);
826             set
827             {
828                 selectorData?.PointSize?.Reset(this);
829                 if (value == null) return;
830
831                 if (value.HasAll()) SetPointSize(value.All);
832                 else EnsureSelectorData().PointSize = new TriggerableSelector<float?>(this, value, SetPointSize, true);
833             }
834         }
835
836         internal Selector<Color> TextColorSelector
837         {
838             get
839             {
840                 var selector = selectorData?.TextColor?.Get();
841                 if (selector != null)
842                 {
843                     return selector;
844                 }
845
846                 Color color = new Color();
847                 if (!GetProperty(TextLabel.Property.TextColor).Get(color))
848                 {
849                     return null;
850                 }
851                 return new Selector<Color>(color);
852             }
853             set
854             {
855                 selectorData?.TextColor?.Reset(this);
856                 if (value == null) return;
857
858                 if (value.HasAll()) SetTextColor(value.All);
859                 else EnsureSelectorData().TextColor = new TriggerableSelector<Color>(this, value, SetTextColor, true);
860             }
861         }
862
863         internal Selector<float?> PixelSizeSelector
864         {
865             get => GetSelector<float?>(selectorData?.PixelSize, TextLabel.PixelSizeProperty);
866             set
867             {
868                 selectorData?.PixelSize?.Reset(this);
869                 if (value == null) return;
870
871                 if (value.HasAll()) SetPixelSize(value.All);
872                 else EnsureSelectorData().PixelSize = new TriggerableSelector<float?>(this, value, SetPixelSize, true);
873             }
874         }
875
876         internal Selector<TextShadow> TextShadowSelector
877         {
878             get => GetSelector<TextShadow>(selectorData?.TextShadow, TextLabel.TextShadowProperty);
879             set
880             {
881                 selectorData?.TextShadow?.Reset(this);
882                 if (value == null) return;
883
884                 if (value.HasAll()) SetTextShadow(value.All);
885                 else EnsureSelectorData().TextShadow = new TriggerableSelector<TextShadow>(this, value, SetTextShadow);
886             }
887         }
888
889         private void SetTranslatableText(string value)
890         {
891             if (value != null)
892             {
893                 translatableText = value;
894             }
895         }
896
897         private void SetText(string value)
898         {
899             if (value != null)
900             {
901
902                 Object.InternalSetPropertyString(SwigCPtr, TextLabel.Property.TEXT, value);
903                 RequestLayout();
904             }
905         }
906
907         private void SetFontFamily(string value)
908         {
909             if (value != null)
910             {
911                 InternalFontFamily = (string)value;
912             }
913         }
914
915         private void SetTextColor(Color value)
916         {
917             if (value != null)
918             {
919
920                 Object.InternalSetPropertyVector4(SwigCPtr, TextLabel.Property.TextColor, value.SwigCPtr);
921             }
922         }
923
924         private void SetPointSize(float? value)
925         {
926             if (value != null)
927             {
928
929                 Object.InternalSetPropertyFloat(SwigCPtr, TextLabel.Property.PointSize, (float)value);
930                 RequestLayout();
931             }
932         }
933
934         private void SetPixelSize(float? value)
935         {
936             if (value != null)
937             {
938
939                 Object.InternalSetPropertyFloat(SwigCPtr, TextLabel.Property.PixelSize, (float)value);
940                 RequestLayout();
941             }
942         }
943
944         private void SetTextShadow(TextShadow value)
945         {
946             if (value != null)
947             {
948                 Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, Property.SHADOW, TextShadow.ToPropertyValue(value));
949             }
950         }
951     }
952 }