2 * Copyright(c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.ComponentModel;
19 using Tizen.NUI.Binding;
21 namespace Tizen.NUI.BaseComponents
24 /// The style class for TextEditor.
25 /// This can decorate a TextEditor instance.
27 [EditorBrowsable(EditorBrowsableState.Never)]
28 public class TextEditorStyle : ViewStyle
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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) =>
261 var textEditorStyle = (TextEditorStyle)bindable;
262 textEditorStyle.ellipsis = (bool?)newValue;
264 defaultValueCreator: (bindable) =>
266 var textEditorStyle = (TextEditorStyle)bindable;
267 return textEditorStyle.ellipsis;
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) =>
274 var textEditorStyle = (TextEditorStyle)bindable;
275 textEditorStyle.lineSpacing = (float?)newValue;
277 defaultValueCreator: (bindable) =>
279 var textEditorStyle = (TextEditorStyle)bindable;
280 return textEditorStyle.lineSpacing;
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) =>
287 var textEditorStyle = (TextEditorStyle)bindable;
288 textEditorStyle.minLineSize = (float?)newValue;
290 defaultValueCreator: (bindable) =>
292 var textEditorStyle = (TextEditorStyle)bindable;
293 return textEditorStyle.minLineSize;
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) =>
300 var textEditorStyle = (TextEditorStyle)bindable;
301 textEditorStyle.relativeLineHeight = (float?)newValue;
303 defaultValueCreator: (bindable) =>
305 var textEditorStyle = (TextEditorStyle)bindable;
306 return textEditorStyle.relativeLineHeight;
309 [EditorBrowsable(EditorBrowsableState.Never)]
310 public static readonly BindableProperty FontSizeScaleProperty = BindableProperty.Create(nameof(FontSizeScale), typeof(float?), typeof(TextEditorStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
312 var textEditorStyle = (TextEditorStyle)bindable;
313 textEditorStyle.fontSizeScale = (float?)newValue;
315 defaultValueCreator: (bindable) =>
317 var textEditorStyle = (TextEditorStyle)bindable;
318 return textEditorStyle.fontSizeScale;
321 [EditorBrowsable(EditorBrowsableState.Never)]
322 public static readonly BindableProperty SelectionPopupStyleProperty = BindableProperty.Create(nameof(SelectionPopupStyle), typeof(PropertyMap), typeof(TextEditorStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
324 var textEditorStyle = (TextEditorStyle)bindable;
325 textEditorStyle.selectionPopupStyle = (PropertyMap)newValue;
327 defaultValueCreator: (bindable) =>
329 var textEditorStyle = (TextEditorStyle)bindable;
330 return textEditorStyle.selectionPopupStyle;
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;
378 static TextEditorStyle() { }
381 /// Create an empty instance.
383 [EditorBrowsable(EditorBrowsableState.Never)]
384 public TextEditorStyle() : base()
389 /// The FontFamily property.
391 [EditorBrowsable(EditorBrowsableState.Never)]
392 public string FontFamily
394 get => (string)GetValue(FontFamilyProperty);
395 set => SetValue(FontFamilyProperty, value);
399 /// The HorizontalAlignment property.
401 [EditorBrowsable(EditorBrowsableState.Never)]
402 public HorizontalAlignment? HorizontalAlignment
404 get => (HorizontalAlignment?)GetValue(HorizontalAlignmentProperty);
405 set => SetValue(HorizontalAlignmentProperty, value);
409 /// The VerticalAlignment property.
411 [EditorBrowsable(EditorBrowsableState.Never)]
412 public VerticalAlignment? VerticalAlignment
414 get => (VerticalAlignment?)GetValue(VerticalAlignmentProperty);
415 set => SetValue(VerticalAlignmentProperty, value);
419 /// The SecondaryCursorColor property.
420 /// Note that the cascade chaining set is impossible. Please set a whole value.
422 [EditorBrowsable(EditorBrowsableState.Never)]
423 public Vector4 SecondaryCursorColor
425 get => (Vector4)GetValue(SecondaryCursorColorProperty);
426 set => SetValue(SecondaryCursorColorProperty, value);
430 /// The EnableCursorBlink property.
432 [EditorBrowsable(EditorBrowsableState.Never)]
433 public bool? EnableCursorBlink
435 get => (bool?)GetValue(EnableCursorBlinkProperty);
436 set => SetValue(EnableCursorBlinkProperty, value);
440 /// The CursorBlinkInterval property.
442 [EditorBrowsable(EditorBrowsableState.Never)]
443 public float? CursorBlinkInterval
445 get => (float?)GetValue(CursorBlinkIntervalProperty);
446 set => SetValue(CursorBlinkIntervalProperty, value);
450 /// The CursorBlinkDuration property.
452 [EditorBrowsable(EditorBrowsableState.Never)]
453 public float? CursorBlinkDuration
455 get => (float?)GetValue(CursorBlinkDurationProperty);
456 set => SetValue(CursorBlinkDurationProperty, value);
460 /// The CursorWidth property.
462 [EditorBrowsable(EditorBrowsableState.Never)]
463 public int? CursorWidth
465 get => (int?)GetValue(CursorWidthProperty);
466 set => SetValue(CursorWidthProperty, value);
470 /// The GrabHandleColor property.
472 [EditorBrowsable(EditorBrowsableState.Never)]
473 public Color GrabHandleColor
475 get => (Color)GetValue(GrabHandleColorProperty);
476 set => SetValue(GrabHandleColorProperty, value);
480 /// The GrabHandleImage property.
482 [EditorBrowsable(EditorBrowsableState.Never)]
483 public string GrabHandleImage
485 get => (string)GetValue(GrabHandleImageProperty);
486 set => SetValue(GrabHandleImageProperty, value);
490 /// The GrabHandlePressedImage property.
492 [EditorBrowsable(EditorBrowsableState.Never)]
493 public string GrabHandlePressedImage
495 get => (string)GetValue(GrabHandlePressedImageProperty);
496 set => SetValue(GrabHandlePressedImageProperty, value);
500 /// The SelectionHandleImageLeft property.
502 [EditorBrowsable(EditorBrowsableState.Never)]
503 public PropertyMap SelectionHandleImageLeft
505 get => (PropertyMap)GetValue(SelectionHandleImageLeftProperty);
506 set => SetValue(SelectionHandleImageLeftProperty, value);
510 /// The SelectionHandleImageRight property.
512 [EditorBrowsable(EditorBrowsableState.Never)]
513 public PropertyMap SelectionHandleImageRight
515 get => (PropertyMap)GetValue(SelectionHandleImageRightProperty);
516 set => SetValue(SelectionHandleImageRightProperty, value);
520 /// The ScrollThreshold property.
522 [EditorBrowsable(EditorBrowsableState.Never)]
523 public float? ScrollThreshold
525 get => (float?)GetValue(ScrollThresholdProperty);
526 set => SetValue(ScrollThresholdProperty, value);
530 /// The ScrollSpeed property.
532 [EditorBrowsable(EditorBrowsableState.Never)]
533 public float? ScrollSpeed
535 get => (float?)GetValue(ScrollSpeedProperty);
536 set => SetValue(ScrollSpeedProperty, value);
540 /// The SelectionHighlightColor property.
541 /// Note that the cascade chaining set is impossible. Please set a whole value.
543 [EditorBrowsable(EditorBrowsableState.Never)]
544 public Vector4 SelectionHighlightColor
546 get => (Vector4)GetValue(SelectionHighlightColorProperty);
547 set => SetValue(SelectionHighlightColorProperty, value);
551 /// The DecorationBoundingBox property.
552 /// Note that the cascade chaining set is impossible. Please set a whole value.
554 [EditorBrowsable(EditorBrowsableState.Never)]
555 public Rectangle DecorationBoundingBox
557 get => (Rectangle)GetValue(DecorationBoundingBoxProperty);
558 set => SetValue(DecorationBoundingBoxProperty, value);
562 /// The InputColor property.
563 /// Note that the cascade chaining set is impossible. Please set a whole value.
565 [EditorBrowsable(EditorBrowsableState.Never)]
566 public Vector4 InputColor
568 get => (Vector4)GetValue(InputColorProperty);
569 set => SetValue(InputColorProperty, value);
573 /// The InputFontFamily property.
575 [EditorBrowsable(EditorBrowsableState.Never)]
576 public string InputFontFamily
578 get => (string)GetValue(InputFontFamilyProperty);
579 set => SetValue(InputFontFamilyProperty, value);
583 /// The InputPointSize property.
585 [EditorBrowsable(EditorBrowsableState.Never)]
586 public float? InputPointSize
588 get => (float?)GetValue(InputPointSizeProperty);
589 set => SetValue(InputPointSizeProperty, value);
593 /// The InputUnderline property.
595 [EditorBrowsable(EditorBrowsableState.Never)]
596 public string InputUnderline
598 get => (string)GetValue(InputUnderlineProperty);
599 set => SetValue(InputUnderlineProperty, value);
603 /// The InputShadow property.
605 [EditorBrowsable(EditorBrowsableState.Never)]
606 public string InputShadow
608 get => (string)GetValue(InputShadowProperty);
609 set => SetValue(InputShadowProperty, value);
613 /// The Emboss property.
615 [EditorBrowsable(EditorBrowsableState.Never)]
618 get => (string)GetValue(EmbossProperty);
619 set => SetValue(EmbossProperty, value);
623 /// The InputEmboss property.
625 [EditorBrowsable(EditorBrowsableState.Never)]
626 public string InputEmboss
628 get => (string)GetValue(InputEmbossProperty);
629 set => SetValue(InputEmbossProperty, value);
633 /// The InputOutline property.
635 [EditorBrowsable(EditorBrowsableState.Never)]
636 public string InputOutline
638 get => (string)GetValue(InputOutlineProperty);
639 set => SetValue(InputOutlineProperty, value);
643 /// The SmoothScroll property.
645 [EditorBrowsable(EditorBrowsableState.Never)]
646 public bool? SmoothScroll
648 get => (bool?)GetValue(SmoothScrollProperty);
649 set => SetValue(SmoothScrollProperty, value);
653 /// The SmoothScrollDuration property.
655 [EditorBrowsable(EditorBrowsableState.Never)]
656 public float? SmoothScrollDuration
658 get => (float?)GetValue(SmoothScrollDurationProperty);
659 set => SetValue(SmoothScrollDurationProperty, value);
663 /// The EnableScrollBar property.
665 [EditorBrowsable(EditorBrowsableState.Never)]
666 public bool? EnableScrollBar
668 get => (bool?)GetValue(EnableScrollBarProperty);
669 set => SetValue(EnableScrollBarProperty, value);
673 /// The ScrollBarShowDuration property.
675 [EditorBrowsable(EditorBrowsableState.Never)]
676 public float? ScrollBarShowDuration
678 get => (float?)GetValue(ScrollBarShowDurationProperty);
679 set => SetValue(ScrollBarShowDurationProperty, value);
683 /// The ScrollBarFadeDuration property.
685 [EditorBrowsable(EditorBrowsableState.Never)]
686 public float? ScrollBarFadeDuration
688 get => (float?)GetValue(ScrollBarFadeDurationProperty);
689 set => SetValue(ScrollBarFadeDurationProperty, value);
693 /// The PixelSize property.
695 [EditorBrowsable(EditorBrowsableState.Never)]
696 public float? PixelSize
698 get => (float?)GetValue(PixelSizeProperty);
699 set => SetValue(PixelSizeProperty, value);
703 /// The EnableSelection property.
705 [EditorBrowsable(EditorBrowsableState.Never)]
706 public bool? EnableSelection
708 get => (bool?)GetValue(EnableSelectionProperty);
709 set => SetValue(EnableSelectionProperty, value);
713 /// The text alignment to match the direction of the system language.
715 [EditorBrowsable(EditorBrowsableState.Never)]
716 public bool? MatchSystemLanguageDirection
718 get => (bool?)GetValue(MatchSystemLanguageDirectionProperty);
719 set => SetValue(MatchSystemLanguageDirectionProperty, value);
723 /// The TextColor property.
724 /// Note that the cascade chaining set is impossible. Please set a whole value.
726 [EditorBrowsable(EditorBrowsableState.Never)]
727 public Vector4 TextColor
729 get => (Vector4)GetValue(TextColorProperty);
730 set => SetValue(TextColorProperty, value);
734 /// The PointSize property.
736 [EditorBrowsable(EditorBrowsableState.Never)]
737 public float? PointSize
739 get => (float?)GetValue(PointSizeProperty);
740 set => SetValue(PointSizeProperty, value);
744 /// The Placeholder text color.
745 /// Note that the cascade chaining set is impossible. Please set a whole value.
747 [EditorBrowsable(EditorBrowsableState.Never)]
748 public Color PlaceholderTextColor
750 get => (Color)GetValue(PlaceholderTextColorProperty);
751 set => SetValue(PlaceholderTextColorProperty, value);
755 /// The PrimaryCursorColor property.
756 /// Note that the cascade chaining set is impossible. Please set a whole value.
758 [EditorBrowsable(EditorBrowsableState.Never)]
759 public Vector4 PrimaryCursorColor
761 get => (Vector4)GetValue(PrimaryCursorColorProperty);
762 set => SetValue(PrimaryCursorColorProperty, value);
766 /// The FontStyle property.
768 [EditorBrowsable(EditorBrowsableState.Never)]
769 public PropertyMap FontStyle
771 get => (PropertyMap)GetValue(FontStyleProperty);
772 set => SetValue(FontStyleProperty, value);
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
779 get => (bool?)GetValue(EllipsisProperty);
780 set => SetValue(EllipsisProperty, value);
784 /// the line spacing to be used.
786 [EditorBrowsable(EditorBrowsableState.Never)]
787 public float? LineSpacing
789 get => (float?)GetValue(LineSpacingProperty);
790 set => SetValue(LineSpacingProperty, value);
794 /// the minimum line size to be used.
796 [EditorBrowsable(EditorBrowsableState.Never)]
797 public float? MinLineSize
799 get => (float?)GetValue(MinLineSizeProperty);
800 set => SetValue(MinLineSizeProperty, value);
804 /// the relative line height to be used.
806 [EditorBrowsable(EditorBrowsableState.Never)]
807 public float? RelativeLineHeight
809 get => (float?)GetValue(RelativeLineHeightProperty);
810 set => SetValue(RelativeLineHeightProperty, value);
813 [EditorBrowsable(EditorBrowsableState.Never)]
814 public float? FontSizeScale
816 get => (float?)GetValue(FontSizeScaleProperty);
817 set => SetValue(FontSizeScaleProperty, value);
820 [EditorBrowsable(EditorBrowsableState.Never)]
821 public PropertyMap SelectionPopupStyle
823 get => (PropertyMap)GetValue(SelectionPopupStyleProperty);
824 set => SetValue(SelectionPopupStyleProperty, value);