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