Support TranslatablePlaceholderTextFocused to TextField
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / Style / TextFieldStyle.cs
1 /*
2  * Copyright(c) 2019 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17 using System;
18 using System.ComponentModel;
19 using Tizen.NUI.Binding;
20
21 namespace Tizen.NUI.BaseComponents
22 {
23     /// <summary>
24     /// The base class for Children attributes in Components.
25     /// </summary>
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
29     {
30         [EditorBrowsable(EditorBrowsableState.Never)]
31         public static readonly BindableProperty FontFamilySelectorProperty = BindableProperty.Create("FontFamilySelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
32         {
33             var textFieldStyle = (TextFieldStyle)bindable;
34             textFieldStyle.fontFamilySelector = ((Selector<string>)newValue)?.Clone();
35         },
36         defaultValueCreator: (bindable) =>
37         {
38             var textFieldStyle = (TextFieldStyle)bindable;
39             return textFieldStyle.fontFamilySelector;
40         });
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) =>
44         {
45             var textFieldStyle = (TextFieldStyle)bindable;
46             textFieldStyle.pointSizeSelector = ((Selector<float?>)newValue)?.Clone();
47         },
48         defaultValueCreator: (bindable) =>
49         {
50             var textFieldStyle = (TextFieldStyle)bindable;
51             return textFieldStyle.pointSizeSelector;
52         });
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) =>
56         {
57             var textFieldStyle = (TextFieldStyle)bindable;
58             textFieldStyle.textColorSelector = ((Selector<Color>)newValue)?.Clone();
59         },
60         defaultValueCreator: (bindable) =>
61         {
62             var textFieldStyle = (TextFieldStyle)bindable;
63             return textFieldStyle.textColorSelector;
64         });
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) =>
68         {
69             var textFieldStyle = (TextFieldStyle)bindable;
70             textFieldStyle.placeholderTextColorSelector = ((Selector<Vector4>)newValue)?.Clone();
71         },
72         defaultValueCreator: (bindable) =>
73         {
74             var textFieldStyle = (TextFieldStyle)bindable;
75             return textFieldStyle.placeholderTextColorSelector;
76         });
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) =>
80         {
81             var textFieldStyle = (TextFieldStyle)bindable;
82             textFieldStyle.primaryCursorColorSelector = ((Selector<Vector4>)newValue)?.Clone();
83         },
84         defaultValueCreator: (bindable) =>
85         {
86             var textFieldStyle = (TextFieldStyle)bindable;
87             return textFieldStyle.primaryCursorColorSelector;
88         });
89
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) =>
93         {
94             var textFieldStyle = (TextFieldStyle)bindable;
95             textFieldStyle.placeholderText = (string)newValue;
96         },
97         defaultValueCreator: (bindable) =>
98         {
99             var textFieldStyle = (TextFieldStyle)bindable;
100             return textFieldStyle.placeholderText;
101         });
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) =>
105         {
106             var textFieldStyle = (TextFieldStyle)bindable;
107             textFieldStyle.placeholderTextFocused = (string)newValue;
108         },
109         defaultValueCreator: (bindable) =>
110         {
111             var textFieldStyle = (TextFieldStyle)bindable;
112             return textFieldStyle.placeholderTextFocused;
113         });
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) =>
117         {
118             var textFieldStyle = (TextFieldStyle)bindable;
119             textFieldStyle.maxLength = (int?)newValue;
120         },
121         defaultValueCreator: (bindable) =>
122         {
123             var textFieldStyle = (TextFieldStyle)bindable;
124             return textFieldStyle.maxLength;
125         });
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) =>
129         {
130             var textFieldStyle = (TextFieldStyle)bindable;
131             textFieldStyle.exceedPolicy = (int?)newValue;
132         },
133         defaultValueCreator: (bindable) =>
134         {
135             var textFieldStyle = (TextFieldStyle)bindable;
136             return textFieldStyle.exceedPolicy;
137         });
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) =>
141         {
142             var textFieldStyle = (TextFieldStyle)bindable;
143             textFieldStyle.horizontalAlignment = (HorizontalAlignment?)newValue;
144         },
145         defaultValueCreator: (bindable) =>
146         {
147             var textFieldStyle = (TextFieldStyle)bindable;
148             return textFieldStyle.horizontalAlignment;
149         });
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) =>
153         {
154             var textFieldStyle = (TextFieldStyle)bindable;
155             textFieldStyle.verticalAlignment = (VerticalAlignment?)newValue;
156         },
157         defaultValueCreator: (bindable) =>
158         {
159             var textFieldStyle = (TextFieldStyle)bindable;
160             return textFieldStyle.verticalAlignment;
161         });
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) =>
165         {
166             var textFieldStyle = (TextFieldStyle)bindable;
167             textFieldStyle.secondaryCursorColor = (Vector4)newValue;
168         },
169         defaultValueCreator: (bindable) =>
170         {
171             var textFieldStyle = (TextFieldStyle)bindable;
172             return textFieldStyle.secondaryCursorColor;
173         });
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) =>
177         {
178             var textFieldStyle = (TextFieldStyle)bindable;
179             textFieldStyle.enableCursorBlink = (bool?)newValue;
180         },
181         defaultValueCreator: (bindable) =>
182         {
183             var textFieldStyle = (TextFieldStyle)bindable;
184             return textFieldStyle.enableCursorBlink;
185         });
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) =>
189         {
190             var textFieldStyle = (TextFieldStyle)bindable;
191             textFieldStyle.cursorBlinkInterval = (float?)newValue;
192         },
193         defaultValueCreator: (bindable) =>
194         {
195             var textFieldStyle = (TextFieldStyle)bindable;
196             return textFieldStyle.cursorBlinkInterval;
197         });
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) =>
201         {
202             var textFieldStyle = (TextFieldStyle)bindable;
203             textFieldStyle.cursorBlinkDuration = (float?)newValue;
204         },
205         defaultValueCreator: (bindable) =>
206         {
207             var textFieldStyle = (TextFieldStyle)bindable;
208             return textFieldStyle.cursorBlinkDuration;
209         });
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) =>
213         {
214             var textFieldStyle = (TextFieldStyle)bindable;
215             textFieldStyle.cursorWidth = (int?)newValue;
216         },
217         defaultValueCreator: (bindable) =>
218         {
219             var textFieldStyle = (TextFieldStyle)bindable;
220             return textFieldStyle.cursorWidth;
221         });
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) =>
225         {
226             var textFieldStyle = (TextFieldStyle)bindable;
227             textFieldStyle.grabHandleImage = (string)newValue;
228         },
229         defaultValueCreator: (bindable) =>
230         {
231             var textFieldStyle = (TextFieldStyle)bindable;
232             return textFieldStyle.grabHandleImage;
233         });
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) =>
237         {
238             var textFieldStyle = (TextFieldStyle)bindable;
239             textFieldStyle.grabHandlePressedImage = (string)newValue;
240         },
241         defaultValueCreator: (bindable) =>
242         {
243             var textFieldStyle = (TextFieldStyle)bindable;
244             return textFieldStyle.grabHandlePressedImage;
245         });
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) =>
249         {
250             var textFieldStyle = (TextFieldStyle)bindable;
251             textFieldStyle.scrollThreshold = (float?)newValue;
252         },
253         defaultValueCreator: (bindable) =>
254         {
255             var textFieldStyle = (TextFieldStyle)bindable;
256             return textFieldStyle.scrollThreshold;
257         });
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) =>
261         {
262             var textFieldStyle = (TextFieldStyle)bindable;
263             textFieldStyle.scrollSpeed = (float?)newValue;
264         },
265         defaultValueCreator: (bindable) =>
266         {
267             var textFieldStyle = (TextFieldStyle)bindable;
268             return textFieldStyle.scrollSpeed;
269         });
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) =>
273         {
274             var textFieldStyle = (TextFieldStyle)bindable;
275             textFieldStyle.selectionHighlightColor = (Vector4)newValue;
276         },
277         defaultValueCreator: (bindable) =>
278         {
279             var textFieldStyle = (TextFieldStyle)bindable;
280             return textFieldStyle.selectionHighlightColor;
281         });
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) =>
285         {
286             var textFieldStyle = (TextFieldStyle)bindable;
287             textFieldStyle.decorationBoundingBox = (Rectangle)newValue;
288         },
289         defaultValueCreator: (bindable) =>
290         {
291             var textFieldStyle = (TextFieldStyle)bindable;
292             return textFieldStyle.decorationBoundingBox;
293         });
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) =>
297         {
298             var textFieldStyle = (TextFieldStyle)bindable;
299             textFieldStyle.inputColor = (Vector4)newValue;
300         },
301         defaultValueCreator: (bindable) =>
302         {
303             var textFieldStyle = (TextFieldStyle)bindable;
304             return textFieldStyle.inputColor;
305         });
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) =>
309         {
310             var textFieldStyle = (TextFieldStyle)bindable;
311             textFieldStyle.enableMarkup = (bool?)newValue;
312         },
313         defaultValueCreator: (bindable) =>
314         {
315             var textFieldStyle = (TextFieldStyle)bindable;
316             return textFieldStyle.enableMarkup;
317         });
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) =>
321         {
322             var textFieldStyle = (TextFieldStyle)bindable;
323             textFieldStyle.inputFontFamily = (string)newValue;
324         },
325         defaultValueCreator: (bindable) =>
326         {
327             var textFieldStyle = (TextFieldStyle)bindable;
328             return textFieldStyle.inputFontFamily;
329         });
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) =>
333         {
334             var textFieldStyle = (TextFieldStyle)bindable;
335             textFieldStyle.inputPointSize = (float?)newValue;
336         },
337         defaultValueCreator: (bindable) =>
338         {
339             var textFieldStyle = (TextFieldStyle)bindable;
340             return textFieldStyle.inputPointSize;
341         });
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) =>
345         {
346             var textFieldStyle = (TextFieldStyle)bindable;
347             textFieldStyle.inputUnderline = (string)newValue;
348         },
349         defaultValueCreator: (bindable) =>
350         {
351             var textFieldStyle = (TextFieldStyle)bindable;
352             return textFieldStyle.inputUnderline;
353         });
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) =>
357         {
358             var textFieldStyle = (TextFieldStyle)bindable;
359             textFieldStyle.inputShadow = (string)newValue;
360         },
361         defaultValueCreator: (bindable) =>
362         {
363             var textFieldStyle = (TextFieldStyle)bindable;
364             return textFieldStyle.inputShadow;
365         });
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) =>
369         {
370             var textFieldStyle = (TextFieldStyle)bindable;
371             textFieldStyle.emboss = (string)newValue;
372         },
373         defaultValueCreator: (bindable) =>
374         {
375             var textFieldStyle = (TextFieldStyle)bindable;
376             return textFieldStyle.emboss;
377         });
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) =>
381         {
382             var textFieldStyle = (TextFieldStyle)bindable;
383             textFieldStyle.inputEmboss = (string)newValue;
384         },
385         defaultValueCreator: (bindable) =>
386         {
387             var textFieldStyle = (TextFieldStyle)bindable;
388             return textFieldStyle.inputEmboss;
389         });
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) =>
393         {
394             var textFieldStyle = (TextFieldStyle)bindable;
395             textFieldStyle.inputOutline = (string)newValue;
396         },
397         defaultValueCreator: (bindable) =>
398         {
399             var textFieldStyle = (TextFieldStyle)bindable;
400             return textFieldStyle.inputOutline;
401         });
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) =>
405         {
406             var textFieldStyle = (TextFieldStyle)bindable;
407             textFieldStyle.pixelSizeSelector = ((Selector<float?>)newValue)?.Clone();
408         },
409         defaultValueCreator: (bindable) =>
410         {
411             var textFieldStyle = (TextFieldStyle)bindable;
412             return textFieldStyle.pixelSizeSelector;
413         });
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) =>
417         {
418             var textFieldStyle = (TextFieldStyle)bindable;
419             textFieldStyle.enableSelection = (bool?)newValue;
420         },
421         defaultValueCreator: (bindable) =>
422         {
423             var textFieldStyle = (TextFieldStyle)bindable;
424             return textFieldStyle.enableSelection;
425         });
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) =>
429         {
430             var textFieldStyle = (TextFieldStyle)bindable;
431             textFieldStyle.ellipsis = (bool?)newValue;
432         },
433         defaultValueCreator: (bindable) =>
434         {
435             var textFieldStyle = (TextFieldStyle)bindable;
436             return textFieldStyle.ellipsis;
437         });
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) =>
441         {
442             var textFieldStyle = (TextFieldStyle)bindable;
443             textFieldStyle.matchSystemLanguageDirection = (bool?)newValue;
444         },
445         defaultValueCreator: (bindable) =>
446         {
447             var textFieldStyle = (TextFieldStyle)bindable;
448             return textFieldStyle.matchSystemLanguageDirection;
449         });
450
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;
486
487         static TextFieldStyle() { }
488
489         /// <summary>
490         /// Create an empty instance.
491         /// </summary>
492         [EditorBrowsable(EditorBrowsableState.Never)]
493         public TextFieldStyle() : base()
494         {
495         }
496
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
500         {
501             get => (string)GetValue(PlaceholderTextProperty);
502             set => SetValue(PlaceholderTextProperty, value);
503         }
504
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
508         {
509             get => (string)GetValue(PlaceholderTextFocusedProperty);
510             set => SetValue(PlaceholderTextFocusedProperty, value);
511         }
512
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
516         {
517             get
518             {
519                 Selector<string> tmp = (Selector<string>)GetValue(FontFamilySelectorProperty);
520                 return (null != tmp) ? tmp : fontFamilySelector = new Selector<string>();
521             }
522             set => SetValue(FontFamilySelectorProperty, value);
523         }
524
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
528         {
529             get => (int?)GetValue(MaxLengthProperty);
530             set => SetValue(MaxLengthProperty, value);
531         }
532
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
536         {
537             get => (int?)GetValue(ExceedPolicyProperty);
538             set => SetValue(ExceedPolicyProperty, value);
539         }
540
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
544         {
545             get => (HorizontalAlignment?)GetValue(HorizontalAlignmentProperty);
546             set => SetValue(HorizontalAlignmentProperty, value);
547         }
548
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
552         {
553             get => (VerticalAlignment?)GetValue(VerticalAlignmentProperty);
554             set => SetValue(VerticalAlignmentProperty, value);
555         }
556
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
560         {
561             get => (Vector4)GetValue(SecondaryCursorColorProperty);
562             set => SetValue(SecondaryCursorColorProperty, value);
563         }
564
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
568         {
569             get => (bool?)GetValue(EnableCursorBlinkProperty);
570             set => SetValue(EnableCursorBlinkProperty, value);
571         }
572
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
576         {
577             get => (float?)GetValue(CursorBlinkIntervalProperty);
578             set => SetValue(CursorBlinkIntervalProperty, value);
579         }
580
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
584         {
585             get => (float?)GetValue(CursorBlinkDurationProperty);
586             set => SetValue(CursorBlinkDurationProperty, value);
587         }
588
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
592         {
593             get => (int?)GetValue(CursorWidthProperty);
594             set => SetValue(CursorWidthProperty, value);
595         }
596
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
600         {
601             get => (string)GetValue(GrabHandleImageProperty);
602             set => SetValue(GrabHandleImageProperty, value);
603         }
604
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
608         {
609             get => (string)GetValue(GrabHandlePressedImageProperty);
610             set => SetValue(GrabHandlePressedImageProperty, value);
611         }
612
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
616         {
617             get => (float?)GetValue(ScrollThresholdProperty);
618             set => SetValue(ScrollThresholdProperty, value);
619         }
620
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
624         {
625             get => (float?)GetValue(ScrollSpeedProperty);
626             set => SetValue(ScrollSpeedProperty, value);
627         }
628
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
632         {
633             get => (Vector4)GetValue(SelectionHighlightColorProperty);
634             set => SetValue(SelectionHighlightColorProperty, value);
635         }
636
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
640         {
641             get => (Rectangle)GetValue(DecorationBoundingBoxProperty);
642             set => SetValue(DecorationBoundingBoxProperty, value);
643         }
644
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
648         {
649             get => (Vector4)GetValue(InputColorProperty);
650             set => SetValue(InputColorProperty, value);
651         }
652
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
656         {
657             get => (bool?)GetValue(EnableMarkupProperty);
658             set => SetValue(EnableMarkupProperty, value);
659         }
660
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
664         {
665             get => (string)GetValue(InputFontFamilyProperty);
666             set => SetValue(InputFontFamilyProperty, value);
667         }
668
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
672         {
673             get => (float?)GetValue(InputPointSizeProperty);
674             set => SetValue(InputPointSizeProperty, value);
675         }
676
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
680         {
681             get => (string)GetValue(InputUnderlineProperty);
682             set => SetValue(InputUnderlineProperty, value);
683         }
684
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
688         {
689             get => (string)GetValue(InputShadowProperty);
690             set => SetValue(InputShadowProperty, value);
691         }
692
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)]
695         public string Emboss
696         {
697             get => (string)GetValue(EmbossProperty);
698             set => SetValue(EmbossProperty, value);
699         }
700
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
704         {
705             get => (string)GetValue(InputEmbossProperty);
706             set => SetValue(InputEmbossProperty, value);
707         }
708
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
712         {
713             get => (string)GetValue(InputOutlineProperty);
714             set => SetValue(InputOutlineProperty, value);
715         }
716
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
720         {
721             get => (Selector<float?>)GetValue(PixelSizeSelectorProperty) ?? (pixelSizeSelector = new Selector<float?>());
722             set => SetValue(PixelSizeSelectorProperty, value);
723         }
724
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
728         {
729             get => (bool?)GetValue(EnableSelectionProperty);
730             set => SetValue(EnableSelectionProperty, value);
731         }
732
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
736         {
737             get => (bool?)GetValue(EllipsisProperty);
738             set => SetValue(EllipsisProperty, value);
739         }
740
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
744         {
745             get => (bool?)GetValue(MatchSystemLanguageDirectionProperty);
746             set => SetValue(MatchSystemLanguageDirectionProperty, value);
747         }
748
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
752         {
753             get
754             {
755                 Selector<Color> tmp = (Selector<Color>)GetValue(TextColorSelectorProperty);
756                 return (null != tmp) ? tmp : textColorSelector = new Selector<Color>();
757             }
758             set => SetValue(TextColorSelectorProperty, value);
759         }
760
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
764         {
765             get
766             {
767                 Selector<float?> tmp = (Selector<float?>)GetValue(PointSizeSelectorProperty);
768                 return (null != tmp) ? tmp : pointSizeSelector = new Selector<float?>();
769             }
770             set => SetValue(PointSizeSelectorProperty, value);
771         }
772
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
776         {
777             get
778             {
779                 Selector<Vector4> tmp = (Selector<Vector4>)GetValue(PlaceholderTextColorSelectorProperty);
780                 return (null != tmp) ? tmp : placeholderTextColorSelector = new Selector<Vector4>();
781             }
782             set => SetValue(PlaceholderTextColorSelectorProperty, value);
783         }
784
785         /// <summary>
786         /// Gets or sets primary cursor color.
787         /// </summary>
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
792         {
793             get
794             {
795                 Selector<Vector4> tmp = (Selector<Vector4>)GetValue(PrimaryCursorColorSelectorProperty);
796                 return (null != tmp) ? tmp : primaryCursorColorSelector = new Selector<Vector4>();
797             }
798             set => SetValue(PrimaryCursorColorSelectorProperty, value);
799         }
800     }
801 }