2 * Copyright(c) 2021 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 System.ComponentModel;
20 using Tizen.NUI.Binding;
22 namespace Tizen.NUI.BaseComponents
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 />
28 /// <since_tizen> 3 </since_tizen>
29 public partial class TextLabel
34 [EditorBrowsable(EditorBrowsableState.Never)]
35 public static readonly BindableProperty TranslatableTextProperty = BindableProperty.Create(nameof(TranslatableText), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
37 var textLabel = (TextLabel)bindable;
39 if (newValue is Selector<string> selector)
41 textLabel.TranslatableTextSelector = selector;
45 textLabel.selectorData?.TranslatableText?.Reset(textLabel);
46 textLabel.SetTranslatableText((string)newValue);
49 defaultValueCreator: (bindable) =>
51 var textLabel = (TextLabel)bindable;
52 return textLabel.translatableText;
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) =>
58 var textLabel = (TextLabel)bindable;
60 if (newValue is Selector<string> selector)
62 textLabel.TextSelector = selector;
66 textLabel.selectorData?.Text?.Reset(textLabel);
67 textLabel.SetText((string)newValue);
70 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
72 var textLabel = (TextLabel)bindable;
74 return Object.InternalGetPropertyString(textLabel.SwigCPtr, TextLabel.Property.TEXT);
76 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
77 [EditorBrowsable(EditorBrowsableState.Never)]
78 public static readonly BindableProperty FontFamilyProperty = BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
80 var textLabel = (TextLabel)bindable;
82 if (newValue is Selector<string> selector)
84 textLabel.FontFamilySelector = selector;
88 textLabel.selectorData?.FontFamily?.Reset(textLabel);
89 textLabel.SetFontFamily((string)newValue);
92 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
94 var textLabel = (TextLabel)bindable;
95 return textLabel.InternalFontFamily;
97 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
98 [EditorBrowsable(EditorBrowsableState.Never)]
99 public static readonly BindableProperty FontStyleProperty = BindableProperty.Create(nameof(FontStyle), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
101 var textLabel = (TextLabel)bindable;
102 if (newValue != null)
104 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontStyle, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
105 textLabel.RequestLayout();
108 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
110 var textLabel = (TextLabel)bindable;
111 PropertyMap temp = new PropertyMap();
112 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontStyle).Get(temp);
115 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
116 [EditorBrowsable(EditorBrowsableState.Never)]
117 public static readonly BindableProperty PointSizeProperty = BindableProperty.Create(nameof(PointSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
119 var textLabel = (TextLabel)bindable;
121 if (newValue is Selector<float?> selector)
123 textLabel.PointSizeSelector = selector;
127 textLabel.selectorData?.PointSize?.Reset(textLabel);
128 textLabel.SetPointSize((float?)newValue);
131 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
133 var textLabel = (TextLabel)bindable;
135 return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.PointSize);
137 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
138 [EditorBrowsable(EditorBrowsableState.Never)]
139 public static readonly BindableProperty MultiLineProperty = BindableProperty.Create(nameof(MultiLine), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
141 var textLabel = (TextLabel)bindable;
142 if (newValue != null)
145 Object.InternalSetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.MultiLine, (bool)newValue);
146 textLabel.RequestLayout();
149 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
151 var textLabel = (TextLabel)bindable;
153 return Object.InternalGetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.MultiLine);
155 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
156 [EditorBrowsable(EditorBrowsableState.Never)]
157 public static readonly BindableProperty HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment), typeof(TextLabel), HorizontalAlignment.Begin, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
159 var textLabel = (TextLabel)bindable;
160 if (newValue != null)
163 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.HorizontalAlignment, (int)newValue);
166 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
168 var textLabel = (TextLabel)bindable;
171 temp = Object.InternalGetPropertyString(textLabel.SwigCPtr, TextLabel.Property.HorizontalAlignment);
172 if (System.String.IsNullOrEmpty(temp))
174 return HorizontalAlignment.Begin; // Return default value.
177 if (temp.Equals("BEGIN"))
179 return HorizontalAlignment.Begin;
181 else if (temp.Equals("CENTER"))
183 return HorizontalAlignment.Center;
187 return HorizontalAlignment.End;
190 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
191 [EditorBrowsable(EditorBrowsableState.Never)]
192 public static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.Create(nameof(VerticalAlignment), typeof(VerticalAlignment), typeof(TextLabel), VerticalAlignment.Bottom, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
194 var textLabel = (TextLabel)bindable;
195 if (newValue != null)
198 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.VerticalAlignment, (int)newValue);
201 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
203 var textLabel = (TextLabel)bindable;
206 temp = Object.InternalGetPropertyString(textLabel.SwigCPtr, TextLabel.Property.VerticalAlignment);
207 if (System.String.IsNullOrEmpty(temp))
209 return VerticalAlignment.Top; // Return default value.
212 if (temp.Equals("TOP"))
214 return VerticalAlignment.Top;
216 else if (temp.Equals("CENTER"))
218 return VerticalAlignment.Center;
222 return VerticalAlignment.Bottom;
225 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
226 [EditorBrowsable(EditorBrowsableState.Never)]
227 public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
229 var textLabel = (TextLabel)bindable;
231 if (newValue is Selector<Color> selector)
233 textLabel.TextColorSelector = selector;
237 textLabel.selectorData?.TextColor?.Reset(textLabel);
238 textLabel.SetTextColor((Color)newValue);
241 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
243 var textLabel = (TextLabel)bindable;
245 if (textLabel.internalTextColor == null)
247 textLabel.internalTextColor = new Color(0, 0, 0, 0);
249 Object.InternalRetrievingPropertyVector4(textLabel.SwigCPtr, TextLabel.Property.TextColor, textLabel.internalTextColor.SwigCPtr);
250 return textLabel.internalTextColor;
253 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
254 [EditorBrowsable(EditorBrowsableState.Never)]
255 public static readonly BindableProperty EnableMarkupProperty = BindableProperty.Create(nameof(EnableMarkup), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
257 var textLabel = (TextLabel)bindable;
258 if (newValue != null)
261 Object.InternalSetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.EnableMarkup, (bool)newValue);
264 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
266 var textLabel = (TextLabel)bindable;
268 return Object.InternalGetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.EnableMarkup);
270 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
271 [EditorBrowsable(EditorBrowsableState.Never)]
272 public static readonly BindableProperty EnableAutoScrollProperty = BindableProperty.Create(nameof(EnableAutoScroll), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
274 var textLabel = (TextLabel)bindable;
275 if (newValue != null)
278 Object.InternalSetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.EnableAutoScroll, (bool)newValue);
281 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
283 var textLabel = (TextLabel)bindable;
285 return Object.InternalGetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.EnableAutoScroll);
287 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
288 [EditorBrowsable(EditorBrowsableState.Never)]
289 public static readonly BindableProperty AutoScrollSpeedProperty = BindableProperty.Create(nameof(AutoScrollSpeed), typeof(int), typeof(TextLabel), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
291 var textLabel = (TextLabel)bindable;
292 if (newValue != null)
295 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.AutoScrollSpeed, (int)newValue);
298 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
300 var textLabel = (TextLabel)bindable;
302 return Object.InternalGetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.AutoScrollSpeed);
304 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
305 [EditorBrowsable(EditorBrowsableState.Never)]
306 public static readonly BindableProperty AutoScrollLoopCountProperty = BindableProperty.Create(nameof(AutoScrollLoopCount), typeof(int), typeof(TextLabel), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
308 var textLabel = (TextLabel)bindable;
309 if (newValue != null)
312 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopCount, (int)newValue);
315 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
317 var textLabel = (TextLabel)bindable;
319 return Object.InternalGetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopCount);
321 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
322 [EditorBrowsable(EditorBrowsableState.Never)]
323 public static readonly BindableProperty AutoScrollGapProperty = BindableProperty.Create(nameof(AutoScrollGap), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
325 var textLabel = (TextLabel)bindable;
326 if (newValue != null)
329 Object.InternalSetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.AutoScrollGap, (float)newValue);
332 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
334 var textLabel = (TextLabel)bindable;
336 return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.AutoScrollGap);
338 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
339 [EditorBrowsable(EditorBrowsableState.Never)]
340 public static readonly BindableProperty LineSpacingProperty = BindableProperty.Create(nameof(LineSpacing), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
342 var textLabel = (TextLabel)bindable;
343 if (newValue != null)
346 Object.InternalSetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.LineSpacing, (float)newValue);
347 textLabel.RequestLayout();
350 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
352 var textLabel = (TextLabel)bindable;
354 return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.LineSpacing);
356 [EditorBrowsable(EditorBrowsableState.Never)]
357 public static readonly BindableProperty RelativeLineHeightProperty = BindableProperty.Create(nameof(RelativeLineHeight), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
359 var textLabel = (TextLabel)bindable;
360 if (newValue != null)
363 Object.InternalSetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.RelativeLineHeight, (float)newValue);
366 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
368 var textLabel = (TextLabel)bindable;
370 return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.RelativeLineHeight);
372 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
373 [EditorBrowsable(EditorBrowsableState.Never)]
374 public static readonly BindableProperty UnderlineProperty = BindableProperty.Create(nameof(Underline), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
376 var textLabel = (TextLabel)bindable;
377 if (newValue != null)
379 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.UNDERLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
382 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
384 var textLabel = (TextLabel)bindable;
385 PropertyMap temp = new PropertyMap();
386 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.UNDERLINE).Get(temp);
390 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
391 [EditorBrowsable(EditorBrowsableState.Never)]
392 public static readonly BindableProperty ShadowProperty = BindableProperty.Create(nameof(Shadow), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
394 var textLabel = (TextLabel)bindable;
395 if (newValue != null)
397 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
400 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
402 var textLabel = (TextLabel)bindable;
403 PropertyMap temp = new PropertyMap();
404 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
407 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
408 [EditorBrowsable(EditorBrowsableState.Never)]
409 public static readonly BindableProperty TextShadowProperty = BindableProperty.Create(nameof(TextShadow), typeof(TextShadow), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
411 var textLabel = (TextLabel)bindable;
413 if (newValue is Selector<TextShadow> selector)
415 textLabel.TextShadowSelector = selector;
419 textLabel.selectorData?.TextShadow?.Reset(textLabel);
420 textLabel.SetTextShadow((TextShadow)newValue);
423 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
425 var textLabel = (TextLabel)bindable;
426 PropertyMap temp = new PropertyMap();
427 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
428 return temp.Empty() ? null : new TextShadow(temp);
430 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
431 [EditorBrowsable(EditorBrowsableState.Never)]
432 public static readonly BindableProperty EmbossProperty = BindableProperty.Create(nameof(Emboss), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
434 var textLabel = (TextLabel)bindable;
435 if (newValue != null)
438 Object.InternalSetPropertyString(textLabel.SwigCPtr, TextLabel.Property.EMBOSS, (string)newValue);
441 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
443 var textLabel = (TextLabel)bindable;
445 return Object.InternalGetPropertyString(textLabel.SwigCPtr, TextLabel.Property.EMBOSS);
447 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
448 [EditorBrowsable(EditorBrowsableState.Never)]
449 public static readonly BindableProperty OutlineProperty = BindableProperty.Create(nameof(Outline), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
451 var textLabel = (TextLabel)bindable;
452 if (newValue != null)
454 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.OUTLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
457 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
459 var textLabel = (TextLabel)bindable;
460 PropertyMap temp = new PropertyMap();
461 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.OUTLINE).Get(temp);
464 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
465 [EditorBrowsable(EditorBrowsableState.Never)]
466 public static readonly BindableProperty PixelSizeProperty = BindableProperty.Create(nameof(PixelSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
468 var textLabel = (TextLabel)bindable;
470 if (newValue is Selector<float?> selector)
472 textLabel.PixelSizeSelector = selector;
476 textLabel.selectorData?.PixelSize?.Reset(textLabel);
477 textLabel.SetPixelSize((float?)newValue);
480 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
482 var textLabel = (TextLabel)bindable;
484 return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.PixelSize);
486 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
487 [EditorBrowsable(EditorBrowsableState.Never)]
488 public static readonly BindableProperty EllipsisProperty = BindableProperty.Create(nameof(Ellipsis), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
490 var textLabel = (TextLabel)bindable;
491 if (newValue != null)
494 Object.InternalSetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.ELLIPSIS, (bool)newValue);
497 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
499 var textLabel = (TextLabel)bindable;
501 return Object.InternalGetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.ELLIPSIS);
503 /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
504 [EditorBrowsable(EditorBrowsableState.Never)]
505 public static readonly BindableProperty EllipsisPositionProperty = BindableProperty.Create(nameof(EllipsisPosition), typeof(EllipsisPosition), typeof(TextLabel), EllipsisPosition.End, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
507 var textLabel = (TextLabel)bindable;
508 if (newValue != null)
511 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.EllipsisPosition, (int)newValue);
514 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
516 var textLabel = (TextLabel)bindable;
518 return (EllipsisPosition)Object.InternalGetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.EllipsisPosition);
520 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
521 [EditorBrowsable(EditorBrowsableState.Never)]
522 public static readonly BindableProperty AutoScrollLoopDelayProperty = BindableProperty.Create(nameof(AutoScrollLoopDelay), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
524 var textLabel = (TextLabel)bindable;
525 if (newValue != null)
528 Object.InternalSetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopDelay, (float)newValue);
531 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
533 var textLabel = (TextLabel)bindable;
535 return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopDelay);
537 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
538 [EditorBrowsable(EditorBrowsableState.Never)]
539 public static readonly BindableProperty AutoScrollStopModeProperty = BindableProperty.Create(nameof(AutoScrollStopMode), typeof(AutoScrollStopMode), typeof(TextLabel), AutoScrollStopMode.FinishLoop, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
541 var textLabel = (TextLabel)bindable;
542 if (newValue != null)
545 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.AutoScrollStopMode, (int)newValue);
548 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
550 var textLabel = (TextLabel)bindable;
553 temp = Object.InternalGetPropertyString(textLabel.SwigCPtr, TextLabel.Property.AutoScrollStopMode);
554 return temp.GetValueByDescription<AutoScrollStopMode>();
556 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
557 [EditorBrowsable(EditorBrowsableState.Never)]
558 public static readonly BindableProperty LineWrapModeProperty = BindableProperty.Create(nameof(LineWrapMode), typeof(LineWrapMode), typeof(TextLabel), LineWrapMode.Word, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
560 var textLabel = (TextLabel)bindable;
561 if (newValue != null)
564 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.LineWrapMode, (int)newValue);
567 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
569 var textLabel = (TextLabel)bindable;
571 return (LineWrapMode)Object.InternalGetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.LineWrapMode);
573 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
574 [EditorBrowsable(EditorBrowsableState.Never)]
575 public static readonly BindableProperty VerticalLineAlignmentProperty = BindableProperty.Create(nameof(VerticalLineAlignment), typeof(VerticalLineAlignment), typeof(TextLabel), VerticalLineAlignment.Bottom, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
577 var textLabel = (TextLabel)bindable;
578 if (newValue != null)
581 Object.InternalSetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.VerticalLineAlignment, (int)newValue);
584 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
586 var textLabel = (TextLabel)bindable;
588 return (VerticalLineAlignment)Object.InternalGetPropertyInt(textLabel.SwigCPtr, TextLabel.Property.VerticalLineAlignment);
590 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
591 [EditorBrowsable(EditorBrowsableState.Never)]
592 public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(MatchSystemLanguageDirection), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
594 var textLabel = (TextLabel)bindable;
595 if (newValue != null)
598 Object.InternalSetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.MatchSystemLanguageDirection, (bool)newValue);
601 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
603 var textLabel = (TextLabel)bindable;
605 return Object.InternalGetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.MatchSystemLanguageDirection);
607 /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
608 [EditorBrowsable(EditorBrowsableState.Never)]
609 public static readonly BindableProperty CharacterSpacingProperty = BindableProperty.Create(nameof(CharacterSpacing), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
611 var textLabel = (TextLabel)bindable;
612 if (newValue != null)
615 Object.InternalSetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.CharacterSpacing, (float)newValue);
618 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
620 var textLabel = (TextLabel)bindable;
622 return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.CharacterSpacing);
624 /// Only for XAML. No need of public API. Make hidden as inhouse API.
625 [EditorBrowsable(EditorBrowsableState.Never)]
626 public static readonly BindableProperty TextFitProperty = BindableProperty.Create(nameof(TextFit), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
628 var textLabel = (TextLabel)bindable;
629 if (newValue != null)
631 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextFit, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
634 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
636 var textLabel = (TextLabel)bindable;
637 PropertyMap temp = new PropertyMap();
638 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextFit).Get(temp);
642 /// Only for XAML. No need of public API. Make hidden as inhouse API.
643 [EditorBrowsable(EditorBrowsableState.Never)]
644 public static readonly BindableProperty MinLineSizeProperty = BindableProperty.Create(nameof(MinLineSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
646 var textLabel = (TextLabel)bindable;
647 if (newValue != null)
650 Object.InternalSetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.MinLineSize, (float)newValue);
651 textLabel.RequestLayout();
654 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
656 var textLabel = (TextLabel)bindable;
658 return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.MinLineSize);
661 [EditorBrowsable(EditorBrowsableState.Never)]
662 public static readonly BindableProperty FontSizeScaleProperty = BindableProperty.Create(nameof(FontSizeScale), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
664 var textLabel = (TextLabel)bindable;
665 if (newValue != null)
667 textLabel.InternalFontSizeScale = (float)newValue;
670 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
672 var textLabel = (TextLabel)bindable;
673 return textLabel.InternalFontSizeScale;
676 [EditorBrowsable(EditorBrowsableState.Never)]
677 public static readonly BindableProperty EnableFontSizeScaleProperty = BindableProperty.Create(nameof(EnableFontSizeScale), typeof(bool), typeof(TextLabel), default(bool), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
679 var textLabel = (TextLabel)bindable;
680 if (newValue != null)
683 Object.InternalSetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.EnableFontSizeScale, (bool)newValue);
684 textLabel.RequestLayout();
687 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
689 var textLabel = (TextLabel)bindable;
691 return Object.InternalGetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.EnableFontSizeScale);
695 /// ShadowOffsetProperty
697 [EditorBrowsable(EditorBrowsableState.Never)]
698 public static readonly BindableProperty ShadowOffsetProperty = BindableProperty.Create(nameof(ShadowOffset), typeof(Tizen.NUI.Vector2), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
700 var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
701 if (newValue != null)
703 instance.InternalShadowOffset = (Tizen.NUI.Vector2)newValue;
706 defaultValueCreator: (bindable) =>
708 var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
709 return instance.InternalShadowOffset;
713 /// ShadowColorProperty
715 [EditorBrowsable(EditorBrowsableState.Never)]
716 public static readonly BindableProperty ShadowColorProperty = BindableProperty.Create(nameof(ShadowColor), typeof(Tizen.NUI.Vector4), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
718 var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
719 if (newValue != null)
721 instance.InternalShadowColor = (Tizen.NUI.Vector4)newValue;
724 defaultValueCreator: (bindable) =>
726 var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
727 return instance.InternalShadowColor;
731 /// UnderlineEnabledProperty
733 [EditorBrowsable(EditorBrowsableState.Never)]
734 public static readonly BindableProperty UnderlineEnabledProperty = BindableProperty.Create(nameof(UnderlineEnabled), typeof(bool), typeof(TextLabel), false, propertyChanged: (bindable, oldValue, newValue) =>
736 var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
737 if (newValue != null)
739 instance.InternalUnderlineEnabled = (bool)newValue;
742 defaultValueCreator: (bindable) =>
744 var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
745 return instance.InternalUnderlineEnabled;
749 /// UnderlineColorProperty
751 [EditorBrowsable(EditorBrowsableState.Never)]
752 public static readonly BindableProperty UnderlineColorProperty = BindableProperty.Create(nameof(UnderlineColor), typeof(Tizen.NUI.Vector4), typeof(TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
754 var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
755 if (newValue != null)
757 instance.InternalUnderlineColor = (Tizen.NUI.Vector4)newValue;
760 defaultValueCreator: (bindable) =>
762 var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
763 return instance.InternalUnderlineColor;
767 /// UnderlineHeightProperty
769 [EditorBrowsable(EditorBrowsableState.Never)]
770 public static readonly BindableProperty UnderlineHeightProperty = BindableProperty.Create(nameof(UnderlineHeight), typeof(float), typeof(TextLabel), 0.0f, propertyChanged: (bindable, oldValue, newValue) =>
772 var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
773 if (newValue != null)
775 instance.InternalUnderlineHeight = (float)newValue;
778 defaultValueCreator: (bindable) =>
780 var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
781 return instance.InternalUnderlineHeight;
784 internal Selector<string> TranslatableTextSelector
786 get => GetSelector<string>(selectorData?.TranslatableText, TextLabel.TranslatableTextProperty);
789 selectorData?.TranslatableText?.Reset(this);
790 if (value == null) return;
792 if (value.HasAll()) SetTranslatableText(value.All);
793 else EnsureSelectorData().TranslatableText = new TriggerableSelector<string>(this, value, SetTranslatableText, true);
797 internal Selector<string> TextSelector
799 get => GetSelector<string>(selectorData?.Text, TextLabel.TextProperty);
802 selectorData?.Text?.Reset(this);
803 if (value == null) return;
805 if (value.HasAll()) SetText(value.All);
806 else EnsureSelectorData().Text = new TriggerableSelector<string>(this, value, SetText, true);
810 internal Selector<string> FontFamilySelector
812 get => GetSelector<string>(selectorData?.FontFamily, TextLabel.FontFamilyProperty);
815 selectorData?.FontFamily?.Reset(this);
816 if (value == null) return;
818 if (value.HasAll()) SetFontFamily(value.All);
819 else EnsureSelectorData().FontFamily = new TriggerableSelector<string>(this, value, SetFontFamily, true);
823 internal Selector<float?> PointSizeSelector
825 get => GetSelector<float?>(selectorData?.PointSize, TextLabel.PointSizeProperty);
828 selectorData?.PointSize?.Reset(this);
829 if (value == null) return;
831 if (value.HasAll()) SetPointSize(value.All);
832 else EnsureSelectorData().PointSize = new TriggerableSelector<float?>(this, value, SetPointSize, true);
836 internal Selector<Color> TextColorSelector
840 var selector = selectorData?.TextColor?.Get();
841 if (selector != null)
846 Color color = new Color();
847 if (!GetProperty(TextLabel.Property.TextColor).Get(color))
851 return new Selector<Color>(color);
855 selectorData?.TextColor?.Reset(this);
856 if (value == null) return;
858 if (value.HasAll()) SetTextColor(value.All);
859 else EnsureSelectorData().TextColor = new TriggerableSelector<Color>(this, value, SetTextColor, true);
863 internal Selector<float?> PixelSizeSelector
865 get => GetSelector<float?>(selectorData?.PixelSize, TextLabel.PixelSizeProperty);
868 selectorData?.PixelSize?.Reset(this);
869 if (value == null) return;
871 if (value.HasAll()) SetPixelSize(value.All);
872 else EnsureSelectorData().PixelSize = new TriggerableSelector<float?>(this, value, SetPixelSize, true);
876 internal Selector<TextShadow> TextShadowSelector
878 get => GetSelector<TextShadow>(selectorData?.TextShadow, TextLabel.TextShadowProperty);
881 selectorData?.TextShadow?.Reset(this);
882 if (value == null) return;
884 if (value.HasAll()) SetTextShadow(value.All);
885 else EnsureSelectorData().TextShadow = new TriggerableSelector<TextShadow>(this, value, SetTextShadow);
889 private void SetTranslatableText(string value)
893 translatableText = value;
897 private void SetText(string value)
902 Object.InternalSetPropertyString(SwigCPtr, TextLabel.Property.TEXT, value);
907 private void SetFontFamily(string value)
911 InternalFontFamily = (string)value;
915 private void SetTextColor(Color value)
920 Object.InternalSetPropertyVector4(SwigCPtr, TextLabel.Property.TextColor, value.SwigCPtr);
924 private void SetPointSize(float? value)
929 Object.InternalSetPropertyFloat(SwigCPtr, TextLabel.Property.PointSize, (float)value);
934 private void SetPixelSize(float? value)
939 Object.InternalSetPropertyFloat(SwigCPtr, TextLabel.Property.PixelSize, (float)value);
944 private void SetTextShadow(TextShadow value)
948 Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, Property.SHADOW, TextShadow.ToPropertyValue(value));