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 TranslatableTextSelectorProperty = BindableProperty.Create("TranslatableTextSelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
34 var textFieldStyle = (TextFieldStyle)bindable;
35 textFieldStyle.translatableTextSelector = ((Selector<string>)newValue)?.Clone();
37 defaultValueCreator: (bindable) =>
39 var textFieldStyle = (TextFieldStyle)bindable;
40 return textFieldStyle.translatableTextSelector;
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 TranslatablePlaceholderTextSelectorProperty = BindableProperty.Create("TranslatablePlaceholderTextSelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
46 var textFieldStyle = (TextFieldStyle)bindable;
47 textFieldStyle.translatablePlaceholderTextSelector = ((Selector<string>)newValue)?.Clone();
49 defaultValueCreator: (bindable) =>
51 var textFieldStyle = (TextFieldStyle)bindable;
52 return textFieldStyle.translatablePlaceholderTextSelector;
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 TextSelectorProperty = BindableProperty.Create("TextSelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
58 var textFieldStyle = (TextFieldStyle)bindable;
59 textFieldStyle.textSelector = ((Selector<string>)newValue)?.Clone();
61 defaultValueCreator: (bindable) =>
63 var textFieldStyle = (TextFieldStyle)bindable;
64 return textFieldStyle.textSelector;
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 FontFamilySelectorProperty = BindableProperty.Create("FontFamilySelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
70 var textFieldStyle = (TextFieldStyle)bindable;
71 textFieldStyle.fontFamilySelector = ((Selector<string>)newValue)?.Clone();
73 defaultValueCreator: (bindable) =>
75 var textFieldStyle = (TextFieldStyle)bindable;
76 return textFieldStyle.fontFamilySelector;
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 PointSizeSelectorProperty = BindableProperty.Create("PointSizeSelector", typeof(Selector<float?>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
82 var textFieldStyle = (TextFieldStyle)bindable;
83 textFieldStyle.pointSizeSelector = ((Selector<float?>)newValue)?.Clone();
85 defaultValueCreator: (bindable) =>
87 var textFieldStyle = (TextFieldStyle)bindable;
88 return textFieldStyle.pointSizeSelector;
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 TextColorSelectorProperty = BindableProperty.Create("TextColorSelector", typeof(Selector<Color>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
94 var textFieldStyle = (TextFieldStyle)bindable;
95 textFieldStyle.textColorSelector = ((Selector<Color>)newValue)?.Clone();
97 defaultValueCreator: (bindable) =>
99 var textFieldStyle = (TextFieldStyle)bindable;
100 return textFieldStyle.textColorSelector;
102 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
103 [EditorBrowsable(EditorBrowsableState.Never)]
104 public static readonly BindableProperty PlaceholderTextColorSelectorProperty = BindableProperty.Create("PlaceholderTextColorSelector", typeof(Selector<Vector4>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
106 var textFieldStyle = (TextFieldStyle)bindable;
107 textFieldStyle.placeholderTextColorSelector = ((Selector<Vector4>)newValue)?.Clone();
109 defaultValueCreator: (bindable) =>
111 var textFieldStyle = (TextFieldStyle)bindable;
112 return textFieldStyle.placeholderTextColorSelector;
114 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
115 [EditorBrowsable(EditorBrowsableState.Never)]
116 public static readonly BindableProperty PrimaryCursorColorSelectorProperty = BindableProperty.Create("PrimaryCursorColorSelector", typeof(Selector<Vector4>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
118 var textFieldStyle = (TextFieldStyle)bindable;
119 textFieldStyle.primaryCursorColorSelector = ((Selector<Vector4>)newValue)?.Clone();
121 defaultValueCreator: (bindable) =>
123 var textFieldStyle = (TextFieldStyle)bindable;
124 return textFieldStyle.primaryCursorColorSelector;
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 PlaceholderTextProperty = BindableProperty.Create(nameof(PlaceholderText), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
131 var textFieldStyle = (TextFieldStyle)bindable;
132 textFieldStyle.placeholderText = (string)newValue;
134 defaultValueCreator: (bindable) =>
136 var textFieldStyle = (TextFieldStyle)bindable;
137 return textFieldStyle.placeholderText;
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 PlaceholderTextFocusedProperty = BindableProperty.Create(nameof(PlaceholderTextFocused), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
143 var textFieldStyle = (TextFieldStyle)bindable;
144 textFieldStyle.placeholderTextFocused = (string)newValue;
146 defaultValueCreator: (bindable) =>
148 var textFieldStyle = (TextFieldStyle)bindable;
149 return textFieldStyle.placeholderTextFocused;
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 MaxLengthProperty = BindableProperty.Create(nameof(MaxLength), typeof(int?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
155 var textFieldStyle = (TextFieldStyle)bindable;
156 textFieldStyle.maxLength = (int?)newValue;
158 defaultValueCreator: (bindable) =>
160 var textFieldStyle = (TextFieldStyle)bindable;
161 return textFieldStyle.maxLength;
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 ExceedPolicyProperty = BindableProperty.Create(nameof(ExceedPolicy), typeof(int?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
167 var textFieldStyle = (TextFieldStyle)bindable;
168 textFieldStyle.exceedPolicy = (int?)newValue;
170 defaultValueCreator: (bindable) =>
172 var textFieldStyle = (TextFieldStyle)bindable;
173 return textFieldStyle.exceedPolicy;
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 HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
179 var textFieldStyle = (TextFieldStyle)bindable;
180 textFieldStyle.horizontalAlignment = (HorizontalAlignment?)newValue;
182 defaultValueCreator: (bindable) =>
184 var textFieldStyle = (TextFieldStyle)bindable;
185 return textFieldStyle.horizontalAlignment;
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 VerticalAlignmentProperty = BindableProperty.Create(nameof(VerticalAlignment), typeof(VerticalAlignment?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
191 var textFieldStyle = (TextFieldStyle)bindable;
192 textFieldStyle.verticalAlignment = (VerticalAlignment?)newValue;
194 defaultValueCreator: (bindable) =>
196 var textFieldStyle = (TextFieldStyle)bindable;
197 return textFieldStyle.verticalAlignment;
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 SecondaryCursorColorProperty = BindableProperty.Create(nameof(SecondaryCursorColor), typeof(Vector4), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
203 var textFieldStyle = (TextFieldStyle)bindable;
204 textFieldStyle.secondaryCursorColor = (Vector4)newValue;
206 defaultValueCreator: (bindable) =>
208 var textFieldStyle = (TextFieldStyle)bindable;
209 return textFieldStyle.secondaryCursorColor;
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 EnableCursorBlinkProperty = BindableProperty.Create(nameof(EnableCursorBlink), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
215 var textFieldStyle = (TextFieldStyle)bindable;
216 textFieldStyle.enableCursorBlink = (bool?)newValue;
218 defaultValueCreator: (bindable) =>
220 var textFieldStyle = (TextFieldStyle)bindable;
221 return textFieldStyle.enableCursorBlink;
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 CursorBlinkIntervalProperty = BindableProperty.Create(nameof(CursorBlinkInterval), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
227 var textFieldStyle = (TextFieldStyle)bindable;
228 textFieldStyle.cursorBlinkInterval = (float?)newValue;
230 defaultValueCreator: (bindable) =>
232 var textFieldStyle = (TextFieldStyle)bindable;
233 return textFieldStyle.cursorBlinkInterval;
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 CursorBlinkDurationProperty = BindableProperty.Create(nameof(CursorBlinkDuration), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
239 var textFieldStyle = (TextFieldStyle)bindable;
240 textFieldStyle.cursorBlinkDuration = (float?)newValue;
242 defaultValueCreator: (bindable) =>
244 var textFieldStyle = (TextFieldStyle)bindable;
245 return textFieldStyle.cursorBlinkDuration;
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 CursorWidthProperty = BindableProperty.Create(nameof(CursorWidth), typeof(int?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
251 var textFieldStyle = (TextFieldStyle)bindable;
252 textFieldStyle.cursorWidth = (int?)newValue;
254 defaultValueCreator: (bindable) =>
256 var textFieldStyle = (TextFieldStyle)bindable;
257 return textFieldStyle.cursorWidth;
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 GrabHandleImageProperty = BindableProperty.Create(nameof(GrabHandleImage), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
263 var textFieldStyle = (TextFieldStyle)bindable;
264 textFieldStyle.grabHandleImage = (string)newValue;
266 defaultValueCreator: (bindable) =>
268 var textFieldStyle = (TextFieldStyle)bindable;
269 return textFieldStyle.grabHandleImage;
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 GrabHandlePressedImageProperty = BindableProperty.Create(nameof(GrabHandlePressedImage), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
275 var textFieldStyle = (TextFieldStyle)bindable;
276 textFieldStyle.grabHandlePressedImage = (string)newValue;
278 defaultValueCreator: (bindable) =>
280 var textFieldStyle = (TextFieldStyle)bindable;
281 return textFieldStyle.grabHandlePressedImage;
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 ScrollThresholdProperty = BindableProperty.Create(nameof(ScrollThreshold), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
287 var textFieldStyle = (TextFieldStyle)bindable;
288 textFieldStyle.scrollThreshold = (float?)newValue;
290 defaultValueCreator: (bindable) =>
292 var textFieldStyle = (TextFieldStyle)bindable;
293 return textFieldStyle.scrollThreshold;
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 ScrollSpeedProperty = BindableProperty.Create(nameof(ScrollSpeed), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
299 var textFieldStyle = (TextFieldStyle)bindable;
300 textFieldStyle.scrollSpeed = (float?)newValue;
302 defaultValueCreator: (bindable) =>
304 var textFieldStyle = (TextFieldStyle)bindable;
305 return textFieldStyle.scrollSpeed;
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 SelectionHighlightColorProperty = BindableProperty.Create(nameof(SelectionHighlightColor), typeof(Vector4), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
311 var textFieldStyle = (TextFieldStyle)bindable;
312 textFieldStyle.selectionHighlightColor = (Vector4)newValue;
314 defaultValueCreator: (bindable) =>
316 var textFieldStyle = (TextFieldStyle)bindable;
317 return textFieldStyle.selectionHighlightColor;
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 DecorationBoundingBoxProperty = BindableProperty.Create(nameof(DecorationBoundingBox), typeof(Rectangle), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
323 var textFieldStyle = (TextFieldStyle)bindable;
324 textFieldStyle.decorationBoundingBox = (Rectangle)newValue;
326 defaultValueCreator: (bindable) =>
328 var textFieldStyle = (TextFieldStyle)bindable;
329 return textFieldStyle.decorationBoundingBox;
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 InputColorProperty = BindableProperty.Create(nameof(InputColor), typeof(Vector4), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
335 var textFieldStyle = (TextFieldStyle)bindable;
336 textFieldStyle.inputColor = (Vector4)newValue;
338 defaultValueCreator: (bindable) =>
340 var textFieldStyle = (TextFieldStyle)bindable;
341 return textFieldStyle.inputColor;
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 EnableMarkupProperty = BindableProperty.Create(nameof(EnableMarkup), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
347 var textFieldStyle = (TextFieldStyle)bindable;
348 textFieldStyle.enableMarkup = (bool?)newValue;
350 defaultValueCreator: (bindable) =>
352 var textFieldStyle = (TextFieldStyle)bindable;
353 return textFieldStyle.enableMarkup;
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 InputFontFamilyProperty = BindableProperty.Create(nameof(InputFontFamily), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
359 var textFieldStyle = (TextFieldStyle)bindable;
360 textFieldStyle.inputFontFamily = (string)newValue;
362 defaultValueCreator: (bindable) =>
364 var textFieldStyle = (TextFieldStyle)bindable;
365 return textFieldStyle.inputFontFamily;
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 InputPointSizeProperty = BindableProperty.Create(nameof(InputPointSize), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
371 var textFieldStyle = (TextFieldStyle)bindable;
372 textFieldStyle.inputPointSize = (float?)newValue;
374 defaultValueCreator: (bindable) =>
376 var textFieldStyle = (TextFieldStyle)bindable;
377 return textFieldStyle.inputPointSize;
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 InputUnderlineProperty = BindableProperty.Create(nameof(InputUnderline), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
383 var textFieldStyle = (TextFieldStyle)bindable;
384 textFieldStyle.inputUnderline = (string)newValue;
386 defaultValueCreator: (bindable) =>
388 var textFieldStyle = (TextFieldStyle)bindable;
389 return textFieldStyle.inputUnderline;
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 InputShadowProperty = BindableProperty.Create(nameof(InputShadow), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
395 var textFieldStyle = (TextFieldStyle)bindable;
396 textFieldStyle.inputShadow = (string)newValue;
398 defaultValueCreator: (bindable) =>
400 var textFieldStyle = (TextFieldStyle)bindable;
401 return textFieldStyle.inputShadow;
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 EmbossProperty = BindableProperty.Create(nameof(Emboss), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
407 var textFieldStyle = (TextFieldStyle)bindable;
408 textFieldStyle.emboss = (string)newValue;
410 defaultValueCreator: (bindable) =>
412 var textFieldStyle = (TextFieldStyle)bindable;
413 return textFieldStyle.emboss;
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 InputEmbossProperty = BindableProperty.Create(nameof(InputEmboss), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
419 var textFieldStyle = (TextFieldStyle)bindable;
420 textFieldStyle.inputEmboss = (string)newValue;
422 defaultValueCreator: (bindable) =>
424 var textFieldStyle = (TextFieldStyle)bindable;
425 return textFieldStyle.inputEmboss;
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 InputOutlineProperty = BindableProperty.Create(nameof(InputOutline), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
431 var textFieldStyle = (TextFieldStyle)bindable;
432 textFieldStyle.inputOutline = (string)newValue;
434 defaultValueCreator: (bindable) =>
436 var textFieldStyle = (TextFieldStyle)bindable;
437 return textFieldStyle.inputOutline;
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 PixelSizeProperty = BindableProperty.Create(nameof(PixelSize), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
443 var textFieldStyle = (TextFieldStyle)bindable;
444 textFieldStyle.pixelSize = (float?)newValue;
446 defaultValueCreator: (bindable) =>
448 var textFieldStyle = (TextFieldStyle)bindable;
449 return textFieldStyle.pixelSize;
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 EnableSelectionProperty = BindableProperty.Create(nameof(EnableSelection), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
455 var textFieldStyle = (TextFieldStyle)bindable;
456 textFieldStyle.enableSelection = (bool?)newValue;
458 defaultValueCreator: (bindable) =>
460 var textFieldStyle = (TextFieldStyle)bindable;
461 return textFieldStyle.enableSelection;
463 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
464 [EditorBrowsable(EditorBrowsableState.Never)]
465 public static readonly BindableProperty EllipsisProperty = BindableProperty.Create(nameof(Ellipsis), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
467 var textFieldStyle = (TextFieldStyle)bindable;
468 textFieldStyle.ellipsis = (bool?)newValue;
470 defaultValueCreator: (bindable) =>
472 var textFieldStyle = (TextFieldStyle)bindable;
473 return textFieldStyle.ellipsis;
475 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
476 [EditorBrowsable(EditorBrowsableState.Never)]
477 public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(MatchSystemLanguageDirection), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
479 var textFieldStyle = (TextFieldStyle)bindable;
480 textFieldStyle.matchSystemLanguageDirection = (bool?)newValue;
482 defaultValueCreator: (bindable) =>
484 var textFieldStyle = (TextFieldStyle)bindable;
485 return textFieldStyle.matchSystemLanguageDirection;
488 private string placeholderText;
489 private string placeholderTextFocused;
490 private int? maxLength;
491 private int? exceedPolicy;
492 private HorizontalAlignment? horizontalAlignment;
493 private VerticalAlignment? verticalAlignment;
494 private Vector4 secondaryCursorColor;
495 private bool? enableCursorBlink;
496 private float? cursorBlinkInterval;
497 private float? cursorBlinkDuration;
498 private int? cursorWidth;
499 private string grabHandleImage;
500 private string grabHandlePressedImage;
501 private float? scrollThreshold;
502 private float? scrollSpeed;
503 private Vector4 selectionHighlightColor;
504 private Rectangle decorationBoundingBox;
505 private Vector4 inputColor;
506 private bool? enableMarkup;
507 private string inputFontFamily;
508 private float? inputPointSize;
509 private string inputUnderline;
510 private string inputShadow;
511 private string emboss;
512 private string inputEmboss;
513 private string inputOutline;
514 private float? pixelSize;
515 private bool? enableSelection;
516 private bool? ellipsis;
517 private bool? matchSystemLanguageDirection;
518 private Selector<string> translatableTextSelector;
519 private Selector<string> translatablePlaceholderTextSelector;
520 private Selector<string> textSelector;
521 private Selector<string> fontFamilySelector;
522 private Selector<Color> textColorSelector;
523 private Selector<float?> pointSizeSelector;
524 private Selector<Vector4> placeholderTextColorSelector;
525 private Selector<Vector4> primaryCursorColorSelector;
527 static TextFieldStyle() { }
530 /// Create an empty instance.
532 [EditorBrowsable(EditorBrowsableState.Never)]
533 public TextFieldStyle()
538 /// Create an instance and set properties from the given TextField.
540 /// <param name="textField">The TextField instance that includes property data.</param>
541 [EditorBrowsable(EditorBrowsableState.Never)]
542 public TextFieldStyle(TextField textField) : base(textField)
546 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
547 [EditorBrowsable(EditorBrowsableState.Never)]
548 public Selector<string> TranslatableText
552 Selector<string> tmp = (Selector<string>)GetValue(TranslatableTextSelectorProperty);
553 return (null != tmp) ? tmp : translatableTextSelector = new Selector<string>();
555 set => SetValue(TranslatableTextSelectorProperty, value);
558 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
559 [EditorBrowsable(EditorBrowsableState.Never)]
560 public Selector<string> TranslatablePlaceholderText
564 Selector<string> tmp = (Selector<string>)GetValue(TranslatablePlaceholderTextSelectorProperty);
565 return (null != tmp) ? tmp : translatablePlaceholderTextSelector = new Selector<string>();
567 set => SetValue(TranslatablePlaceholderTextSelectorProperty, value);
570 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
571 [EditorBrowsable(EditorBrowsableState.Never)]
572 public Selector<string> Text
576 Selector<string> tmp = (Selector<string>)GetValue(TextSelectorProperty);
577 return (null != tmp) ? tmp : textSelector = new Selector<string>();
579 set => SetValue(TextSelectorProperty, value);
582 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
583 [EditorBrowsable(EditorBrowsableState.Never)]
584 public string PlaceholderText
586 get => (string)GetValue(PlaceholderTextProperty);
587 set => SetValue(PlaceholderTextProperty, value);
590 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
591 [EditorBrowsable(EditorBrowsableState.Never)]
592 public string PlaceholderTextFocused
594 get => (string)GetValue(PlaceholderTextFocusedProperty);
595 set => SetValue(PlaceholderTextFocusedProperty, value);
598 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
599 [EditorBrowsable(EditorBrowsableState.Never)]
600 public Selector<string> FontFamily
604 Selector<string> tmp = (Selector<string>)GetValue(FontFamilySelectorProperty);
605 return (null != tmp) ? tmp : fontFamilySelector = new Selector<string>();
607 set => SetValue(FontFamilySelectorProperty, value);
610 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
611 [EditorBrowsable(EditorBrowsableState.Never)]
612 public int? MaxLength
614 get => (int?)GetValue(MaxLengthProperty);
615 set => SetValue(MaxLengthProperty, value);
618 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
619 [EditorBrowsable(EditorBrowsableState.Never)]
620 public int? ExceedPolicy
622 get => (int?)GetValue(ExceedPolicyProperty);
623 set => SetValue(ExceedPolicyProperty, value);
626 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
627 [EditorBrowsable(EditorBrowsableState.Never)]
628 public HorizontalAlignment? HorizontalAlignment
630 get => (HorizontalAlignment?)GetValue(HorizontalAlignmentProperty);
631 set => SetValue(HorizontalAlignmentProperty, value);
634 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
635 [EditorBrowsable(EditorBrowsableState.Never)]
636 public VerticalAlignment? VerticalAlignment
638 get => (VerticalAlignment?)GetValue(VerticalAlignmentProperty);
639 set => SetValue(VerticalAlignmentProperty, value);
642 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
643 [EditorBrowsable(EditorBrowsableState.Never)]
644 public Vector4 SecondaryCursorColor
646 get => (Vector4)GetValue(SecondaryCursorColorProperty);
647 set => SetValue(SecondaryCursorColorProperty, value);
650 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
651 [EditorBrowsable(EditorBrowsableState.Never)]
652 public bool? EnableCursorBlink
654 get => (bool?)GetValue(EnableCursorBlinkProperty);
655 set => SetValue(EnableCursorBlinkProperty, value);
658 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
659 [EditorBrowsable(EditorBrowsableState.Never)]
660 public float? CursorBlinkInterval
662 get => (float?)GetValue(CursorBlinkIntervalProperty);
663 set => SetValue(CursorBlinkIntervalProperty, value);
666 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
667 [EditorBrowsable(EditorBrowsableState.Never)]
668 public float? CursorBlinkDuration
670 get => (float?)GetValue(CursorBlinkDurationProperty);
671 set => SetValue(CursorBlinkDurationProperty, value);
674 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
675 [EditorBrowsable(EditorBrowsableState.Never)]
676 public int? CursorWidth
678 get => (int?)GetValue(CursorWidthProperty);
679 set => SetValue(CursorWidthProperty, value);
682 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
683 [EditorBrowsable(EditorBrowsableState.Never)]
684 public string GrabHandleImage
686 get => (string)GetValue(GrabHandleImageProperty);
687 set => SetValue(GrabHandleImageProperty, value);
690 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
691 [EditorBrowsable(EditorBrowsableState.Never)]
692 public string GrabHandlePressedImage
694 get => (string)GetValue(GrabHandlePressedImageProperty);
695 set => SetValue(GrabHandlePressedImageProperty, value);
698 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
699 [EditorBrowsable(EditorBrowsableState.Never)]
700 public float? ScrollThreshold
702 get => (float?)GetValue(ScrollThresholdProperty);
703 set => SetValue(ScrollThresholdProperty, value);
706 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
707 [EditorBrowsable(EditorBrowsableState.Never)]
708 public float? ScrollSpeed
710 get => (float?)GetValue(ScrollSpeedProperty);
711 set => SetValue(ScrollSpeedProperty, value);
714 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
715 [EditorBrowsable(EditorBrowsableState.Never)]
716 public Vector4 SelectionHighlightColor
718 get => (Vector4)GetValue(SelectionHighlightColorProperty);
719 set => SetValue(SelectionHighlightColorProperty, value);
722 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
723 [EditorBrowsable(EditorBrowsableState.Never)]
724 public Rectangle DecorationBoundingBox
726 get => (Rectangle)GetValue(DecorationBoundingBoxProperty);
727 set => SetValue(DecorationBoundingBoxProperty, value);
730 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
731 [EditorBrowsable(EditorBrowsableState.Never)]
732 public Vector4 InputColor
734 get => (Vector4)GetValue(InputColorProperty);
735 set => SetValue(InputColorProperty, value);
738 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
739 [EditorBrowsable(EditorBrowsableState.Never)]
740 public bool? EnableMarkup
742 get => (bool?)GetValue(EnableMarkupProperty);
743 set => SetValue(EnableMarkupProperty, value);
746 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
747 [EditorBrowsable(EditorBrowsableState.Never)]
748 public string InputFontFamily
750 get => (string)GetValue(InputFontFamilyProperty);
751 set => SetValue(InputFontFamilyProperty, value);
754 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
755 [EditorBrowsable(EditorBrowsableState.Never)]
756 public float? InputPointSize
758 get => (float?)GetValue(InputPointSizeProperty);
759 set => SetValue(InputPointSizeProperty, value);
762 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
763 [EditorBrowsable(EditorBrowsableState.Never)]
764 public string InputUnderline
766 get => (string)GetValue(InputUnderlineProperty);
767 set => SetValue(InputUnderlineProperty, value);
770 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
771 [EditorBrowsable(EditorBrowsableState.Never)]
772 public string InputShadow
774 get => (string)GetValue(InputShadowProperty);
775 set => SetValue(InputShadowProperty, value);
778 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
779 [EditorBrowsable(EditorBrowsableState.Never)]
782 get => (string)GetValue(EmbossProperty);
783 set => SetValue(EmbossProperty, value);
786 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
787 [EditorBrowsable(EditorBrowsableState.Never)]
788 public string InputEmboss
790 get => (string)GetValue(InputEmbossProperty);
791 set => SetValue(InputEmbossProperty, value);
794 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
795 [EditorBrowsable(EditorBrowsableState.Never)]
796 public string InputOutline
798 get => (string)GetValue(InputOutlineProperty);
799 set => SetValue(InputOutlineProperty, value);
802 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
803 [EditorBrowsable(EditorBrowsableState.Never)]
804 public float? PixelSize
806 get => (float?)GetValue(PixelSizeProperty);
807 set => SetValue(PixelSizeProperty, value);
810 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
811 [EditorBrowsable(EditorBrowsableState.Never)]
812 public bool? EnableSelection
814 get => (bool?)GetValue(EnableSelectionProperty);
815 set => SetValue(EnableSelectionProperty, value);
818 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
819 [EditorBrowsable(EditorBrowsableState.Never)]
820 public bool? Ellipsis
822 get => (bool?)GetValue(EllipsisProperty);
823 set => SetValue(EllipsisProperty, value);
826 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
827 [EditorBrowsable(EditorBrowsableState.Never)]
828 public bool? MatchSystemLanguageDirection
830 get => (bool?)GetValue(MatchSystemLanguageDirectionProperty);
831 set => SetValue(MatchSystemLanguageDirectionProperty, value);
834 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
835 [EditorBrowsable(EditorBrowsableState.Never)]
836 public Selector<Color> TextColor
840 Selector<Color> tmp = (Selector<Color>)GetValue(TextColorSelectorProperty);
841 return (null != tmp) ? tmp : textColorSelector = new Selector<Color>();
843 set => SetValue(TextColorSelectorProperty, value);
846 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
847 [EditorBrowsable(EditorBrowsableState.Never)]
848 public Selector<float?> PointSize
852 Selector<float?> tmp = (Selector<float?>)GetValue(PointSizeSelectorProperty);
853 return (null != tmp) ? tmp : pointSizeSelector = new Selector<float?>();
855 set => SetValue(PointSizeSelectorProperty, value);
858 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
859 [EditorBrowsable(EditorBrowsableState.Never)]
860 public Selector<Vector4> PlaceholderTextColor
864 Selector<Vector4> tmp = (Selector<Vector4>)GetValue(PlaceholderTextColorSelectorProperty);
865 return (null != tmp) ? tmp : placeholderTextColorSelector = new Selector<Vector4>();
867 set => SetValue(PlaceholderTextColorSelectorProperty, value);
871 /// Gets or sets primary cursor color.
873 /// <since_tizen> 6 </since_tizen>
874 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
875 [EditorBrowsable(EditorBrowsableState.Never)]
876 public Selector<Vector4> PrimaryCursorColor
880 Selector<Vector4> tmp = (Selector<Vector4>)GetValue(PrimaryCursorColorSelectorProperty);
881 return (null != tmp) ? tmp : primaryCursorColorSelector = new Selector<Vector4>();
883 set => SetValue(PrimaryCursorColorSelectorProperty, value);