2 * Copyright(c) 2020 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 extern alias TizenSystemSettings;
19 using TizenSystemSettings.Tizen.System;
20 using System.ComponentModel;
21 using Tizen.NUI.Binding;
23 namespace Tizen.NUI.BaseComponents
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 />
29 /// <since_tizen> 3 </since_tizen>
30 public partial class TextLabel
35 [EditorBrowsable(EditorBrowsableState.Never)]
36 public static readonly BindableProperty TranslatableTextProperty = BindableProperty.Create(nameof(TranslatableText), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
38 var textLabel = (TextLabel)bindable;
41 textLabel.translatableText = (string)newValue;
44 defaultValueCreator: (bindable) =>
46 var textLabel = (TextLabel)bindable;
47 return textLabel.translatableText;
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) =>
53 var textLabel = (TextLabel)bindable;
56 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TEXT, new Tizen.NUI.PropertyValue((string)newValue));
59 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
61 var textLabel = (TextLabel)bindable;
63 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TEXT).Get(out temp);
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) =>
70 var textLabel = (TextLabel)bindable;
73 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontFamily, new Tizen.NUI.PropertyValue((string)newValue));
76 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
78 var textLabel = (TextLabel)bindable;
80 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontFamily).Get(out temp);
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) =>
87 var textLabel = (TextLabel)bindable;
90 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontStyle, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
93 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
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);
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) =>
104 var textLabel = (TextLabel)bindable;
105 if (newValue != null)
107 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.PointSize, new Tizen.NUI.PropertyValue((float)newValue));
110 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
112 var textLabel = (TextLabel)bindable;
114 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.PointSize).Get(out temp);
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) =>
121 var textLabel = (TextLabel)bindable;
122 if (newValue != null)
124 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MultiLine, new Tizen.NUI.PropertyValue((bool)newValue));
127 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
129 var textLabel = (TextLabel)bindable;
131 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MultiLine).Get(out temp);
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) =>
138 var textLabel = (TextLabel)bindable;
139 string valueToString = "";
140 if (newValue != null)
142 valueToString = ((HorizontalAlignment)newValue).GetDescription();
143 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.HorizontalAlignment, new Tizen.NUI.PropertyValue(valueToString));
146 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
148 var textLabel = (TextLabel)bindable;
150 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.HorizontalAlignment).Get(out temp) == false)
152 NUILog.Error("HorizontalAlignment get error!");
154 return temp.GetValueByDescription<HorizontalAlignment>();
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) =>
160 var textLabel = (TextLabel)bindable;
161 string valueToString = "";
162 if (newValue != null)
164 valueToString = ((VerticalAlignment)newValue).GetDescription();
165 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalAlignment, new Tizen.NUI.PropertyValue(valueToString));
168 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
170 var textLabel = (TextLabel)bindable;
172 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalAlignment).Get(out temp) == false)
174 NUILog.Error("VerticalAlignment get error!");
177 return temp.GetValueByDescription<VerticalAlignment>();
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) =>
183 var textLabel = (TextLabel)bindable;
184 if (newValue != null)
186 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextColor, new Tizen.NUI.PropertyValue((Color)newValue));
189 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
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);
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) =>
201 var textLabel = (TextLabel)bindable;
202 if (newValue != null)
204 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableMarkup, new Tizen.NUI.PropertyValue((bool)newValue));
207 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
209 var textLabel = (TextLabel)bindable;
211 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableMarkup).Get(out temp);
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) =>
218 var textLabel = (TextLabel)bindable;
219 if (newValue != null)
221 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableAutoScroll, new Tizen.NUI.PropertyValue((bool)newValue));
224 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
226 var textLabel = (TextLabel)bindable;
228 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableAutoScroll).Get(out temp);
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) =>
235 var textLabel = (TextLabel)bindable;
236 if (newValue != null)
238 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollSpeed, new Tizen.NUI.PropertyValue((int)newValue));
241 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
243 var textLabel = (TextLabel)bindable;
245 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollSpeed).Get(out temp);
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) =>
252 var textLabel = (TextLabel)bindable;
253 if (newValue != null)
255 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopCount, new Tizen.NUI.PropertyValue((int)newValue));
258 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
260 var textLabel = (TextLabel)bindable;
262 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopCount).Get(out temp);
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) =>
269 var textLabel = (TextLabel)bindable;
270 if (newValue != null)
272 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollGap, new Tizen.NUI.PropertyValue((float)newValue));
275 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
277 var textLabel = (TextLabel)bindable;
279 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollGap).Get(out temp);
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) =>
286 var textLabel = (TextLabel)bindable;
287 if (newValue != null)
289 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineSpacing, new Tizen.NUI.PropertyValue((float)newValue));
292 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
294 var textLabel = (TextLabel)bindable;
296 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineSpacing).Get(out temp);
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) =>
303 var textLabel = (TextLabel)bindable;
304 if (newValue != null)
306 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.UNDERLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
309 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
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);
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) =>
320 var textLabel = (TextLabel)bindable;
321 if (newValue != null)
323 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
326 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
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);
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) =>
337 var textLabel = (TextLabel)bindable;
338 if (newValue != null)
340 Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, Property.SHADOW, TextShadow.ToPropertyValue((TextShadow)newValue));
343 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
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);
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) =>
354 var textLabel = (TextLabel)bindable;
355 if (newValue != null)
357 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EMBOSS, new Tizen.NUI.PropertyValue((string)newValue));
360 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
362 var textLabel = (TextLabel)bindable;
364 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EMBOSS).Get(out temp);
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) =>
371 var textLabel = (TextLabel)bindable;
372 if (newValue != null)
374 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.OUTLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
377 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
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);
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) =>
388 var textLabel = (TextLabel)bindable;
389 if (newValue != null)
391 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.PixelSize, new Tizen.NUI.PropertyValue((float)newValue));
394 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
396 var textLabel = (TextLabel)bindable;
398 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.PixelSize).Get(out temp);
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) =>
405 var textLabel = (TextLabel)bindable;
406 if (newValue != null)
408 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.ELLIPSIS, new Tizen.NUI.PropertyValue((bool)newValue));
411 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
413 var textLabel = (TextLabel)bindable;
415 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.ELLIPSIS).Get(out temp);
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) =>
422 var textLabel = (TextLabel)bindable;
423 if (newValue != null)
425 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopDelay, new Tizen.NUI.PropertyValue((float)newValue));
428 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
430 var textLabel = (TextLabel)bindable;
432 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopDelay).Get(out temp);
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) =>
439 var textLabel = (TextLabel)bindable;
440 if (newValue != null)
442 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollStopMode, new Tizen.NUI.PropertyValue((int)newValue));
445 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
447 var textLabel = (TextLabel)bindable;
449 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollStopMode).Get(out temp) == false)
451 NUILog.Error("AutoScrollStopMode get error!");
453 return temp.GetValueByDescription<AutoScrollStopMode>();
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) =>
459 var textLabel = (TextLabel)bindable;
460 if (newValue != null)
462 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineWrapMode, new Tizen.NUI.PropertyValue((int)newValue));
465 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
467 var textLabel = (TextLabel)bindable;
469 if (false == Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineWrapMode).Get(out temp))
471 NUILog.Error("LineWrapMode get error!");
473 return (LineWrapMode)temp;
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) =>
479 var textLabel = (TextLabel)bindable;
480 if (newValue != null)
482 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalLineAlignment, new Tizen.NUI.PropertyValue((int)newValue));
485 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
487 var textLabel = (TextLabel)bindable;
489 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalLineAlignment).Get(out temp);
490 return (VerticalLineAlignment)temp;
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) =>
496 var textLabel = (TextLabel)bindable;
497 if (newValue != null)
499 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MatchSystemLanguageDirection, new Tizen.NUI.PropertyValue((bool)newValue));
502 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
504 var textLabel = (TextLabel)bindable;
506 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MatchSystemLanguageDirection).Get(out temp);
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) =>
514 var textLabel = (TextLabel)bindable;
515 if (newValue != null)
517 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextFit, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
520 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
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);
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) =>
532 var textLabel = (TextLabel)bindable;
533 if (newValue != null)
535 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MinLineSize, new Tizen.NUI.PropertyValue((float)newValue));
538 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
540 var textLabel = (TextLabel)bindable;
542 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MinLineSize).Get(out temp);
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) =>
549 var textLabel = (TextLabel)bindable;
550 if (newValue != null)
552 using (var property = new Tizen.NUI.PropertyValue((float)newValue))
554 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontSizeScale, property);
558 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
560 var textLabel = (TextLabel)bindable;
562 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontSizeScale).Get(out temp);
567 internal static readonly BindableProperty TranslatableTextSelectorProperty = BindableProperty.Create("TranslatableTextSelector", typeof(Selector<string>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
569 var textLabel = (TextLabel)bindable;
570 textLabel.SelectorData.TranslatableText.Update(textLabel, (Selector<string>)newValue, true);
572 defaultValueCreator: (bindable) =>
574 var textLabel = (TextLabel)bindable;
575 return textLabel.SelectorData.TranslatableText.Get(textLabel);
577 internal static readonly BindableProperty TextSelectorProperty = BindableProperty.Create("TextSelector", typeof(Selector<string>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
579 var textLabel = (TextLabel)bindable;
580 textLabel.SelectorData.Text.Update(textLabel, (Selector<string>)newValue, true);
582 defaultValueCreator: (bindable) =>
584 var textLabel = (TextLabel)bindable;
585 return textLabel.SelectorData.Text.Get(textLabel);
587 internal static readonly BindableProperty FontFamilySelectorProperty = BindableProperty.Create("FontFamilySelector", typeof(Selector<string>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
589 var textLabel = (TextLabel)bindable;
590 textLabel.SelectorData.FontFamily.Update(textLabel, (Selector<string>)newValue, true);
592 defaultValueCreator: (bindable) =>
594 var textLabel = (TextLabel)bindable;
595 return textLabel.SelectorData.FontFamily.Get(textLabel);
597 internal static readonly BindableProperty PointSizeSelectorProperty = BindableProperty.Create("PointSizeSelector", typeof(Selector<float?>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
599 var textLabel = (TextLabel)bindable;
600 textLabel.SelectorData.PointSize.Update(textLabel, (Selector<float?>)newValue, true);
602 defaultValueCreator: (bindable) =>
604 var textLabel = (TextLabel)bindable;
605 return textLabel.SelectorData.PointSize.Get(textLabel);
607 internal static readonly BindableProperty TextColorSelectorProperty = BindableProperty.Create("TextColorSelector", typeof(Selector<Color>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
609 var textLabel = (TextLabel)bindable;
610 textLabel.SelectorData.TextColor.Update(textLabel, (Selector<Color>)newValue, true);
612 defaultValueCreator: (bindable) =>
614 var textLabel = (TextLabel)bindable;
615 return textLabel.SelectorData.TextColor.Get(textLabel);
618 internal static readonly BindableProperty TextShadowSelectorProperty = BindableProperty.Create("TextShadowSelector", typeof(Selector<TextShadow>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
620 var textLabel = (TextLabel)bindable;
621 textLabel.SelectorData.TextShadow.Update(textLabel, (Selector<TextShadow>)newValue, true);
623 defaultValueCreator: (bindable) =>
625 var textLabel = (TextLabel)bindable;
626 return textLabel.SelectorData.TextShadow.Get(textLabel);
629 internal static readonly BindableProperty PixelSizeSelectorProperty = BindableProperty.Create("PixelSizeSelector", typeof(Selector<float?>), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
631 var textLabel = (TextLabel)bindable;
632 ((TextLabel)bindable).SelectorData.PixelSize.Update(textLabel, (Selector<float?>)newValue, true);
634 defaultValueCreator: (bindable) =>
636 var textLabel = (TextLabel)bindable;
637 return textLabel.SelectorData.PixelSize.Get(textLabel);