36934d55035cccffd8663ae8c7b556b4a3a2dd9c
[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 TranslatableTextSelectorProperty = BindableProperty.Create("TranslatableTextSelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
33         {
34             var textFieldStyle = (TextFieldStyle)bindable;
35             textFieldStyle.translatableTextSelector = ((Selector<string>)newValue)?.Clone();
36         },
37         defaultValueCreator: (bindable) =>
38         {
39             var textFieldStyle = (TextFieldStyle)bindable;
40             return textFieldStyle.translatableTextSelector;
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 TranslatablePlaceholderTextSelectorProperty = BindableProperty.Create("TranslatablePlaceholderTextSelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
45         {
46             var textFieldStyle = (TextFieldStyle)bindable;
47             textFieldStyle.translatablePlaceholderTextSelector = ((Selector<string>)newValue)?.Clone();
48         },
49         defaultValueCreator: (bindable) =>
50         {
51             var textFieldStyle = (TextFieldStyle)bindable;
52             return textFieldStyle.translatablePlaceholderTextSelector;
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 TextSelectorProperty = BindableProperty.Create("TextSelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
57         {
58             var textFieldStyle = (TextFieldStyle)bindable;
59             textFieldStyle.textSelector = ((Selector<string>)newValue)?.Clone();
60         },
61         defaultValueCreator: (bindable) =>
62         {
63             var textFieldStyle = (TextFieldStyle)bindable;
64             return textFieldStyle.textSelector;
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 FontFamilySelectorProperty = BindableProperty.Create("FontFamilySelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
69         {
70             var textFieldStyle = (TextFieldStyle)bindable;
71             textFieldStyle.fontFamilySelector = ((Selector<string>)newValue)?.Clone();
72         },
73         defaultValueCreator: (bindable) =>
74         {
75             var textFieldStyle = (TextFieldStyle)bindable;
76             return textFieldStyle.fontFamilySelector;
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 PointSizeSelectorProperty = BindableProperty.Create("PointSizeSelector", typeof(Selector<float?>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
81         {
82             var textFieldStyle = (TextFieldStyle)bindable;
83             textFieldStyle.pointSizeSelector = ((Selector<float?>)newValue)?.Clone();
84         },
85         defaultValueCreator: (bindable) =>
86         {
87             var textFieldStyle = (TextFieldStyle)bindable;
88             return textFieldStyle.pointSizeSelector;
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 TextColorSelectorProperty = BindableProperty.Create("TextColorSelector", typeof(Selector<Color>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
93         {
94             var textFieldStyle = (TextFieldStyle)bindable;
95             textFieldStyle.textColorSelector = ((Selector<Color>)newValue)?.Clone();
96         },
97         defaultValueCreator: (bindable) =>
98         {
99             var textFieldStyle = (TextFieldStyle)bindable;
100             return textFieldStyle.textColorSelector;
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 PlaceholderTextColorSelectorProperty = BindableProperty.Create("PlaceholderTextColorSelector", typeof(Selector<Vector4>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
105         {
106             var textFieldStyle = (TextFieldStyle)bindable;
107             textFieldStyle.placeholderTextColorSelector = ((Selector<Vector4>)newValue)?.Clone();
108         },
109         defaultValueCreator: (bindable) =>
110         {
111             var textFieldStyle = (TextFieldStyle)bindable;
112             return textFieldStyle.placeholderTextColorSelector;
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 PrimaryCursorColorSelectorProperty = BindableProperty.Create("PrimaryCursorColorSelector", typeof(Selector<Vector4>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
117         {
118             var textFieldStyle = (TextFieldStyle)bindable;
119             textFieldStyle.primaryCursorColorSelector = ((Selector<Vector4>)newValue)?.Clone();
120         },
121         defaultValueCreator: (bindable) =>
122         {
123             var textFieldStyle = (TextFieldStyle)bindable;
124             return textFieldStyle.primaryCursorColorSelector;
125         });
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 PlaceholderTextProperty = BindableProperty.Create(nameof(PlaceholderText), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
130         {
131             var textFieldStyle = (TextFieldStyle)bindable;
132             textFieldStyle.placeholderText = (string)newValue;
133         },
134         defaultValueCreator: (bindable) =>
135         {
136             var textFieldStyle = (TextFieldStyle)bindable;
137             return textFieldStyle.placeholderText;
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 PlaceholderTextFocusedProperty = BindableProperty.Create(nameof(PlaceholderTextFocused), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
142         {
143             var textFieldStyle = (TextFieldStyle)bindable;
144             textFieldStyle.placeholderTextFocused = (string)newValue;
145         },
146         defaultValueCreator: (bindable) =>
147         {
148             var textFieldStyle = (TextFieldStyle)bindable;
149             return textFieldStyle.placeholderTextFocused;
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 MaxLengthProperty = BindableProperty.Create(nameof(MaxLength), typeof(int?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
154         {
155             var textFieldStyle = (TextFieldStyle)bindable;
156             textFieldStyle.maxLength = (int?)newValue;
157         },
158         defaultValueCreator: (bindable) =>
159         {
160             var textFieldStyle = (TextFieldStyle)bindable;
161             return textFieldStyle.maxLength;
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 ExceedPolicyProperty = BindableProperty.Create(nameof(ExceedPolicy), typeof(int?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
166         {
167             var textFieldStyle = (TextFieldStyle)bindable;
168             textFieldStyle.exceedPolicy = (int?)newValue;
169         },
170         defaultValueCreator: (bindable) =>
171         {
172             var textFieldStyle = (TextFieldStyle)bindable;
173             return textFieldStyle.exceedPolicy;
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 HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
178         {
179             var textFieldStyle = (TextFieldStyle)bindable;
180             textFieldStyle.horizontalAlignment = (HorizontalAlignment?)newValue;
181         },
182         defaultValueCreator: (bindable) =>
183         {
184             var textFieldStyle = (TextFieldStyle)bindable;
185             return textFieldStyle.horizontalAlignment;
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 VerticalAlignmentProperty = BindableProperty.Create(nameof(VerticalAlignment), typeof(VerticalAlignment?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
190         {
191             var textFieldStyle = (TextFieldStyle)bindable;
192             textFieldStyle.verticalAlignment = (VerticalAlignment?)newValue;
193         },
194         defaultValueCreator: (bindable) =>
195         {
196             var textFieldStyle = (TextFieldStyle)bindable;
197             return textFieldStyle.verticalAlignment;
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 SecondaryCursorColorProperty = BindableProperty.Create(nameof(SecondaryCursorColor), typeof(Vector4), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
202         {
203             var textFieldStyle = (TextFieldStyle)bindable;
204             textFieldStyle.secondaryCursorColor = (Vector4)newValue;
205         },
206         defaultValueCreator: (bindable) =>
207         {
208             var textFieldStyle = (TextFieldStyle)bindable;
209             return textFieldStyle.secondaryCursorColor;
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 EnableCursorBlinkProperty = BindableProperty.Create(nameof(EnableCursorBlink), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
214         {
215             var textFieldStyle = (TextFieldStyle)bindable;
216             textFieldStyle.enableCursorBlink = (bool?)newValue;
217         },
218         defaultValueCreator: (bindable) =>
219         {
220             var textFieldStyle = (TextFieldStyle)bindable;
221             return textFieldStyle.enableCursorBlink;
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 CursorBlinkIntervalProperty = BindableProperty.Create(nameof(CursorBlinkInterval), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
226         {
227             var textFieldStyle = (TextFieldStyle)bindable;
228             textFieldStyle.cursorBlinkInterval = (float?)newValue;
229         },
230         defaultValueCreator: (bindable) =>
231         {
232             var textFieldStyle = (TextFieldStyle)bindable;
233             return textFieldStyle.cursorBlinkInterval;
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 CursorBlinkDurationProperty = BindableProperty.Create(nameof(CursorBlinkDuration), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
238         {
239             var textFieldStyle = (TextFieldStyle)bindable;
240             textFieldStyle.cursorBlinkDuration = (float?)newValue;
241         },
242         defaultValueCreator: (bindable) =>
243         {
244             var textFieldStyle = (TextFieldStyle)bindable;
245             return textFieldStyle.cursorBlinkDuration;
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 CursorWidthProperty = BindableProperty.Create(nameof(CursorWidth), typeof(int?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
250         {
251             var textFieldStyle = (TextFieldStyle)bindable;
252             textFieldStyle.cursorWidth = (int?)newValue;
253         },
254         defaultValueCreator: (bindable) =>
255         {
256             var textFieldStyle = (TextFieldStyle)bindable;
257             return textFieldStyle.cursorWidth;
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 GrabHandleImageProperty = BindableProperty.Create(nameof(GrabHandleImage), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
262         {
263             var textFieldStyle = (TextFieldStyle)bindable;
264             textFieldStyle.grabHandleImage = (string)newValue;
265         },
266         defaultValueCreator: (bindable) =>
267         {
268             var textFieldStyle = (TextFieldStyle)bindable;
269             return textFieldStyle.grabHandleImage;
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 GrabHandlePressedImageProperty = BindableProperty.Create(nameof(GrabHandlePressedImage), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
274         {
275             var textFieldStyle = (TextFieldStyle)bindable;
276             textFieldStyle.grabHandlePressedImage = (string)newValue;
277         },
278         defaultValueCreator: (bindable) =>
279         {
280             var textFieldStyle = (TextFieldStyle)bindable;
281             return textFieldStyle.grabHandlePressedImage;
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 ScrollThresholdProperty = BindableProperty.Create(nameof(ScrollThreshold), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
286         {
287             var textFieldStyle = (TextFieldStyle)bindable;
288             textFieldStyle.scrollThreshold = (float?)newValue;
289         },
290         defaultValueCreator: (bindable) =>
291         {
292             var textFieldStyle = (TextFieldStyle)bindable;
293             return textFieldStyle.scrollThreshold;
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 ScrollSpeedProperty = BindableProperty.Create(nameof(ScrollSpeed), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
298         {
299             var textFieldStyle = (TextFieldStyle)bindable;
300             textFieldStyle.scrollSpeed = (float?)newValue;
301         },
302         defaultValueCreator: (bindable) =>
303         {
304             var textFieldStyle = (TextFieldStyle)bindable;
305             return textFieldStyle.scrollSpeed;
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 SelectionHighlightColorProperty = BindableProperty.Create(nameof(SelectionHighlightColor), typeof(Vector4), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
310         {
311             var textFieldStyle = (TextFieldStyle)bindable;
312             textFieldStyle.selectionHighlightColor = (Vector4)newValue;
313         },
314         defaultValueCreator: (bindable) =>
315         {
316             var textFieldStyle = (TextFieldStyle)bindable;
317             return textFieldStyle.selectionHighlightColor;
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 DecorationBoundingBoxProperty = BindableProperty.Create(nameof(DecorationBoundingBox), typeof(Rectangle), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
322         {
323             var textFieldStyle = (TextFieldStyle)bindable;
324             textFieldStyle.decorationBoundingBox = (Rectangle)newValue;
325         },
326         defaultValueCreator: (bindable) =>
327         {
328             var textFieldStyle = (TextFieldStyle)bindable;
329             return textFieldStyle.decorationBoundingBox;
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 InputColorProperty = BindableProperty.Create(nameof(InputColor), typeof(Vector4), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
334         {
335             var textFieldStyle = (TextFieldStyle)bindable;
336             textFieldStyle.inputColor = (Vector4)newValue;
337         },
338         defaultValueCreator: (bindable) =>
339         {
340             var textFieldStyle = (TextFieldStyle)bindable;
341             return textFieldStyle.inputColor;
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 EnableMarkupProperty = BindableProperty.Create(nameof(EnableMarkup), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
346         {
347             var textFieldStyle = (TextFieldStyle)bindable;
348             textFieldStyle.enableMarkup = (bool?)newValue;
349         },
350         defaultValueCreator: (bindable) =>
351         {
352             var textFieldStyle = (TextFieldStyle)bindable;
353             return textFieldStyle.enableMarkup;
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 InputFontFamilyProperty = BindableProperty.Create(nameof(InputFontFamily), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
358         {
359             var textFieldStyle = (TextFieldStyle)bindable;
360             textFieldStyle.inputFontFamily = (string)newValue;
361         },
362         defaultValueCreator: (bindable) =>
363         {
364             var textFieldStyle = (TextFieldStyle)bindable;
365             return textFieldStyle.inputFontFamily;
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 InputPointSizeProperty = BindableProperty.Create(nameof(InputPointSize), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
370         {
371             var textFieldStyle = (TextFieldStyle)bindable;
372             textFieldStyle.inputPointSize = (float?)newValue;
373         },
374         defaultValueCreator: (bindable) =>
375         {
376             var textFieldStyle = (TextFieldStyle)bindable;
377             return textFieldStyle.inputPointSize;
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 InputUnderlineProperty = BindableProperty.Create(nameof(InputUnderline), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
382         {
383             var textFieldStyle = (TextFieldStyle)bindable;
384             textFieldStyle.inputUnderline = (string)newValue;
385         },
386         defaultValueCreator: (bindable) =>
387         {
388             var textFieldStyle = (TextFieldStyle)bindable;
389             return textFieldStyle.inputUnderline;
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 InputShadowProperty = BindableProperty.Create(nameof(InputShadow), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
394         {
395             var textFieldStyle = (TextFieldStyle)bindable;
396             textFieldStyle.inputShadow = (string)newValue;
397         },
398         defaultValueCreator: (bindable) =>
399         {
400             var textFieldStyle = (TextFieldStyle)bindable;
401             return textFieldStyle.inputShadow;
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 EmbossProperty = BindableProperty.Create(nameof(Emboss), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
406         {
407             var textFieldStyle = (TextFieldStyle)bindable;
408             textFieldStyle.emboss = (string)newValue;
409         },
410         defaultValueCreator: (bindable) =>
411         {
412             var textFieldStyle = (TextFieldStyle)bindable;
413             return textFieldStyle.emboss;
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 InputEmbossProperty = BindableProperty.Create(nameof(InputEmboss), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
418         {
419             var textFieldStyle = (TextFieldStyle)bindable;
420             textFieldStyle.inputEmboss = (string)newValue;
421         },
422         defaultValueCreator: (bindable) =>
423         {
424             var textFieldStyle = (TextFieldStyle)bindable;
425             return textFieldStyle.inputEmboss;
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 InputOutlineProperty = BindableProperty.Create(nameof(InputOutline), typeof(string), typeof(TextFieldStyle), String.Empty, propertyChanged: (bindable, oldValue, newValue) =>
430         {
431             var textFieldStyle = (TextFieldStyle)bindable;
432             textFieldStyle.inputOutline = (string)newValue;
433         },
434         defaultValueCreator: (bindable) =>
435         {
436             var textFieldStyle = (TextFieldStyle)bindable;
437             return textFieldStyle.inputOutline;
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 PixelSizeSelectorProperty = BindableProperty.Create("PixelSizeSelector", typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
442         {
443             var textFieldStyle = (TextFieldStyle)bindable;
444             textFieldStyle.pixelSizeSelector = ((Selector<float?>)newValue)?.Clone();
445         },
446         defaultValueCreator: (bindable) =>
447         {
448             var textFieldStyle = (TextFieldStyle)bindable;
449             return textFieldStyle.pixelSizeSelector;
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 EnableSelectionProperty = BindableProperty.Create(nameof(EnableSelection), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
454         {
455             var textFieldStyle = (TextFieldStyle)bindable;
456             textFieldStyle.enableSelection = (bool?)newValue;
457         },
458         defaultValueCreator: (bindable) =>
459         {
460             var textFieldStyle = (TextFieldStyle)bindable;
461             return textFieldStyle.enableSelection;
462         });
463         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
464         [EditorBrowsable(EditorBrowsableState.Never)]
465         public static readonly BindableProperty EllipsisProperty = BindableProperty.Create(nameof(Ellipsis), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
466         {
467             var textFieldStyle = (TextFieldStyle)bindable;
468             textFieldStyle.ellipsis = (bool?)newValue;
469         },
470         defaultValueCreator: (bindable) =>
471         {
472             var textFieldStyle = (TextFieldStyle)bindable;
473             return textFieldStyle.ellipsis;
474         });
475         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
476         [EditorBrowsable(EditorBrowsableState.Never)]
477         public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(MatchSystemLanguageDirection), typeof(bool?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
478         {
479             var textFieldStyle = (TextFieldStyle)bindable;
480             textFieldStyle.matchSystemLanguageDirection = (bool?)newValue;
481         },
482         defaultValueCreator: (bindable) =>
483         {
484             var textFieldStyle = (TextFieldStyle)bindable;
485             return textFieldStyle.matchSystemLanguageDirection;
486         });
487
488         private string placeholderText;
489         private string placeholderTextFocused;
490         private int? maxLength;
491         private int? exceedPolicy;
492         private HorizontalAlignment? horizontalAlignment;
493         private VerticalAlignment? verticalAlignment;
494         private Vector4 secondaryCursorColor;
495         private bool? enableCursorBlink;
496         private float? cursorBlinkInterval;
497         private float? cursorBlinkDuration;
498         private int? cursorWidth;
499         private string grabHandleImage;
500         private string grabHandlePressedImage;
501         private float? scrollThreshold;
502         private float? scrollSpeed;
503         private Vector4 selectionHighlightColor;
504         private Rectangle decorationBoundingBox;
505         private Vector4 inputColor;
506         private bool? enableMarkup;
507         private string inputFontFamily;
508         private float? inputPointSize;
509         private string inputUnderline;
510         private string inputShadow;
511         private string emboss;
512         private string inputEmboss;
513         private string inputOutline;
514         private Selector<float?> pixelSizeSelector;
515         private bool? enableSelection;
516         private bool? ellipsis;
517         private bool? matchSystemLanguageDirection;
518         private Selector<string> translatableTextSelector;
519         private Selector<string> translatablePlaceholderTextSelector;
520         private Selector<string> textSelector;
521         private Selector<string> fontFamilySelector;
522         private Selector<Color> textColorSelector;
523         private Selector<float?> pointSizeSelector;
524         private Selector<Vector4> placeholderTextColorSelector;
525         private Selector<Vector4> primaryCursorColorSelector;
526
527         static TextFieldStyle() { }
528
529         /// <summary>
530         /// Create an empty instance.
531         /// </summary>
532         [EditorBrowsable(EditorBrowsableState.Never)]
533         public TextFieldStyle() : base()
534         {
535         }
536
537         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
538         [EditorBrowsable(EditorBrowsableState.Never)]
539         public Selector<string> TranslatableText
540         {
541             get
542             {
543                 Selector<string> tmp = (Selector<string>)GetValue(TranslatableTextSelectorProperty);
544                 return (null != tmp) ? tmp : translatableTextSelector = new Selector<string>();
545             }
546             set => SetValue(TranslatableTextSelectorProperty, 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 Selector<string> TranslatablePlaceholderText
552         {
553             get
554             {
555                 Selector<string> tmp = (Selector<string>)GetValue(TranslatablePlaceholderTextSelectorProperty);
556                 return (null != tmp) ? tmp : translatablePlaceholderTextSelector = new Selector<string>();
557             }
558             set => SetValue(TranslatablePlaceholderTextSelectorProperty, value);
559         }
560
561         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
562         [EditorBrowsable(EditorBrowsableState.Never)]
563         public Selector<string> Text
564         {
565             get
566             {
567                 Selector<string> tmp = (Selector<string>)GetValue(TextSelectorProperty);
568                 return (null != tmp) ? tmp : textSelector = new Selector<string>();
569             }
570             set => SetValue(TextSelectorProperty, 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 string PlaceholderText
576         {
577             get => (string)GetValue(PlaceholderTextProperty);
578             set => SetValue(PlaceholderTextProperty, 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 string PlaceholderTextFocused
584         {
585             get => (string)GetValue(PlaceholderTextFocusedProperty);
586             set => SetValue(PlaceholderTextFocusedProperty, 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 Selector<string> FontFamily
592         {
593             get
594             {
595                 Selector<string> tmp = (Selector<string>)GetValue(FontFamilySelectorProperty);
596                 return (null != tmp) ? tmp : fontFamilySelector = new Selector<string>();
597             }
598             set => SetValue(FontFamilySelectorProperty, value);
599         }
600
601         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
602         [EditorBrowsable(EditorBrowsableState.Never)]
603         public int? MaxLength
604         {
605             get => (int?)GetValue(MaxLengthProperty);
606             set => SetValue(MaxLengthProperty, value);
607         }
608
609         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
610         [EditorBrowsable(EditorBrowsableState.Never)]
611         public int? ExceedPolicy
612         {
613             get => (int?)GetValue(ExceedPolicyProperty);
614             set => SetValue(ExceedPolicyProperty, value);
615         }
616
617         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
618         [EditorBrowsable(EditorBrowsableState.Never)]
619         public HorizontalAlignment? HorizontalAlignment
620         {
621             get => (HorizontalAlignment?)GetValue(HorizontalAlignmentProperty);
622             set => SetValue(HorizontalAlignmentProperty, value);
623         }
624
625         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
626         [EditorBrowsable(EditorBrowsableState.Never)]
627         public VerticalAlignment? VerticalAlignment
628         {
629             get => (VerticalAlignment?)GetValue(VerticalAlignmentProperty);
630             set => SetValue(VerticalAlignmentProperty, value);
631         }
632
633         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
634         [EditorBrowsable(EditorBrowsableState.Never)]
635         public Vector4 SecondaryCursorColor
636         {
637             get => (Vector4)GetValue(SecondaryCursorColorProperty);
638             set => SetValue(SecondaryCursorColorProperty, value);
639         }
640
641         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
642         [EditorBrowsable(EditorBrowsableState.Never)]
643         public bool? EnableCursorBlink
644         {
645             get => (bool?)GetValue(EnableCursorBlinkProperty);
646             set => SetValue(EnableCursorBlinkProperty, value);
647         }
648
649         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
650         [EditorBrowsable(EditorBrowsableState.Never)]
651         public float? CursorBlinkInterval
652         {
653             get => (float?)GetValue(CursorBlinkIntervalProperty);
654             set => SetValue(CursorBlinkIntervalProperty, value);
655         }
656
657         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
658         [EditorBrowsable(EditorBrowsableState.Never)]
659         public float? CursorBlinkDuration
660         {
661             get => (float?)GetValue(CursorBlinkDurationProperty);
662             set => SetValue(CursorBlinkDurationProperty, value);
663         }
664
665         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
666         [EditorBrowsable(EditorBrowsableState.Never)]
667         public int? CursorWidth
668         {
669             get => (int?)GetValue(CursorWidthProperty);
670             set => SetValue(CursorWidthProperty, value);
671         }
672
673         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
674         [EditorBrowsable(EditorBrowsableState.Never)]
675         public string GrabHandleImage
676         {
677             get => (string)GetValue(GrabHandleImageProperty);
678             set => SetValue(GrabHandleImageProperty, value);
679         }
680
681         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
682         [EditorBrowsable(EditorBrowsableState.Never)]
683         public string GrabHandlePressedImage
684         {
685             get => (string)GetValue(GrabHandlePressedImageProperty);
686             set => SetValue(GrabHandlePressedImageProperty, value);
687         }
688
689         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
690         [EditorBrowsable(EditorBrowsableState.Never)]
691         public float? ScrollThreshold
692         {
693             get => (float?)GetValue(ScrollThresholdProperty);
694             set => SetValue(ScrollThresholdProperty, value);
695         }
696
697         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
698         [EditorBrowsable(EditorBrowsableState.Never)]
699         public float? ScrollSpeed
700         {
701             get => (float?)GetValue(ScrollSpeedProperty);
702             set => SetValue(ScrollSpeedProperty, value);
703         }
704
705         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
706         [EditorBrowsable(EditorBrowsableState.Never)]
707         public Vector4 SelectionHighlightColor
708         {
709             get => (Vector4)GetValue(SelectionHighlightColorProperty);
710             set => SetValue(SelectionHighlightColorProperty, value);
711         }
712
713         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
714         [EditorBrowsable(EditorBrowsableState.Never)]
715         public Rectangle DecorationBoundingBox
716         {
717             get => (Rectangle)GetValue(DecorationBoundingBoxProperty);
718             set => SetValue(DecorationBoundingBoxProperty, value);
719         }
720
721         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
722         [EditorBrowsable(EditorBrowsableState.Never)]
723         public Vector4 InputColor
724         {
725             get => (Vector4)GetValue(InputColorProperty);
726             set => SetValue(InputColorProperty, value);
727         }
728
729         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
730         [EditorBrowsable(EditorBrowsableState.Never)]
731         public bool? EnableMarkup
732         {
733             get => (bool?)GetValue(EnableMarkupProperty);
734             set => SetValue(EnableMarkupProperty, value);
735         }
736
737         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
738         [EditorBrowsable(EditorBrowsableState.Never)]
739         public string InputFontFamily
740         {
741             get => (string)GetValue(InputFontFamilyProperty);
742             set => SetValue(InputFontFamilyProperty, value);
743         }
744
745         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
746         [EditorBrowsable(EditorBrowsableState.Never)]
747         public float? InputPointSize
748         {
749             get => (float?)GetValue(InputPointSizeProperty);
750             set => SetValue(InputPointSizeProperty, value);
751         }
752
753         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
754         [EditorBrowsable(EditorBrowsableState.Never)]
755         public string InputUnderline
756         {
757             get => (string)GetValue(InputUnderlineProperty);
758             set => SetValue(InputUnderlineProperty, 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 string InputShadow
764         {
765             get => (string)GetValue(InputShadowProperty);
766             set => SetValue(InputShadowProperty, value);
767         }
768
769         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
770         [EditorBrowsable(EditorBrowsableState.Never)]
771         public string Emboss
772         {
773             get => (string)GetValue(EmbossProperty);
774             set => SetValue(EmbossProperty, value);
775         }
776
777         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
778         [EditorBrowsable(EditorBrowsableState.Never)]
779         public string InputEmboss
780         {
781             get => (string)GetValue(InputEmbossProperty);
782             set => SetValue(InputEmbossProperty, value);
783         }
784
785         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
786         [EditorBrowsable(EditorBrowsableState.Never)]
787         public string InputOutline
788         {
789             get => (string)GetValue(InputOutlineProperty);
790             set => SetValue(InputOutlineProperty, value);
791         }
792
793         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
794         [EditorBrowsable(EditorBrowsableState.Never)]
795         public Selector<float?> PixelSize
796         {
797             get => (Selector<float?>)GetValue(PixelSizeSelectorProperty) ?? (pixelSizeSelector = new Selector<float?>());
798             set => SetValue(PixelSizeSelectorProperty, value);
799         }
800
801         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
802         [EditorBrowsable(EditorBrowsableState.Never)]
803         public bool? EnableSelection
804         {
805             get => (bool?)GetValue(EnableSelectionProperty);
806             set => SetValue(EnableSelectionProperty, value);
807         }
808
809         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
810         [EditorBrowsable(EditorBrowsableState.Never)]
811         public bool? Ellipsis
812         {
813             get => (bool?)GetValue(EllipsisProperty);
814             set => SetValue(EllipsisProperty, value);
815         }
816
817         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
818         [EditorBrowsable(EditorBrowsableState.Never)]
819         public bool? MatchSystemLanguageDirection
820         {
821             get => (bool?)GetValue(MatchSystemLanguageDirectionProperty);
822             set => SetValue(MatchSystemLanguageDirectionProperty, value);
823         }
824
825         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
826         [EditorBrowsable(EditorBrowsableState.Never)]
827         public Selector<Color> TextColor
828         {
829             get
830             {
831                 Selector<Color> tmp = (Selector<Color>)GetValue(TextColorSelectorProperty);
832                 return (null != tmp) ? tmp : textColorSelector = new Selector<Color>();
833             }
834             set => SetValue(TextColorSelectorProperty, value);
835         }
836
837         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
838         [EditorBrowsable(EditorBrowsableState.Never)]
839         public Selector<float?> PointSize
840         {
841             get
842             {
843                 Selector<float?> tmp = (Selector<float?>)GetValue(PointSizeSelectorProperty);
844                 return (null != tmp) ? tmp : pointSizeSelector = new Selector<float?>();
845             }
846             set => SetValue(PointSizeSelectorProperty, value);
847         }
848
849         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
850         [EditorBrowsable(EditorBrowsableState.Never)]
851         public Selector<Vector4> PlaceholderTextColor
852         {
853             get
854             {
855                 Selector<Vector4> tmp = (Selector<Vector4>)GetValue(PlaceholderTextColorSelectorProperty);
856                 return (null != tmp) ? tmp : placeholderTextColorSelector = new Selector<Vector4>();
857             }
858             set => SetValue(PlaceholderTextColorSelectorProperty, value);
859         }
860
861         /// <summary>
862         /// Gets or sets primary cursor color.
863         /// </summary>
864         /// <since_tizen> 6 </since_tizen>
865         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
866         [EditorBrowsable(EditorBrowsableState.Never)]
867         public Selector<Vector4> PrimaryCursorColor
868         {
869             get
870             {
871                 Selector<Vector4> tmp = (Selector<Vector4>)GetValue(PrimaryCursorColorSelectorProperty);
872                 return (null != tmp) ? tmp : primaryCursorColorSelector = new Selector<Vector4>();
873             }
874             set => SetValue(PrimaryCursorColorSelectorProperty, value);
875         }
876     }
877 }