2 * Copyright(c) 2019 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 using System.ComponentModel;
19 using Tizen.NUI.Binding;
21 namespace Tizen.NUI.BaseComponents
24 /// The base class for Children attributes in Components.
26 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
27 [EditorBrowsable(EditorBrowsableState.Never)]
28 public class TextFieldStyle : ViewStyle
30 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
31 [EditorBrowsable(EditorBrowsableState.Never)]
32 public static readonly BindableProperty TranslatablePlaceholderTextSelectorProperty = BindableProperty.Create("TranslatablePlaceholderTextSelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
34 var textFieldStyle = (TextFieldStyle)bindable;
35 textFieldStyle.translatablePlaceholderTextSelector = ((Selector<string>)newValue)?.Clone();
37 defaultValueCreator: (bindable) =>
39 var textFieldStyle = (TextFieldStyle)bindable;
40 return textFieldStyle.translatablePlaceholderTextSelector;
42 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
43 [EditorBrowsable(EditorBrowsableState.Never)]
44 public static readonly BindableProperty FontFamilySelectorProperty = BindableProperty.Create("FontFamilySelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
46 var textFieldStyle = (TextFieldStyle)bindable;
47 textFieldStyle.fontFamilySelector = ((Selector<string>)newValue)?.Clone();
49 defaultValueCreator: (bindable) =>
51 var textFieldStyle = (TextFieldStyle)bindable;
52 return textFieldStyle.fontFamilySelector;
54 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
55 [EditorBrowsable(EditorBrowsableState.Never)]
56 public static readonly BindableProperty PointSizeSelectorProperty = BindableProperty.Create("PointSizeSelector", typeof(Selector<float?>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
58 var textFieldStyle = (TextFieldStyle)bindable;
59 textFieldStyle.pointSizeSelector = ((Selector<float?>)newValue)?.Clone();
61 defaultValueCreator: (bindable) =>
63 var textFieldStyle = (TextFieldStyle)bindable;
64 return textFieldStyle.pointSizeSelector;
66 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
67 [EditorBrowsable(EditorBrowsableState.Never)]
68 public static readonly BindableProperty TextColorSelectorProperty = BindableProperty.Create("TextColorSelector", typeof(Selector<Color>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
70 var textFieldStyle = (TextFieldStyle)bindable;
71 textFieldStyle.textColorSelector = ((Selector<Color>)newValue)?.Clone();
73 defaultValueCreator: (bindable) =>
75 var textFieldStyle = (TextFieldStyle)bindable;
76 return textFieldStyle.textColorSelector;
78 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
79 [EditorBrowsable(EditorBrowsableState.Never)]
80 public static readonly BindableProperty PlaceholderTextColorSelectorProperty = BindableProperty.Create("PlaceholderTextColorSelector", typeof(Selector<Vector4>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
82 var textFieldStyle = (TextFieldStyle)bindable;
83 textFieldStyle.placeholderTextColorSelector = ((Selector<Vector4>)newValue)?.Clone();
85 defaultValueCreator: (bindable) =>
87 var textFieldStyle = (TextFieldStyle)bindable;
88 return textFieldStyle.placeholderTextColorSelector;
90 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
91 [EditorBrowsable(EditorBrowsableState.Never)]
92 public static readonly BindableProperty PrimaryCursorColorSelectorProperty = BindableProperty.Create("PrimaryCursorColorSelector", typeof(Selector<Vector4>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
94 var textFieldStyle = (TextFieldStyle)bindable;
95 textFieldStyle.primaryCursorColorSelector = ((Selector<Vector4>)newValue)?.Clone();
97 defaultValueCreator: (bindable) =>
99 var textFieldStyle = (TextFieldStyle)bindable;
100 return textFieldStyle.primaryCursorColorSelector;
103 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
104 [EditorBrowsable(EditorBrowsableState.Never)]
105 public static readonly BindableProperty PlaceholderTextProperty = BindableProperty.Create(nameof(PlaceholderText), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
107 var textFieldStyle = (TextFieldStyle)bindable;
108 textFieldStyle.placeholderText = (string)newValue;
110 defaultValueCreator: (bindable) =>
112 var textFieldStyle = (TextFieldStyle)bindable;
113 return textFieldStyle.placeholderText;
115 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
116 [EditorBrowsable(EditorBrowsableState.Never)]
117 public static readonly BindableProperty PlaceholderTextFocusedProperty = BindableProperty.Create(nameof(PlaceholderTextFocused), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
119 var textFieldStyle = (TextFieldStyle)bindable;
120 textFieldStyle.placeholderTextFocused = (string)newValue;
122 defaultValueCreator: (bindable) =>
124 var textFieldStyle = (TextFieldStyle)bindable;
125 return textFieldStyle.placeholderTextFocused;
127 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
128 [EditorBrowsable(EditorBrowsableState.Never)]
129 public static readonly BindableProperty MaxLengthProperty = BindableProperty.Create(nameof(MaxLength), typeof(int?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
131 var textFieldStyle = (TextFieldStyle)bindable;
132 textFieldStyle.maxLength = (int?)newValue;
134 defaultValueCreator: (bindable) =>
136 var textFieldStyle = (TextFieldStyle)bindable;
137 return textFieldStyle.maxLength;
139 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
140 [EditorBrowsable(EditorBrowsableState.Never)]
141 public static readonly BindableProperty ExceedPolicyProperty = BindableProperty.Create(nameof(ExceedPolicy), typeof(int?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
143 var textFieldStyle = (TextFieldStyle)bindable;
144 textFieldStyle.exceedPolicy = (int?)newValue;
146 defaultValueCreator: (bindable) =>
148 var textFieldStyle = (TextFieldStyle)bindable;
149 return textFieldStyle.exceedPolicy;
151 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
152 [EditorBrowsable(EditorBrowsableState.Never)]
153 public static readonly BindableProperty HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
155 var textFieldStyle = (TextFieldStyle)bindable;
156 textFieldStyle.horizontalAlignment = (HorizontalAlignment?)newValue;
158 defaultValueCreator: (bindable) =>
160 var textFieldStyle = (TextFieldStyle)bindable;
161 return textFieldStyle.horizontalAlignment;
163 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
164 [EditorBrowsable(EditorBrowsableState.Never)]
165 public static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.Create(nameof(VerticalAlignment), typeof(VerticalAlignment?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
167 var textFieldStyle = (TextFieldStyle)bindable;
168 textFieldStyle.verticalAlignment = (VerticalAlignment?)newValue;
170 defaultValueCreator: (bindable) =>
172 var textFieldStyle = (TextFieldStyle)bindable;
173 return textFieldStyle.verticalAlignment;
175 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
176 [EditorBrowsable(EditorBrowsableState.Never)]
177 public static readonly BindableProperty SecondaryCursorColorProperty = BindableProperty.Create(nameof(SecondaryCursorColor), typeof(Vector4), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
179 var textFieldStyle = (TextFieldStyle)bindable;
180 textFieldStyle.secondaryCursorColor = (Vector4)newValue;
182 defaultValueCreator: (bindable) =>
184 var textFieldStyle = (TextFieldStyle)bindable;
185 return textFieldStyle.secondaryCursorColor;
187 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
188 [EditorBrowsable(EditorBrowsableState.Never)]
189 public static readonly BindableProperty EnableCursorBlinkProperty = BindableProperty.Create(nameof(EnableCursorBlink), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
191 var textFieldStyle = (TextFieldStyle)bindable;
192 textFieldStyle.enableCursorBlink = (bool?)newValue;
194 defaultValueCreator: (bindable) =>
196 var textFieldStyle = (TextFieldStyle)bindable;
197 return textFieldStyle.enableCursorBlink;
199 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
200 [EditorBrowsable(EditorBrowsableState.Never)]
201 public static readonly BindableProperty CursorBlinkIntervalProperty = BindableProperty.Create(nameof(CursorBlinkInterval), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
203 var textFieldStyle = (TextFieldStyle)bindable;
204 textFieldStyle.cursorBlinkInterval = (float?)newValue;
206 defaultValueCreator: (bindable) =>
208 var textFieldStyle = (TextFieldStyle)bindable;
209 return textFieldStyle.cursorBlinkInterval;
211 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
212 [EditorBrowsable(EditorBrowsableState.Never)]
213 public static readonly BindableProperty CursorBlinkDurationProperty = BindableProperty.Create(nameof(CursorBlinkDuration), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
215 var textFieldStyle = (TextFieldStyle)bindable;
216 textFieldStyle.cursorBlinkDuration = (float?)newValue;
218 defaultValueCreator: (bindable) =>
220 var textFieldStyle = (TextFieldStyle)bindable;
221 return textFieldStyle.cursorBlinkDuration;
223 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
224 [EditorBrowsable(EditorBrowsableState.Never)]
225 public static readonly BindableProperty CursorWidthProperty = BindableProperty.Create(nameof(CursorWidth), typeof(int?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
227 var textFieldStyle = (TextFieldStyle)bindable;
228 textFieldStyle.cursorWidth = (int?)newValue;
230 defaultValueCreator: (bindable) =>
232 var textFieldStyle = (TextFieldStyle)bindable;
233 return textFieldStyle.cursorWidth;
235 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
236 [EditorBrowsable(EditorBrowsableState.Never)]
237 public static readonly BindableProperty GrabHandleImageProperty = BindableProperty.Create(nameof(GrabHandleImage), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
239 var textFieldStyle = (TextFieldStyle)bindable;
240 textFieldStyle.grabHandleImage = (string)newValue;
242 defaultValueCreator: (bindable) =>
244 var textFieldStyle = (TextFieldStyle)bindable;
245 return textFieldStyle.grabHandleImage;
247 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
248 [EditorBrowsable(EditorBrowsableState.Never)]
249 public static readonly BindableProperty GrabHandlePressedImageProperty = BindableProperty.Create(nameof(GrabHandlePressedImage), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
251 var textFieldStyle = (TextFieldStyle)bindable;
252 textFieldStyle.grabHandlePressedImage = (string)newValue;
254 defaultValueCreator: (bindable) =>
256 var textFieldStyle = (TextFieldStyle)bindable;
257 return textFieldStyle.grabHandlePressedImage;
259 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
260 [EditorBrowsable(EditorBrowsableState.Never)]
261 public static readonly BindableProperty ScrollThresholdProperty = BindableProperty.Create(nameof(ScrollThreshold), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
263 var textFieldStyle = (TextFieldStyle)bindable;
264 textFieldStyle.scrollThreshold = (float?)newValue;
266 defaultValueCreator: (bindable) =>
268 var textFieldStyle = (TextFieldStyle)bindable;
269 return textFieldStyle.scrollThreshold;
271 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
272 [EditorBrowsable(EditorBrowsableState.Never)]
273 public static readonly BindableProperty ScrollSpeedProperty = BindableProperty.Create(nameof(ScrollSpeed), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
275 var textFieldStyle = (TextFieldStyle)bindable;
276 textFieldStyle.scrollSpeed = (float?)newValue;
278 defaultValueCreator: (bindable) =>
280 var textFieldStyle = (TextFieldStyle)bindable;
281 return textFieldStyle.scrollSpeed;
283 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
284 [EditorBrowsable(EditorBrowsableState.Never)]
285 public static readonly BindableProperty SelectionHighlightColorProperty = BindableProperty.Create(nameof(SelectionHighlightColor), typeof(Vector4), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
287 var textFieldStyle = (TextFieldStyle)bindable;
288 textFieldStyle.selectionHighlightColor = (Vector4)newValue;
290 defaultValueCreator: (bindable) =>
292 var textFieldStyle = (TextFieldStyle)bindable;
293 return textFieldStyle.selectionHighlightColor;
295 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
296 [EditorBrowsable(EditorBrowsableState.Never)]
297 public static readonly BindableProperty DecorationBoundingBoxProperty = BindableProperty.Create(nameof(DecorationBoundingBox), typeof(Rectangle), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
299 var textFieldStyle = (TextFieldStyle)bindable;
300 textFieldStyle.decorationBoundingBox = (Rectangle)newValue;
302 defaultValueCreator: (bindable) =>
304 var textFieldStyle = (TextFieldStyle)bindable;
305 return textFieldStyle.decorationBoundingBox;
307 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
308 [EditorBrowsable(EditorBrowsableState.Never)]
309 public static readonly BindableProperty InputColorProperty = BindableProperty.Create(nameof(InputColor), typeof(Vector4), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
311 var textFieldStyle = (TextFieldStyle)bindable;
312 textFieldStyle.inputColor = (Vector4)newValue;
314 defaultValueCreator: (bindable) =>
316 var textFieldStyle = (TextFieldStyle)bindable;
317 return textFieldStyle.inputColor;
319 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
320 [EditorBrowsable(EditorBrowsableState.Never)]
321 public static readonly BindableProperty EnableMarkupProperty = BindableProperty.Create(nameof(EnableMarkup), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
323 var textFieldStyle = (TextFieldStyle)bindable;
324 textFieldStyle.enableMarkup = (bool?)newValue;
326 defaultValueCreator: (bindable) =>
328 var textFieldStyle = (TextFieldStyle)bindable;
329 return textFieldStyle.enableMarkup;
331 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
332 [EditorBrowsable(EditorBrowsableState.Never)]
333 public static readonly BindableProperty InputFontFamilyProperty = BindableProperty.Create(nameof(InputFontFamily), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
335 var textFieldStyle = (TextFieldStyle)bindable;
336 textFieldStyle.inputFontFamily = (string)newValue;
338 defaultValueCreator: (bindable) =>
340 var textFieldStyle = (TextFieldStyle)bindable;
341 return textFieldStyle.inputFontFamily;
343 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
344 [EditorBrowsable(EditorBrowsableState.Never)]
345 public static readonly BindableProperty InputPointSizeProperty = BindableProperty.Create(nameof(InputPointSize), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
347 var textFieldStyle = (TextFieldStyle)bindable;
348 textFieldStyle.inputPointSize = (float?)newValue;
350 defaultValueCreator: (bindable) =>
352 var textFieldStyle = (TextFieldStyle)bindable;
353 return textFieldStyle.inputPointSize;
355 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
356 [EditorBrowsable(EditorBrowsableState.Never)]
357 public static readonly BindableProperty InputUnderlineProperty = BindableProperty.Create(nameof(InputUnderline), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
359 var textFieldStyle = (TextFieldStyle)bindable;
360 textFieldStyle.inputUnderline = (string)newValue;
362 defaultValueCreator: (bindable) =>
364 var textFieldStyle = (TextFieldStyle)bindable;
365 return textFieldStyle.inputUnderline;
367 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
368 [EditorBrowsable(EditorBrowsableState.Never)]
369 public static readonly BindableProperty InputShadowProperty = BindableProperty.Create(nameof(InputShadow), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
371 var textFieldStyle = (TextFieldStyle)bindable;
372 textFieldStyle.inputShadow = (string)newValue;
374 defaultValueCreator: (bindable) =>
376 var textFieldStyle = (TextFieldStyle)bindable;
377 return textFieldStyle.inputShadow;
379 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
380 [EditorBrowsable(EditorBrowsableState.Never)]
381 public static readonly BindableProperty EmbossProperty = BindableProperty.Create(nameof(Emboss), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
383 var textFieldStyle = (TextFieldStyle)bindable;
384 textFieldStyle.emboss = (string)newValue;
386 defaultValueCreator: (bindable) =>
388 var textFieldStyle = (TextFieldStyle)bindable;
389 return textFieldStyle.emboss;
391 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
392 [EditorBrowsable(EditorBrowsableState.Never)]
393 public static readonly BindableProperty InputEmbossProperty = BindableProperty.Create(nameof(InputEmboss), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
395 var textFieldStyle = (TextFieldStyle)bindable;
396 textFieldStyle.inputEmboss = (string)newValue;
398 defaultValueCreator: (bindable) =>
400 var textFieldStyle = (TextFieldStyle)bindable;
401 return textFieldStyle.inputEmboss;
403 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
404 [EditorBrowsable(EditorBrowsableState.Never)]
405 public static readonly BindableProperty InputOutlineProperty = BindableProperty.Create(nameof(InputOutline), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
407 var textFieldStyle = (TextFieldStyle)bindable;
408 textFieldStyle.inputOutline = (string)newValue;
410 defaultValueCreator: (bindable) =>
412 var textFieldStyle = (TextFieldStyle)bindable;
413 return textFieldStyle.inputOutline;
415 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
416 [EditorBrowsable(EditorBrowsableState.Never)]
417 public static readonly BindableProperty PixelSizeSelectorProperty = BindableProperty.Create("PixelSizeSelector", typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
419 var textFieldStyle = (TextFieldStyle)bindable;
420 textFieldStyle.pixelSizeSelector = ((Selector<float?>)newValue)?.Clone();
422 defaultValueCreator: (bindable) =>
424 var textFieldStyle = (TextFieldStyle)bindable;
425 return textFieldStyle.pixelSizeSelector;
427 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
428 [EditorBrowsable(EditorBrowsableState.Never)]
429 public static readonly BindableProperty EnableSelectionProperty = BindableProperty.Create(nameof(EnableSelection), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
431 var textFieldStyle = (TextFieldStyle)bindable;
432 textFieldStyle.enableSelection = (bool?)newValue;
434 defaultValueCreator: (bindable) =>
436 var textFieldStyle = (TextFieldStyle)bindable;
437 return textFieldStyle.enableSelection;
439 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
440 [EditorBrowsable(EditorBrowsableState.Never)]
441 public static readonly BindableProperty EllipsisProperty = BindableProperty.Create(nameof(Ellipsis), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
443 var textFieldStyle = (TextFieldStyle)bindable;
444 textFieldStyle.ellipsis = (bool?)newValue;
446 defaultValueCreator: (bindable) =>
448 var textFieldStyle = (TextFieldStyle)bindable;
449 return textFieldStyle.ellipsis;
451 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
452 [EditorBrowsable(EditorBrowsableState.Never)]
453 public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(MatchSystemLanguageDirection), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
455 var textFieldStyle = (TextFieldStyle)bindable;
456 textFieldStyle.matchSystemLanguageDirection = (bool?)newValue;
458 defaultValueCreator: (bindable) =>
460 var textFieldStyle = (TextFieldStyle)bindable;
461 return textFieldStyle.matchSystemLanguageDirection;
464 private string placeholderText;
465 private string placeholderTextFocused;
466 private int? maxLength;
467 private int? exceedPolicy;
468 private HorizontalAlignment? horizontalAlignment;
469 private VerticalAlignment? verticalAlignment;
470 private Vector4 secondaryCursorColor;
471 private bool? enableCursorBlink;
472 private float? cursorBlinkInterval;
473 private float? cursorBlinkDuration;
474 private int? cursorWidth;
475 private string grabHandleImage;
476 private string grabHandlePressedImage;
477 private float? scrollThreshold;
478 private float? scrollSpeed;
479 private Vector4 selectionHighlightColor;
480 private Rectangle decorationBoundingBox;
481 private Vector4 inputColor;
482 private bool? enableMarkup;
483 private string inputFontFamily;
484 private float? inputPointSize;
485 private string inputUnderline;
486 private string inputShadow;
487 private string emboss;
488 private string inputEmboss;
489 private string inputOutline;
490 private Selector<float?> pixelSizeSelector;
491 private bool? enableSelection;
492 private bool? ellipsis;
493 private bool? matchSystemLanguageDirection;
494 private Selector<string> translatablePlaceholderTextSelector;
495 private Selector<string> fontFamilySelector;
496 private Selector<Color> textColorSelector;
497 private Selector<float?> pointSizeSelector;
498 private Selector<Vector4> placeholderTextColorSelector;
499 private Selector<Vector4> primaryCursorColorSelector;
501 static TextFieldStyle() { }
504 /// Create an empty instance.
506 [EditorBrowsable(EditorBrowsableState.Never)]
507 public TextFieldStyle() : base()
511 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
512 [EditorBrowsable(EditorBrowsableState.Never)]
513 public Selector<string> TranslatablePlaceholderText
517 Selector<string> tmp = (Selector<string>)GetValue(TranslatablePlaceholderTextSelectorProperty);
518 return (null != tmp) ? tmp : translatablePlaceholderTextSelector = new Selector<string>();
520 set => SetValue(TranslatablePlaceholderTextSelectorProperty, value);
523 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
524 [EditorBrowsable(EditorBrowsableState.Never)]
525 public string PlaceholderText
527 get => (string)GetValue(PlaceholderTextProperty);
528 set => SetValue(PlaceholderTextProperty, value);
531 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
532 [EditorBrowsable(EditorBrowsableState.Never)]
533 public string PlaceholderTextFocused
535 get => (string)GetValue(PlaceholderTextFocusedProperty);
536 set => SetValue(PlaceholderTextFocusedProperty, value);
539 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
540 [EditorBrowsable(EditorBrowsableState.Never)]
541 public Selector<string> FontFamily
545 Selector<string> tmp = (Selector<string>)GetValue(FontFamilySelectorProperty);
546 return (null != tmp) ? tmp : fontFamilySelector = new Selector<string>();
548 set => SetValue(FontFamilySelectorProperty, value);
551 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
552 [EditorBrowsable(EditorBrowsableState.Never)]
553 public int? MaxLength
555 get => (int?)GetValue(MaxLengthProperty);
556 set => SetValue(MaxLengthProperty, value);
559 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
560 [EditorBrowsable(EditorBrowsableState.Never)]
561 public int? ExceedPolicy
563 get => (int?)GetValue(ExceedPolicyProperty);
564 set => SetValue(ExceedPolicyProperty, value);
567 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
568 [EditorBrowsable(EditorBrowsableState.Never)]
569 public HorizontalAlignment? HorizontalAlignment
571 get => (HorizontalAlignment?)GetValue(HorizontalAlignmentProperty);
572 set => SetValue(HorizontalAlignmentProperty, value);
575 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
576 [EditorBrowsable(EditorBrowsableState.Never)]
577 public VerticalAlignment? VerticalAlignment
579 get => (VerticalAlignment?)GetValue(VerticalAlignmentProperty);
580 set => SetValue(VerticalAlignmentProperty, value);
583 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
584 [EditorBrowsable(EditorBrowsableState.Never)]
585 public Vector4 SecondaryCursorColor
587 get => (Vector4)GetValue(SecondaryCursorColorProperty);
588 set => SetValue(SecondaryCursorColorProperty, value);
591 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
592 [EditorBrowsable(EditorBrowsableState.Never)]
593 public bool? EnableCursorBlink
595 get => (bool?)GetValue(EnableCursorBlinkProperty);
596 set => SetValue(EnableCursorBlinkProperty, value);
599 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
600 [EditorBrowsable(EditorBrowsableState.Never)]
601 public float? CursorBlinkInterval
603 get => (float?)GetValue(CursorBlinkIntervalProperty);
604 set => SetValue(CursorBlinkIntervalProperty, value);
607 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
608 [EditorBrowsable(EditorBrowsableState.Never)]
609 public float? CursorBlinkDuration
611 get => (float?)GetValue(CursorBlinkDurationProperty);
612 set => SetValue(CursorBlinkDurationProperty, value);
615 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
616 [EditorBrowsable(EditorBrowsableState.Never)]
617 public int? CursorWidth
619 get => (int?)GetValue(CursorWidthProperty);
620 set => SetValue(CursorWidthProperty, value);
623 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
624 [EditorBrowsable(EditorBrowsableState.Never)]
625 public string GrabHandleImage
627 get => (string)GetValue(GrabHandleImageProperty);
628 set => SetValue(GrabHandleImageProperty, value);
631 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
632 [EditorBrowsable(EditorBrowsableState.Never)]
633 public string GrabHandlePressedImage
635 get => (string)GetValue(GrabHandlePressedImageProperty);
636 set => SetValue(GrabHandlePressedImageProperty, value);
639 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
640 [EditorBrowsable(EditorBrowsableState.Never)]
641 public float? ScrollThreshold
643 get => (float?)GetValue(ScrollThresholdProperty);
644 set => SetValue(ScrollThresholdProperty, value);
647 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
648 [EditorBrowsable(EditorBrowsableState.Never)]
649 public float? ScrollSpeed
651 get => (float?)GetValue(ScrollSpeedProperty);
652 set => SetValue(ScrollSpeedProperty, value);
655 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
656 [EditorBrowsable(EditorBrowsableState.Never)]
657 public Vector4 SelectionHighlightColor
659 get => (Vector4)GetValue(SelectionHighlightColorProperty);
660 set => SetValue(SelectionHighlightColorProperty, value);
663 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
664 [EditorBrowsable(EditorBrowsableState.Never)]
665 public Rectangle DecorationBoundingBox
667 get => (Rectangle)GetValue(DecorationBoundingBoxProperty);
668 set => SetValue(DecorationBoundingBoxProperty, value);
671 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
672 [EditorBrowsable(EditorBrowsableState.Never)]
673 public Vector4 InputColor
675 get => (Vector4)GetValue(InputColorProperty);
676 set => SetValue(InputColorProperty, value);
679 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
680 [EditorBrowsable(EditorBrowsableState.Never)]
681 public bool? EnableMarkup
683 get => (bool?)GetValue(EnableMarkupProperty);
684 set => SetValue(EnableMarkupProperty, value);
687 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
688 [EditorBrowsable(EditorBrowsableState.Never)]
689 public string InputFontFamily
691 get => (string)GetValue(InputFontFamilyProperty);
692 set => SetValue(InputFontFamilyProperty, value);
695 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
696 [EditorBrowsable(EditorBrowsableState.Never)]
697 public float? InputPointSize
699 get => (float?)GetValue(InputPointSizeProperty);
700 set => SetValue(InputPointSizeProperty, value);
703 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
704 [EditorBrowsable(EditorBrowsableState.Never)]
705 public string InputUnderline
707 get => (string)GetValue(InputUnderlineProperty);
708 set => SetValue(InputUnderlineProperty, value);
711 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
712 [EditorBrowsable(EditorBrowsableState.Never)]
713 public string InputShadow
715 get => (string)GetValue(InputShadowProperty);
716 set => SetValue(InputShadowProperty, value);
719 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
720 [EditorBrowsable(EditorBrowsableState.Never)]
723 get => (string)GetValue(EmbossProperty);
724 set => SetValue(EmbossProperty, value);
727 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
728 [EditorBrowsable(EditorBrowsableState.Never)]
729 public string InputEmboss
731 get => (string)GetValue(InputEmbossProperty);
732 set => SetValue(InputEmbossProperty, value);
735 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
736 [EditorBrowsable(EditorBrowsableState.Never)]
737 public string InputOutline
739 get => (string)GetValue(InputOutlineProperty);
740 set => SetValue(InputOutlineProperty, value);
743 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
744 [EditorBrowsable(EditorBrowsableState.Never)]
745 public Selector<float?> PixelSize
747 get => (Selector<float?>)GetValue(PixelSizeSelectorProperty) ?? (pixelSizeSelector = new Selector<float?>());
748 set => SetValue(PixelSizeSelectorProperty, value);
751 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
752 [EditorBrowsable(EditorBrowsableState.Never)]
753 public bool? EnableSelection
755 get => (bool?)GetValue(EnableSelectionProperty);
756 set => SetValue(EnableSelectionProperty, value);
759 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
760 [EditorBrowsable(EditorBrowsableState.Never)]
761 public bool? Ellipsis
763 get => (bool?)GetValue(EllipsisProperty);
764 set => SetValue(EllipsisProperty, value);
767 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
768 [EditorBrowsable(EditorBrowsableState.Never)]
769 public bool? MatchSystemLanguageDirection
771 get => (bool?)GetValue(MatchSystemLanguageDirectionProperty);
772 set => SetValue(MatchSystemLanguageDirectionProperty, value);
775 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
776 [EditorBrowsable(EditorBrowsableState.Never)]
777 public Selector<Color> TextColor
781 Selector<Color> tmp = (Selector<Color>)GetValue(TextColorSelectorProperty);
782 return (null != tmp) ? tmp : textColorSelector = new Selector<Color>();
784 set => SetValue(TextColorSelectorProperty, value);
787 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
788 [EditorBrowsable(EditorBrowsableState.Never)]
789 public Selector<float?> PointSize
793 Selector<float?> tmp = (Selector<float?>)GetValue(PointSizeSelectorProperty);
794 return (null != tmp) ? tmp : pointSizeSelector = new Selector<float?>();
796 set => SetValue(PointSizeSelectorProperty, value);
799 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
800 [EditorBrowsable(EditorBrowsableState.Never)]
801 public Selector<Vector4> PlaceholderTextColor
805 Selector<Vector4> tmp = (Selector<Vector4>)GetValue(PlaceholderTextColorSelectorProperty);
806 return (null != tmp) ? tmp : placeholderTextColorSelector = new Selector<Vector4>();
808 set => SetValue(PlaceholderTextColorSelectorProperty, value);
812 /// Gets or sets primary cursor color.
814 /// <since_tizen> 6 </since_tizen>
815 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
816 [EditorBrowsable(EditorBrowsableState.Never)]
817 public Selector<Vector4> PrimaryCursorColor
821 Selector<Vector4> tmp = (Selector<Vector4>)GetValue(PrimaryCursorColorSelectorProperty);
822 return (null != tmp) ? tmp : primaryCursorColorSelector = new Selector<Vector4>();
824 set => SetValue(PrimaryCursorColorSelectorProperty, value);