[NUI] Improve performance : Remove rarely used properties from the Style. (#2695)
[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         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
31         [EditorBrowsable(EditorBrowsableState.Never)]
32         public static readonly BindableProperty TranslatablePlaceholderTextSelectorProperty = BindableProperty.Create("TranslatablePlaceholderTextSelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
33         {
34             var textFieldStyle = (TextFieldStyle)bindable;
35             textFieldStyle.translatablePlaceholderTextSelector = ((Selector<string>)newValue)?.Clone();
36         },
37         defaultValueCreator: (bindable) =>
38         {
39             var textFieldStyle = (TextFieldStyle)bindable;
40             return textFieldStyle.translatablePlaceholderTextSelector;
41         });
42         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
43         [EditorBrowsable(EditorBrowsableState.Never)]
44         public static readonly BindableProperty FontFamilySelectorProperty = BindableProperty.Create("FontFamilySelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
45         {
46             var textFieldStyle = (TextFieldStyle)bindable;
47             textFieldStyle.fontFamilySelector = ((Selector<string>)newValue)?.Clone();
48         },
49         defaultValueCreator: (bindable) =>
50         {
51             var textFieldStyle = (TextFieldStyle)bindable;
52             return textFieldStyle.fontFamilySelector;
53         });
54         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
55         [EditorBrowsable(EditorBrowsableState.Never)]
56         public static readonly BindableProperty PointSizeSelectorProperty = BindableProperty.Create("PointSizeSelector", typeof(Selector<float?>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
57         {
58             var textFieldStyle = (TextFieldStyle)bindable;
59             textFieldStyle.pointSizeSelector = ((Selector<float?>)newValue)?.Clone();
60         },
61         defaultValueCreator: (bindable) =>
62         {
63             var textFieldStyle = (TextFieldStyle)bindable;
64             return textFieldStyle.pointSizeSelector;
65         });
66         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
67         [EditorBrowsable(EditorBrowsableState.Never)]
68         public static readonly BindableProperty TextColorSelectorProperty = BindableProperty.Create("TextColorSelector", typeof(Selector<Color>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
69         {
70             var textFieldStyle = (TextFieldStyle)bindable;
71             textFieldStyle.textColorSelector = ((Selector<Color>)newValue)?.Clone();
72         },
73         defaultValueCreator: (bindable) =>
74         {
75             var textFieldStyle = (TextFieldStyle)bindable;
76             return textFieldStyle.textColorSelector;
77         });
78         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
79         [EditorBrowsable(EditorBrowsableState.Never)]
80         public static readonly BindableProperty PlaceholderTextColorSelectorProperty = BindableProperty.Create("PlaceholderTextColorSelector", typeof(Selector<Vector4>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
81         {
82             var textFieldStyle = (TextFieldStyle)bindable;
83             textFieldStyle.placeholderTextColorSelector = ((Selector<Vector4>)newValue)?.Clone();
84         },
85         defaultValueCreator: (bindable) =>
86         {
87             var textFieldStyle = (TextFieldStyle)bindable;
88             return textFieldStyle.placeholderTextColorSelector;
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 PrimaryCursorColorSelectorProperty = BindableProperty.Create("PrimaryCursorColorSelector", typeof(Selector<Vector4>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
93         {
94             var textFieldStyle = (TextFieldStyle)bindable;
95             textFieldStyle.primaryCursorColorSelector = ((Selector<Vector4>)newValue)?.Clone();
96         },
97         defaultValueCreator: (bindable) =>
98         {
99             var textFieldStyle = (TextFieldStyle)bindable;
100             return textFieldStyle.primaryCursorColorSelector;
101         });
102
103         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
104         [EditorBrowsable(EditorBrowsableState.Never)]
105         public static readonly BindableProperty PlaceholderTextProperty = BindableProperty.Create(nameof(PlaceholderText), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
106         {
107             var textFieldStyle = (TextFieldStyle)bindable;
108             textFieldStyle.placeholderText = (string)newValue;
109         },
110         defaultValueCreator: (bindable) =>
111         {
112             var textFieldStyle = (TextFieldStyle)bindable;
113             return textFieldStyle.placeholderText;
114         });
115         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
116         [EditorBrowsable(EditorBrowsableState.Never)]
117         public static readonly BindableProperty PlaceholderTextFocusedProperty = BindableProperty.Create(nameof(PlaceholderTextFocused), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
118         {
119             var textFieldStyle = (TextFieldStyle)bindable;
120             textFieldStyle.placeholderTextFocused = (string)newValue;
121         },
122         defaultValueCreator: (bindable) =>
123         {
124             var textFieldStyle = (TextFieldStyle)bindable;
125             return textFieldStyle.placeholderTextFocused;
126         });
127         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
128         [EditorBrowsable(EditorBrowsableState.Never)]
129         public static readonly BindableProperty MaxLengthProperty = BindableProperty.Create(nameof(MaxLength), typeof(int?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
130         {
131             var textFieldStyle = (TextFieldStyle)bindable;
132             textFieldStyle.maxLength = (int?)newValue;
133         },
134         defaultValueCreator: (bindable) =>
135         {
136             var textFieldStyle = (TextFieldStyle)bindable;
137             return textFieldStyle.maxLength;
138         });
139         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
140         [EditorBrowsable(EditorBrowsableState.Never)]
141         public static readonly BindableProperty ExceedPolicyProperty = BindableProperty.Create(nameof(ExceedPolicy), typeof(int?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
142         {
143             var textFieldStyle = (TextFieldStyle)bindable;
144             textFieldStyle.exceedPolicy = (int?)newValue;
145         },
146         defaultValueCreator: (bindable) =>
147         {
148             var textFieldStyle = (TextFieldStyle)bindable;
149             return textFieldStyle.exceedPolicy;
150         });
151         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
152         [EditorBrowsable(EditorBrowsableState.Never)]
153         public static readonly BindableProperty HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
154         {
155             var textFieldStyle = (TextFieldStyle)bindable;
156             textFieldStyle.horizontalAlignment = (HorizontalAlignment?)newValue;
157         },
158         defaultValueCreator: (bindable) =>
159         {
160             var textFieldStyle = (TextFieldStyle)bindable;
161             return textFieldStyle.horizontalAlignment;
162         });
163         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
164         [EditorBrowsable(EditorBrowsableState.Never)]
165         public static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.Create(nameof(VerticalAlignment), typeof(VerticalAlignment?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
166         {
167             var textFieldStyle = (TextFieldStyle)bindable;
168             textFieldStyle.verticalAlignment = (VerticalAlignment?)newValue;
169         },
170         defaultValueCreator: (bindable) =>
171         {
172             var textFieldStyle = (TextFieldStyle)bindable;
173             return textFieldStyle.verticalAlignment;
174         });
175         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
176         [EditorBrowsable(EditorBrowsableState.Never)]
177         public static readonly BindableProperty SecondaryCursorColorProperty = BindableProperty.Create(nameof(SecondaryCursorColor), typeof(Vector4), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
178         {
179             var textFieldStyle = (TextFieldStyle)bindable;
180             textFieldStyle.secondaryCursorColor = (Vector4)newValue;
181         },
182         defaultValueCreator: (bindable) =>
183         {
184             var textFieldStyle = (TextFieldStyle)bindable;
185             return textFieldStyle.secondaryCursorColor;
186         });
187         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
188         [EditorBrowsable(EditorBrowsableState.Never)]
189         public static readonly BindableProperty EnableCursorBlinkProperty = BindableProperty.Create(nameof(EnableCursorBlink), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
190         {
191             var textFieldStyle = (TextFieldStyle)bindable;
192             textFieldStyle.enableCursorBlink = (bool?)newValue;
193         },
194         defaultValueCreator: (bindable) =>
195         {
196             var textFieldStyle = (TextFieldStyle)bindable;
197             return textFieldStyle.enableCursorBlink;
198         });
199         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
200         [EditorBrowsable(EditorBrowsableState.Never)]
201         public static readonly BindableProperty CursorBlinkIntervalProperty = BindableProperty.Create(nameof(CursorBlinkInterval), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
202         {
203             var textFieldStyle = (TextFieldStyle)bindable;
204             textFieldStyle.cursorBlinkInterval = (float?)newValue;
205         },
206         defaultValueCreator: (bindable) =>
207         {
208             var textFieldStyle = (TextFieldStyle)bindable;
209             return textFieldStyle.cursorBlinkInterval;
210         });
211         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
212         [EditorBrowsable(EditorBrowsableState.Never)]
213         public static readonly BindableProperty CursorBlinkDurationProperty = BindableProperty.Create(nameof(CursorBlinkDuration), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
214         {
215             var textFieldStyle = (TextFieldStyle)bindable;
216             textFieldStyle.cursorBlinkDuration = (float?)newValue;
217         },
218         defaultValueCreator: (bindable) =>
219         {
220             var textFieldStyle = (TextFieldStyle)bindable;
221             return textFieldStyle.cursorBlinkDuration;
222         });
223         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
224         [EditorBrowsable(EditorBrowsableState.Never)]
225         public static readonly BindableProperty CursorWidthProperty = BindableProperty.Create(nameof(CursorWidth), typeof(int?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
226         {
227             var textFieldStyle = (TextFieldStyle)bindable;
228             textFieldStyle.cursorWidth = (int?)newValue;
229         },
230         defaultValueCreator: (bindable) =>
231         {
232             var textFieldStyle = (TextFieldStyle)bindable;
233             return textFieldStyle.cursorWidth;
234         });
235         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
236         [EditorBrowsable(EditorBrowsableState.Never)]
237         public static readonly BindableProperty GrabHandleImageProperty = BindableProperty.Create(nameof(GrabHandleImage), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
238         {
239             var textFieldStyle = (TextFieldStyle)bindable;
240             textFieldStyle.grabHandleImage = (string)newValue;
241         },
242         defaultValueCreator: (bindable) =>
243         {
244             var textFieldStyle = (TextFieldStyle)bindable;
245             return textFieldStyle.grabHandleImage;
246         });
247         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
248         [EditorBrowsable(EditorBrowsableState.Never)]
249         public static readonly BindableProperty GrabHandlePressedImageProperty = BindableProperty.Create(nameof(GrabHandlePressedImage), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
250         {
251             var textFieldStyle = (TextFieldStyle)bindable;
252             textFieldStyle.grabHandlePressedImage = (string)newValue;
253         },
254         defaultValueCreator: (bindable) =>
255         {
256             var textFieldStyle = (TextFieldStyle)bindable;
257             return textFieldStyle.grabHandlePressedImage;
258         });
259         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
260         [EditorBrowsable(EditorBrowsableState.Never)]
261         public static readonly BindableProperty ScrollThresholdProperty = BindableProperty.Create(nameof(ScrollThreshold), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
262         {
263             var textFieldStyle = (TextFieldStyle)bindable;
264             textFieldStyle.scrollThreshold = (float?)newValue;
265         },
266         defaultValueCreator: (bindable) =>
267         {
268             var textFieldStyle = (TextFieldStyle)bindable;
269             return textFieldStyle.scrollThreshold;
270         });
271         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
272         [EditorBrowsable(EditorBrowsableState.Never)]
273         public static readonly BindableProperty ScrollSpeedProperty = BindableProperty.Create(nameof(ScrollSpeed), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
274         {
275             var textFieldStyle = (TextFieldStyle)bindable;
276             textFieldStyle.scrollSpeed = (float?)newValue;
277         },
278         defaultValueCreator: (bindable) =>
279         {
280             var textFieldStyle = (TextFieldStyle)bindable;
281             return textFieldStyle.scrollSpeed;
282         });
283         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
284         [EditorBrowsable(EditorBrowsableState.Never)]
285         public static readonly BindableProperty SelectionHighlightColorProperty = BindableProperty.Create(nameof(SelectionHighlightColor), typeof(Vector4), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
286         {
287             var textFieldStyle = (TextFieldStyle)bindable;
288             textFieldStyle.selectionHighlightColor = (Vector4)newValue;
289         },
290         defaultValueCreator: (bindable) =>
291         {
292             var textFieldStyle = (TextFieldStyle)bindable;
293             return textFieldStyle.selectionHighlightColor;
294         });
295         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
296         [EditorBrowsable(EditorBrowsableState.Never)]
297         public static readonly BindableProperty DecorationBoundingBoxProperty = BindableProperty.Create(nameof(DecorationBoundingBox), typeof(Rectangle), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
298         {
299             var textFieldStyle = (TextFieldStyle)bindable;
300             textFieldStyle.decorationBoundingBox = (Rectangle)newValue;
301         },
302         defaultValueCreator: (bindable) =>
303         {
304             var textFieldStyle = (TextFieldStyle)bindable;
305             return textFieldStyle.decorationBoundingBox;
306         });
307         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
308         [EditorBrowsable(EditorBrowsableState.Never)]
309         public static readonly BindableProperty InputColorProperty = BindableProperty.Create(nameof(InputColor), typeof(Vector4), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
310         {
311             var textFieldStyle = (TextFieldStyle)bindable;
312             textFieldStyle.inputColor = (Vector4)newValue;
313         },
314         defaultValueCreator: (bindable) =>
315         {
316             var textFieldStyle = (TextFieldStyle)bindable;
317             return textFieldStyle.inputColor;
318         });
319         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
320         [EditorBrowsable(EditorBrowsableState.Never)]
321         public static readonly BindableProperty EnableMarkupProperty = BindableProperty.Create(nameof(EnableMarkup), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
322         {
323             var textFieldStyle = (TextFieldStyle)bindable;
324             textFieldStyle.enableMarkup = (bool?)newValue;
325         },
326         defaultValueCreator: (bindable) =>
327         {
328             var textFieldStyle = (TextFieldStyle)bindable;
329             return textFieldStyle.enableMarkup;
330         });
331         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
332         [EditorBrowsable(EditorBrowsableState.Never)]
333         public static readonly BindableProperty InputFontFamilyProperty = BindableProperty.Create(nameof(InputFontFamily), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
334         {
335             var textFieldStyle = (TextFieldStyle)bindable;
336             textFieldStyle.inputFontFamily = (string)newValue;
337         },
338         defaultValueCreator: (bindable) =>
339         {
340             var textFieldStyle = (TextFieldStyle)bindable;
341             return textFieldStyle.inputFontFamily;
342         });
343         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
344         [EditorBrowsable(EditorBrowsableState.Never)]
345         public static readonly BindableProperty InputPointSizeProperty = BindableProperty.Create(nameof(InputPointSize), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
346         {
347             var textFieldStyle = (TextFieldStyle)bindable;
348             textFieldStyle.inputPointSize = (float?)newValue;
349         },
350         defaultValueCreator: (bindable) =>
351         {
352             var textFieldStyle = (TextFieldStyle)bindable;
353             return textFieldStyle.inputPointSize;
354         });
355         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
356         [EditorBrowsable(EditorBrowsableState.Never)]
357         public static readonly BindableProperty InputUnderlineProperty = BindableProperty.Create(nameof(InputUnderline), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
358         {
359             var textFieldStyle = (TextFieldStyle)bindable;
360             textFieldStyle.inputUnderline = (string)newValue;
361         },
362         defaultValueCreator: (bindable) =>
363         {
364             var textFieldStyle = (TextFieldStyle)bindable;
365             return textFieldStyle.inputUnderline;
366         });
367         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
368         [EditorBrowsable(EditorBrowsableState.Never)]
369         public static readonly BindableProperty InputShadowProperty = BindableProperty.Create(nameof(InputShadow), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
370         {
371             var textFieldStyle = (TextFieldStyle)bindable;
372             textFieldStyle.inputShadow = (string)newValue;
373         },
374         defaultValueCreator: (bindable) =>
375         {
376             var textFieldStyle = (TextFieldStyle)bindable;
377             return textFieldStyle.inputShadow;
378         });
379         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
380         [EditorBrowsable(EditorBrowsableState.Never)]
381         public static readonly BindableProperty EmbossProperty = BindableProperty.Create(nameof(Emboss), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
382         {
383             var textFieldStyle = (TextFieldStyle)bindable;
384             textFieldStyle.emboss = (string)newValue;
385         },
386         defaultValueCreator: (bindable) =>
387         {
388             var textFieldStyle = (TextFieldStyle)bindable;
389             return textFieldStyle.emboss;
390         });
391         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
392         [EditorBrowsable(EditorBrowsableState.Never)]
393         public static readonly BindableProperty InputEmbossProperty = BindableProperty.Create(nameof(InputEmboss), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
394         {
395             var textFieldStyle = (TextFieldStyle)bindable;
396             textFieldStyle.inputEmboss = (string)newValue;
397         },
398         defaultValueCreator: (bindable) =>
399         {
400             var textFieldStyle = (TextFieldStyle)bindable;
401             return textFieldStyle.inputEmboss;
402         });
403         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
404         [EditorBrowsable(EditorBrowsableState.Never)]
405         public static readonly BindableProperty InputOutlineProperty = BindableProperty.Create(nameof(InputOutline), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
406         {
407             var textFieldStyle = (TextFieldStyle)bindable;
408             textFieldStyle.inputOutline = (string)newValue;
409         },
410         defaultValueCreator: (bindable) =>
411         {
412             var textFieldStyle = (TextFieldStyle)bindable;
413             return textFieldStyle.inputOutline;
414         });
415         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
416         [EditorBrowsable(EditorBrowsableState.Never)]
417         public static readonly BindableProperty PixelSizeSelectorProperty = BindableProperty.Create("PixelSizeSelector", typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
418         {
419             var textFieldStyle = (TextFieldStyle)bindable;
420             textFieldStyle.pixelSizeSelector = ((Selector<float?>)newValue)?.Clone();
421         },
422         defaultValueCreator: (bindable) =>
423         {
424             var textFieldStyle = (TextFieldStyle)bindable;
425             return textFieldStyle.pixelSizeSelector;
426         });
427         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
428         [EditorBrowsable(EditorBrowsableState.Never)]
429         public static readonly BindableProperty EnableSelectionProperty = BindableProperty.Create(nameof(EnableSelection), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
430         {
431             var textFieldStyle = (TextFieldStyle)bindable;
432             textFieldStyle.enableSelection = (bool?)newValue;
433         },
434         defaultValueCreator: (bindable) =>
435         {
436             var textFieldStyle = (TextFieldStyle)bindable;
437             return textFieldStyle.enableSelection;
438         });
439         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
440         [EditorBrowsable(EditorBrowsableState.Never)]
441         public static readonly BindableProperty EllipsisProperty = BindableProperty.Create(nameof(Ellipsis), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
442         {
443             var textFieldStyle = (TextFieldStyle)bindable;
444             textFieldStyle.ellipsis = (bool?)newValue;
445         },
446         defaultValueCreator: (bindable) =>
447         {
448             var textFieldStyle = (TextFieldStyle)bindable;
449             return textFieldStyle.ellipsis;
450         });
451         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
452         [EditorBrowsable(EditorBrowsableState.Never)]
453         public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(MatchSystemLanguageDirection), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
454         {
455             var textFieldStyle = (TextFieldStyle)bindable;
456             textFieldStyle.matchSystemLanguageDirection = (bool?)newValue;
457         },
458         defaultValueCreator: (bindable) =>
459         {
460             var textFieldStyle = (TextFieldStyle)bindable;
461             return textFieldStyle.matchSystemLanguageDirection;
462         });
463
464         private string placeholderText;
465         private string placeholderTextFocused;
466         private int? maxLength;
467         private int? exceedPolicy;
468         private HorizontalAlignment? horizontalAlignment;
469         private VerticalAlignment? verticalAlignment;
470         private Vector4 secondaryCursorColor;
471         private bool? enableCursorBlink;
472         private float? cursorBlinkInterval;
473         private float? cursorBlinkDuration;
474         private int? cursorWidth;
475         private string grabHandleImage;
476         private string grabHandlePressedImage;
477         private float? scrollThreshold;
478         private float? scrollSpeed;
479         private Vector4 selectionHighlightColor;
480         private Rectangle decorationBoundingBox;
481         private Vector4 inputColor;
482         private bool? enableMarkup;
483         private string inputFontFamily;
484         private float? inputPointSize;
485         private string inputUnderline;
486         private string inputShadow;
487         private string emboss;
488         private string inputEmboss;
489         private string inputOutline;
490         private Selector<float?> pixelSizeSelector;
491         private bool? enableSelection;
492         private bool? ellipsis;
493         private bool? matchSystemLanguageDirection;
494         private Selector<string> translatablePlaceholderTextSelector;
495         private Selector<string> fontFamilySelector;
496         private Selector<Color> textColorSelector;
497         private Selector<float?> pointSizeSelector;
498         private Selector<Vector4> placeholderTextColorSelector;
499         private Selector<Vector4> primaryCursorColorSelector;
500
501         static TextFieldStyle() { }
502
503         /// <summary>
504         /// Create an empty instance.
505         /// </summary>
506         [EditorBrowsable(EditorBrowsableState.Never)]
507         public TextFieldStyle() : base()
508         {
509         }
510
511         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
512         [EditorBrowsable(EditorBrowsableState.Never)]
513         public Selector<string> TranslatablePlaceholderText
514         {
515             get
516             {
517                 Selector<string> tmp = (Selector<string>)GetValue(TranslatablePlaceholderTextSelectorProperty);
518                 return (null != tmp) ? tmp : translatablePlaceholderTextSelector = new Selector<string>();
519             }
520             set => SetValue(TranslatablePlaceholderTextSelectorProperty, value);
521         }
522
523         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
524         [EditorBrowsable(EditorBrowsableState.Never)]
525         public string PlaceholderText
526         {
527             get => (string)GetValue(PlaceholderTextProperty);
528             set => SetValue(PlaceholderTextProperty, value);
529         }
530
531         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
532         [EditorBrowsable(EditorBrowsableState.Never)]
533         public string PlaceholderTextFocused
534         {
535             get => (string)GetValue(PlaceholderTextFocusedProperty);
536             set => SetValue(PlaceholderTextFocusedProperty, value);
537         }
538
539         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
540         [EditorBrowsable(EditorBrowsableState.Never)]
541         public Selector<string> FontFamily
542         {
543             get
544             {
545                 Selector<string> tmp = (Selector<string>)GetValue(FontFamilySelectorProperty);
546                 return (null != tmp) ? tmp : fontFamilySelector = new Selector<string>();
547             }
548             set => SetValue(FontFamilySelectorProperty, value);
549         }
550
551         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
552         [EditorBrowsable(EditorBrowsableState.Never)]
553         public int? MaxLength
554         {
555             get => (int?)GetValue(MaxLengthProperty);
556             set => SetValue(MaxLengthProperty, value);
557         }
558
559         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
560         [EditorBrowsable(EditorBrowsableState.Never)]
561         public int? ExceedPolicy
562         {
563             get => (int?)GetValue(ExceedPolicyProperty);
564             set => SetValue(ExceedPolicyProperty, value);
565         }
566
567         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
568         [EditorBrowsable(EditorBrowsableState.Never)]
569         public HorizontalAlignment? HorizontalAlignment
570         {
571             get => (HorizontalAlignment?)GetValue(HorizontalAlignmentProperty);
572             set => SetValue(HorizontalAlignmentProperty, value);
573         }
574
575         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
576         [EditorBrowsable(EditorBrowsableState.Never)]
577         public VerticalAlignment? VerticalAlignment
578         {
579             get => (VerticalAlignment?)GetValue(VerticalAlignmentProperty);
580             set => SetValue(VerticalAlignmentProperty, value);
581         }
582
583         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
584         [EditorBrowsable(EditorBrowsableState.Never)]
585         public Vector4 SecondaryCursorColor
586         {
587             get => (Vector4)GetValue(SecondaryCursorColorProperty);
588             set => SetValue(SecondaryCursorColorProperty, value);
589         }
590
591         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
592         [EditorBrowsable(EditorBrowsableState.Never)]
593         public bool? EnableCursorBlink
594         {
595             get => (bool?)GetValue(EnableCursorBlinkProperty);
596             set => SetValue(EnableCursorBlinkProperty, value);
597         }
598
599         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
600         [EditorBrowsable(EditorBrowsableState.Never)]
601         public float? CursorBlinkInterval
602         {
603             get => (float?)GetValue(CursorBlinkIntervalProperty);
604             set => SetValue(CursorBlinkIntervalProperty, value);
605         }
606
607         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
608         [EditorBrowsable(EditorBrowsableState.Never)]
609         public float? CursorBlinkDuration
610         {
611             get => (float?)GetValue(CursorBlinkDurationProperty);
612             set => SetValue(CursorBlinkDurationProperty, value);
613         }
614
615         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
616         [EditorBrowsable(EditorBrowsableState.Never)]
617         public int? CursorWidth
618         {
619             get => (int?)GetValue(CursorWidthProperty);
620             set => SetValue(CursorWidthProperty, value);
621         }
622
623         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
624         [EditorBrowsable(EditorBrowsableState.Never)]
625         public string GrabHandleImage
626         {
627             get => (string)GetValue(GrabHandleImageProperty);
628             set => SetValue(GrabHandleImageProperty, value);
629         }
630
631         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
632         [EditorBrowsable(EditorBrowsableState.Never)]
633         public string GrabHandlePressedImage
634         {
635             get => (string)GetValue(GrabHandlePressedImageProperty);
636             set => SetValue(GrabHandlePressedImageProperty, value);
637         }
638
639         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
640         [EditorBrowsable(EditorBrowsableState.Never)]
641         public float? ScrollThreshold
642         {
643             get => (float?)GetValue(ScrollThresholdProperty);
644             set => SetValue(ScrollThresholdProperty, value);
645         }
646
647         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
648         [EditorBrowsable(EditorBrowsableState.Never)]
649         public float? ScrollSpeed
650         {
651             get => (float?)GetValue(ScrollSpeedProperty);
652             set => SetValue(ScrollSpeedProperty, value);
653         }
654
655         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
656         [EditorBrowsable(EditorBrowsableState.Never)]
657         public Vector4 SelectionHighlightColor
658         {
659             get => (Vector4)GetValue(SelectionHighlightColorProperty);
660             set => SetValue(SelectionHighlightColorProperty, value);
661         }
662
663         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
664         [EditorBrowsable(EditorBrowsableState.Never)]
665         public Rectangle DecorationBoundingBox
666         {
667             get => (Rectangle)GetValue(DecorationBoundingBoxProperty);
668             set => SetValue(DecorationBoundingBoxProperty, value);
669         }
670
671         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
672         [EditorBrowsable(EditorBrowsableState.Never)]
673         public Vector4 InputColor
674         {
675             get => (Vector4)GetValue(InputColorProperty);
676             set => SetValue(InputColorProperty, value);
677         }
678
679         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
680         [EditorBrowsable(EditorBrowsableState.Never)]
681         public bool? EnableMarkup
682         {
683             get => (bool?)GetValue(EnableMarkupProperty);
684             set => SetValue(EnableMarkupProperty, value);
685         }
686
687         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
688         [EditorBrowsable(EditorBrowsableState.Never)]
689         public string InputFontFamily
690         {
691             get => (string)GetValue(InputFontFamilyProperty);
692             set => SetValue(InputFontFamilyProperty, value);
693         }
694
695         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
696         [EditorBrowsable(EditorBrowsableState.Never)]
697         public float? InputPointSize
698         {
699             get => (float?)GetValue(InputPointSizeProperty);
700             set => SetValue(InputPointSizeProperty, value);
701         }
702
703         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
704         [EditorBrowsable(EditorBrowsableState.Never)]
705         public string InputUnderline
706         {
707             get => (string)GetValue(InputUnderlineProperty);
708             set => SetValue(InputUnderlineProperty, value);
709         }
710
711         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
712         [EditorBrowsable(EditorBrowsableState.Never)]
713         public string InputShadow
714         {
715             get => (string)GetValue(InputShadowProperty);
716             set => SetValue(InputShadowProperty, value);
717         }
718
719         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
720         [EditorBrowsable(EditorBrowsableState.Never)]
721         public string Emboss
722         {
723             get => (string)GetValue(EmbossProperty);
724             set => SetValue(EmbossProperty, value);
725         }
726
727         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
728         [EditorBrowsable(EditorBrowsableState.Never)]
729         public string InputEmboss
730         {
731             get => (string)GetValue(InputEmbossProperty);
732             set => SetValue(InputEmbossProperty, value);
733         }
734
735         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
736         [EditorBrowsable(EditorBrowsableState.Never)]
737         public string InputOutline
738         {
739             get => (string)GetValue(InputOutlineProperty);
740             set => SetValue(InputOutlineProperty, value);
741         }
742
743         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
744         [EditorBrowsable(EditorBrowsableState.Never)]
745         public Selector<float?> PixelSize
746         {
747             get => (Selector<float?>)GetValue(PixelSizeSelectorProperty) ?? (pixelSizeSelector = new Selector<float?>());
748             set => SetValue(PixelSizeSelectorProperty, value);
749         }
750
751         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
752         [EditorBrowsable(EditorBrowsableState.Never)]
753         public bool? EnableSelection
754         {
755             get => (bool?)GetValue(EnableSelectionProperty);
756             set => SetValue(EnableSelectionProperty, value);
757         }
758
759         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
760         [EditorBrowsable(EditorBrowsableState.Never)]
761         public bool? Ellipsis
762         {
763             get => (bool?)GetValue(EllipsisProperty);
764             set => SetValue(EllipsisProperty, value);
765         }
766
767         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
768         [EditorBrowsable(EditorBrowsableState.Never)]
769         public bool? MatchSystemLanguageDirection
770         {
771             get => (bool?)GetValue(MatchSystemLanguageDirectionProperty);
772             set => SetValue(MatchSystemLanguageDirectionProperty, value);
773         }
774
775         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
776         [EditorBrowsable(EditorBrowsableState.Never)]
777         public Selector<Color> TextColor
778         {
779             get
780             {
781                 Selector<Color> tmp = (Selector<Color>)GetValue(TextColorSelectorProperty);
782                 return (null != tmp) ? tmp : textColorSelector = new Selector<Color>();
783             }
784             set => SetValue(TextColorSelectorProperty, value);
785         }
786
787         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
788         [EditorBrowsable(EditorBrowsableState.Never)]
789         public Selector<float?> PointSize
790         {
791             get
792             {
793                 Selector<float?> tmp = (Selector<float?>)GetValue(PointSizeSelectorProperty);
794                 return (null != tmp) ? tmp : pointSizeSelector = new Selector<float?>();
795             }
796             set => SetValue(PointSizeSelectorProperty, value);
797         }
798
799         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
800         [EditorBrowsable(EditorBrowsableState.Never)]
801         public Selector<Vector4> PlaceholderTextColor
802         {
803             get
804             {
805                 Selector<Vector4> tmp = (Selector<Vector4>)GetValue(PlaceholderTextColorSelectorProperty);
806                 return (null != tmp) ? tmp : placeholderTextColorSelector = new Selector<Vector4>();
807             }
808             set => SetValue(PlaceholderTextColorSelectorProperty, value);
809         }
810
811         /// <summary>
812         /// Gets or sets primary cursor color.
813         /// </summary>
814         /// <since_tizen> 6 </since_tizen>
815         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
816         [EditorBrowsable(EditorBrowsableState.Never)]
817         public Selector<Vector4> PrimaryCursorColor
818         {
819             get
820             {
821                 Selector<Vector4> tmp = (Selector<Vector4>)GetValue(PrimaryCursorColorSelectorProperty);
822                 return (null != tmp) ? tmp : primaryCursorColorSelector = new Selector<Vector4>();
823             }
824             set => SetValue(PrimaryCursorColorSelectorProperty, value);
825         }
826     }
827 }