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 [EditorBrowsable(EditorBrowsableState.Never)]
31 public static readonly BindableProperty FontFamilySelectorProperty = BindableProperty.Create("FontFamilySelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
33 var textFieldStyle = (TextFieldStyle)bindable;
34 textFieldStyle.fontFamilySelector = ((Selector<string>)newValue)?.Clone();
36 defaultValueCreator: (bindable) =>
38 var textFieldStyle = (TextFieldStyle)bindable;
39 return textFieldStyle.fontFamilySelector;
41 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
42 [EditorBrowsable(EditorBrowsableState.Never)]
43 public static readonly BindableProperty PointSizeSelectorProperty = BindableProperty.Create("PointSizeSelector", typeof(Selector<float?>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
45 var textFieldStyle = (TextFieldStyle)bindable;
46 textFieldStyle.pointSizeSelector = ((Selector<float?>)newValue)?.Clone();
48 defaultValueCreator: (bindable) =>
50 var textFieldStyle = (TextFieldStyle)bindable;
51 return textFieldStyle.pointSizeSelector;
53 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
54 [EditorBrowsable(EditorBrowsableState.Never)]
55 public static readonly BindableProperty TextColorSelectorProperty = BindableProperty.Create("TextColorSelector", typeof(Selector<Color>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
57 var textFieldStyle = (TextFieldStyle)bindable;
58 textFieldStyle.textColorSelector = ((Selector<Color>)newValue)?.Clone();
60 defaultValueCreator: (bindable) =>
62 var textFieldStyle = (TextFieldStyle)bindable;
63 return textFieldStyle.textColorSelector;
65 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
66 [EditorBrowsable(EditorBrowsableState.Never)]
67 public static readonly BindableProperty PlaceholderTextColorSelectorProperty = BindableProperty.Create("PlaceholderTextColorSelector", typeof(Selector<Vector4>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
69 var textFieldStyle = (TextFieldStyle)bindable;
70 textFieldStyle.placeholderTextColorSelector = ((Selector<Vector4>)newValue)?.Clone();
72 defaultValueCreator: (bindable) =>
74 var textFieldStyle = (TextFieldStyle)bindable;
75 return textFieldStyle.placeholderTextColorSelector;
77 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
78 [EditorBrowsable(EditorBrowsableState.Never)]
79 public static readonly BindableProperty PrimaryCursorColorSelectorProperty = BindableProperty.Create("PrimaryCursorColorSelector", typeof(Selector<Vector4>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
81 var textFieldStyle = (TextFieldStyle)bindable;
82 textFieldStyle.primaryCursorColorSelector = ((Selector<Vector4>)newValue)?.Clone();
84 defaultValueCreator: (bindable) =>
86 var textFieldStyle = (TextFieldStyle)bindable;
87 return textFieldStyle.primaryCursorColorSelector;
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 PlaceholderTextProperty = BindableProperty.Create(nameof(PlaceholderText), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
94 var textFieldStyle = (TextFieldStyle)bindable;
95 textFieldStyle.placeholderText = (string)newValue;
97 defaultValueCreator: (bindable) =>
99 var textFieldStyle = (TextFieldStyle)bindable;
100 return textFieldStyle.placeholderText;
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 PlaceholderTextFocusedProperty = BindableProperty.Create(nameof(PlaceholderTextFocused), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
106 var textFieldStyle = (TextFieldStyle)bindable;
107 textFieldStyle.placeholderTextFocused = (string)newValue;
109 defaultValueCreator: (bindable) =>
111 var textFieldStyle = (TextFieldStyle)bindable;
112 return textFieldStyle.placeholderTextFocused;
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 MaxLengthProperty = BindableProperty.Create(nameof(MaxLength), typeof(int?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
118 var textFieldStyle = (TextFieldStyle)bindable;
119 textFieldStyle.maxLength = (int?)newValue;
121 defaultValueCreator: (bindable) =>
123 var textFieldStyle = (TextFieldStyle)bindable;
124 return textFieldStyle.maxLength;
126 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
127 [EditorBrowsable(EditorBrowsableState.Never)]
128 public static readonly BindableProperty ExceedPolicyProperty = BindableProperty.Create(nameof(ExceedPolicy), typeof(int?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
130 var textFieldStyle = (TextFieldStyle)bindable;
131 textFieldStyle.exceedPolicy = (int?)newValue;
133 defaultValueCreator: (bindable) =>
135 var textFieldStyle = (TextFieldStyle)bindable;
136 return textFieldStyle.exceedPolicy;
138 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
139 [EditorBrowsable(EditorBrowsableState.Never)]
140 public static readonly BindableProperty HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
142 var textFieldStyle = (TextFieldStyle)bindable;
143 textFieldStyle.horizontalAlignment = (HorizontalAlignment?)newValue;
145 defaultValueCreator: (bindable) =>
147 var textFieldStyle = (TextFieldStyle)bindable;
148 return textFieldStyle.horizontalAlignment;
150 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
151 [EditorBrowsable(EditorBrowsableState.Never)]
152 public static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.Create(nameof(VerticalAlignment), typeof(VerticalAlignment?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
154 var textFieldStyle = (TextFieldStyle)bindable;
155 textFieldStyle.verticalAlignment = (VerticalAlignment?)newValue;
157 defaultValueCreator: (bindable) =>
159 var textFieldStyle = (TextFieldStyle)bindable;
160 return textFieldStyle.verticalAlignment;
162 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
163 [EditorBrowsable(EditorBrowsableState.Never)]
164 public static readonly BindableProperty SecondaryCursorColorProperty = BindableProperty.Create(nameof(SecondaryCursorColor), typeof(Vector4), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
166 var textFieldStyle = (TextFieldStyle)bindable;
167 textFieldStyle.secondaryCursorColor = (Vector4)newValue;
169 defaultValueCreator: (bindable) =>
171 var textFieldStyle = (TextFieldStyle)bindable;
172 return textFieldStyle.secondaryCursorColor;
174 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
175 [EditorBrowsable(EditorBrowsableState.Never)]
176 public static readonly BindableProperty EnableCursorBlinkProperty = BindableProperty.Create(nameof(EnableCursorBlink), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
178 var textFieldStyle = (TextFieldStyle)bindable;
179 textFieldStyle.enableCursorBlink = (bool?)newValue;
181 defaultValueCreator: (bindable) =>
183 var textFieldStyle = (TextFieldStyle)bindable;
184 return textFieldStyle.enableCursorBlink;
186 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
187 [EditorBrowsable(EditorBrowsableState.Never)]
188 public static readonly BindableProperty CursorBlinkIntervalProperty = BindableProperty.Create(nameof(CursorBlinkInterval), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
190 var textFieldStyle = (TextFieldStyle)bindable;
191 textFieldStyle.cursorBlinkInterval = (float?)newValue;
193 defaultValueCreator: (bindable) =>
195 var textFieldStyle = (TextFieldStyle)bindable;
196 return textFieldStyle.cursorBlinkInterval;
198 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
199 [EditorBrowsable(EditorBrowsableState.Never)]
200 public static readonly BindableProperty CursorBlinkDurationProperty = BindableProperty.Create(nameof(CursorBlinkDuration), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
202 var textFieldStyle = (TextFieldStyle)bindable;
203 textFieldStyle.cursorBlinkDuration = (float?)newValue;
205 defaultValueCreator: (bindable) =>
207 var textFieldStyle = (TextFieldStyle)bindable;
208 return textFieldStyle.cursorBlinkDuration;
210 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
211 [EditorBrowsable(EditorBrowsableState.Never)]
212 public static readonly BindableProperty CursorWidthProperty = BindableProperty.Create(nameof(CursorWidth), typeof(int?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
214 var textFieldStyle = (TextFieldStyle)bindable;
215 textFieldStyle.cursorWidth = (int?)newValue;
217 defaultValueCreator: (bindable) =>
219 var textFieldStyle = (TextFieldStyle)bindable;
220 return textFieldStyle.cursorWidth;
222 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
223 [EditorBrowsable(EditorBrowsableState.Never)]
224 public static readonly BindableProperty GrabHandleImageProperty = BindableProperty.Create(nameof(GrabHandleImage), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
226 var textFieldStyle = (TextFieldStyle)bindable;
227 textFieldStyle.grabHandleImage = (string)newValue;
229 defaultValueCreator: (bindable) =>
231 var textFieldStyle = (TextFieldStyle)bindable;
232 return textFieldStyle.grabHandleImage;
234 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
235 [EditorBrowsable(EditorBrowsableState.Never)]
236 public static readonly BindableProperty GrabHandlePressedImageProperty = BindableProperty.Create(nameof(GrabHandlePressedImage), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
238 var textFieldStyle = (TextFieldStyle)bindable;
239 textFieldStyle.grabHandlePressedImage = (string)newValue;
241 defaultValueCreator: (bindable) =>
243 var textFieldStyle = (TextFieldStyle)bindable;
244 return textFieldStyle.grabHandlePressedImage;
246 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
247 [EditorBrowsable(EditorBrowsableState.Never)]
248 public static readonly BindableProperty ScrollThresholdProperty = BindableProperty.Create(nameof(ScrollThreshold), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
250 var textFieldStyle = (TextFieldStyle)bindable;
251 textFieldStyle.scrollThreshold = (float?)newValue;
253 defaultValueCreator: (bindable) =>
255 var textFieldStyle = (TextFieldStyle)bindable;
256 return textFieldStyle.scrollThreshold;
258 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
259 [EditorBrowsable(EditorBrowsableState.Never)]
260 public static readonly BindableProperty ScrollSpeedProperty = BindableProperty.Create(nameof(ScrollSpeed), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
262 var textFieldStyle = (TextFieldStyle)bindable;
263 textFieldStyle.scrollSpeed = (float?)newValue;
265 defaultValueCreator: (bindable) =>
267 var textFieldStyle = (TextFieldStyle)bindable;
268 return textFieldStyle.scrollSpeed;
270 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
271 [EditorBrowsable(EditorBrowsableState.Never)]
272 public static readonly BindableProperty SelectionHighlightColorProperty = BindableProperty.Create(nameof(SelectionHighlightColor), typeof(Vector4), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
274 var textFieldStyle = (TextFieldStyle)bindable;
275 textFieldStyle.selectionHighlightColor = (Vector4)newValue;
277 defaultValueCreator: (bindable) =>
279 var textFieldStyle = (TextFieldStyle)bindable;
280 return textFieldStyle.selectionHighlightColor;
282 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
283 [EditorBrowsable(EditorBrowsableState.Never)]
284 public static readonly BindableProperty DecorationBoundingBoxProperty = BindableProperty.Create(nameof(DecorationBoundingBox), typeof(Rectangle), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
286 var textFieldStyle = (TextFieldStyle)bindable;
287 textFieldStyle.decorationBoundingBox = (Rectangle)newValue;
289 defaultValueCreator: (bindable) =>
291 var textFieldStyle = (TextFieldStyle)bindable;
292 return textFieldStyle.decorationBoundingBox;
294 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
295 [EditorBrowsable(EditorBrowsableState.Never)]
296 public static readonly BindableProperty InputColorProperty = BindableProperty.Create(nameof(InputColor), typeof(Vector4), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
298 var textFieldStyle = (TextFieldStyle)bindable;
299 textFieldStyle.inputColor = (Vector4)newValue;
301 defaultValueCreator: (bindable) =>
303 var textFieldStyle = (TextFieldStyle)bindable;
304 return textFieldStyle.inputColor;
306 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
307 [EditorBrowsable(EditorBrowsableState.Never)]
308 public static readonly BindableProperty EnableMarkupProperty = BindableProperty.Create(nameof(EnableMarkup), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
310 var textFieldStyle = (TextFieldStyle)bindable;
311 textFieldStyle.enableMarkup = (bool?)newValue;
313 defaultValueCreator: (bindable) =>
315 var textFieldStyle = (TextFieldStyle)bindable;
316 return textFieldStyle.enableMarkup;
318 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
319 [EditorBrowsable(EditorBrowsableState.Never)]
320 public static readonly BindableProperty InputFontFamilyProperty = BindableProperty.Create(nameof(InputFontFamily), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
322 var textFieldStyle = (TextFieldStyle)bindable;
323 textFieldStyle.inputFontFamily = (string)newValue;
325 defaultValueCreator: (bindable) =>
327 var textFieldStyle = (TextFieldStyle)bindable;
328 return textFieldStyle.inputFontFamily;
330 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
331 [EditorBrowsable(EditorBrowsableState.Never)]
332 public static readonly BindableProperty InputPointSizeProperty = BindableProperty.Create(nameof(InputPointSize), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
334 var textFieldStyle = (TextFieldStyle)bindable;
335 textFieldStyle.inputPointSize = (float?)newValue;
337 defaultValueCreator: (bindable) =>
339 var textFieldStyle = (TextFieldStyle)bindable;
340 return textFieldStyle.inputPointSize;
342 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
343 [EditorBrowsable(EditorBrowsableState.Never)]
344 public static readonly BindableProperty InputUnderlineProperty = BindableProperty.Create(nameof(InputUnderline), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
346 var textFieldStyle = (TextFieldStyle)bindable;
347 textFieldStyle.inputUnderline = (string)newValue;
349 defaultValueCreator: (bindable) =>
351 var textFieldStyle = (TextFieldStyle)bindable;
352 return textFieldStyle.inputUnderline;
354 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
355 [EditorBrowsable(EditorBrowsableState.Never)]
356 public static readonly BindableProperty InputShadowProperty = BindableProperty.Create(nameof(InputShadow), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
358 var textFieldStyle = (TextFieldStyle)bindable;
359 textFieldStyle.inputShadow = (string)newValue;
361 defaultValueCreator: (bindable) =>
363 var textFieldStyle = (TextFieldStyle)bindable;
364 return textFieldStyle.inputShadow;
366 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
367 [EditorBrowsable(EditorBrowsableState.Never)]
368 public static readonly BindableProperty EmbossProperty = BindableProperty.Create(nameof(Emboss), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
370 var textFieldStyle = (TextFieldStyle)bindable;
371 textFieldStyle.emboss = (string)newValue;
373 defaultValueCreator: (bindable) =>
375 var textFieldStyle = (TextFieldStyle)bindable;
376 return textFieldStyle.emboss;
378 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
379 [EditorBrowsable(EditorBrowsableState.Never)]
380 public static readonly BindableProperty InputEmbossProperty = BindableProperty.Create(nameof(InputEmboss), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
382 var textFieldStyle = (TextFieldStyle)bindable;
383 textFieldStyle.inputEmboss = (string)newValue;
385 defaultValueCreator: (bindable) =>
387 var textFieldStyle = (TextFieldStyle)bindable;
388 return textFieldStyle.inputEmboss;
390 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
391 [EditorBrowsable(EditorBrowsableState.Never)]
392 public static readonly BindableProperty InputOutlineProperty = BindableProperty.Create(nameof(InputOutline), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
394 var textFieldStyle = (TextFieldStyle)bindable;
395 textFieldStyle.inputOutline = (string)newValue;
397 defaultValueCreator: (bindable) =>
399 var textFieldStyle = (TextFieldStyle)bindable;
400 return textFieldStyle.inputOutline;
402 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
403 [EditorBrowsable(EditorBrowsableState.Never)]
404 public static readonly BindableProperty PixelSizeSelectorProperty = BindableProperty.Create("PixelSizeSelector", typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
406 var textFieldStyle = (TextFieldStyle)bindable;
407 textFieldStyle.pixelSizeSelector = ((Selector<float?>)newValue)?.Clone();
409 defaultValueCreator: (bindable) =>
411 var textFieldStyle = (TextFieldStyle)bindable;
412 return textFieldStyle.pixelSizeSelector;
414 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
415 [EditorBrowsable(EditorBrowsableState.Never)]
416 public static readonly BindableProperty EnableSelectionProperty = BindableProperty.Create(nameof(EnableSelection), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
418 var textFieldStyle = (TextFieldStyle)bindable;
419 textFieldStyle.enableSelection = (bool?)newValue;
421 defaultValueCreator: (bindable) =>
423 var textFieldStyle = (TextFieldStyle)bindable;
424 return textFieldStyle.enableSelection;
426 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
427 [EditorBrowsable(EditorBrowsableState.Never)]
428 public static readonly BindableProperty EllipsisProperty = BindableProperty.Create(nameof(Ellipsis), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
430 var textFieldStyle = (TextFieldStyle)bindable;
431 textFieldStyle.ellipsis = (bool?)newValue;
433 defaultValueCreator: (bindable) =>
435 var textFieldStyle = (TextFieldStyle)bindable;
436 return textFieldStyle.ellipsis;
438 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
439 [EditorBrowsable(EditorBrowsableState.Never)]
440 public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(MatchSystemLanguageDirection), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
442 var textFieldStyle = (TextFieldStyle)bindable;
443 textFieldStyle.matchSystemLanguageDirection = (bool?)newValue;
445 defaultValueCreator: (bindable) =>
447 var textFieldStyle = (TextFieldStyle)bindable;
448 return textFieldStyle.matchSystemLanguageDirection;
451 private string placeholderText;
452 private string placeholderTextFocused;
453 private int? maxLength;
454 private int? exceedPolicy;
455 private HorizontalAlignment? horizontalAlignment;
456 private VerticalAlignment? verticalAlignment;
457 private Vector4 secondaryCursorColor;
458 private bool? enableCursorBlink;
459 private float? cursorBlinkInterval;
460 private float? cursorBlinkDuration;
461 private int? cursorWidth;
462 private string grabHandleImage;
463 private string grabHandlePressedImage;
464 private float? scrollThreshold;
465 private float? scrollSpeed;
466 private Vector4 selectionHighlightColor;
467 private Rectangle decorationBoundingBox;
468 private Vector4 inputColor;
469 private bool? enableMarkup;
470 private string inputFontFamily;
471 private float? inputPointSize;
472 private string inputUnderline;
473 private string inputShadow;
474 private string emboss;
475 private string inputEmboss;
476 private string inputOutline;
477 private Selector<float?> pixelSizeSelector;
478 private bool? enableSelection;
479 private bool? ellipsis;
480 private bool? matchSystemLanguageDirection;
481 private Selector<string> fontFamilySelector;
482 private Selector<Color> textColorSelector;
483 private Selector<float?> pointSizeSelector;
484 private Selector<Vector4> placeholderTextColorSelector;
485 private Selector<Vector4> primaryCursorColorSelector;
487 static TextFieldStyle() { }
490 /// Create an empty instance.
492 [EditorBrowsable(EditorBrowsableState.Never)]
493 public TextFieldStyle() : base()
497 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
498 [EditorBrowsable(EditorBrowsableState.Never)]
499 public string PlaceholderText
501 get => (string)GetValue(PlaceholderTextProperty);
502 set => SetValue(PlaceholderTextProperty, value);
505 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
506 [EditorBrowsable(EditorBrowsableState.Never)]
507 public string PlaceholderTextFocused
509 get => (string)GetValue(PlaceholderTextFocusedProperty);
510 set => SetValue(PlaceholderTextFocusedProperty, value);
513 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
514 [EditorBrowsable(EditorBrowsableState.Never)]
515 public Selector<string> FontFamily
519 Selector<string> tmp = (Selector<string>)GetValue(FontFamilySelectorProperty);
520 return (null != tmp) ? tmp : fontFamilySelector = new Selector<string>();
522 set => SetValue(FontFamilySelectorProperty, value);
525 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
526 [EditorBrowsable(EditorBrowsableState.Never)]
527 public int? MaxLength
529 get => (int?)GetValue(MaxLengthProperty);
530 set => SetValue(MaxLengthProperty, value);
533 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
534 [EditorBrowsable(EditorBrowsableState.Never)]
535 public int? ExceedPolicy
537 get => (int?)GetValue(ExceedPolicyProperty);
538 set => SetValue(ExceedPolicyProperty, value);
541 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
542 [EditorBrowsable(EditorBrowsableState.Never)]
543 public HorizontalAlignment? HorizontalAlignment
545 get => (HorizontalAlignment?)GetValue(HorizontalAlignmentProperty);
546 set => SetValue(HorizontalAlignmentProperty, value);
549 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
550 [EditorBrowsable(EditorBrowsableState.Never)]
551 public VerticalAlignment? VerticalAlignment
553 get => (VerticalAlignment?)GetValue(VerticalAlignmentProperty);
554 set => SetValue(VerticalAlignmentProperty, value);
557 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
558 [EditorBrowsable(EditorBrowsableState.Never)]
559 public Vector4 SecondaryCursorColor
561 get => (Vector4)GetValue(SecondaryCursorColorProperty);
562 set => SetValue(SecondaryCursorColorProperty, value);
565 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
566 [EditorBrowsable(EditorBrowsableState.Never)]
567 public bool? EnableCursorBlink
569 get => (bool?)GetValue(EnableCursorBlinkProperty);
570 set => SetValue(EnableCursorBlinkProperty, value);
573 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
574 [EditorBrowsable(EditorBrowsableState.Never)]
575 public float? CursorBlinkInterval
577 get => (float?)GetValue(CursorBlinkIntervalProperty);
578 set => SetValue(CursorBlinkIntervalProperty, value);
581 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
582 [EditorBrowsable(EditorBrowsableState.Never)]
583 public float? CursorBlinkDuration
585 get => (float?)GetValue(CursorBlinkDurationProperty);
586 set => SetValue(CursorBlinkDurationProperty, value);
589 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
590 [EditorBrowsable(EditorBrowsableState.Never)]
591 public int? CursorWidth
593 get => (int?)GetValue(CursorWidthProperty);
594 set => SetValue(CursorWidthProperty, value);
597 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
598 [EditorBrowsable(EditorBrowsableState.Never)]
599 public string GrabHandleImage
601 get => (string)GetValue(GrabHandleImageProperty);
602 set => SetValue(GrabHandleImageProperty, value);
605 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
606 [EditorBrowsable(EditorBrowsableState.Never)]
607 public string GrabHandlePressedImage
609 get => (string)GetValue(GrabHandlePressedImageProperty);
610 set => SetValue(GrabHandlePressedImageProperty, value);
613 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
614 [EditorBrowsable(EditorBrowsableState.Never)]
615 public float? ScrollThreshold
617 get => (float?)GetValue(ScrollThresholdProperty);
618 set => SetValue(ScrollThresholdProperty, value);
621 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
622 [EditorBrowsable(EditorBrowsableState.Never)]
623 public float? ScrollSpeed
625 get => (float?)GetValue(ScrollSpeedProperty);
626 set => SetValue(ScrollSpeedProperty, value);
629 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
630 [EditorBrowsable(EditorBrowsableState.Never)]
631 public Vector4 SelectionHighlightColor
633 get => (Vector4)GetValue(SelectionHighlightColorProperty);
634 set => SetValue(SelectionHighlightColorProperty, value);
637 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
638 [EditorBrowsable(EditorBrowsableState.Never)]
639 public Rectangle DecorationBoundingBox
641 get => (Rectangle)GetValue(DecorationBoundingBoxProperty);
642 set => SetValue(DecorationBoundingBoxProperty, value);
645 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
646 [EditorBrowsable(EditorBrowsableState.Never)]
647 public Vector4 InputColor
649 get => (Vector4)GetValue(InputColorProperty);
650 set => SetValue(InputColorProperty, value);
653 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
654 [EditorBrowsable(EditorBrowsableState.Never)]
655 public bool? EnableMarkup
657 get => (bool?)GetValue(EnableMarkupProperty);
658 set => SetValue(EnableMarkupProperty, value);
661 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
662 [EditorBrowsable(EditorBrowsableState.Never)]
663 public string InputFontFamily
665 get => (string)GetValue(InputFontFamilyProperty);
666 set => SetValue(InputFontFamilyProperty, value);
669 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
670 [EditorBrowsable(EditorBrowsableState.Never)]
671 public float? InputPointSize
673 get => (float?)GetValue(InputPointSizeProperty);
674 set => SetValue(InputPointSizeProperty, value);
677 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
678 [EditorBrowsable(EditorBrowsableState.Never)]
679 public string InputUnderline
681 get => (string)GetValue(InputUnderlineProperty);
682 set => SetValue(InputUnderlineProperty, value);
685 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
686 [EditorBrowsable(EditorBrowsableState.Never)]
687 public string InputShadow
689 get => (string)GetValue(InputShadowProperty);
690 set => SetValue(InputShadowProperty, value);
693 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
694 [EditorBrowsable(EditorBrowsableState.Never)]
697 get => (string)GetValue(EmbossProperty);
698 set => SetValue(EmbossProperty, value);
701 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
702 [EditorBrowsable(EditorBrowsableState.Never)]
703 public string InputEmboss
705 get => (string)GetValue(InputEmbossProperty);
706 set => SetValue(InputEmbossProperty, value);
709 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
710 [EditorBrowsable(EditorBrowsableState.Never)]
711 public string InputOutline
713 get => (string)GetValue(InputOutlineProperty);
714 set => SetValue(InputOutlineProperty, value);
717 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
718 [EditorBrowsable(EditorBrowsableState.Never)]
719 public Selector<float?> PixelSize
721 get => (Selector<float?>)GetValue(PixelSizeSelectorProperty) ?? (pixelSizeSelector = new Selector<float?>());
722 set => SetValue(PixelSizeSelectorProperty, value);
725 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
726 [EditorBrowsable(EditorBrowsableState.Never)]
727 public bool? EnableSelection
729 get => (bool?)GetValue(EnableSelectionProperty);
730 set => SetValue(EnableSelectionProperty, value);
733 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
734 [EditorBrowsable(EditorBrowsableState.Never)]
735 public bool? Ellipsis
737 get => (bool?)GetValue(EllipsisProperty);
738 set => SetValue(EllipsisProperty, value);
741 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
742 [EditorBrowsable(EditorBrowsableState.Never)]
743 public bool? MatchSystemLanguageDirection
745 get => (bool?)GetValue(MatchSystemLanguageDirectionProperty);
746 set => SetValue(MatchSystemLanguageDirectionProperty, value);
749 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
750 [EditorBrowsable(EditorBrowsableState.Never)]
751 public Selector<Color> TextColor
755 Selector<Color> tmp = (Selector<Color>)GetValue(TextColorSelectorProperty);
756 return (null != tmp) ? tmp : textColorSelector = new Selector<Color>();
758 set => SetValue(TextColorSelectorProperty, value);
761 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
762 [EditorBrowsable(EditorBrowsableState.Never)]
763 public Selector<float?> PointSize
767 Selector<float?> tmp = (Selector<float?>)GetValue(PointSizeSelectorProperty);
768 return (null != tmp) ? tmp : pointSizeSelector = new Selector<float?>();
770 set => SetValue(PointSizeSelectorProperty, value);
773 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
774 [EditorBrowsable(EditorBrowsableState.Never)]
775 public Selector<Vector4> PlaceholderTextColor
779 Selector<Vector4> tmp = (Selector<Vector4>)GetValue(PlaceholderTextColorSelectorProperty);
780 return (null != tmp) ? tmp : placeholderTextColorSelector = new Selector<Vector4>();
782 set => SetValue(PlaceholderTextColorSelectorProperty, value);
786 /// Gets or sets primary cursor color.
788 /// <since_tizen> 6 </since_tizen>
789 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
790 [EditorBrowsable(EditorBrowsableState.Never)]
791 public Selector<Vector4> PrimaryCursorColor
795 Selector<Vector4> tmp = (Selector<Vector4>)GetValue(PrimaryCursorColorSelectorProperty);
796 return (null != tmp) ? tmp : primaryCursorColorSelector = new Selector<Vector4>();
798 set => SetValue(PrimaryCursorColorSelectorProperty, value);