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 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TEXT).Get(out temp);
77 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
78 [EditorBrowsable(EditorBrowsableState.Never)]
79 public static readonly BindableProperty FontFamilyProperty = BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
81 var textLabel = (TextLabel)bindable;
83 if (newValue is Selector<string> selector)
85 textLabel.FontFamilySelector = selector;
89 textLabel.selectorData?.FontFamily?.Reset(textLabel);
90 textLabel.SetFontFamily((string)newValue);
93 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
95 var textLabel = (TextLabel)bindable;
97 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontFamily).Get(out 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 FontStyleProperty = BindableProperty.Create(nameof(FontStyle), typeof(PropertyMap), typeof(TextLabel), null, 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.FontStyle, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
108 textLabel.RequestLayout();
111 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
113 var textLabel = (TextLabel)bindable;
114 PropertyMap temp = new PropertyMap();
115 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontStyle).Get(temp);
118 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
119 [EditorBrowsable(EditorBrowsableState.Never)]
120 public static readonly BindableProperty PointSizeProperty = BindableProperty.Create(nameof(PointSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
122 var textLabel = (TextLabel)bindable;
124 if (newValue is Selector<float?> selector)
126 textLabel.PointSizeSelector = selector;
130 textLabel.selectorData?.PointSize?.Reset(textLabel);
131 textLabel.SetPointSize((float?)newValue);
134 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
136 var textLabel = (TextLabel)bindable;
138 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.PointSize).Get(out temp);
141 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
142 [EditorBrowsable(EditorBrowsableState.Never)]
143 public static readonly BindableProperty MultiLineProperty = BindableProperty.Create(nameof(MultiLine), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
145 var textLabel = (TextLabel)bindable;
146 if (newValue != null)
148 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MultiLine, new Tizen.NUI.PropertyValue((bool)newValue));
149 textLabel.RequestLayout();
152 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
154 var textLabel = (TextLabel)bindable;
156 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MultiLine).Get(out temp);
159 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
160 [EditorBrowsable(EditorBrowsableState.Never)]
161 public static readonly BindableProperty HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment), typeof(TextLabel), HorizontalAlignment.Begin, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
163 var textLabel = (TextLabel)bindable;
164 string valueToString = "";
165 if (newValue != null)
167 valueToString = ((HorizontalAlignment)newValue).GetDescription();
168 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.HorizontalAlignment, new Tizen.NUI.PropertyValue(valueToString));
171 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
173 var textLabel = (TextLabel)bindable;
175 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.HorizontalAlignment).Get(out temp) == false)
177 NUILog.Error("HorizontalAlignment get error!");
179 return temp.GetValueByDescription<HorizontalAlignment>();
181 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
182 [EditorBrowsable(EditorBrowsableState.Never)]
183 public static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.Create(nameof(VerticalAlignment), typeof(VerticalAlignment), typeof(TextLabel), VerticalAlignment.Bottom, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
185 var textLabel = (TextLabel)bindable;
186 string valueToString = "";
187 if (newValue != null)
189 valueToString = ((VerticalAlignment)newValue).GetDescription();
190 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalAlignment, new Tizen.NUI.PropertyValue(valueToString));
193 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
195 var textLabel = (TextLabel)bindable;
197 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalAlignment).Get(out temp) == false)
199 NUILog.Error("VerticalAlignment get error!");
202 return temp.GetValueByDescription<VerticalAlignment>();
204 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
205 [EditorBrowsable(EditorBrowsableState.Never)]
206 public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
208 var textLabel = (TextLabel)bindable;
210 if (newValue is Selector<Color> selector)
212 textLabel.TextColorSelector = selector;
216 textLabel.selectorData?.TextColor?.Reset(textLabel);
217 textLabel.SetTextColor((Color)newValue);
220 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
222 var textLabel = (TextLabel)bindable;
223 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
224 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextColor).Get(temp);
228 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
229 [EditorBrowsable(EditorBrowsableState.Never)]
230 public static readonly BindableProperty EnableMarkupProperty = BindableProperty.Create(nameof(EnableMarkup), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
232 var textLabel = (TextLabel)bindable;
233 if (newValue != null)
235 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableMarkup, new Tizen.NUI.PropertyValue((bool)newValue));
238 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
240 var textLabel = (TextLabel)bindable;
242 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableMarkup).Get(out temp);
245 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
246 [EditorBrowsable(EditorBrowsableState.Never)]
247 public static readonly BindableProperty EnableAutoScrollProperty = BindableProperty.Create(nameof(EnableAutoScroll), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
249 var textLabel = (TextLabel)bindable;
250 if (newValue != null)
252 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableAutoScroll, new Tizen.NUI.PropertyValue((bool)newValue));
255 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
257 var textLabel = (TextLabel)bindable;
259 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableAutoScroll).Get(out temp);
262 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
263 [EditorBrowsable(EditorBrowsableState.Never)]
264 public static readonly BindableProperty AutoScrollSpeedProperty = BindableProperty.Create(nameof(AutoScrollSpeed), typeof(int), typeof(TextLabel), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
266 var textLabel = (TextLabel)bindable;
267 if (newValue != null)
269 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollSpeed, new Tizen.NUI.PropertyValue((int)newValue));
272 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
274 var textLabel = (TextLabel)bindable;
276 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollSpeed).Get(out temp);
279 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
280 [EditorBrowsable(EditorBrowsableState.Never)]
281 public static readonly BindableProperty AutoScrollLoopCountProperty = BindableProperty.Create(nameof(AutoScrollLoopCount), typeof(int), typeof(TextLabel), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
283 var textLabel = (TextLabel)bindable;
284 if (newValue != null)
286 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopCount, new Tizen.NUI.PropertyValue((int)newValue));
289 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
291 var textLabel = (TextLabel)bindable;
293 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopCount).Get(out temp);
296 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
297 [EditorBrowsable(EditorBrowsableState.Never)]
298 public static readonly BindableProperty AutoScrollGapProperty = BindableProperty.Create(nameof(AutoScrollGap), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
300 var textLabel = (TextLabel)bindable;
301 if (newValue != null)
303 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollGap, new Tizen.NUI.PropertyValue((float)newValue));
306 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
308 var textLabel = (TextLabel)bindable;
310 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollGap).Get(out temp);
313 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
314 [EditorBrowsable(EditorBrowsableState.Never)]
315 public static readonly BindableProperty LineSpacingProperty = BindableProperty.Create(nameof(LineSpacing), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
317 var textLabel = (TextLabel)bindable;
318 if (newValue != null)
320 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineSpacing, new Tizen.NUI.PropertyValue((float)newValue));
321 textLabel.RequestLayout();
324 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
326 var textLabel = (TextLabel)bindable;
328 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineSpacing).Get(out temp);
331 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
332 [EditorBrowsable(EditorBrowsableState.Never)]
333 public static readonly BindableProperty UnderlineProperty = BindableProperty.Create(nameof(Underline), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
335 var textLabel = (TextLabel)bindable;
336 if (newValue != null)
338 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.UNDERLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
341 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
343 var textLabel = (TextLabel)bindable;
344 PropertyMap temp = new PropertyMap();
345 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.UNDERLINE).Get(temp);
348 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
349 [EditorBrowsable(EditorBrowsableState.Never)]
350 public static readonly BindableProperty ShadowProperty = BindableProperty.Create(nameof(Shadow), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
352 var textLabel = (TextLabel)bindable;
353 if (newValue != null)
355 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
358 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
360 var textLabel = (TextLabel)bindable;
361 PropertyMap temp = new PropertyMap();
362 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
365 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
366 [EditorBrowsable(EditorBrowsableState.Never)]
367 public static readonly BindableProperty TextShadowProperty = BindableProperty.Create(nameof(TextShadow), typeof(TextShadow), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
369 var textLabel = (TextLabel)bindable;
371 if (newValue is Selector<TextShadow> selector)
373 textLabel.TextShadowSelector = selector;
377 textLabel.selectorData?.TextShadow?.Reset(textLabel);
378 textLabel.SetTextShadow((TextShadow)newValue);
381 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
383 var textLabel = (TextLabel)bindable;
384 PropertyMap temp = new PropertyMap();
385 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.SHADOW).Get(temp);
386 return temp.Empty() ? null : new TextShadow(temp);
388 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
389 [EditorBrowsable(EditorBrowsableState.Never)]
390 public static readonly BindableProperty EmbossProperty = BindableProperty.Create(nameof(Emboss), typeof(string), typeof(TextLabel), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
392 var textLabel = (TextLabel)bindable;
393 if (newValue != null)
395 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EMBOSS, new Tizen.NUI.PropertyValue((string)newValue));
398 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
400 var textLabel = (TextLabel)bindable;
402 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EMBOSS).Get(out temp);
405 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
406 [EditorBrowsable(EditorBrowsableState.Never)]
407 public static readonly BindableProperty OutlineProperty = BindableProperty.Create(nameof(Outline), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
409 var textLabel = (TextLabel)bindable;
410 if (newValue != null)
412 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.OUTLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
415 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
417 var textLabel = (TextLabel)bindable;
418 PropertyMap temp = new PropertyMap();
419 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.OUTLINE).Get(temp);
422 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
423 [EditorBrowsable(EditorBrowsableState.Never)]
424 public static readonly BindableProperty PixelSizeProperty = BindableProperty.Create(nameof(PixelSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
426 var textLabel = (TextLabel)bindable;
428 if (newValue is Selector<float?> selector)
430 textLabel.PixelSizeSelector = selector;
434 textLabel.selectorData?.PixelSize?.Reset(textLabel);
435 textLabel.SetPixelSize((float?)newValue);
438 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
440 var textLabel = (TextLabel)bindable;
442 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.PixelSize).Get(out temp);
445 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
446 [EditorBrowsable(EditorBrowsableState.Never)]
447 public static readonly BindableProperty EllipsisProperty = BindableProperty.Create(nameof(Ellipsis), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
449 var textLabel = (TextLabel)bindable;
450 if (newValue != null)
452 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.ELLIPSIS, new Tizen.NUI.PropertyValue((bool)newValue));
455 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
457 var textLabel = (TextLabel)bindable;
459 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.ELLIPSIS).Get(out temp);
462 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
463 [EditorBrowsable(EditorBrowsableState.Never)]
464 public static readonly BindableProperty AutoScrollLoopDelayProperty = BindableProperty.Create(nameof(AutoScrollLoopDelay), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
466 var textLabel = (TextLabel)bindable;
467 if (newValue != null)
469 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopDelay, new Tizen.NUI.PropertyValue((float)newValue));
472 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
474 var textLabel = (TextLabel)bindable;
476 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollLoopDelay).Get(out temp);
479 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
480 [EditorBrowsable(EditorBrowsableState.Never)]
481 public static readonly BindableProperty AutoScrollStopModeProperty = BindableProperty.Create(nameof(AutoScrollStopMode), typeof(AutoScrollStopMode), typeof(TextLabel), AutoScrollStopMode.FinishLoop, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
483 var textLabel = (TextLabel)bindable;
484 if (newValue != null)
486 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollStopMode, new Tizen.NUI.PropertyValue((int)newValue));
489 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
491 var textLabel = (TextLabel)bindable;
493 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.AutoScrollStopMode).Get(out temp) == false)
495 NUILog.Error("AutoScrollStopMode get error!");
497 return temp.GetValueByDescription<AutoScrollStopMode>();
499 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
500 [EditorBrowsable(EditorBrowsableState.Never)]
501 public static readonly BindableProperty LineWrapModeProperty = BindableProperty.Create(nameof(LineWrapMode), typeof(LineWrapMode), typeof(TextLabel), LineWrapMode.Word, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
503 var textLabel = (TextLabel)bindable;
504 if (newValue != null)
506 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineWrapMode, new Tizen.NUI.PropertyValue((int)newValue));
509 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
511 var textLabel = (TextLabel)bindable;
513 if (false == Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.LineWrapMode).Get(out temp))
515 NUILog.Error("LineWrapMode get error!");
517 return (LineWrapMode)temp;
519 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
520 [EditorBrowsable(EditorBrowsableState.Never)]
521 public static readonly BindableProperty VerticalLineAlignmentProperty = BindableProperty.Create(nameof(VerticalLineAlignment), typeof(VerticalLineAlignment), typeof(TextLabel), VerticalLineAlignment.Bottom, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
523 var textLabel = (TextLabel)bindable;
524 if (newValue != null)
526 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalLineAlignment, new Tizen.NUI.PropertyValue((int)newValue));
529 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
531 var textLabel = (TextLabel)bindable;
533 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.VerticalLineAlignment).Get(out temp);
534 return (VerticalLineAlignment)temp;
536 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
537 [EditorBrowsable(EditorBrowsableState.Never)]
538 public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(MatchSystemLanguageDirection), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
540 var textLabel = (TextLabel)bindable;
541 if (newValue != null)
543 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MatchSystemLanguageDirection, new Tizen.NUI.PropertyValue((bool)newValue));
546 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
548 var textLabel = (TextLabel)bindable;
550 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MatchSystemLanguageDirection).Get(out temp);
554 /// Only for XAML. No need of public API. Make hidden as inhouse API.
555 [EditorBrowsable(EditorBrowsableState.Never)]
556 public static readonly BindableProperty TextFitProperty = BindableProperty.Create(nameof(TextFit), typeof(PropertyMap), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
558 var textLabel = (TextLabel)bindable;
559 if (newValue != null)
561 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextFit, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
564 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
566 var textLabel = (TextLabel)bindable;
567 PropertyMap temp = new PropertyMap();
568 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.TextFit).Get(temp);
572 /// Only for XAML. No need of public API. Make hidden as inhouse API.
573 [EditorBrowsable(EditorBrowsableState.Never)]
574 public static readonly BindableProperty MinLineSizeProperty = BindableProperty.Create(nameof(MinLineSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
576 var textLabel = (TextLabel)bindable;
577 if (newValue != null)
579 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MinLineSize, new Tizen.NUI.PropertyValue((float)newValue));
580 textLabel.RequestLayout();
583 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
585 var textLabel = (TextLabel)bindable;
587 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.MinLineSize).Get(out temp);
591 [EditorBrowsable(EditorBrowsableState.Never)]
592 public static readonly BindableProperty FontSizeScaleProperty = BindableProperty.Create(nameof(FontSizeScale), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
594 var textLabel = (TextLabel)bindable;
595 if (newValue != null)
597 using (var property = new Tizen.NUI.PropertyValue((float)newValue))
599 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontSizeScale, property);
600 textLabel.RequestLayout();
604 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
606 var textLabel = (TextLabel)bindable;
608 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontSizeScale).Get(out temp);
612 internal Selector<string> TranslatableTextSelector
614 get => GetSelector<string>(selectorData?.TranslatableText, TextLabel.TranslatableTextProperty);
617 selectorData?.TranslatableText?.Reset(this);
618 if (value == null) return;
620 if (value.HasAll()) SetTranslatableText(value.All);
621 else EnsureSelectorData().TranslatableText = new TriggerableSelector<string>(this, value, SetTranslatableText, true);
625 internal Selector<string> TextSelector
627 get => GetSelector<string>(selectorData?.Text, TextLabel.TextProperty);
630 selectorData?.Text?.Reset(this);
631 if (value == null) return;
633 if (value.HasAll()) SetText(value.All);
634 else EnsureSelectorData().Text = new TriggerableSelector<string>(this, value, SetText, true);
638 internal Selector<string> FontFamilySelector
640 get => GetSelector<string>(selectorData?.FontFamily, TextLabel.FontFamilyProperty);
643 selectorData?.FontFamily?.Reset(this);
644 if (value == null) return;
646 if (value.HasAll()) SetFontFamily(value.All);
647 else EnsureSelectorData().FontFamily = new TriggerableSelector<string>(this, value, SetFontFamily, true);
651 internal Selector<float?> PointSizeSelector
653 get => GetSelector<float?>(selectorData?.PointSize, TextLabel.PointSizeProperty);
656 selectorData?.PointSize?.Reset(this);
657 if (value == null) return;
659 if (value.HasAll()) SetPointSize(value.All);
660 else EnsureSelectorData().PointSize = new TriggerableSelector<float?>(this, value, SetPointSize, true);
664 internal Selector<Color> TextColorSelector
668 var selector = selectorData?.TextColor?.Get();
669 if (selector != null)
674 Color color = new Color();
675 if (!GetProperty(TextLabel.Property.TextColor).Get(color))
679 return new Selector<Color>(color);
683 selectorData?.TextColor?.Reset(this);
684 if (value == null) return;
686 if (value.HasAll()) SetTextColor(value.All);
687 else EnsureSelectorData().TextColor = new TriggerableSelector<Color>(this, value, SetTextColor, true);
691 internal Selector<float?> PixelSizeSelector
693 get => GetSelector<float?>(selectorData?.PixelSize, TextLabel.PixelSizeProperty);
696 selectorData?.PixelSize?.Reset(this);
697 if (value == null) return;
699 if (value.HasAll()) SetPixelSize(value.All);
700 else EnsureSelectorData().PixelSize = new TriggerableSelector<float?>(this, value, SetPixelSize, true);
704 internal Selector<TextShadow> TextShadowSelector
706 get => GetSelector<TextShadow>(selectorData?.TextShadow, TextLabel.TextShadowProperty);
709 selectorData?.TextShadow?.Reset(this);
710 if (value == null) return;
712 if (value.HasAll()) SetTextShadow(value.All);
713 else EnsureSelectorData().TextShadow = new TriggerableSelector<TextShadow>(this, value, SetTextShadow);
717 private void SetTranslatableText(string value)
721 translatableText = value;
725 private void SetText(string value)
729 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextLabel.Property.TEXT, new Tizen.NUI.PropertyValue(value));
734 private void SetFontFamily(string value)
738 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextLabel.Property.FontFamily, new Tizen.NUI.PropertyValue(value));
743 private void SetTextColor(Color value)
747 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextLabel.Property.TextColor, new Tizen.NUI.PropertyValue(value));
751 private void SetPointSize(float? value)
755 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextLabel.Property.PointSize, new Tizen.NUI.PropertyValue((float)value));
760 private void SetPixelSize(float? value)
764 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextLabel.Property.PixelSize, new Tizen.NUI.PropertyValue((float)value));
769 private void SetTextShadow(TextShadow value)
773 Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, Property.SHADOW, TextShadow.ToPropertyValue(value));