[NUI] Add FontSizeScale property in TextLabel, TextField and TextEditor (#2559)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextLabelBindableProperty.cs
1 /*
2  * Copyright(c) 2020 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 extern alias TizenSystemSettings;
19 using TizenSystemSettings.Tizen.System;
20 using System.ComponentModel;
21 using Tizen.NUI.Binding;
22
23 namespace Tizen.NUI.BaseComponents
24 {
25     /// <summary>
26     /// A control which renders a short text string.<br />
27     /// Text labels are lightweight, non-editable, and do not respond to the user input.<br />
28     /// </summary>
29     /// <since_tizen> 3 </since_tizen>
30     public partial class TextLabel
31     {
32         /// <summary>
33         /// StyleNameProperty
34         /// </summary>
35         [EditorBrowsable(EditorBrowsableState.Never)]
36         public static readonly BindableProperty TranslatableTextProperty = BindableProperty.Create(nameof(TranslatableText), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
37         {
38             var textLabel = (TextLabel)bindable;
39             if (newValue != null)
40             {
41                 textLabel.translatableText = (string)newValue;
42             }
43         },
44         defaultValueCreator: (bindable) =>
45         {
46             var textLabel = (TextLabel)bindable;
47             return textLabel.translatableText;
48         });
49         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
50         [EditorBrowsable(EditorBrowsableState.Never)]
51         public static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
52         {
53             var textLabel = (TextLabel)bindable;
54             if (newValue != null)
55             {
56                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TEXT, new Tizen.NUI.PropertyValue((string)newValue));
57             }
58         }),
59         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
60         {
61             var textLabel = (TextLabel)bindable;
62             string temp;
63             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TEXT).Get(out temp);
64             return temp;
65         }));
66         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
67         [EditorBrowsable(EditorBrowsableState.Never)]
68         public static readonly BindableProperty FontFamilyProperty = BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
69         {
70             var textLabel = (TextLabel)bindable;
71             if (newValue != null)
72             {
73                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontFamily, new Tizen.NUI.PropertyValue((string)newValue));
74             }
75         }),
76         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
77         {
78             var textLabel = (TextLabel)bindable;
79             string temp;
80             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontFamily).Get(out temp);
81             return temp;
82         }));
83         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
84         [EditorBrowsable(EditorBrowsableState.Never)]
85         public static readonly BindableProperty FontStyleProperty = BindableProperty.Create(nameof(FontStyle), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
86         {
87             var textLabel = (TextLabel)bindable;
88             if (newValue != null)
89             {
90                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontStyle, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
91             }
92         }),
93         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
94         {
95             var textLabel = (TextLabel)bindable;
96             PropertyMap temp = new PropertyMap();
97             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontStyle).Get(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 PointSizeProperty = BindableProperty.Create(nameof(PointSize), typeof(float), typeof(TextLabel), default(float), 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.PointSize, new Tizen.NUI.PropertyValue((float)newValue));
108             }
109         }),
110         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
111         {
112             var textLabel = (TextLabel)bindable;
113             float temp = 0.0f;
114             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.PointSize).Get(out temp);
115             return temp;
116         }));
117         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
118         [EditorBrowsable(EditorBrowsableState.Never)]
119         public static readonly BindableProperty MultiLineProperty = BindableProperty.Create(nameof(MultiLine), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
120         {
121             var textLabel = (TextLabel)bindable;
122             if (newValue != null)
123             {
124                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MultiLine, new Tizen.NUI.PropertyValue((bool)newValue));
125             }
126         }),
127         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
128         {
129             var textLabel = (TextLabel)bindable;
130             bool temp = false;
131             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MultiLine).Get(out temp);
132             return temp;
133         }));
134         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
135         [EditorBrowsable(EditorBrowsableState.Never)]
136         public static readonly BindableProperty HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment), typeof(TextLabel), HorizontalAlignment.Begin, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
137         {
138             var textLabel = (TextLabel)bindable;
139             string valueToString = "";
140             if (newValue != null)
141             {
142                 valueToString = ((HorizontalAlignment)newValue).GetDescription();
143                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.HorizontalAlignment, new Tizen.NUI.PropertyValue(valueToString));
144             }
145         }),
146         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
147         {
148             var textLabel = (TextLabel)bindable;
149             string temp;
150             if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.HorizontalAlignment).Get(out temp) == false)
151             {
152                 NUILog.Error("HorizontalAlignment get error!");
153             }
154             return temp.GetValueByDescription<HorizontalAlignment>();
155         }));
156         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
157         [EditorBrowsable(EditorBrowsableState.Never)]
158         public static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.Create(nameof(VerticalAlignment), typeof(VerticalAlignment), typeof(TextLabel), VerticalAlignment.Bottom, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
159         {
160             var textLabel = (TextLabel)bindable;
161             string valueToString = "";
162             if (newValue != null)
163             {
164                 valueToString = ((VerticalAlignment)newValue).GetDescription();
165                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalAlignment, new Tizen.NUI.PropertyValue(valueToString));
166             }
167         }),
168         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
169         {
170             var textLabel = (TextLabel)bindable;
171             string temp;
172             if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalAlignment).Get(out temp) == false)
173             {
174                 NUILog.Error("VerticalAlignment get error!");
175             }
176
177             return temp.GetValueByDescription<VerticalAlignment>();
178         }));
179         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
180         [EditorBrowsable(EditorBrowsableState.Never)]
181         public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
182         {
183             var textLabel = (TextLabel)bindable;
184             if (newValue != null)
185             {
186                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextColor, new Tizen.NUI.PropertyValue((Color)newValue));
187             }
188         }),
189         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
190         {
191             var textLabel = (TextLabel)bindable;
192             Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
193             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextColor).Get(temp);
194             return temp;
195         }));
196
197         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
198         [EditorBrowsable(EditorBrowsableState.Never)]
199         public static readonly BindableProperty EnableMarkupProperty = BindableProperty.Create(nameof(EnableMarkup), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
200         {
201             var textLabel = (TextLabel)bindable;
202             if (newValue != null)
203             {
204                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableMarkup, new Tizen.NUI.PropertyValue((bool)newValue));
205             }
206         }),
207         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
208         {
209             var textLabel = (TextLabel)bindable;
210             bool temp = false;
211             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableMarkup).Get(out temp);
212             return temp;
213         }));
214         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
215         [EditorBrowsable(EditorBrowsableState.Never)]
216         public static readonly BindableProperty EnableAutoScrollProperty = BindableProperty.Create(nameof(EnableAutoScroll), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
217         {
218             var textLabel = (TextLabel)bindable;
219             if (newValue != null)
220             {
221                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableAutoScroll, new Tizen.NUI.PropertyValue((bool)newValue));
222             }
223         }),
224         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
225         {
226             var textLabel = (TextLabel)bindable;
227             bool temp = false;
228             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableAutoScroll).Get(out temp);
229             return temp;
230         }));
231         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
232         [EditorBrowsable(EditorBrowsableState.Never)]
233         public static readonly BindableProperty AutoScrollSpeedProperty = BindableProperty.Create(nameof(AutoScrollSpeed), typeof(int), typeof(TextLabel), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
234         {
235             var textLabel = (TextLabel)bindable;
236             if (newValue != null)
237             {
238                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollSpeed, new Tizen.NUI.PropertyValue((int)newValue));
239             }
240         }),
241         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
242         {
243             var textLabel = (TextLabel)bindable;
244             int temp = 0;
245             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollSpeed).Get(out temp);
246             return temp;
247         }));
248         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
249         [EditorBrowsable(EditorBrowsableState.Never)]
250         public static readonly BindableProperty AutoScrollLoopCountProperty = BindableProperty.Create(nameof(AutoScrollLoopCount), typeof(int), typeof(TextLabel), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
251         {
252             var textLabel = (TextLabel)bindable;
253             if (newValue != null)
254             {
255                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopCount, new Tizen.NUI.PropertyValue((int)newValue));
256             }
257         }),
258         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
259         {
260             var textLabel = (TextLabel)bindable;
261             int temp = 0;
262             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopCount).Get(out temp);
263             return temp;
264         }));
265         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
266         [EditorBrowsable(EditorBrowsableState.Never)]
267         public static readonly BindableProperty AutoScrollGapProperty = BindableProperty.Create(nameof(AutoScrollGap), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
268         {
269             var textLabel = (TextLabel)bindable;
270             if (newValue != null)
271             {
272                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollGap, new Tizen.NUI.PropertyValue((float)newValue));
273             }
274         }),
275         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
276         {
277             var textLabel = (TextLabel)bindable;
278             float temp = 0.0f;
279             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollGap).Get(out temp);
280             return temp;
281         }));
282         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
283         [EditorBrowsable(EditorBrowsableState.Never)]
284         public static readonly BindableProperty LineSpacingProperty = BindableProperty.Create(nameof(LineSpacing), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
285         {
286             var textLabel = (TextLabel)bindable;
287             if (newValue != null)
288             {
289                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineSpacing, new Tizen.NUI.PropertyValue((float)newValue));
290             }
291         }),
292         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
293         {
294             var textLabel = (TextLabel)bindable;
295             float temp = 0.0f;
296             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineSpacing).Get(out temp);
297             return temp;
298         }));
299         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
300         [EditorBrowsable(EditorBrowsableState.Never)]
301         public static readonly BindableProperty UnderlineProperty = BindableProperty.Create(nameof(Underline), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
302         {
303             var textLabel = (TextLabel)bindable;
304             if (newValue != null)
305             {
306                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.UNDERLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
307             }
308         }),
309         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
310         {
311             var textLabel = (TextLabel)bindable;
312             PropertyMap temp = new PropertyMap();
313             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.UNDERLINE).Get(temp);
314             return temp;
315         }));
316         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
317         [EditorBrowsable(EditorBrowsableState.Never)]
318         public static readonly BindableProperty ShadowProperty = BindableProperty.Create(nameof(Shadow), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
319         {
320             var textLabel = (TextLabel)bindable;
321             if (newValue != null)
322             {
323                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
324             }
325         }),
326         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
327         {
328             var textLabel = (TextLabel)bindable;
329             PropertyMap temp = new PropertyMap();
330             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
331             return temp;
332         }));
333         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
334         [EditorBrowsable(EditorBrowsableState.Never)]
335         public static readonly BindableProperty TextShadowProperty = BindableProperty.Create(nameof(TextShadow), typeof(TextShadow), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
336         {
337             var textLabel = (TextLabel)bindable;
338             if (newValue != null)
339             {
340                 Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, Property.SHADOW, TextShadow.ToPropertyValue((TextShadow)newValue));
341             }
342         }),
343         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
344         {
345             var textLabel = (TextLabel)bindable;
346             PropertyMap temp = new PropertyMap();
347             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
348             return temp.Empty() ? null : new TextShadow(temp);
349         }));
350         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
351         [EditorBrowsable(EditorBrowsableState.Never)]
352         public static readonly BindableProperty EmbossProperty = BindableProperty.Create(nameof(Emboss), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
353         {
354             var textLabel = (TextLabel)bindable;
355             if (newValue != null)
356             {
357                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EMBOSS, new Tizen.NUI.PropertyValue((string)newValue));
358             }
359         }),
360         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
361         {
362             var textLabel = (TextLabel)bindable;
363             string temp;
364             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EMBOSS).Get(out temp);
365             return temp;
366         }));
367         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
368         [EditorBrowsable(EditorBrowsableState.Never)]
369         public static readonly BindableProperty OutlineProperty = BindableProperty.Create(nameof(Outline), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
370         {
371             var textLabel = (TextLabel)bindable;
372             if (newValue != null)
373             {
374                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.OUTLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
375             }
376         }),
377         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
378         {
379             var textLabel = (TextLabel)bindable;
380             PropertyMap temp = new PropertyMap();
381             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.OUTLINE).Get(temp);
382             return temp;
383         }));
384         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
385         [EditorBrowsable(EditorBrowsableState.Never)]
386         public static readonly BindableProperty PixelSizeProperty = BindableProperty.Create(nameof(PixelSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
387         {
388             var textLabel = (TextLabel)bindable;
389             if (newValue != null)
390             {
391                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.PixelSize, new Tizen.NUI.PropertyValue((float)newValue));
392             }
393         }),
394         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
395         {
396             var textLabel = (TextLabel)bindable;
397             float temp = 0.0f;
398             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.PixelSize).Get(out temp);
399             return temp;
400         }));
401         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
402         [EditorBrowsable(EditorBrowsableState.Never)]
403         public static readonly BindableProperty EllipsisProperty = BindableProperty.Create(nameof(Ellipsis), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
404         {
405             var textLabel = (TextLabel)bindable;
406             if (newValue != null)
407             {
408                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.ELLIPSIS, new Tizen.NUI.PropertyValue((bool)newValue));
409             }
410         }),
411         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
412         {
413             var textLabel = (TextLabel)bindable;
414             bool temp = false;
415             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.ELLIPSIS).Get(out temp);
416             return temp;
417         }));
418         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
419         [EditorBrowsable(EditorBrowsableState.Never)]
420         public static readonly BindableProperty AutoScrollLoopDelayProperty = BindableProperty.Create(nameof(AutoScrollLoopDelay), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
421         {
422             var textLabel = (TextLabel)bindable;
423             if (newValue != null)
424             {
425                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopDelay, new Tizen.NUI.PropertyValue((float)newValue));
426             }
427         }),
428         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
429         {
430             var textLabel = (TextLabel)bindable;
431             float temp = 0.0f;
432             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopDelay).Get(out temp);
433             return temp;
434         }));
435         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
436         [EditorBrowsable(EditorBrowsableState.Never)]
437         public static readonly BindableProperty AutoScrollStopModeProperty = BindableProperty.Create(nameof(AutoScrollStopMode), typeof(AutoScrollStopMode), typeof(TextLabel), AutoScrollStopMode.FinishLoop, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
438         {
439             var textLabel = (TextLabel)bindable;
440             if (newValue != null)
441             {
442                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollStopMode, new Tizen.NUI.PropertyValue((int)newValue));
443             }
444         }),
445         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
446         {
447             var textLabel = (TextLabel)bindable;
448             string temp;
449             if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollStopMode).Get(out temp) == false)
450             {
451                 NUILog.Error("AutoScrollStopMode get error!");
452             }
453             return temp.GetValueByDescription<AutoScrollStopMode>();
454         }));
455         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
456         [EditorBrowsable(EditorBrowsableState.Never)]
457         public static readonly BindableProperty LineWrapModeProperty = BindableProperty.Create(nameof(LineWrapMode), typeof(LineWrapMode), typeof(TextLabel), LineWrapMode.Word, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
458         {
459             var textLabel = (TextLabel)bindable;
460             if (newValue != null)
461             {
462                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineWrapMode, new Tizen.NUI.PropertyValue((int)newValue));
463             }
464         }),
465         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
466         {
467             var textLabel = (TextLabel)bindable;
468             int temp;
469             if (false == Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineWrapMode).Get(out temp))
470             {
471                 NUILog.Error("LineWrapMode get error!");
472             }
473             return (LineWrapMode)temp;
474         }));
475         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
476         [EditorBrowsable(EditorBrowsableState.Never)]
477         public static readonly BindableProperty VerticalLineAlignmentProperty = BindableProperty.Create(nameof(VerticalLineAlignment), typeof(VerticalLineAlignment), typeof(TextLabel), VerticalLineAlignment.Bottom, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
478         {
479             var textLabel = (TextLabel)bindable;
480             if (newValue != null)
481             {
482                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalLineAlignment, new Tizen.NUI.PropertyValue((int)newValue));
483             }
484         }),
485         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
486         {
487             var textLabel = (TextLabel)bindable;
488             int temp = 0;
489             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalLineAlignment).Get(out temp);
490             return (VerticalLineAlignment)temp;
491         }));
492         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
493         [EditorBrowsable(EditorBrowsableState.Never)]
494         public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(MatchSystemLanguageDirection), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
495         {
496             var textLabel = (TextLabel)bindable;
497             if (newValue != null)
498             {
499                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MatchSystemLanguageDirection, new Tizen.NUI.PropertyValue((bool)newValue));
500             }
501         }),
502         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
503         {
504             var textLabel = (TextLabel)bindable;
505             bool temp = false;
506             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MatchSystemLanguageDirection).Get(out temp);
507             return temp;
508         }));
509
510         /// Only for XAML. No need of public API. Make hidden as inhouse API.
511         [EditorBrowsable(EditorBrowsableState.Never)]
512         public static readonly BindableProperty TextFitProperty = BindableProperty.Create(nameof(TextFit), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
513         {
514             var textLabel = (TextLabel)bindable;
515             if (newValue != null)
516             {
517                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextFit, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
518             }
519         }),
520         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
521         {
522             var textLabel = (TextLabel)bindable;
523             PropertyMap temp = new PropertyMap();
524             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextFit).Get(temp);
525             return temp;
526         }));
527
528         /// Only for XAML. No need of public API. Make hidden as inhouse API.
529         [EditorBrowsable(EditorBrowsableState.Never)]
530         public static readonly BindableProperty MinLineSizeProperty = BindableProperty.Create(nameof(MinLineSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
531         {
532             var textLabel = (TextLabel)bindable;
533             if (newValue != null)
534             {
535                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MinLineSize, new Tizen.NUI.PropertyValue((float)newValue));
536             }
537         }),
538         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
539         {
540             var textLabel = (TextLabel)bindable;
541             float temp = 0.0f;
542             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MinLineSize).Get(out temp);
543             return temp;
544         }));
545
546         [EditorBrowsable(EditorBrowsableState.Never)]
547         public static readonly BindableProperty FontSizeScaleProperty = BindableProperty.Create(nameof(FontSizeScale), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
548         {
549             var textLabel = (TextLabel)bindable;
550             if (newValue != null)
551             {
552                 using (var property = new Tizen.NUI.PropertyValue((float)newValue))
553                 {
554                     Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontSizeScale, property);
555                 }
556             }
557         }),
558         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
559         {
560             var textLabel = (TextLabel)bindable;
561             float temp;
562             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontSizeScale).Get(out temp);
563             return temp;
564         }));
565
566         #region Selectors
567         internal static readonly BindableProperty TranslatableTextSelectorProperty = BindableProperty.Create("TranslatableTextSelector", typeof(Selector<string>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
568         {
569             var textLabel = (TextLabel)bindable;
570             textLabel.SelectorData.TranslatableText.Update(textLabel, (Selector<string>)newValue, true);
571         },
572         defaultValueCreator: (bindable) =>
573         {
574             var textLabel = (TextLabel)bindable;
575             return textLabel.SelectorData.TranslatableText.Get(textLabel);
576         });
577         internal static readonly BindableProperty TextSelectorProperty = BindableProperty.Create("TextSelector", typeof(Selector<string>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
578         {
579             var textLabel = (TextLabel)bindable;
580             textLabel.SelectorData.Text.Update(textLabel, (Selector<string>)newValue, true);
581         },
582         defaultValueCreator: (bindable) =>
583         {
584             var textLabel = (TextLabel)bindable;
585             return textLabel.SelectorData.Text.Get(textLabel);
586         });
587         internal static readonly BindableProperty FontFamilySelectorProperty = BindableProperty.Create("FontFamilySelector", typeof(Selector<string>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
588         {
589             var textLabel = (TextLabel)bindable;
590             textLabel.SelectorData.FontFamily.Update(textLabel, (Selector<string>)newValue, true);
591         },
592         defaultValueCreator: (bindable) =>
593         {
594             var textLabel = (TextLabel)bindable;
595             return textLabel.SelectorData.FontFamily.Get(textLabel);
596         });
597         internal static readonly BindableProperty PointSizeSelectorProperty = BindableProperty.Create("PointSizeSelector", typeof(Selector<float?>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
598         {
599             var textLabel = (TextLabel)bindable;
600             textLabel.SelectorData.PointSize.Update(textLabel, (Selector<float?>)newValue, true);
601         },
602         defaultValueCreator: (bindable) =>
603         {
604             var textLabel = (TextLabel)bindable;
605             return textLabel.SelectorData.PointSize.Get(textLabel);
606         });
607         internal static readonly BindableProperty TextColorSelectorProperty = BindableProperty.Create("TextColorSelector", typeof(Selector<Color>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
608         {
609             var textLabel = (TextLabel)bindable;
610             textLabel.SelectorData.TextColor.Update(textLabel, (Selector<Color>)newValue, true);
611         },
612         defaultValueCreator: (bindable) =>
613         {
614             var textLabel = (TextLabel)bindable;
615             return textLabel.SelectorData.TextColor.Get(textLabel);
616         });
617
618         internal static readonly BindableProperty TextShadowSelectorProperty = BindableProperty.Create("TextShadowSelector", typeof(Selector<TextShadow>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
619         {
620             var textLabel = (TextLabel)bindable;
621             textLabel.SelectorData.TextShadow.Update(textLabel, (Selector<TextShadow>)newValue, true);
622         },
623         defaultValueCreator: (bindable) =>
624         {
625             var textLabel = (TextLabel)bindable;
626             return textLabel.SelectorData.TextShadow.Get(textLabel);
627         });
628
629         internal static readonly BindableProperty PixelSizeSelectorProperty = BindableProperty.Create("PixelSizeSelector", typeof(Selector<float?>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
630         {
631             var textLabel = (TextLabel)bindable;
632             ((TextLabel)bindable).SelectorData.PixelSize.Update(textLabel, (Selector<float?>)newValue, true);
633         },
634         defaultValueCreator: (bindable) =>
635         {
636             var textLabel = (TextLabel)bindable;
637             return textLabel.SelectorData.PixelSize.Get(textLabel);
638         });
639         #endregion
640
641     }
642 }