a77a2d4e7a1af9f1cb7e7c386ef064bbf76147b0
[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_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
463         [EditorBrowsable(EditorBrowsableState.Never)]
464         public static readonly BindableProperty AutoScrollLoopDelayProperty = BindableProperty.Create(nameof(AutoScrollLoopDelay), typeof(float), typeof(TextLabel), default(float), 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.AutoScrollLoopDelay, new Tizen.NUI.PropertyValue((float)newValue));
470             }
471         }),
472         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
473         {
474             var textLabel = (TextLabel)bindable;
475             float temp = 0.0f;
476             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopDelay).Get(out temp);
477             return 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 AutoScrollStopModeProperty = BindableProperty.Create(nameof(AutoScrollStopMode), typeof(AutoScrollStopMode), typeof(TextLabel), AutoScrollStopMode.FinishLoop, 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.AutoScrollStopMode, new Tizen.NUI.PropertyValue((int)newValue));
487             }
488         }),
489         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
490         {
491             var textLabel = (TextLabel)bindable;
492             string temp;
493             if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollStopMode).Get(out temp) == false)
494             {
495                 NUILog.Error("AutoScrollStopMode get error!");
496             }
497             return temp.GetValueByDescription<AutoScrollStopMode>();
498         }));
499         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
500         [EditorBrowsable(EditorBrowsableState.Never)]
501         public static readonly BindableProperty LineWrapModeProperty = BindableProperty.Create(nameof(LineWrapMode), typeof(LineWrapMode), typeof(TextLabel), LineWrapMode.Word, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
502         {
503             var textLabel = (TextLabel)bindable;
504             if (newValue != null)
505             {
506                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineWrapMode, new Tizen.NUI.PropertyValue((int)newValue));
507             }
508         }),
509         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
510         {
511             var textLabel = (TextLabel)bindable;
512             int temp;
513             if (false == Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineWrapMode).Get(out temp))
514             {
515                 NUILog.Error("LineWrapMode get error!");
516             }
517             return (LineWrapMode)temp;
518         }));
519         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
520         [EditorBrowsable(EditorBrowsableState.Never)]
521         public static readonly BindableProperty VerticalLineAlignmentProperty = BindableProperty.Create(nameof(VerticalLineAlignment), typeof(VerticalLineAlignment), typeof(TextLabel), VerticalLineAlignment.Bottom, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
522         {
523             var textLabel = (TextLabel)bindable;
524             if (newValue != null)
525             {
526                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalLineAlignment, new Tizen.NUI.PropertyValue((int)newValue));
527             }
528         }),
529         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
530         {
531             var textLabel = (TextLabel)bindable;
532             int temp = 0;
533             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalLineAlignment).Get(out temp);
534             return (VerticalLineAlignment)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 MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(MatchSystemLanguageDirection), typeof(bool), typeof(TextLabel), false, 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.MatchSystemLanguageDirection, new Tizen.NUI.PropertyValue((bool)newValue));
544             }
545         }),
546         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
547         {
548             var textLabel = (TextLabel)bindable;
549             bool temp = false;
550             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MatchSystemLanguageDirection).Get(out temp);
551             return temp;
552         }));
553
554         /// Only for XAML. No need of public API. Make hidden as inhouse API.
555         [EditorBrowsable(EditorBrowsableState.Never)]
556         public static readonly BindableProperty TextFitProperty = BindableProperty.Create(nameof(TextFit), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
557         {
558             var textLabel = (TextLabel)bindable;
559             if (newValue != null)
560             {
561                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextFit, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
562             }
563         }),
564         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
565         {
566             var textLabel = (TextLabel)bindable;
567             PropertyMap temp = new PropertyMap();
568             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextFit).Get(temp);
569             return temp;
570         }));
571
572         /// Only for XAML. No need of public API. Make hidden as inhouse API.
573         [EditorBrowsable(EditorBrowsableState.Never)]
574         public static readonly BindableProperty MinLineSizeProperty = BindableProperty.Create(nameof(MinLineSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
575         {
576             var textLabel = (TextLabel)bindable;
577             if (newValue != null)
578             {
579                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MinLineSize, new Tizen.NUI.PropertyValue((float)newValue));
580                 textLabel.RequestLayout();
581             }
582         }),
583         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
584         {
585             var textLabel = (TextLabel)bindable;
586             float temp = 0.0f;
587             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MinLineSize).Get(out temp);
588             return temp;
589         }));
590
591         [EditorBrowsable(EditorBrowsableState.Never)]
592         public static readonly BindableProperty FontSizeScaleProperty = BindableProperty.Create(nameof(FontSizeScale), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
593         {
594             var textLabel = (TextLabel)bindable;
595             if (newValue != null)
596             {
597                 using (var property = new Tizen.NUI.PropertyValue((float)newValue))
598                 {
599                     Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontSizeScale, property);
600                     textLabel.RequestLayout();
601                 }
602             }
603         }),
604         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
605         {
606             var textLabel = (TextLabel)bindable;
607             float temp;
608             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontSizeScale).Get(out temp);
609             return temp;
610         }));
611
612         internal Selector<string> TranslatableTextSelector
613         {
614             get => GetSelector<string>(selectorData?.TranslatableText, TextLabel.TranslatableTextProperty);
615             set
616             {
617                 selectorData?.TranslatableText?.Reset(this);
618                 if (value == null) return;
619
620                 if (value.HasAll()) SetTranslatableText(value.All);
621                 else EnsureSelectorData().TranslatableText = new TriggerableSelector<string>(this, value, SetTranslatableText, true);
622             }
623         }
624
625         internal Selector<string> TextSelector
626         {
627             get => GetSelector<string>(selectorData?.Text, TextLabel.TextProperty);
628             set
629             {
630                 selectorData?.Text?.Reset(this);
631                 if (value == null) return;
632
633                 if (value.HasAll()) SetText(value.All);
634                 else EnsureSelectorData().Text = new TriggerableSelector<string>(this, value, SetText, true);
635             }
636         }
637
638         internal Selector<string> FontFamilySelector
639         {
640             get => GetSelector<string>(selectorData?.FontFamily, TextLabel.FontFamilyProperty);
641             set
642             {
643                 selectorData?.FontFamily?.Reset(this);
644                 if (value == null) return;
645
646                 if (value.HasAll()) SetFontFamily(value.All);
647                 else EnsureSelectorData().FontFamily = new TriggerableSelector<string>(this, value, SetFontFamily, true);
648             }
649         }
650
651         internal Selector<float?> PointSizeSelector
652         {
653             get => GetSelector<float?>(selectorData?.PointSize, TextLabel.PointSizeProperty);
654             set
655             {
656                 selectorData?.PointSize?.Reset(this);
657                 if (value == null) return;
658
659                 if (value.HasAll()) SetPointSize(value.All);
660                 else EnsureSelectorData().PointSize = new TriggerableSelector<float?>(this, value, SetPointSize, true);
661             }
662         }
663
664         internal Selector<Color> TextColorSelector
665         {
666             get
667             {
668                 var selector =  selectorData?.TextColor?.Get();
669                 if (selector != null)
670                 {
671                     return selector;
672                 }
673
674                 Color color = new Color();
675                 if (!GetProperty(TextLabel.Property.TextColor).Get(color))
676                 {
677                     return null;
678                 }
679                 return new Selector<Color>(color);
680             }
681             set
682             {
683                 selectorData?.TextColor?.Reset(this);
684                 if (value == null) return;
685
686                 if (value.HasAll()) SetTextColor(value.All);
687                 else EnsureSelectorData().TextColor = new TriggerableSelector<Color>(this, value, SetTextColor, true);
688             }
689         }
690
691         internal Selector<float?> PixelSizeSelector
692         {
693             get => GetSelector<float?>(selectorData?.PixelSize, TextLabel.PixelSizeProperty);
694             set
695             {
696                 selectorData?.PixelSize?.Reset(this);
697                 if (value == null) return;
698
699                 if (value.HasAll()) SetPixelSize(value.All);
700                 else EnsureSelectorData().PixelSize = new TriggerableSelector<float?>(this, value, SetPixelSize, true);
701             }
702         }
703
704         internal Selector<TextShadow> TextShadowSelector
705         {
706             get => GetSelector<TextShadow>(selectorData?.TextShadow, TextLabel.TextShadowProperty);
707             set
708             {
709                 selectorData?.TextShadow?.Reset(this);
710                 if (value == null) return;
711
712                 if (value.HasAll()) SetTextShadow(value.All);
713                 else EnsureSelectorData().TextShadow = new TriggerableSelector<TextShadow>(this, value, SetTextShadow);
714             }
715         }
716
717         private void SetTranslatableText(string value)
718         {
719             if (value != null)
720             {
721                 translatableText = value;
722             }
723         }
724
725         private void SetText(string value)
726         {
727             if (value != null)
728             {
729                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextLabel.Property.TEXT, new Tizen.NUI.PropertyValue(value));
730                 RequestLayout();
731             }
732         }
733
734         private void SetFontFamily(string value)
735         {
736             if (value != null)
737             {
738                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextLabel.Property.FontFamily, new Tizen.NUI.PropertyValue(value));
739                 RequestLayout();
740             }
741         }
742
743         private void SetTextColor(Color value)
744         {
745             if (value != null)
746             {
747                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextLabel.Property.TextColor, new Tizen.NUI.PropertyValue(value));
748             }
749         }
750
751         private void SetPointSize(float? value)
752         {
753             if (value != null)
754             {
755                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextLabel.Property.PointSize, new Tizen.NUI.PropertyValue((float)value));
756                 RequestLayout();
757             }
758         }
759
760         private void SetPixelSize(float? value)
761         {
762             if (value != null)
763             {
764                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextLabel.Property.PixelSize, new Tizen.NUI.PropertyValue((float)value));
765                 RequestLayout();
766             }
767         }
768
769         private void SetTextShadow(TextShadow value)
770         {
771             if (value != null)
772             {
773                 Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, Property.SHADOW, TextShadow.ToPropertyValue(value));
774             }
775         }
776     }
777 }