a2e06f111b138e966134ac17194fead91fa7d93f
[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             string temp;
74             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TEXT).Get(out temp);
75             return temp;
76         }));
77         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
78         [EditorBrowsable(EditorBrowsableState.Never)]
79         public static readonly BindableProperty FontFamilyProperty = BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
80         {
81             var textLabel = (TextLabel)bindable;
82
83             if (newValue is Selector<string> selector)
84             {
85                 textLabel.FontFamilySelector = selector;
86             }
87             else
88             {
89                 textLabel.selectorData?.FontFamily?.Reset(textLabel);
90                 textLabel.SetFontFamily((string)newValue);
91             }
92         }),
93         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
94         {
95             var textLabel = (TextLabel)bindable;
96             string temp;
97             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontFamily).Get(out temp);
98             return temp;
99         }));
100         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
101         [EditorBrowsable(EditorBrowsableState.Never)]
102         public static readonly BindableProperty FontStyleProperty = BindableProperty.Create(nameof(FontStyle), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
103         {
104             var textLabel = (TextLabel)bindable;
105             if (newValue != null)
106             {
107                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontStyle, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
108                 textLabel.RequestLayout();
109             }
110         }),
111         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
112         {
113             var textLabel = (TextLabel)bindable;
114             PropertyMap temp = new PropertyMap();
115             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontStyle).Get(temp);
116             return temp;
117         }));
118         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
119         [EditorBrowsable(EditorBrowsableState.Never)]
120         public static readonly BindableProperty PointSizeProperty = BindableProperty.Create(nameof(PointSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
121         {
122             var textLabel = (TextLabel)bindable;
123
124             if (newValue is Selector<float?> selector)
125             {
126                 textLabel.PointSizeSelector = selector;
127             }
128             else
129             {
130                 textLabel.selectorData?.PointSize?.Reset(textLabel);
131                 textLabel.SetPointSize((float?)newValue);
132             }
133         }),
134         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
135         {
136             var textLabel = (TextLabel)bindable;
137             float temp = 0.0f;
138             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.PointSize).Get(out temp);
139             return temp;
140         }));
141         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
142         [EditorBrowsable(EditorBrowsableState.Never)]
143         public static readonly BindableProperty MultiLineProperty = BindableProperty.Create(nameof(MultiLine), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
144         {
145             var textLabel = (TextLabel)bindable;
146             if (newValue != null)
147             {
148                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MultiLine, new Tizen.NUI.PropertyValue((bool)newValue));
149                 textLabel.RequestLayout();
150             }
151         }),
152         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
153         {
154             var textLabel = (TextLabel)bindable;
155             bool temp = false;
156             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MultiLine).Get(out temp);
157             return temp;
158         }));
159         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
160         [EditorBrowsable(EditorBrowsableState.Never)]
161         public static readonly BindableProperty HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment), typeof(TextLabel), HorizontalAlignment.Begin, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
162         {
163             var textLabel = (TextLabel)bindable;
164             string valueToString = "";
165             if (newValue != null)
166             {
167                 valueToString = ((HorizontalAlignment)newValue).GetDescription();
168                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.HorizontalAlignment, new Tizen.NUI.PropertyValue(valueToString));
169             }
170         }),
171         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
172         {
173             var textLabel = (TextLabel)bindable;
174             string temp;
175             if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.HorizontalAlignment).Get(out temp) == false)
176             {
177                 NUILog.Error("HorizontalAlignment get error!");
178             }
179             return temp.GetValueByDescription<HorizontalAlignment>();
180         }));
181         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
182         [EditorBrowsable(EditorBrowsableState.Never)]
183         public static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.Create(nameof(VerticalAlignment), typeof(VerticalAlignment), typeof(TextLabel), VerticalAlignment.Bottom, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
184         {
185             var textLabel = (TextLabel)bindable;
186             string valueToString = "";
187             if (newValue != null)
188             {
189                 valueToString = ((VerticalAlignment)newValue).GetDescription();
190                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalAlignment, new Tizen.NUI.PropertyValue(valueToString));
191             }
192         }),
193         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
194         {
195             var textLabel = (TextLabel)bindable;
196             string temp;
197             if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalAlignment).Get(out temp) == false)
198             {
199                 NUILog.Error("VerticalAlignment get error!");
200             }
201
202             return temp.GetValueByDescription<VerticalAlignment>();
203         }));
204         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
205         [EditorBrowsable(EditorBrowsableState.Never)]
206         public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
207         {
208             var textLabel = (TextLabel)bindable;
209
210             if (newValue is Selector<Color> selector)
211             {
212                 textLabel.TextColorSelector = selector;
213             }
214             else
215             {
216                 textLabel.selectorData?.TextColor?.Reset(textLabel);
217                 textLabel.SetTextColor((Color)newValue);
218             }
219         }),
220         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
221         {
222             var textLabel = (TextLabel)bindable;
223             Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
224             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextColor).Get(temp);
225             return temp;
226         }));
227
228         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
229         [EditorBrowsable(EditorBrowsableState.Never)]
230         public static readonly BindableProperty EnableMarkupProperty = BindableProperty.Create(nameof(EnableMarkup), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
231         {
232             var textLabel = (TextLabel)bindable;
233             if (newValue != null)
234             {
235                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableMarkup, new Tizen.NUI.PropertyValue((bool)newValue));
236             }
237         }),
238         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
239         {
240             var textLabel = (TextLabel)bindable;
241             bool temp = false;
242             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableMarkup).Get(out temp);
243             return temp;
244         }));
245         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
246         [EditorBrowsable(EditorBrowsableState.Never)]
247         public static readonly BindableProperty EnableAutoScrollProperty = BindableProperty.Create(nameof(EnableAutoScroll), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
248         {
249             var textLabel = (TextLabel)bindable;
250             if (newValue != null)
251             {
252                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableAutoScroll, new Tizen.NUI.PropertyValue((bool)newValue));
253             }
254         }),
255         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
256         {
257             var textLabel = (TextLabel)bindable;
258             bool temp = false;
259             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableAutoScroll).Get(out temp);
260             return temp;
261         }));
262         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
263         [EditorBrowsable(EditorBrowsableState.Never)]
264         public static readonly BindableProperty AutoScrollSpeedProperty = BindableProperty.Create(nameof(AutoScrollSpeed), typeof(int), typeof(TextLabel), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
265         {
266             var textLabel = (TextLabel)bindable;
267             if (newValue != null)
268             {
269                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollSpeed, new Tizen.NUI.PropertyValue((int)newValue));
270             }
271         }),
272         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
273         {
274             var textLabel = (TextLabel)bindable;
275             int temp = 0;
276             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollSpeed).Get(out temp);
277             return temp;
278         }));
279         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
280         [EditorBrowsable(EditorBrowsableState.Never)]
281         public static readonly BindableProperty AutoScrollLoopCountProperty = BindableProperty.Create(nameof(AutoScrollLoopCount), typeof(int), typeof(TextLabel), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
282         {
283             var textLabel = (TextLabel)bindable;
284             if (newValue != null)
285             {
286                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopCount, new Tizen.NUI.PropertyValue((int)newValue));
287             }
288         }),
289         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
290         {
291             var textLabel = (TextLabel)bindable;
292             int temp = 0;
293             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopCount).Get(out temp);
294             return temp;
295         }));
296         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
297         [EditorBrowsable(EditorBrowsableState.Never)]
298         public static readonly BindableProperty AutoScrollGapProperty = BindableProperty.Create(nameof(AutoScrollGap), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
299         {
300             var textLabel = (TextLabel)bindable;
301             if (newValue != null)
302             {
303                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollGap, new Tizen.NUI.PropertyValue((float)newValue));
304             }
305         }),
306         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
307         {
308             var textLabel = (TextLabel)bindable;
309             float temp = 0.0f;
310             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollGap).Get(out temp);
311             return temp;
312         }));
313         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
314         [EditorBrowsable(EditorBrowsableState.Never)]
315         public static readonly BindableProperty LineSpacingProperty = BindableProperty.Create(nameof(LineSpacing), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
316         {
317             var textLabel = (TextLabel)bindable;
318             if (newValue != null)
319             {
320                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineSpacing, new Tizen.NUI.PropertyValue((float)newValue));
321                 textLabel.RequestLayout();
322             }
323         }),
324         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
325         {
326             var textLabel = (TextLabel)bindable;
327             float temp = 0.0f;
328             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineSpacing).Get(out temp);
329             return temp;
330         }));
331         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
332         [EditorBrowsable(EditorBrowsableState.Never)]
333         public static readonly BindableProperty UnderlineProperty = BindableProperty.Create(nameof(Underline), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
334         {
335             var textLabel = (TextLabel)bindable;
336             if (newValue != null)
337             {
338                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.UNDERLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
339             }
340         }),
341         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
342         {
343             var textLabel = (TextLabel)bindable;
344             PropertyMap temp = new PropertyMap();
345             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.UNDERLINE).Get(temp);
346             return temp;
347         }));
348         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
349         [EditorBrowsable(EditorBrowsableState.Never)]
350         public static readonly BindableProperty ShadowProperty = BindableProperty.Create(nameof(Shadow), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
351         {
352             var textLabel = (TextLabel)bindable;
353             if (newValue != null)
354             {
355                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
356             }
357         }),
358         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
359         {
360             var textLabel = (TextLabel)bindable;
361             PropertyMap temp = new PropertyMap();
362             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
363             return temp;
364         }));
365         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
366         [EditorBrowsable(EditorBrowsableState.Never)]
367         public static readonly BindableProperty TextShadowProperty = BindableProperty.Create(nameof(TextShadow), typeof(TextShadow), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
368         {
369             var textLabel = (TextLabel)bindable;
370
371             if (newValue is Selector<TextShadow> selector)
372             {
373                 textLabel.TextShadowSelector = selector;
374             }
375             else
376             {
377                 textLabel.selectorData?.TextShadow?.Reset(textLabel);
378                 textLabel.SetTextShadow((TextShadow)newValue);
379             }
380         }),
381         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
382         {
383             var textLabel = (TextLabel)bindable;
384             PropertyMap temp = new PropertyMap();
385             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
386             return temp.Empty() ? null : new TextShadow(temp);
387         }));
388         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
389         [EditorBrowsable(EditorBrowsableState.Never)]
390         public static readonly BindableProperty EmbossProperty = BindableProperty.Create(nameof(Emboss), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
391         {
392             var textLabel = (TextLabel)bindable;
393             if (newValue != null)
394             {
395                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EMBOSS, new Tizen.NUI.PropertyValue((string)newValue));
396             }
397         }),
398         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
399         {
400             var textLabel = (TextLabel)bindable;
401             string temp;
402             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EMBOSS).Get(out temp);
403             return temp;
404         }));
405         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
406         [EditorBrowsable(EditorBrowsableState.Never)]
407         public static readonly BindableProperty OutlineProperty = BindableProperty.Create(nameof(Outline), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
408         {
409             var textLabel = (TextLabel)bindable;
410             if (newValue != null)
411             {
412                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.OUTLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
413             }
414         }),
415         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
416         {
417             var textLabel = (TextLabel)bindable;
418             PropertyMap temp = new PropertyMap();
419             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.OUTLINE).Get(temp);
420             return temp;
421         }));
422         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
423         [EditorBrowsable(EditorBrowsableState.Never)]
424         public static readonly BindableProperty PixelSizeProperty = BindableProperty.Create(nameof(PixelSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
425         {
426             var textLabel = (TextLabel)bindable;
427
428             if (newValue is Selector<float?> selector)
429             {
430                 textLabel.PixelSizeSelector = selector;
431             }
432             else
433             {
434                 textLabel.selectorData?.PixelSize?.Reset(textLabel);
435                 textLabel.SetPixelSize((float?)newValue);
436             }
437         }),
438         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
439         {
440             var textLabel = (TextLabel)bindable;
441             float temp = 0.0f;
442             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.PixelSize).Get(out temp);
443             return temp;
444         }));
445         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
446         [EditorBrowsable(EditorBrowsableState.Never)]
447         public static readonly BindableProperty EllipsisProperty = BindableProperty.Create(nameof(Ellipsis), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
448         {
449             var textLabel = (TextLabel)bindable;
450             if (newValue != null)
451             {
452                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.ELLIPSIS, new Tizen.NUI.PropertyValue((bool)newValue));
453             }
454         }),
455         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
456         {
457             var textLabel = (TextLabel)bindable;
458             bool temp = false;
459             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.ELLIPSIS).Get(out temp);
460             return temp;
461         }));
462         /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
463         [EditorBrowsable(EditorBrowsableState.Never)]
464         public static readonly BindableProperty EllipsisLocationProperty = BindableProperty.Create(nameof(EllipsisLocation), typeof(EllipsisLocation), typeof(TextLabel), EllipsisLocation.End, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
465         {
466             var textLabel = (TextLabel)bindable;
467             if (newValue != null)
468             {
469                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EllipsisLocation, new Tizen.NUI.PropertyValue((int)newValue));
470             }
471         }),
472         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
473         {
474             var textLabel = (TextLabel)bindable;
475             int temp = 0;
476             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EllipsisLocation).Get(out temp);
477             return (EllipsisLocation)temp;
478         }));
479         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
480         [EditorBrowsable(EditorBrowsableState.Never)]
481         public static readonly BindableProperty AutoScrollLoopDelayProperty = BindableProperty.Create(nameof(AutoScrollLoopDelay), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
482         {
483             var textLabel = (TextLabel)bindable;
484             if (newValue != null)
485             {
486                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopDelay, new Tizen.NUI.PropertyValue((float)newValue));
487             }
488         }),
489         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
490         {
491             var textLabel = (TextLabel)bindable;
492             float temp = 0.0f;
493             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopDelay).Get(out temp);
494             return temp;
495         }));
496         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
497         [EditorBrowsable(EditorBrowsableState.Never)]
498         public static readonly BindableProperty AutoScrollStopModeProperty = BindableProperty.Create(nameof(AutoScrollStopMode), typeof(AutoScrollStopMode), typeof(TextLabel), AutoScrollStopMode.FinishLoop, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
499         {
500             var textLabel = (TextLabel)bindable;
501             if (newValue != null)
502             {
503                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollStopMode, new Tizen.NUI.PropertyValue((int)newValue));
504             }
505         }),
506         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
507         {
508             var textLabel = (TextLabel)bindable;
509             string temp;
510             if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollStopMode).Get(out temp) == false)
511             {
512                 NUILog.Error("AutoScrollStopMode get error!");
513             }
514             return temp.GetValueByDescription<AutoScrollStopMode>();
515         }));
516         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
517         [EditorBrowsable(EditorBrowsableState.Never)]
518         public static readonly BindableProperty LineWrapModeProperty = BindableProperty.Create(nameof(LineWrapMode), typeof(LineWrapMode), typeof(TextLabel), LineWrapMode.Word, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
519         {
520             var textLabel = (TextLabel)bindable;
521             if (newValue != null)
522             {
523                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineWrapMode, new Tizen.NUI.PropertyValue((int)newValue));
524             }
525         }),
526         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
527         {
528             var textLabel = (TextLabel)bindable;
529             int temp;
530             if (false == Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineWrapMode).Get(out temp))
531             {
532                 NUILog.Error("LineWrapMode get error!");
533             }
534             return (LineWrapMode)temp;
535         }));
536         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
537         [EditorBrowsable(EditorBrowsableState.Never)]
538         public static readonly BindableProperty VerticalLineAlignmentProperty = BindableProperty.Create(nameof(VerticalLineAlignment), typeof(VerticalLineAlignment), typeof(TextLabel), VerticalLineAlignment.Bottom, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
539         {
540             var textLabel = (TextLabel)bindable;
541             if (newValue != null)
542             {
543                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalLineAlignment, new Tizen.NUI.PropertyValue((int)newValue));
544             }
545         }),
546         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
547         {
548             var textLabel = (TextLabel)bindable;
549             int temp = 0;
550             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalLineAlignment).Get(out temp);
551             return (VerticalLineAlignment)temp;
552         }));
553         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
554         [EditorBrowsable(EditorBrowsableState.Never)]
555         public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(MatchSystemLanguageDirection), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
556         {
557             var textLabel = (TextLabel)bindable;
558             if (newValue != null)
559             {
560                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MatchSystemLanguageDirection, new Tizen.NUI.PropertyValue((bool)newValue));
561             }
562         }),
563         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
564         {
565             var textLabel = (TextLabel)bindable;
566             bool temp = false;
567             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MatchSystemLanguageDirection).Get(out temp);
568             return temp;
569         }));
570
571         /// Only for XAML. No need of public API. Make hidden as inhouse API.
572         [EditorBrowsable(EditorBrowsableState.Never)]
573         public static readonly BindableProperty TextFitProperty = BindableProperty.Create(nameof(TextFit), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
574         {
575             var textLabel = (TextLabel)bindable;
576             if (newValue != null)
577             {
578                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextFit, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
579             }
580         }),
581         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
582         {
583             var textLabel = (TextLabel)bindable;
584             PropertyMap temp = new PropertyMap();
585             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextFit).Get(temp);
586             return temp;
587         }));
588
589         /// Only for XAML. No need of public API. Make hidden as inhouse API.
590         [EditorBrowsable(EditorBrowsableState.Never)]
591         public static readonly BindableProperty MinLineSizeProperty = BindableProperty.Create(nameof(MinLineSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
592         {
593             var textLabel = (TextLabel)bindable;
594             if (newValue != null)
595             {
596                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MinLineSize, new Tizen.NUI.PropertyValue((float)newValue));
597                 textLabel.RequestLayout();
598             }
599         }),
600         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
601         {
602             var textLabel = (TextLabel)bindable;
603             float temp = 0.0f;
604             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MinLineSize).Get(out temp);
605             return temp;
606         }));
607
608         [EditorBrowsable(EditorBrowsableState.Never)]
609         public static readonly BindableProperty FontSizeScaleProperty = BindableProperty.Create(nameof(FontSizeScale), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
610         {
611             var textLabel = (TextLabel)bindable;
612             if (newValue != null)
613             {
614                 using (var property = new Tizen.NUI.PropertyValue((float)newValue))
615                 {
616                     Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontSizeScale, property);
617                     textLabel.RequestLayout();
618                 }
619             }
620         }),
621         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
622         {
623             var textLabel = (TextLabel)bindable;
624             float temp;
625             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontSizeScale).Get(out temp);
626             return temp;
627         }));
628
629         internal Selector<string> TranslatableTextSelector
630         {
631             get => GetSelector<string>(selectorData?.TranslatableText, TextLabel.TranslatableTextProperty);
632             set
633             {
634                 selectorData?.TranslatableText?.Reset(this);
635                 if (value == null) return;
636
637                 if (value.HasAll()) SetTranslatableText(value.All);
638                 else EnsureSelectorData().TranslatableText = new TriggerableSelector<string>(this, value, SetTranslatableText, true);
639             }
640         }
641
642         internal Selector<string> TextSelector
643         {
644             get => GetSelector<string>(selectorData?.Text, TextLabel.TextProperty);
645             set
646             {
647                 selectorData?.Text?.Reset(this);
648                 if (value == null) return;
649
650                 if (value.HasAll()) SetText(value.All);
651                 else EnsureSelectorData().Text = new TriggerableSelector<string>(this, value, SetText, true);
652             }
653         }
654
655         internal Selector<string> FontFamilySelector
656         {
657             get => GetSelector<string>(selectorData?.FontFamily, TextLabel.FontFamilyProperty);
658             set
659             {
660                 selectorData?.FontFamily?.Reset(this);
661                 if (value == null) return;
662
663                 if (value.HasAll()) SetFontFamily(value.All);
664                 else EnsureSelectorData().FontFamily = new TriggerableSelector<string>(this, value, SetFontFamily, true);
665             }
666         }
667
668         internal Selector<float?> PointSizeSelector
669         {
670             get => GetSelector<float?>(selectorData?.PointSize, TextLabel.PointSizeProperty);
671             set
672             {
673                 selectorData?.PointSize?.Reset(this);
674                 if (value == null) return;
675
676                 if (value.HasAll()) SetPointSize(value.All);
677                 else EnsureSelectorData().PointSize = new TriggerableSelector<float?>(this, value, SetPointSize, true);
678             }
679         }
680
681         internal Selector<Color> TextColorSelector
682         {
683             get
684             {
685                 var selector =  selectorData?.TextColor?.Get();
686                 if (selector != null)
687                 {
688                     return selector;
689                 }
690
691                 Color color = new Color();
692                 if (!GetProperty(TextLabel.Property.TextColor).Get(color))
693                 {
694                     return null;
695                 }
696                 return new Selector<Color>(color);
697             }
698             set
699             {
700                 selectorData?.TextColor?.Reset(this);
701                 if (value == null) return;
702
703                 if (value.HasAll()) SetTextColor(value.All);
704                 else EnsureSelectorData().TextColor = new TriggerableSelector<Color>(this, value, SetTextColor, true);
705             }
706         }
707
708         internal Selector<float?> PixelSizeSelector
709         {
710             get => GetSelector<float?>(selectorData?.PixelSize, TextLabel.PixelSizeProperty);
711             set
712             {
713                 selectorData?.PixelSize?.Reset(this);
714                 if (value == null) return;
715
716                 if (value.HasAll()) SetPixelSize(value.All);
717                 else EnsureSelectorData().PixelSize = new TriggerableSelector<float?>(this, value, SetPixelSize, true);
718             }
719         }
720
721         internal Selector<TextShadow> TextShadowSelector
722         {
723             get => GetSelector<TextShadow>(selectorData?.TextShadow, TextLabel.TextShadowProperty);
724             set
725             {
726                 selectorData?.TextShadow?.Reset(this);
727                 if (value == null) return;
728
729                 if (value.HasAll()) SetTextShadow(value.All);
730                 else EnsureSelectorData().TextShadow = new TriggerableSelector<TextShadow>(this, value, SetTextShadow);
731             }
732         }
733
734         private void SetTranslatableText(string value)
735         {
736             if (value != null)
737             {
738                 translatableText = value;
739             }
740         }
741
742         private void SetText(string value)
743         {
744             if (value != null)
745             {
746                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextLabel.Property.TEXT, new Tizen.NUI.PropertyValue(value));
747                 RequestLayout();
748             }
749         }
750
751         private void SetFontFamily(string value)
752         {
753             if (value != null)
754             {
755                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextLabel.Property.FontFamily, new Tizen.NUI.PropertyValue(value));
756                 RequestLayout();
757             }
758         }
759
760         private void SetTextColor(Color value)
761         {
762             if (value != null)
763             {
764                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextLabel.Property.TextColor, new Tizen.NUI.PropertyValue(value));
765             }
766         }
767
768         private void SetPointSize(float? value)
769         {
770             if (value != null)
771             {
772                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextLabel.Property.PointSize, new Tizen.NUI.PropertyValue((float)value));
773                 RequestLayout();
774             }
775         }
776
777         private void SetPixelSize(float? value)
778         {
779             if (value != null)
780             {
781                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextLabel.Property.PixelSize, new Tizen.NUI.PropertyValue((float)value));
782                 RequestLayout();
783             }
784         }
785
786         private void SetTextShadow(TextShadow value)
787         {
788             if (value != null)
789             {
790                 Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, Property.SHADOW, TextShadow.ToPropertyValue(value));
791             }
792         }
793     }
794 }