[NUI] TextEditorBindableProperty changes (#6086)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextEditor.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
18 extern alias TizenSystemSettings;
19 using TizenSystemSettings.Tizen.System;
20
21 using System;
22 using System.Globalization;
23 using System.ComponentModel;
24 using Tizen.NUI.Text;
25 using Tizen.NUI.Binding;
26
27 namespace Tizen.NUI.BaseComponents
28 {
29     /// <summary>
30     /// A control which provides a multi-line editable text editor.
31     /// </summary>
32     /// <since_tizen> 3 </since_tizen>
33     public partial class TextEditor : View
34     {
35         static private string defaultStyleName = "Tizen.NUI.BaseComponents.TextEditor";
36         static private string defaultFontFamily = "TizenSans";
37         private static SystemFontTypeChanged systemFontTypeChanged = new SystemFontTypeChanged();
38         private static SystemLocaleLanguageChanged systemLocaleLanguageChanged = new SystemLocaleLanguageChanged();
39         private string textEditorTextSid = null;
40         private string textEditorPlaceHolderTextSid = null;
41         private InputMethodContext inputMethodContext = null;
42         private string fontFamily = defaultFontFamily;
43         private float fontSizeScale = 1.0f;
44         private bool hasSystemLanguageChanged = false;
45         private bool hasSystemFontSizeChanged = false;
46         private bool hasSystemFontTypeChanged = false;
47         private bool isSettingTextInCSharp = false;
48
49         private Color internalPlaceholderTextColor = null;
50         private Vector4 internalPrimaryCursorColor = null;
51         private Vector4 internalSecondaryCursorColor = null;
52         private Vector4 internalSelectionHighlightColor = null;
53         private Vector4 internalInputColor = null;
54         private Vector4 internalTextColor = null;
55         private Color internalGrabHandleColor = null;
56
57
58         static TextEditor() 
59         { 
60             if(NUIApplication.IsUsingXaml)
61             {
62                 TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: SetInternalTextProperty, defaultValueCreator: GetInternalTextProperty);
63
64                 TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Vector4), typeof(TextEditor), null, propertyChanged: SetInternalTextColorProperty, defaultValueCreator: GetInternalTextColorProperty);
65
66                 FontFamilyProperty = BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: SetInternalFontFamilyProperty, defaultValueCreator: GetInternalFontFamilyProperty);
67
68                 FontStyleProperty = BindableProperty.Create(nameof(FontStyle), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: SetInternalFontStyleProperty, defaultValueCreator: GetInternalFontStyleProperty);
69
70                 PointSizeProperty = BindableProperty.Create(nameof(PointSize), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalPointSizeProperty, defaultValueCreator: GetInternalPointSizeProperty);
71
72                 HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment), typeof(TextEditor), HorizontalAlignment.Begin, propertyChanged: SetInternalHorizontalAlignmentProperty, defaultValueCreator: GetInternalHorizontalAlignmentProperty);
73
74                 VerticalAlignmentProperty = BindableProperty.Create(nameof(VerticalAlignment), typeof(VerticalAlignment), typeof(TextEditor), VerticalAlignment.Bottom, propertyChanged: SetInternalVerticalAlignmentProperty, defaultValueCreator: GetInternalVerticalAlignmentProperty);
75
76                 ScrollThresholdProperty = BindableProperty.Create(nameof(ScrollThreshold), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalScrollThresholdProperty, defaultValueCreator: GetInternalScrollThresholdProperty);
77
78                 ScrollSpeedProperty = BindableProperty.Create(nameof(ScrollSpeed), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalScrollSpeedProperty, defaultValueCreator: GetInternalScrollSpeedProperty);
79
80                 PrimaryCursorColorProperty = BindableProperty.Create(nameof(PrimaryCursorColor), typeof(Vector4), typeof(TextEditor), null, propertyChanged: SetInternalPrimaryCursorColorProperty, defaultValueCreator: GetInternalPrimaryCursorColorProperty);
81
82                 SecondaryCursorColorProperty = BindableProperty.Create(nameof(SecondaryCursorColor), typeof(Vector4), typeof(TextEditor), null, propertyChanged: SetInternalSecondaryCursorColorProperty, defaultValueCreator: GetInternalSecondaryCursorColorProperty);
83
84                 EnableCursorBlinkProperty = BindableProperty.Create(nameof(EnableCursorBlink), typeof(bool), typeof(TextEditor), false, propertyChanged: SetInternalEnableCursorBlinkProperty, defaultValueCreator: GetInternalEnableCursorBlinkProperty);
85
86                 CursorBlinkIntervalProperty = BindableProperty.Create(nameof(CursorBlinkInterval), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalCursorBlinkIntervalProperty, defaultValueCreator: GetInternalCursorBlinkIntervalProperty);
87
88                 CursorBlinkDurationProperty = BindableProperty.Create(nameof(CursorBlinkDuration), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalCursorBlinkDurationProperty, defaultValueCreator: GetInternalCursorBlinkDurationProperty);
89
90                 CursorWidthProperty = BindableProperty.Create(nameof(CursorWidth), typeof(int), typeof(TextEditor), default(int), propertyChanged: SetInternalCursorWidthProperty, defaultValueCreator: GetInternalCursorWidthProperty);
91
92                 GrabHandleImageProperty = BindableProperty.Create(nameof(GrabHandleImage), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: SetInternalGrabHandleImageProperty, defaultValueCreator: GetInternalGrabHandleImageProperty);
93
94                 GrabHandlePressedImageProperty = BindableProperty.Create(nameof(GrabHandlePressedImage), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: SetInternalGrabHandlePressedImageProperty, defaultValueCreator: GetInternalGrabHandlePressedImageProperty);
95
96                 SelectionPopupStyleProperty = BindableProperty.Create(nameof(SelectionPopupStyle), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: SetInternalSelectionPopupStyleProperty, defaultValueCreator: GetInternalSelectionPopupStyleProperty);
97
98                 SelectionHandleImageLeftProperty = BindableProperty.Create(nameof(SelectionHandleImageLeft), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: SetInternalSelectionHandleImageLeftProperty, defaultValueCreator: GetInternalSelectionHandleImageLeftProperty);
99
100                 SelectionHandleImageRightProperty = BindableProperty.Create(nameof(SelectionHandleImageRight), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: SetInternalSelectionHandleImageRightProperty, defaultValueCreator: GetInternalSelectionHandleImageRightProperty);
101
102                 SelectionHandlePressedImageLeftProperty = BindableProperty.Create(nameof(SelectionHandlePressedImageLeft), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: SetInternalSelectionHandlePressedImageLeftProperty, defaultValueCreator: GetInternalSelectionHandlePressedImageLeftProperty);
103
104                 SelectionHandlePressedImageRightProperty = BindableProperty.Create(nameof(SelectionHandlePressedImageRight), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: SetInternalSelectionHandlePressedImageRightProperty, defaultValueCreator: GetInternalSelectionHandlePressedImageRightProperty);
105
106                 SelectionHandleMarkerImageLeftProperty = BindableProperty.Create(nameof(SelectionHandleMarkerImageLeft), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: SetInternalSelectionHandleMarkerImageLeftProperty, defaultValueCreator: GetInternalSelectionHandleMarkerImageLeftProperty);
107
108                 SelectionHandleMarkerImageRightProperty = BindableProperty.Create(nameof(SelectionHandleMarkerImageRight), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: SetInternalSelectionHandleMarkerImageRightProperty, defaultValueCreator: GetInternalSelectionHandleMarkerImageRightProperty);
109
110                 SelectionHighlightColorProperty = BindableProperty.Create(nameof(SelectionHighlightColor), typeof(Vector4), typeof(TextEditor), null, propertyChanged: SetInternalSelectionHighlightColorProperty, defaultValueCreator: GetInternalSelectionHighlightColorProperty);
111
112                 DecorationBoundingBoxProperty = BindableProperty.Create(nameof(DecorationBoundingBox), typeof(Rectangle), typeof(TextEditor), null, propertyChanged: SetInternalDecorationBoundingBoxProperty, defaultValueCreator: GetInternalDecorationBoundingBoxProperty);
113
114                 EnableMarkupProperty = BindableProperty.Create(nameof(EnableMarkup), typeof(bool), typeof(TextEditor), false, propertyChanged: SetInternalEnableMarkupProperty, defaultValueCreator: GetInternalEnableMarkupProperty);
115
116                 InputColorProperty = BindableProperty.Create(nameof(InputColor), typeof(Vector4), typeof(TextEditor), null, propertyChanged: SetInternalInputColorProperty, defaultValueCreator: GetInternalInputColorProperty);
117
118                 InputFontFamilyProperty = BindableProperty.Create(nameof(InputFontFamily), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: SetInternalInputFontFamilyProperty, defaultValueCreator: GetInternalInputFontFamilyProperty);
119
120                 InputFontStyleProperty = BindableProperty.Create(nameof(InputFontStyle), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: SetInternalInputFontStyleProperty, defaultValueCreator: GetInternalInputFontStyleProperty);
121
122                 InputPointSizeProperty = BindableProperty.Create(nameof(InputPointSize), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalInputPointSizeProperty, defaultValueCreator: GetInternalInputPointSizeProperty);
123
124                 LineSpacingProperty = BindableProperty.Create(nameof(LineSpacing), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalLineSpacingProperty, defaultValueCreator: GetInternalLineSpacingProperty);
125
126                 InputLineSpacingProperty = BindableProperty.Create(nameof(InputLineSpacing), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalInputLineSpacingProperty, defaultValueCreator: GetInternalInputLineSpacingProperty);
127
128                 RelativeLineHeightProperty = BindableProperty.Create(nameof(RelativeLineHeight), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalRelativeLineHeightProperty, defaultValueCreator: GetInternalRelativeLineHeightProperty);
129
130                 UnderlineProperty = BindableProperty.Create(nameof(Underline), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: SetInternalUnderlineProperty, defaultValueCreator: GetInternalUnderlineProperty);
131
132                 InputUnderlineProperty = BindableProperty.Create(nameof(InputUnderline), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: SetInternalInputUnderlineProperty, defaultValueCreator: GetInternalInputUnderlineProperty);
133
134                 ShadowProperty = BindableProperty.Create(nameof(Shadow), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: SetInternalShadowProperty, defaultValueCreator: GetInternalShadowProperty);
135
136                 InputShadowProperty = BindableProperty.Create(nameof(InputShadow), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: SetInternalInputShadowProperty, defaultValueCreator: GetInternalInputShadowProperty);
137
138                 EmbossProperty = BindableProperty.Create(nameof(Emboss), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: SetInternalEmbossProperty, defaultValueCreator: GetInternalEmbossProperty);
139
140                 InputEmbossProperty = BindableProperty.Create(nameof(InputEmboss), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: SetInternalInputEmbossProperty, defaultValueCreator: GetInternalInputEmbossProperty);
141
142                 OutlineProperty = BindableProperty.Create(nameof(Outline), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: SetInternalOutlineProperty, defaultValueCreator: GetInternalOutlineProperty);
143
144                 InputOutlineProperty = BindableProperty.Create(nameof(InputOutline), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: SetInternalInputOutlineProperty, defaultValueCreator: GetInternalInputOutlineProperty);
145
146                 SmoothScrollProperty = BindableProperty.Create(nameof(SmoothScroll), typeof(bool), typeof(TextEditor), false, propertyChanged: SetInternalSmoothScrollProperty, defaultValueCreator: GetInternalSmoothScrollProperty);
147
148                 SmoothScrollDurationProperty = BindableProperty.Create(nameof(SmoothScrollDuration), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalSmoothScrollDurationProperty, defaultValueCreator: GetInternalSmoothScrollDurationProperty);
149
150                 EnableScrollBarProperty = BindableProperty.Create(nameof(EnableScrollBar), typeof(bool), typeof(TextEditor), false, propertyChanged: SetInternalEnableScrollBarProperty, defaultValueCreator: GetInternalEnableScrollBarProperty);
151
152                 ScrollBarShowDurationProperty = BindableProperty.Create(nameof(ScrollBarShowDuration), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalScrollBarShowDurationProperty, defaultValueCreator: GetInternalScrollBarShowDurationProperty);
153
154                 ScrollBarFadeDurationProperty = BindableProperty.Create(nameof(ScrollBarFadeDuration), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalScrollBarFadeDurationProperty, defaultValueCreator: GetInternalScrollBarFadeDurationProperty);
155
156                 PixelSizeProperty = BindableProperty.Create(nameof(PixelSize), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalPixelSizeProperty, defaultValueCreator: GetInternalPixelSizeProperty);
157
158                 PlaceholderTextProperty = BindableProperty.Create(nameof(PlaceholderText), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: SetInternalPlaceholderTextProperty, defaultValueCreator: GetInternalPlaceholderTextProperty);
159
160                 PlaceholderTextColorProperty = BindableProperty.Create(nameof(PlaceholderTextColor), typeof(Color), typeof(TextEditor), null, propertyChanged: SetInternalPlaceholderTextColorProperty, defaultValueCreator: GetInternalPlaceholderTextColorProperty);
161
162                 EnableSelectionProperty = BindableProperty.Create(nameof(EnableSelection), typeof(bool), typeof(TextEditor), false, propertyChanged: SetInternalEnableSelectionProperty, defaultValueCreator: GetInternalEnableSelectionProperty);
163
164                 PlaceholderProperty = BindableProperty.Create(nameof(Placeholder), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: SetInternalPlaceholderProperty, defaultValueCreator: GetInternalPlaceholderProperty);
165
166                 LineWrapModeProperty = BindableProperty.Create(nameof(LineWrapMode), typeof(LineWrapMode), typeof(TextEditor), LineWrapMode.Word, propertyChanged: SetInternalLineWrapModeProperty, defaultValueCreator: GetInternalLineWrapModeProperty);
167
168                 EnableShiftSelectionProperty = BindableProperty.Create(nameof(TextEditor.EnableShiftSelection), typeof(bool), typeof(TextEditor), true, propertyChanged: SetInternalEnableShiftSelectionProperty, defaultValueCreator: GetInternalEnableShiftSelectionProperty);
169
170                 MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(TextEditor.MatchSystemLanguageDirection), typeof(bool), typeof(TextEditor), false, propertyChanged: SetInternalMatchSystemLanguageDirectionProperty, defaultValueCreator: GetInternalMatchSystemLanguageDirectionProperty);
171
172                 MaxLengthProperty = BindableProperty.Create(nameof(MaxLength), typeof(int), typeof(TextEditor), default(int), propertyChanged: SetInternalMaxLengthProperty, defaultValueCreator: GetInternalMaxLengthProperty);
173
174                 FontSizeScaleProperty = BindableProperty.Create(nameof(FontSizeScale), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalFontSizeScaleProperty, defaultValueCreator: GetInternalFontSizeScaleProperty);
175
176                 EnableFontSizeScaleProperty = BindableProperty.Create(nameof(EnableFontSizeScale), typeof(bool), typeof(TextEditor), default(bool), propertyChanged: SetInternalEnableFontSizeScaleProperty, defaultValueCreator: GetInternalEnableFontSizeScaleProperty);
177
178                 GrabHandleColorProperty = BindableProperty.Create(nameof(GrabHandleColor), typeof(Color), typeof(TextEditor), null, propertyChanged: SetInternalGrabHandleColorProperty, defaultValueCreator: GetInternalGrabHandleColorProperty);
179
180                 EnableGrabHandleProperty = BindableProperty.Create(nameof(TextEditor.EnableGrabHandle), typeof(bool), typeof(TextEditor), true, propertyChanged: SetInternalEnableGrabHandleProperty, defaultValueCreator: GetInternalEnableGrabHandleProperty);
181
182                 EnableGrabHandlePopupProperty = BindableProperty.Create(nameof(TextEditor.EnableGrabHandlePopup), typeof(bool), typeof(TextEditor), true, propertyChanged: SetInternalEnableGrabHandlePopupProperty, defaultValueCreator: GetInternalEnableGrabHandlePopupProperty);
183
184                 InputMethodSettingsProperty = BindableProperty.Create(nameof(TextEditor.InputMethodSettings), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: SetInternalInputMethodSettingsProperty, defaultValueCreator: GetInternalInputMethodSettingsProperty);
185
186                 EllipsisProperty = BindableProperty.Create(nameof(TextEditor.Ellipsis), typeof(bool), typeof(TextEditor), false, propertyChanged: SetInternalEllipsisProperty, defaultValueCreator: GetInternalEllipsisProperty);
187
188                 EllipsisPositionProperty = BindableProperty.Create(nameof(EllipsisPosition), typeof(EllipsisPosition), typeof(TextEditor), EllipsisPosition.End, propertyChanged: SetInternalEllipsisPositionProperty, defaultValueCreator: GetInternalEllipsisPositionProperty);
189
190                 MinLineSizeProperty = BindableProperty.Create(nameof(MinLineSize), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalMinLineSizeProperty, defaultValueCreator: GetInternalMinLineSizeProperty);
191
192                 TranslatableTextProperty = BindableProperty.Create(nameof(TranslatableText), typeof(string), typeof(Tizen.NUI.BaseComponents.TextEditor), string.Empty, propertyChanged: SetInternalTranslatableTextProperty, defaultValueCreator: GetInternalTranslatableTextProperty);
193
194                 TranslatablePlaceholderTextProperty = BindableProperty.Create(nameof(TranslatablePlaceholderText), typeof(string), typeof(Tizen.NUI.BaseComponents.TextEditor), string.Empty, propertyChanged: SetInternalTranslatablePlaceholderTextProperty, defaultValueCreator: GetInternalTranslatablePlaceholderTextProperty);
195
196                 EnableEditingProperty = BindableProperty.Create(nameof(EnableEditing), typeof(bool), typeof(Tizen.NUI.BaseComponents.TextEditor), false, propertyChanged: SetInternalEnableEditingProperty, defaultValueCreator: GetInternalEnableEditingProperty);
197
198                 HorizontalScrollPositionProperty = BindableProperty.Create(nameof(HorizontalScrollPosition), typeof(int), typeof(Tizen.NUI.BaseComponents.TextEditor), 0, propertyChanged: SetInternalHorizontalScrollPositionProperty, defaultValueCreator: GetInternalHorizontalScrollPositionProperty);
199
200                 VerticalScrollPositionProperty = BindableProperty.Create(nameof(VerticalScrollPosition), typeof(int), typeof(Tizen.NUI.BaseComponents.TextEditor), 0, propertyChanged: SetInternalVerticalScrollPositionProperty, defaultValueCreator: GetInternalVerticalScrollPositionProperty);
201
202                 PrimaryCursorPositionProperty = BindableProperty.Create(nameof(PrimaryCursorPosition), typeof(int), typeof(Tizen.NUI.BaseComponents.TextEditor), 0, propertyChanged: SetInternalPrimaryCursorPositionProperty, defaultValueCreator: GetInternalPrimaryCursorPositionProperty);
203
204                 CharacterSpacingProperty = BindableProperty.Create(nameof(CharacterSpacing), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalCharacterSpacingProperty, defaultValueCreator: GetInternalCharacterSpacingProperty);
205             }
206         }
207
208         static internal new void Preload()
209         {
210             // Do not call View.Preload(), since we already call it
211
212             Property.Preload();
213             // Do nothing. Just call for load static values.
214         }
215
216         /// <summary>
217         /// Creates the TextEditor control.
218         /// </summary>
219         /// <since_tizen> 3 </since_tizen>
220         public TextEditor() : this(Interop.TextEditor.New(ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
221         {
222             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223         }
224
225         /// <summary>
226         /// Creates the TextEditor with specified style.
227         /// </summary>
228         [EditorBrowsable(EditorBrowsableState.Never)]
229         public TextEditor(TextEditorStyle style) : this(Interop.TextEditor.New(ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true, style: style)
230         {
231         }
232
233         /// <summary>
234         /// Creates the TextEditor with setting the status of shown or hidden.
235         /// </summary>
236         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
237         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
238         [EditorBrowsable(EditorBrowsableState.Never)]
239         public TextEditor(bool shown) : this(Interop.TextEditor.New(ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
240         {
241             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
242             SetVisible(shown);
243         }
244
245         internal TextEditor(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true, TextEditorStyle style = null) : base(cPtr, cMemoryOwn, style)
246         {
247             if (!shown)
248             {
249                 SetVisible(false);
250             }
251             Focusable = true;
252             TextChanged += TextEditorTextChanged;
253         }
254
255         private bool HasStyle()
256         {
257             return ThemeManager.GetStyle(this.GetType()) == null ? false : true;
258         }
259
260         /// <summary>
261         /// The TranslatableText property.<br />
262         /// The text can set the SID value.<br />
263         /// </summary>
264         /// <exception cref='ArgumentNullException'>
265         /// ResourceManager about multilingual is null.
266         /// </exception>
267         /// <since_tizen> 4 </since_tizen>
268         public string TranslatableText
269         {
270             get
271             {
272                 if (NUIApplication.IsUsingXaml)
273                 {
274                     return GetValue(TranslatableTextProperty) as string;
275                 }
276                 else
277                 {
278                     return GetInternalTranslatableTextProperty(this) as string;
279                 }
280             }
281             set
282             {
283                 if (NUIApplication.IsUsingXaml)
284                 {
285                     SetValue(TranslatableTextProperty, value);
286                 }
287                 else
288                 {
289                     SetInternalTranslatableTextProperty(this, null, value);
290                 }
291             }
292         }
293
294         private string InternalTranslatableText
295         {
296             get
297             {
298                 return textEditorTextSid;
299             }
300             set
301             {
302                 if (NUIApplication.MultilingualResourceManager == null)
303                 {
304                     throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
305                 }
306                 textEditorTextSid = value;
307                 Text = SetTranslatable(textEditorTextSid);
308                 NotifyPropertyChanged();
309             }
310         }
311         /// <summary>
312         /// The TranslatablePlaceholderText property.<br />
313         /// The text can set the SID value.<br />
314         /// </summary>
315         /// <exception cref='ArgumentNullException'>
316         /// ResourceManager about multilingual is null.
317         /// </exception>
318         /// <since_tizen> 4 </since_tizen>
319         public string TranslatablePlaceholderText
320         {
321             get
322             {
323                 if (NUIApplication.IsUsingXaml)
324                 {
325                     return GetValue(TranslatablePlaceholderTextProperty) as string;
326                 }
327                 else
328                 {
329                     return GetInternalTranslatablePlaceholderTextProperty(this) as string;
330                 }
331             }
332             set
333             {
334                 if (NUIApplication.IsUsingXaml)
335                 {
336                     SetValue(TranslatablePlaceholderTextProperty, value);
337                 }
338                 else
339                 {
340                     SetInternalTranslatablePlaceholderTextProperty(this, null, value);
341                 }
342             }
343         }
344
345         private string InternalTranslatablePlaceholderText
346         {
347             get
348             {
349                 return textEditorPlaceHolderTextSid;
350             }
351             set
352             {
353                 if (NUIApplication.MultilingualResourceManager == null)
354                 {
355                     throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
356                 }
357                 textEditorPlaceHolderTextSid = value;
358                 PlaceholderText = SetTranslatable(textEditorPlaceHolderTextSid);
359                 NotifyPropertyChanged();
360             }
361         }
362
363         /// <summary>
364         /// The Text property.<br />
365         /// The text to display in the UTF-8 format.<br />
366         /// </summary>
367         /// <since_tizen> 3 </since_tizen>
368         public string Text
369         {
370             get
371             {
372                 if (NUIApplication.IsUsingXaml)
373                 {
374                     return (string)GetValue(TextProperty);
375                 }
376                 else
377                 {
378                     return (string)GetInternalTextProperty(this);
379                 }
380             }
381             set
382             {
383                 if (NUIApplication.IsUsingXaml)
384                 {
385                     SetValue(TextProperty, value);
386                 }
387                 else
388                 {
389                     SetInternalTextProperty(this, null, value);
390                 }
391                 NotifyPropertyChanged();
392             }
393         }
394
395         /// <summary>
396         /// The TextColor property.<br />
397         /// The color of the text.<br />
398         /// </summary>
399         /// <remarks>
400         /// The property cascade chaining set is possible. For example, this (textEditor.TextColor.X = 0.1f;) is possible.
401         /// </remarks>
402         /// <since_tizen> 3 </since_tizen>
403         public Vector4 TextColor
404         {
405             get
406             {
407                 Vector4 temp;
408                 if (NUIApplication.IsUsingXaml)
409                 {
410                     temp = (Vector4)GetValue(TextColorProperty);
411                 }
412                 else
413                 {
414                     temp = (Vector4)GetInternalTextColorProperty(this);
415                 }
416                 return new Vector4(OnTextColorChanged, temp.X, temp.Y, temp.Z, temp.W);
417             }
418             set
419             {
420                 if (NUIApplication.IsUsingXaml)
421                 {
422                     SetValue(TextColorProperty, value);
423                 }
424                 else
425                 {
426                     SetInternalTextColorProperty(this, null, value);
427                 }
428                 NotifyPropertyChanged();
429             }
430         }
431
432         /// <summary>
433         /// The FontFamily property.<br />
434         /// The requested font family to use.<br />
435         /// </summary>
436         /// <since_tizen> 3 </since_tizen>
437         public string FontFamily
438         {
439             get
440             {
441                 if (NUIApplication.IsUsingXaml)
442                 {
443                     return (string)GetValue(FontFamilyProperty);
444                 }
445                 else
446                 {
447                     return (string)GetInternalFontFamilyProperty(this);
448                 }
449             }
450             set
451             {
452                 if (NUIApplication.IsUsingXaml)
453                 {
454                     SetValue(FontFamilyProperty, value);
455                 }
456                 else
457                 {
458                     SetInternalFontFamilyProperty(this, null, value);
459                 }
460                 NotifyPropertyChanged();
461             }
462         }
463
464         private string InternalFontFamily
465         {
466             get
467             {
468                 if (HasStyle())
469                     return fontFamily;
470                 else
471                     return Object.InternalGetPropertyString(this.SwigCPtr, TextEditor.Property.FontFamily);
472             }
473             set
474             {
475                 string newFontFamily;
476
477                 if (string.Equals(fontFamily, value)) return;
478
479                 fontFamily = value;
480                 if (fontFamily == Tizen.NUI.FontFamily.UseSystemSetting)
481                 {
482                     try
483                     {
484                         newFontFamily = SystemSettings.FontType;
485                     }
486                     catch (Exception e)
487                     {
488                         Console.WriteLine("{0} Exception caught.", e);
489                         newFontFamily = defaultFontFamily;
490                     }
491                     AddSystemSettingsFontTypeChanged();
492                 }
493                 else
494                 {
495                     newFontFamily = fontFamily;
496                     RemoveSystemSettingsFontTypeChanged();
497                 }
498
499                 SetInternalFontFamily(newFontFamily);
500             }
501         }
502
503         private void SetInternalFontFamily(string fontFamily)
504         {
505             Object.InternalSetPropertyString(this.SwigCPtr, TextEditor.Property.FontFamily, (string)fontFamily);
506         }
507
508         /// <summary>
509         /// The FontStyle property.<br />
510         /// The requested font style to use.<br />
511         /// The fontStyle map contains the following keys :<br />
512         /// <list type="table">
513         /// <item><term>width (string)</term><description>The width key defines occupied by each glyph. (values: ultraCondensed, extraCondensed, condensed, semiCondensed, normal, semiExpanded, expanded, extraExpanded, ultraExpanded)</description></item>
514         /// <item><term>weight (string)</term><description>The weight key defines the thickness or darkness of the glyphs. (values: thin, ultraLight, extraLight, light, demiLight, semiLight, book, normal, regular, medium, demiBold, semiBold, bold, ultraBold, extraBold, black, heavy, extraBlack)</description></item>
515         /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
516         /// </list>
517         /// </summary>
518         /// <since_tizen> 3 </since_tizen>
519         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
520         public PropertyMap FontStyle
521         {
522             get
523             {
524                 if (NUIApplication.IsUsingXaml)
525                 {
526                     return (PropertyMap)GetValue(FontStyleProperty);
527                 }
528                 else
529                 {
530                     return (PropertyMap)GetInternalFontStyleProperty(this);
531                 }
532             }
533             set
534             {
535                 if (NUIApplication.IsUsingXaml)
536                 {
537                     SetValue(FontStyleProperty, value);
538                 }
539                 else
540                 {
541                     SetInternalFontStyleProperty(this, null, value);
542                 }
543                 NotifyPropertyChanged();
544             }
545         }
546
547         /// <summary>
548         /// Set FontStyle to TextEditor. <br />
549         /// </summary>
550         /// <param name="fontStyle">The FontStyle</param>
551         /// <remarks>
552         /// SetFontStyle specifies the requested font style through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
553         /// </remarks>
554         /// <example>
555         /// The following example demonstrates how to use the SetFontStyle method.
556         /// <code>
557         /// var fontStyle = new Tizen.NUI.Text.FontStyle();
558         /// fontStyle.Width = FontWidthType.Expanded;
559         /// fontStyle.Weight = FontWeightType.Bold;
560         /// fontStyle.Slant = FontSlantType.Italic;
561         /// editor.SetFontStyle(fontStyle);
562         /// </code>
563         /// </example>
564         [EditorBrowsable(EditorBrowsableState.Never)]
565         public void SetFontStyle(FontStyle fontStyle)
566         {
567             using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
568             {
569                 SetValue(FontStyleProperty, fontStyleMap);
570             }
571         }
572
573         /// <summary>
574         /// Get FontStyle from TextEditor. <br />
575         /// </summary>
576         /// <returns>The FontStyle</returns>
577         /// <remarks>
578         /// <see cref="Tizen.NUI.Text.FontStyle"/>
579         /// </remarks>
580         [EditorBrowsable(EditorBrowsableState.Never)]
581         public FontStyle GetFontStyle()
582         {
583             FontStyle fontStyle;
584             using (var fontStyleMap = (PropertyMap)GetValue(FontStyleProperty))
585             {
586                 fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
587             }
588             return fontStyle;
589         }
590
591         /// <summary>
592         /// The PointSize property.<br />
593         /// The size of font in points.<br />
594         /// </summary>
595         /// <since_tizen> 3 </since_tizen>
596         [Binding.TypeConverter(typeof(PointSizeTypeConverter))]
597         public float PointSize
598         {
599             get
600             {
601                 if (NUIApplication.IsUsingXaml)
602                 {
603                     return (float)GetValue(PointSizeProperty);
604                 }
605                 else
606                 {
607                     return (float)GetInternalPointSizeProperty(this);
608                 }
609             }
610             set
611             {
612                 if (NUIApplication.IsUsingXaml)
613                 {
614                     SetValue(PointSizeProperty, value);
615                 }
616                 else
617                 {
618                     SetInternalPointSizeProperty(this, null, value);
619                 }
620                 NotifyPropertyChanged();
621             }
622         }
623
624         /// <summary>
625         /// The HorizontalAlignment property.<br />
626         /// The line horizontal alignment.<br />
627         /// </summary>
628         /// <since_tizen> 3 </since_tizen>
629         public HorizontalAlignment HorizontalAlignment
630         {
631             get
632             {
633                 if (NUIApplication.IsUsingXaml)
634                 {
635                     return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
636                 }
637                 else
638                 {
639                     return (HorizontalAlignment)GetInternalHorizontalAlignmentProperty(this);
640                 }
641             }
642             set
643             {
644                 if (NUIApplication.IsUsingXaml)
645                 {
646                     SetValue(HorizontalAlignmentProperty, value);
647                 }
648                 else
649                 {
650                     SetInternalHorizontalAlignmentProperty(this, null, value);
651                 }
652                 NotifyPropertyChanged();
653             }
654         }
655
656         /// <summary>
657         /// The VerticalAlignment property.<br />
658         /// The line vertical alignment.
659         /// </summary>
660         [EditorBrowsable(EditorBrowsableState.Never)]
661         public VerticalAlignment VerticalAlignment
662         {
663             get
664             {
665                 if (NUIApplication.IsUsingXaml)
666                 {
667                     return (VerticalAlignment)GetValue(VerticalAlignmentProperty);
668                 }
669                 else
670                 {
671                     return (VerticalAlignment)GetInternalVerticalAlignmentProperty(this);
672                 }
673             }
674             set
675             {
676                 if (NUIApplication.IsUsingXaml)
677                 {
678                     SetValue(VerticalAlignmentProperty, value);
679                 }
680                 else
681                 {
682                     SetInternalVerticalAlignmentProperty(this, null, value);
683                 }
684                 NotifyPropertyChanged();
685             }
686         }
687
688         /// <summary>
689         /// The ScrollThreshold property.<br />
690         /// Horizontal scrolling will occur if the cursor is this close to the control border.<br />
691         /// </summary>
692         /// <since_tizen> 3 </since_tizen>
693         public float ScrollThreshold
694         {
695             get
696             {
697                 if (NUIApplication.IsUsingXaml)
698                 {
699                     return (float)GetValue(ScrollThresholdProperty);
700                 }
701                 else
702                 {
703                     return (float)GetInternalScrollThresholdProperty(this);
704                 }
705             }
706             set
707             {
708                 if (NUIApplication.IsUsingXaml)
709                 {
710                     SetValue(ScrollThresholdProperty, value);
711                 }
712                 else
713                 {
714                     SetInternalScrollThresholdProperty(this, null, value);
715                 }
716                 NotifyPropertyChanged();
717             }
718         }
719
720         /// <summary>
721         /// The ScrollSpeed property.<br />
722         /// The scroll speed in pixels per second.<br />
723         /// </summary>
724         /// <since_tizen> 3 </since_tizen>
725         public float ScrollSpeed
726         {
727             get
728             {
729                 if (NUIApplication.IsUsingXaml)
730                 {
731                     return (float)GetValue(ScrollSpeedProperty);
732                 }
733                 else
734                 {
735                     return (float)GetInternalScrollSpeedProperty(this);
736                 }
737             }
738             set
739             {
740                 if (NUIApplication.IsUsingXaml)
741                 {
742                     SetValue(ScrollSpeedProperty, value);
743                 }
744                 else
745                 {
746                     SetInternalScrollSpeedProperty(this, null, value);
747                 }
748                 NotifyPropertyChanged();
749             }
750         }
751
752         /// <summary>
753         /// The PrimaryCursorColor property.<br />
754         /// The color to apply to the primary cursor.<br />
755         /// </summary>
756         /// <remarks>
757         /// The property cascade chaining set is possible. For example, this (textEditor.PrimaryCursorColor.X = 0.1f;) is possible.
758         /// </remarks>
759         /// <since_tizen> 3 </since_tizen>
760         public Vector4 PrimaryCursorColor
761         {
762             get
763             {
764                 Vector4 temp;
765                 if (NUIApplication.IsUsingXaml)
766                 {
767                     temp = (Vector4)GetValue(PrimaryCursorColorProperty);
768                 }
769                 else
770                 {
771                     temp = (Vector4)GetInternalPrimaryCursorColorProperty(this);
772                 }
773                 return new Vector4(OnPrimaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
774             }
775             set
776             {
777                 if (NUIApplication.IsUsingXaml)
778                 {
779                     SetValue(PrimaryCursorColorProperty, value);
780                 }
781                 else
782                 {
783                     SetInternalPrimaryCursorColorProperty(this, null, value);
784                 }
785                 NotifyPropertyChanged();
786             }
787         }
788
789         /// <summary>
790         /// The SecondaryCursorColor property.<br />
791         /// The color to apply to the secondary cursor.<br />
792         /// </summary>
793         /// <remarks>
794         /// The property cascade chaining set is possible. For example, this (textEditor.SecondaryCursorColor.X = 0.1f;) is possible.
795         /// </remarks>
796         /// <since_tizen> 3 </since_tizen>
797         public Vector4 SecondaryCursorColor
798         {
799             get
800             {
801                 Vector4 temp;
802                 if (NUIApplication.IsUsingXaml)
803                 {
804                     temp = (Vector4)GetValue(SecondaryCursorColorProperty);
805                 }
806                 else
807                 {
808                     temp = (Vector4)GetInternalSecondaryCursorColorProperty(this);
809                 }
810                 return new Vector4(OnSecondaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
811             }
812             set
813             {
814                 if (NUIApplication.IsUsingXaml)
815                 {
816                     SetValue(SecondaryCursorColorProperty, value);
817                 }
818                 else
819                 {
820                     SetInternalSecondaryCursorColorProperty(this, null, value);
821                 }
822                 NotifyPropertyChanged();
823             }
824         }
825
826         /// <summary>
827         /// The EnableCursorBlink property.<br />
828         /// Whether the cursor should blink or not.<br />
829         /// </summary>
830         /// <since_tizen> 3 </since_tizen>
831         public bool EnableCursorBlink
832         {
833             get
834             {
835                 if (NUIApplication.IsUsingXaml)
836                 {
837                     return (bool)GetValue(EnableCursorBlinkProperty);
838                 }
839                 else
840                 {
841                     return (bool)GetInternalEnableCursorBlinkProperty(this);
842                 }
843             }
844             set
845             {
846                 if (NUIApplication.IsUsingXaml)
847                 {
848                     SetValue(EnableCursorBlinkProperty, value);
849                 }
850                 else
851                 {
852                     SetInternalEnableCursorBlinkProperty(this, null, value);
853                 }
854                 NotifyPropertyChanged();
855             }
856         }
857
858         /// <summary>
859         /// The CursorBlinkInterval property.<br />
860         /// The time interval in seconds between cursor on/off states.<br />
861         /// </summary>
862         /// <since_tizen> 3 </since_tizen>
863         public float CursorBlinkInterval
864         {
865             get
866             {
867                 if (NUIApplication.IsUsingXaml)
868                 {
869                     return (float)GetValue(CursorBlinkIntervalProperty);
870                 }
871                 else
872                 {
873                     return (float)GetInternalCursorBlinkIntervalProperty(this);
874                 }
875             }
876             set
877             {
878                 if (NUIApplication.IsUsingXaml)
879                 {
880                     SetValue(CursorBlinkIntervalProperty, value);
881                 }
882                 else
883                 {
884                     SetInternalCursorBlinkIntervalProperty(this, null, value);
885                 }
886                 NotifyPropertyChanged();
887             }
888         }
889
890         /// <summary>
891         /// The CursorBlinkDuration property.<br />
892         /// The cursor will stop blinking after this number of seconds (if non-zero).<br />
893         /// </summary>
894         /// <since_tizen> 3 </since_tizen>
895         public float CursorBlinkDuration
896         {
897             get
898             {
899                 if (NUIApplication.IsUsingXaml)
900                 {
901                     return (float)GetValue(CursorBlinkDurationProperty);
902                 }
903                 else
904                 {
905                     return (float)GetInternalCursorBlinkDurationProperty(this);
906                 }
907             }
908             set
909             {
910                 if (NUIApplication.IsUsingXaml)
911                 {
912                     SetValue(CursorBlinkDurationProperty, value);
913                 }
914                 else
915                 {
916                     SetInternalCursorBlinkDurationProperty(this, null, value);
917                 }
918                 NotifyPropertyChanged();
919             }
920         }
921
922         /// <summary>
923         /// The CursorWidth property.
924         /// </summary>
925         /// <since_tizen> 3 </since_tizen>
926         public int CursorWidth
927         {
928             get
929             {
930                 if (NUIApplication.IsUsingXaml)
931                 {
932                     return (int)GetValue(CursorWidthProperty);
933                 }
934                 else
935                 {
936                     return (int)GetInternalCursorWidthProperty(this);
937                 }
938             }
939             set
940             {
941                 if (NUIApplication.IsUsingXaml)
942                 {
943                     SetValue(CursorWidthProperty, value);
944                 }
945                 else
946                 {
947                     SetInternalCursorWidthProperty(this, null, value);
948                 }
949                 NotifyPropertyChanged();
950             }
951         }
952
953         /// <summary>
954         /// The GrabHandleImage property.<br />
955         /// The image to display for the grab handle.<br />
956         /// </summary>
957         /// <since_tizen> 3 </since_tizen>
958         public string GrabHandleImage
959         {
960             get
961             {
962                 if (NUIApplication.IsUsingXaml)
963                 {
964                     return (string)GetValue(GrabHandleImageProperty);
965                 }
966                 else
967                 {
968                     return (string)GetInternalGrabHandleImageProperty(this);
969                 }
970             }
971             set
972             {
973                 if (NUIApplication.IsUsingXaml)
974                 {
975                     SetValue(GrabHandleImageProperty, value);
976                 }
977                 else
978                 {
979                     SetInternalGrabHandleImageProperty(this, null, value);
980                 }
981                 NotifyPropertyChanged();
982             }
983         }
984
985         /// <summary>
986         /// The GrabHandlePressedImage property.<br />
987         /// The image to display when the grab handle is pressed.<br />
988         /// </summary>
989         /// <since_tizen> 3 </since_tizen>
990         public string GrabHandlePressedImage
991         {
992             get
993             {
994                 if (NUIApplication.IsUsingXaml)
995                 {
996                     return (string)GetValue(GrabHandlePressedImageProperty);
997                 }
998                 else
999                 {
1000                     return (string)GetInternalGrabHandlePressedImageProperty(this);
1001                 }
1002             }
1003             set
1004             {
1005                 if (NUIApplication.IsUsingXaml)
1006                 {
1007                     SetValue(GrabHandlePressedImageProperty, value);
1008                 }
1009                 else
1010                 {
1011                     SetInternalGrabHandlePressedImageProperty(this, null, value);
1012                 }
1013                 NotifyPropertyChanged();
1014             }
1015         }
1016
1017         /// <summary>
1018         /// The SelectionPopupStyle property.<br />
1019         /// The style of the text selection popup can be set through SelectionPopupStyle property.
1020         /// </summary>
1021         [EditorBrowsable(EditorBrowsableState.Never)]
1022         public PropertyMap SelectionPopupStyle
1023         {
1024             get
1025             {
1026                 if (NUIApplication.IsUsingXaml)
1027                 {
1028                     return (PropertyMap)GetValue(SelectionPopupStyleProperty);
1029                 }
1030                 else
1031                 {
1032                     return (PropertyMap)GetInternalSelectionPopupStyleProperty(this);
1033                 }
1034             }
1035             set
1036             {
1037                 if (NUIApplication.IsUsingXaml)
1038                 {
1039                     SetValue(SelectionPopupStyleProperty, value);
1040                 }
1041                 else
1042                 {
1043                     SetInternalSelectionPopupStyleProperty(this, null, value);
1044                 }
1045                 NotifyPropertyChanged();
1046             }
1047         }
1048
1049         /// <summary>
1050         /// The SelectionHandleImageLeft property.<br />
1051         /// The image to display for the left selection handle.<br />
1052         /// The selectionHandleImageLeft map contains the following key :<br />
1053         /// <list type="table">
1054         /// <item><term>filename (string)</term><description>The path of image file</description></item>
1055         /// </list>
1056         /// </summary>
1057         /// <since_tizen> 3 </since_tizen>
1058         public PropertyMap SelectionHandleImageLeft
1059         {
1060             get
1061             {
1062                 if (NUIApplication.IsUsingXaml)
1063                 {
1064                     return (PropertyMap)GetValue(SelectionHandleImageLeftProperty);
1065                 }
1066                 else
1067                 {
1068                     return (PropertyMap)GetInternalSelectionHandleImageLeftProperty(this);
1069                 }
1070             }
1071             set
1072             {
1073                 if (NUIApplication.IsUsingXaml)
1074                 {
1075                     SetValue(SelectionHandleImageLeftProperty, value);
1076                 }
1077                 else
1078                 {
1079                     SetInternalSelectionHandleImageLeftProperty(this, null, value);
1080                 }
1081                 NotifyPropertyChanged();
1082             }
1083         }
1084
1085         /// <summary>
1086         /// The SelectionHandleImageRight property.<br />
1087         /// The image to display for the right selection handle.<br />
1088         /// The selectionHandleImageRight map contains the following key :<br />
1089         /// <list type="table">
1090         /// <item><term>filename (string)</term><description>The path of image file</description></item>
1091         /// </list>
1092         /// </summary>
1093         /// <since_tizen> 3 </since_tizen>
1094         public PropertyMap SelectionHandleImageRight
1095         {
1096             get
1097             {
1098                 if (NUIApplication.IsUsingXaml)
1099                 {
1100                     return (PropertyMap)GetValue(SelectionHandleImageRightProperty);
1101                     
1102                 }
1103                 else
1104                 {
1105                     return (PropertyMap)GetInternalSelectionHandleImageRightProperty(this);
1106                 }
1107             }
1108             set
1109             {
1110                 if (NUIApplication.IsUsingXaml)
1111                 {
1112                     SetValue(SelectionHandleImageRightProperty, value);
1113                     
1114                 }
1115                 else
1116                 {
1117                     SetInternalSelectionHandleImageRightProperty(this, null, value);
1118                 }
1119                 NotifyPropertyChanged();
1120             }
1121         }
1122
1123         /// <summary>
1124         /// Set SelectionHandleImage to TextEditor. <br />
1125         /// </summary>
1126         /// <param name="selectionHandleImage">The SelectionHandleImage</param>
1127         /// <remarks>
1128         /// SetSelectionHandleImage specifies the display image used for the selection handle through <see cref="Tizen.NUI.Text.SelectionHandleImage"/>. <br />
1129         /// </remarks>
1130         /// <example>
1131         /// The following example demonstrates how to use the SetSelectionHandleImage method.
1132         /// <code>
1133         /// var selectionHandleImage = new Tizen.NUI.Text.SelectionHandleImage();
1134         /// selectionHandleImage.LeftImageUrl = "handle_downleft.png";
1135         /// selectionHandleImage.RightImageUrl = "handle_downright.png";
1136         /// editor.SetSelectionHandleImage(selectionHandleImage);
1137         /// </code>
1138         /// </example>
1139         [EditorBrowsable(EditorBrowsableState.Never)]
1140         public void SetSelectionHandleImage(SelectionHandleImage selectionHandleImage)
1141         {
1142             if (!String.IsNullOrEmpty(selectionHandleImage.LeftImageUrl))
1143             {
1144                 using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandleImage.LeftImageUrl))
1145                 {
1146                     SetValue(SelectionHandleImageLeftProperty, leftImageMap);
1147                 }
1148             }
1149
1150             if (!String.IsNullOrEmpty(selectionHandleImage.RightImageUrl))
1151             {
1152                 using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandleImage.RightImageUrl))
1153                 {
1154                     SetValue(SelectionHandleImageRightProperty, rightImageMap);
1155                 }
1156             }
1157         }
1158
1159         /// <summary>
1160         /// Get SelectionHandleImage from TextEditor. <br />
1161         /// </summary>
1162         /// <returns>The SelectionHandleImage</returns>
1163         /// <remarks>
1164         /// <see cref="Tizen.NUI.Text.SelectionHandleImage"/>
1165         /// </remarks>
1166         [EditorBrowsable(EditorBrowsableState.Never)]
1167         public SelectionHandleImage GetSelectionHandleImage()
1168         {
1169             SelectionHandleImage selectionHandleImage;
1170             using (var leftImageMap = (PropertyMap)GetValue(SelectionHandleImageLeftProperty))
1171             using (var rightImageMap = (PropertyMap)GetValue(SelectionHandleImageRightProperty))
1172             {
1173                 selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
1174             }
1175             return selectionHandleImage;
1176         }
1177
1178         /// <summary>
1179         /// The SelectionHandlePressedImageLeft property.<br />
1180         /// The image to display when the left selection handle is pressed.<br />
1181         /// The selectionHandlePressedImageLeft map contains the following key :<br />
1182         /// <list type="table">
1183         /// <item><term>filename (string)</term><description>The path of image file</description></item>
1184         /// </list>
1185         /// </summary>
1186         /// <since_tizen> 3 </since_tizen>
1187         public PropertyMap SelectionHandlePressedImageLeft
1188         {
1189             get
1190             {
1191                 if (NUIApplication.IsUsingXaml)
1192                 {
1193                     return (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty);
1194                 }
1195                 else
1196                 {
1197                     return (PropertyMap)GetInternalSelectionHandlePressedImageLeftProperty(this);
1198                 }
1199             }
1200             set
1201             {
1202                 if (NUIApplication.IsUsingXaml)
1203                 {
1204                     SetValue(SelectionHandlePressedImageLeftProperty, value);
1205                 }
1206                 else
1207                 {
1208                     SetInternalSelectionHandlePressedImageLeftProperty(this, null, value);
1209                 }
1210                 NotifyPropertyChanged();
1211             }
1212         }
1213
1214         /// <summary>
1215         /// The SelectionHandlePressedImageRight property.<br />
1216         /// The image to display when the right selection handle is pressed.<br />
1217         /// The selectionHandlePressedImageRight map contains the following key :<br />
1218         /// <list type="table">
1219         /// <item><term>filename (string)</term><description>The path of image file</description></item>
1220         /// </list>
1221         /// </summary>
1222         /// <since_tizen> 3 </since_tizen>
1223         public PropertyMap SelectionHandlePressedImageRight
1224         {
1225             get
1226             {
1227                 if (NUIApplication.IsUsingXaml)
1228                 {
1229                     return (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty);
1230                 }
1231                 else
1232                 {
1233                     return (PropertyMap)GetInternalSelectionHandlePressedImageRightProperty(this);
1234                 }
1235             }
1236             set
1237             {
1238                 if (NUIApplication.IsUsingXaml)
1239                 {
1240                     SetValue(SelectionHandlePressedImageRightProperty, value);
1241                 }
1242                 else
1243                 {
1244                     SetInternalSelectionHandlePressedImageRightProperty(this, null, value);
1245                 }
1246                 NotifyPropertyChanged();
1247             }
1248         }
1249
1250         /// <summary>
1251         /// Set SelectionHandlePressedImage to TextEditor. <br />
1252         /// </summary>
1253         /// <param name="selectionHandlePressedImage">The SelectionHandleImage</param>
1254         /// <remarks>
1255         /// SetSelectionHandlePressedImage specifies the display image used for the selection handle through <see cref="Tizen.NUI.Text.SelectionHandleImage"/>. <br />
1256         /// </remarks>
1257         /// <example>
1258         /// The following example demonstrates how to use the SetSelectionHandlePressedImage method.
1259         /// <code>
1260         /// var selectionHandlePressedImage = new Tizen.NUI.Text.SelectionHandleImage();
1261         /// selectionHandlePressedImage.LeftImageUrl = "handle_pressed_downleft.png";
1262         /// selectionHandlePressedImage.RightImageUrl = "handle_pressed_downright.png";
1263         /// editor.SetSelectionHandlePressedImage(selectionHandlePressedImage);
1264         /// </code>
1265         /// </example>
1266         [EditorBrowsable(EditorBrowsableState.Never)]
1267         public void SetSelectionHandlePressedImage(SelectionHandleImage selectionHandlePressedImage)
1268         {
1269             if (!String.IsNullOrEmpty(selectionHandlePressedImage.LeftImageUrl))
1270             {
1271                 using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandlePressedImage.LeftImageUrl))
1272                 {
1273                     SetValue(SelectionHandlePressedImageLeftProperty, leftImageMap);
1274                 }
1275             }
1276
1277             if (!String.IsNullOrEmpty(selectionHandlePressedImage.RightImageUrl))
1278             {
1279                 using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandlePressedImage.RightImageUrl))
1280                 {
1281                     SetValue(SelectionHandlePressedImageRightProperty, rightImageMap);
1282                 }
1283             }
1284         }
1285
1286         /// <summary>
1287         /// Get SelectionHandlePressedImage from TextEditor. <br />
1288         /// </summary>
1289         /// <returns>The SelectionHandlePressedImage</returns>
1290         /// <remarks>
1291         /// <see cref="Tizen.NUI.Text.SelectionHandleImage"/>
1292         /// </remarks>
1293         [EditorBrowsable(EditorBrowsableState.Never)]
1294         public SelectionHandleImage GetSelectionHandlePressedImage()
1295         {
1296             SelectionHandleImage selectionHandleImage;
1297             using (var leftImageMap = (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty))
1298             using (var rightImageMap = (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty))
1299             {
1300                 selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
1301             }
1302             return selectionHandleImage;
1303         }
1304
1305         /// <summary>
1306         /// The SelectionHandleMarkerImageLeft property.<br />
1307         /// The image to display for the left selection handle marker.<br />
1308         /// The selectionHandleMarkerImageLeft map contains the following key :<br />
1309         /// <list type="table">
1310         /// <item><term>filename (string)</term><description>The path of image file</description></item>
1311         /// </list>
1312         /// </summary>
1313         /// <since_tizen> 3 </since_tizen>
1314         public PropertyMap SelectionHandleMarkerImageLeft
1315         {
1316             get
1317             {
1318                 if (NUIApplication.IsUsingXaml)
1319                 {
1320                     return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty);
1321                 }
1322                 else
1323                 {
1324                     return (PropertyMap)GetInternalSelectionHandleMarkerImageLeftProperty(this);
1325                 }
1326             }
1327             set
1328             {
1329                 if (NUIApplication.IsUsingXaml)
1330                 {
1331                     SetValue(SelectionHandleMarkerImageLeftProperty, value);
1332                 }
1333                 else
1334                 {
1335                     SetInternalSelectionHandleMarkerImageLeftProperty(this, null, value);
1336                 }
1337                 NotifyPropertyChanged();
1338             }
1339         }
1340
1341         /// <summary>
1342         /// The SelectionHandleMarkerImageRight property.<br />
1343         /// The image to display for the right selection handle marker.<br />
1344         /// The selectionHandleMarkerImageRight map contains the following key :<br />
1345         /// <list type="table">
1346         /// <item><term>filename (string)</term><description>The path of image file</description></item>
1347         /// </list>
1348         /// </summary>
1349         /// <since_tizen> 3 </since_tizen>
1350         public PropertyMap SelectionHandleMarkerImageRight
1351         {
1352             get
1353             {
1354                 if (NUIApplication.IsUsingXaml)
1355                 {
1356                     return (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty);
1357                 }
1358                 else
1359                 {
1360                     return (PropertyMap)GetInternalSelectionHandleMarkerImageRightProperty(this);
1361                 }
1362             }
1363             set
1364             {
1365                 if (NUIApplication.IsUsingXaml)
1366                 {
1367                     SetValue(SelectionHandleMarkerImageRightProperty, value);
1368                 }
1369                 else
1370                 {
1371                     SetInternalSelectionHandleMarkerImageRightProperty(this, null, value);
1372                 }
1373                 NotifyPropertyChanged();
1374             }
1375         }
1376
1377         /// <summary>
1378         /// Set SelectionHandleMarkerImage to TextEditor. <br />
1379         /// </summary>
1380         /// <param name="selectionHandleMarkerImage">The SelectionHandleImage</param>
1381         /// <remarks>
1382         /// SetSelectionHandleMarkerImage specifies the display image used for the selection handle through <see cref="Tizen.NUI.Text.SelectionHandleImage"/>. <br />
1383         /// </remarks>
1384         /// <example>
1385         /// The following example demonstrates how to use the SetSelectionHandleMarkerImage method.
1386         /// <code>
1387         /// var selectionHandleMarkerImage = new Tizen.NUI.Text.SelectionHandleImage();
1388         /// selectionHandleMarkerImage.LeftImageUrl = "handle_pressed_downleft.png";
1389         /// selectionHandleMarkerImage.RightImageUrl = "handle_pressed_downright.png";
1390         /// editor.SetSelectionHandleMarkerImage(selectionHandleMarkerImage);
1391         /// </code>
1392         /// </example>
1393         [EditorBrowsable(EditorBrowsableState.Never)]
1394         public void SetSelectionHandleMarkerImage(SelectionHandleImage selectionHandleMarkerImage)
1395         {
1396             if (!String.IsNullOrEmpty(selectionHandleMarkerImage.LeftImageUrl))
1397             {
1398                 using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.LeftImageUrl))
1399                 {
1400                     SetValue(SelectionHandleMarkerImageLeftProperty, leftImageMap);
1401                 }
1402             }
1403
1404             if (!String.IsNullOrEmpty(selectionHandleMarkerImage.RightImageUrl))
1405             {
1406                 using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.RightImageUrl))
1407                 {
1408                     SetValue(SelectionHandleMarkerImageRightProperty, rightImageMap);
1409                 }
1410             }
1411         }
1412
1413         /// <summary>
1414         /// Get SelectionHandleMarkerImage from TextEditor. <br />
1415         /// </summary>
1416         /// <returns>The SelectionHandleMarkerImage</returns>
1417         /// <remarks>
1418         /// <see cref="Tizen.NUI.Text.SelectionHandleImage"/>
1419         /// </remarks>
1420         [EditorBrowsable(EditorBrowsableState.Never)]
1421         public SelectionHandleImage GetSelectionHandleMarkerImage()
1422         {
1423             SelectionHandleImage selectionHandleImage;
1424             using (var leftImageMap = (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty))
1425             using (var rightImageMap = (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty))
1426             {
1427                 selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
1428             }
1429             return selectionHandleImage;
1430         }
1431
1432         /// <summary>
1433         /// The SelectionHighlightColor property.<br />
1434         /// The color of the selection highlight.<br />
1435         /// </summary>
1436         /// <remarks>
1437         /// The property cascade chaining set is possible. For example, this (textEditor.SelectionHighlightColor.X = 0.1f;) is possible.
1438         /// </remarks>
1439         /// <since_tizen> 3 </since_tizen>
1440         public Vector4 SelectionHighlightColor
1441         {
1442             get
1443             {
1444                 Vector4 temp;
1445                 if (NUIApplication.IsUsingXaml)
1446                 {
1447                     temp = (Vector4)GetValue(SelectionHighlightColorProperty);
1448                 }
1449                 else
1450                 {
1451                     temp = (Vector4)GetInternalSelectionHighlightColorProperty(this);
1452                 }
1453                 return new Vector4(OnSelectionHighlightColorChanged, temp.X, temp.Y, temp.Z, temp.W);
1454             }
1455             set
1456             {
1457                 if (NUIApplication.IsUsingXaml)
1458                 {
1459                     SetValue(SelectionHighlightColorProperty, value);
1460                 }
1461                 else
1462                 {
1463                     SetInternalSelectionHighlightColorProperty(this, null, value);
1464                 }
1465                 NotifyPropertyChanged();
1466             }
1467         }
1468
1469         /// <summary>
1470         /// The DecorationBoundingBox property.<br />
1471         /// The decorations (handles etc) will positioned within this area on-screen.<br />
1472         /// </summary>
1473         /// <remarks>
1474         /// The property cascade chaining set is possible. For example, this (textEditor.DecorationBoundingBox.X = 1;) is possible.
1475         /// </remarks>
1476         /// <since_tizen> 3 </since_tizen>
1477         public Rectangle DecorationBoundingBox
1478         {
1479             get
1480             {
1481                 Rectangle temp;
1482                 if (NUIApplication.IsUsingXaml)
1483                 {
1484                     temp = (Rectangle)GetValue(DecorationBoundingBoxProperty);
1485                 }
1486                 else
1487                 {
1488                     temp = (Rectangle)GetInternalDecorationBoundingBoxProperty(this);
1489                 }
1490                 return new Rectangle(OnDecorationBoundingBoxChanged, temp.X, temp.Y, temp.Width, temp.Height);
1491             }
1492             set
1493             {
1494                 if (NUIApplication.IsUsingXaml)
1495                 {
1496                     SetValue(DecorationBoundingBoxProperty, value);
1497                 }
1498                 else
1499                 {
1500                     SetInternalDecorationBoundingBoxProperty(this, null, value);
1501                 }
1502                 NotifyPropertyChanged();
1503             }
1504         }
1505
1506         /// <summary>
1507         /// The EnableMarkup property.<br />
1508         /// Whether the mark-up processing is enabled.<br />
1509         /// </summary>
1510         /// <since_tizen> 3 </since_tizen>
1511         public bool EnableMarkup
1512         {
1513             get
1514             {
1515                 if (NUIApplication.IsUsingXaml)
1516                 {
1517                     return (bool)GetValue(EnableMarkupProperty);
1518                 }
1519                 else
1520                 {
1521                     return (bool)GetInternalEnableMarkupProperty(this);
1522                 }
1523             }
1524             set
1525             {
1526                 if (NUIApplication.IsUsingXaml)
1527                 {
1528                     SetValue(EnableMarkupProperty, value);
1529                 }
1530                 else
1531                 {
1532                     SetInternalEnableMarkupProperty(this, null, value);
1533                 }
1534                 NotifyPropertyChanged();
1535             }
1536         }
1537
1538         /// <summary>
1539         /// The InputColor property.<br />
1540         /// The color of the new input text.<br />
1541         /// </summary>
1542         /// <remarks>
1543         /// The property cascade chaining set is possible. For example, this (textEditor.InputColor.X = 0.1f;) is possible.
1544         /// </remarks>
1545         /// <since_tizen> 3 </since_tizen>
1546         public Vector4 InputColor
1547         {
1548             get
1549             {
1550                 Vector4 temp;
1551                 if (NUIApplication.IsUsingXaml)
1552                 {
1553                     temp = (Vector4)GetValue(InputColorProperty);
1554                 }
1555                 else
1556                 {
1557                     temp = (Vector4)GetInternalInputColorProperty(this);
1558                 }
1559                 return new Vector4(OnInputColorChanged, temp.X, temp.Y, temp.Z, temp.W);
1560             }
1561             set
1562             {
1563                 if (NUIApplication.IsUsingXaml)
1564                 {
1565                     SetValue(InputColorProperty, value);
1566                 }
1567                 else
1568                 {
1569                     SetInternalInputColorProperty(this, null, value);
1570                 }
1571                 NotifyPropertyChanged();
1572             }
1573         }
1574
1575         /// <summary>
1576         /// The InputFontFamily property.<br />
1577         /// The font's family of the new input text.<br />
1578         /// </summary>
1579         /// <since_tizen> 3 </since_tizen>
1580         public string InputFontFamily
1581         {
1582             get
1583             {
1584                 if (NUIApplication.IsUsingXaml)
1585                 {
1586                     return (string)GetValue(InputFontFamilyProperty);
1587                 }
1588                 else
1589                 {
1590                     return (string)GetInternalInputFontFamilyProperty(this);
1591                 }
1592             }
1593             set
1594             {
1595                 if (NUIApplication.IsUsingXaml)
1596                 {
1597                     SetValue(InputFontFamilyProperty, value);
1598                 }
1599                 else
1600                 {
1601                     SetInternalInputFontFamilyProperty(this, null, value);
1602                 }
1603                 NotifyPropertyChanged();
1604             }
1605         }
1606
1607         /// <summary>
1608         /// The InputFontStyle property.<br />
1609         /// The font's style of the new input text.<br />
1610         /// The inputFontStyle map contains the following keys :<br />
1611         /// <list type="table">
1612         /// <item><term>width (string)</term><description>The width key defines occupied by each glyph. (values: ultraCondensed, extraCondensed, condensed, semiCondensed, normal, semiExpanded, expanded, extraExpanded, ultraExpanded)</description></item>
1613         /// <item><term>weight (string)</term><description>The weight key defines the thickness or darkness of the glyphs. (values: thin, ultraLight, extraLight, light, demiLight, semiLight, book, normal, regular, medium, demiBold, semiBold, bold, ultraBold, extraBold, black, heavy, extraBlack)</description></item>
1614         /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
1615         /// </list>
1616         /// </summary>
1617         /// <since_tizen> 3 </since_tizen>
1618         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1619         public PropertyMap InputFontStyle
1620         {
1621             get
1622             {
1623                 if (NUIApplication.IsUsingXaml)
1624                 {
1625                     return (PropertyMap)GetValue(InputFontStyleProperty);
1626                 }
1627                 else
1628                 {
1629                     return (PropertyMap)GetInternalInputFontStyleProperty(this);
1630                 }
1631             }
1632             set
1633             {
1634                 if (NUIApplication.IsUsingXaml)
1635                 {
1636                     SetValue(InputFontStyleProperty, value);
1637                 }
1638                 else
1639                 {
1640                     SetInternalInputFontStyleProperty(this, null, value);
1641                 }
1642                 NotifyPropertyChanged();
1643             }
1644         }
1645
1646         /// <summary>
1647         /// Set InputFontStyle to TextEditor. <br />
1648         /// </summary>
1649         /// <param name="fontStyle">The FontStyle</param>
1650         /// <remarks>
1651         /// SetInputFontStyle specifies the requested font style for new input text through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
1652         /// </remarks>
1653         /// <example>
1654         /// The following example demonstrates how to use the SetInputFontStyle method.
1655         /// <code>
1656         /// var fontStyle = new Tizen.NUI.Text.FontStyle();
1657         /// fontStyle.Width = FontWidthType.Expanded;
1658         /// fontStyle.Weight = FontWeightType.Bold;
1659         /// fontStyle.Slant = FontSlantType.Italic;
1660         /// editor.SetInputFontStyle(fontStyle);
1661         /// </code>
1662         /// </example>
1663         [EditorBrowsable(EditorBrowsableState.Never)]
1664         public void SetInputFontStyle(FontStyle fontStyle)
1665         {
1666             using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
1667             {
1668                 SetValue(InputFontStyleProperty, fontStyleMap);
1669             }
1670         }
1671
1672         /// <summary>
1673         /// Get InputFontStyle from TextEditor. <br />
1674         /// </summary>
1675         /// <returns>The FontStyle</returns>
1676         /// <remarks>
1677         /// <see cref="Tizen.NUI.Text.FontStyle"/>
1678         /// </remarks>
1679         [EditorBrowsable(EditorBrowsableState.Never)]
1680         public FontStyle GetInputFontStyle()
1681         {
1682             FontStyle fontStyle;
1683             using (var fontStyleMap = (PropertyMap)GetValue(InputFontStyleProperty))
1684             {
1685                 fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
1686             }
1687             return fontStyle;
1688         }
1689
1690         /// <summary>
1691         /// The InputPointSize property.<br />
1692         /// The font's size of the new input text in points.<br />
1693         /// </summary>
1694         /// <since_tizen> 3 </since_tizen>
1695         [Binding.TypeConverter(typeof(PointSizeTypeConverter))]
1696         public float InputPointSize
1697         {
1698             get
1699             {
1700                 if (NUIApplication.IsUsingXaml)
1701                 {
1702                     return (float)GetValue(InputPointSizeProperty);
1703                 }
1704                 else
1705                 {
1706                     return (float)GetInternalInputPointSizeProperty(this);
1707                 }
1708             }
1709             set
1710             {
1711                 if (NUIApplication.IsUsingXaml)
1712                 {
1713                     SetValue(InputPointSizeProperty, value);
1714                 }
1715                 else
1716                 {
1717                     SetInternalInputPointSizeProperty(this, null, value);
1718                 }
1719                 NotifyPropertyChanged();
1720             }
1721         }
1722
1723         /// <summary>
1724         /// The LineSpacing property.<br />
1725         /// The default extra space between lines in points.<br />
1726         /// </summary>
1727         /// <since_tizen> 3 </since_tizen>
1728         public float LineSpacing
1729         {
1730             get
1731             {
1732                 if (NUIApplication.IsUsingXaml)
1733                 {
1734                     return (float)GetValue(LineSpacingProperty);
1735                 }
1736                 else
1737                 {
1738                     return (float)GetInternalLineSpacingProperty(this);
1739                 }
1740             }
1741             set
1742             {
1743                 if (NUIApplication.IsUsingXaml)
1744                 {
1745                     SetValue(LineSpacingProperty, value);
1746                 }
1747                 else
1748                 {
1749                     SetInternalLineSpacingProperty(this, null, value);
1750                 }
1751                 NotifyPropertyChanged();
1752             }
1753         }
1754
1755         /// <summary>
1756         /// The InputLineSpacing property.<br />
1757         /// The extra space between lines in points.<br />
1758         /// </summary>
1759         /// <since_tizen> 3 </since_tizen>
1760         public float InputLineSpacing
1761         {
1762             get
1763             {
1764                 if (NUIApplication.IsUsingXaml)
1765                 {
1766                     return (float)GetValue(InputLineSpacingProperty);
1767                 }
1768                 else
1769                 {
1770                     return (float)GetInternalInputLineSpacingProperty(this);
1771                 }
1772             }
1773             set
1774             {
1775                 if (NUIApplication.IsUsingXaml)
1776                 {
1777                     SetValue(InputLineSpacingProperty, value);
1778                 }
1779                 else
1780                 {
1781                     SetInternalInputLineSpacingProperty(this, null, value);
1782                 }
1783                 NotifyPropertyChanged();
1784             }
1785         }
1786
1787         /// <summary>
1788         /// The relative height of the line (a factor that will be multiplied by text height). <br />
1789         /// If the value is less than 1, the lines could to be overlapped.
1790         /// </summary>
1791         [EditorBrowsable(EditorBrowsableState.Never)]
1792         public float RelativeLineHeight
1793         {
1794             get
1795             {
1796                 if (NUIApplication.IsUsingXaml)
1797                 {
1798                     return (float)GetValue(RelativeLineHeightProperty);
1799                 }
1800                 else
1801                 {
1802                     return (float)GetInternalRelativeLineHeightProperty(this);
1803                 }
1804             }
1805             set
1806             {
1807                 if (NUIApplication.IsUsingXaml)
1808                 {
1809                     SetValue(RelativeLineHeightProperty, value);
1810                 }
1811                 else
1812                 {
1813                     SetInternalRelativeLineHeightProperty(this, null, value);
1814                 }
1815                 NotifyPropertyChanged();
1816             }
1817         }
1818
1819         /// <summary>
1820         /// The Underline property.<br />
1821         /// The default underline parameters.<br />
1822         /// The underline map contains the following keys :<br />
1823         /// <list type="table">
1824         /// <item><term>enable (bool)</term><description>Whether the underline is enabled (the default value is false)</description></item>
1825         /// <item><term>color (Color)</term><description>The color of the underline (If not provided then the color of the text is used)</description></item>
1826         /// <item><term>height (float)</term><description>The height in pixels of the underline (the default value is 1.f)</description></item>
1827         /// </list>
1828         /// </summary>
1829         /// <since_tizen> 3 </since_tizen>
1830         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1831         public PropertyMap Underline
1832         {
1833             get
1834             {
1835                 if (NUIApplication.IsUsingXaml)
1836                 {
1837                     return (PropertyMap)GetValue(UnderlineProperty);
1838                 }
1839                 else
1840                 {
1841                     return (PropertyMap)GetInternalUnderlineProperty(this);
1842                 }
1843             }
1844             set
1845             {
1846                 if (NUIApplication.IsUsingXaml)
1847                 {
1848                     SetValue(UnderlineProperty, value);
1849                 }
1850                 else
1851                 {
1852                     SetInternalUnderlineProperty(this, null, value);
1853                 }
1854                 NotifyPropertyChanged();
1855             }
1856         }
1857
1858         /// <summary>
1859         /// Set Underline to TextEditor. <br />
1860         /// </summary>
1861         /// <param name="underline">The Underline</param>
1862         /// <remarks>
1863         /// SetUnderline specifies the underline of the text through <see cref="Tizen.NUI.Text.Underline"/>. <br />
1864         /// </remarks>
1865         /// <example>
1866         /// The following example demonstrates how to use the SetUnderline method.
1867         /// <code>
1868         /// var underline = new Tizen.NUI.Text.Underline();
1869         /// underline.Enable = true;
1870         /// underline.Color = new Color("#3498DB");
1871         /// underline.Height = 2.0f;
1872         /// editor.SetUnderline(underline);
1873         /// </code>
1874         /// </example>
1875         [EditorBrowsable(EditorBrowsableState.Never)]
1876         public void SetUnderline(Underline underline)
1877         {
1878             using (var underlineMap = TextMapHelper.GetUnderlineMap(underline))
1879             {
1880                 SetValue(UnderlineProperty, underlineMap);
1881             }
1882         }
1883
1884         /// <summary>
1885         /// Get Underline from TextEditor. <br />
1886         /// </summary>
1887         /// <returns>The Underline</returns>
1888         /// <remarks>
1889         /// <see cref="Tizen.NUI.Text.Underline"/>
1890         /// </remarks>
1891         [EditorBrowsable(EditorBrowsableState.Never)]
1892         public Underline GetUnderline()
1893         {
1894             Underline underline;
1895             using (var underlineMap = (PropertyMap)GetValue(UnderlineProperty))
1896             {
1897                 underline = TextMapHelper.GetUnderlineStruct(underlineMap);
1898             }
1899             return underline;
1900         }
1901
1902         /// <summary>
1903         /// The InputUnderline property.<br />
1904         /// The underline parameters of the new input text.<br />
1905         /// </summary>
1906         /// <since_tizen> 3 </since_tizen>
1907         public string InputUnderline
1908         {
1909             get
1910             {
1911                 if (NUIApplication.IsUsingXaml)
1912                 {
1913                     return (string)GetValue(InputUnderlineProperty);
1914                 }
1915                 else
1916                 {
1917                     return (string)GetInternalInputUnderlineProperty(this);
1918                 }
1919             }
1920             set
1921             {
1922                 if (NUIApplication.IsUsingXaml)
1923                 {
1924                     SetValue(InputUnderlineProperty, value);
1925                 }
1926                 else
1927                 {
1928                     SetInternalInputUnderlineProperty(this, null, value);
1929                 }
1930                 NotifyPropertyChanged();
1931             }
1932         }
1933
1934         /// <summary>
1935         /// The Shadow property.<br />
1936         /// The default shadow parameters.<br />
1937         /// The shadow map contains the following keys :<br />
1938         /// <list type="table">
1939         /// <item><term>color (Color)</term><description>The color of the shadow (the default color is Color.Black)</description></item>
1940         /// <item><term>offset (Vector2)</term><description>The offset in pixels of the shadow (If not provided then the shadow is not enabled)</description></item>
1941         /// <item><term>blurRadius (float)</term><description>The radius of the Gaussian blur for the soft shadow (If not provided then the soft shadow is not enabled)</description></item>
1942         /// </list>
1943         /// </summary>
1944         /// <since_tizen> 3 </since_tizen>
1945         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1946         public PropertyMap Shadow
1947         {
1948             get
1949             {
1950                 if (NUIApplication.IsUsingXaml)
1951                 {
1952                     return (PropertyMap)GetValue(ShadowProperty);
1953                 }
1954                 else
1955                 {
1956                     return (PropertyMap)GetInternalShadowProperty(this);
1957                 }
1958             }
1959             set
1960             {
1961                 if (NUIApplication.IsUsingXaml)
1962                 {
1963                     SetValue(ShadowProperty, value);
1964                 }
1965                 else
1966                 {
1967                     SetInternalShadowProperty(this, null, value);
1968                 }
1969                 NotifyPropertyChanged();
1970             }
1971         }
1972
1973         /// <summary>
1974         /// Set Shadow to TextEditor. <br />
1975         /// </summary>
1976         /// <param name="shadow">The Shadow</param>
1977         /// <remarks>
1978         /// SetShadow specifies the shadow of the text through <see cref="Tizen.NUI.Text.Shadow"/>. <br />
1979         /// </remarks>
1980         /// <example>
1981         /// The following example demonstrates how to use the SetShadow method.
1982         /// <code>
1983         /// var shadow = new Tizen.NUI.Text.Shadow();
1984         /// shadow.Offset = new Vector2(3, 3);
1985         /// shadow.Color = new Color("#F1C40F");
1986         /// editor.SetShadow(shadow);
1987         /// </code>
1988         /// </example>
1989         [EditorBrowsable(EditorBrowsableState.Never)]
1990         public void SetShadow(Tizen.NUI.Text.Shadow shadow)
1991         {
1992             using (var shadowMap = TextMapHelper.GetShadowMap(shadow))
1993             {
1994                 SetValue(ShadowProperty, shadowMap);
1995             }
1996         }
1997
1998         /// <summary>
1999         /// Get Shadow from TextEditor. <br />
2000         /// </summary>
2001         /// <returns>The Shadow</returns>
2002         /// <remarks>
2003         /// <see cref="Tizen.NUI.Text.Shadow"/>
2004         /// </remarks>
2005         [EditorBrowsable(EditorBrowsableState.Never)]
2006         public Tizen.NUI.Text.Shadow GetShadow()
2007         {
2008             Tizen.NUI.Text.Shadow shadow;
2009             using (var shadowMap = (PropertyMap)GetValue(ShadowProperty))
2010             {
2011                 shadow = TextMapHelper.GetShadowStruct(shadowMap);
2012             }
2013             return shadow;
2014         }
2015
2016         /// <summary>
2017         /// The InputShadow property.<br />
2018         /// The shadow parameters of the new input text.<br />
2019         /// </summary>
2020         /// <since_tizen> 3 </since_tizen>
2021         public string InputShadow
2022         {
2023             get
2024             {
2025                 if (NUIApplication.IsUsingXaml)
2026                 {
2027                     return (string)GetValue(InputShadowProperty);
2028                 }
2029                 else
2030                 {
2031                     return (string)GetInternalInputShadowProperty(this);
2032                 }
2033             }
2034             set
2035             {
2036                 if (NUIApplication.IsUsingXaml)
2037                 {
2038                     SetValue(InputShadowProperty, value);
2039                 }
2040                 else
2041                 {
2042                     SetInternalInputShadowProperty(this, null, value);
2043                 }
2044                 NotifyPropertyChanged();
2045             }
2046         }
2047
2048         /// <summary>
2049         /// The Emboss property.<br />
2050         /// The default emboss parameters.<br />
2051         /// </summary>
2052         /// <since_tizen> 3 </since_tizen>
2053         public string Emboss
2054         {
2055             get
2056             {
2057                 if (NUIApplication.IsUsingXaml)
2058                 {
2059                     return (string)GetValue(EmbossProperty);
2060                 }
2061                 else
2062                 {
2063                     return (string)GetInternalEmbossProperty(this);
2064                 }
2065             }
2066             set
2067             {
2068                 if (NUIApplication.IsUsingXaml)
2069                 {
2070                     SetValue(EmbossProperty, value);
2071                 }
2072                 else
2073                 {
2074                     SetInternalEmbossProperty(this, null, value);
2075                 }
2076                 NotifyPropertyChanged();
2077             }
2078         }
2079
2080         /// <summary>
2081         /// The InputEmboss property.<br />
2082         /// The emboss parameters of the new input text.<br />
2083         /// </summary>
2084         /// <since_tizen> 3 </since_tizen>
2085         public string InputEmboss
2086         {
2087             get
2088             {
2089                 if (NUIApplication.IsUsingXaml)
2090                 {
2091                     return (string)GetValue(InputEmbossProperty);
2092                 }
2093                 else
2094                 {
2095                     return (string)GetInternalInputEmbossProperty(this);
2096                 }
2097             }
2098             set
2099             {
2100                 if (NUIApplication.IsUsingXaml)
2101                 {
2102                     SetValue(InputEmbossProperty, value);
2103                 }
2104                 else
2105                 {
2106                     SetInternalInputEmbossProperty(this, null, value);
2107                 }
2108                 NotifyPropertyChanged();
2109             }
2110         }
2111
2112         /// <summary>
2113         /// The Outline property.<br />
2114         /// The default outline parameters.<br />
2115         /// The outline map contains the following keys :<br />
2116         /// <list type="table">
2117         /// <item><term>color (Color)</term><description>The color of the outline (the default color is Color.White)</description></item>
2118         /// <item><term>width (float)</term><description>The width in pixels of the outline (If not provided then the outline is not enabled)</description></item>
2119         /// </list>
2120         /// </summary>
2121         /// <since_tizen> 3 </since_tizen>
2122         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
2123         public PropertyMap Outline
2124         {
2125             get
2126             {
2127                 if (NUIApplication.IsUsingXaml)
2128                 {
2129                     return (PropertyMap)GetValue(OutlineProperty);
2130                 }
2131                 else
2132                 {
2133                     return (PropertyMap)GetInternalOutlineProperty(this);
2134                 }
2135             }
2136             set
2137             {
2138                 if (NUIApplication.IsUsingXaml)
2139                 {
2140                     SetValue(OutlineProperty, value);
2141                 }
2142                 else
2143                 {
2144                     SetInternalOutlineProperty(this, null, value);
2145                 }
2146                 NotifyPropertyChanged();
2147             }
2148         }
2149
2150         /// <summary>
2151         /// Set Outline to TextEditor. <br />
2152         /// </summary>
2153         /// <param name="outline">The Outline</param>
2154         /// <remarks>
2155         /// SetOutline specifies the outline of the text through <see cref="Tizen.NUI.Text.Outline"/>. <br />
2156         /// </remarks>
2157         /// <example>
2158         /// The following example demonstrates how to use the SetOutline method.
2159         /// <code>
2160         /// var outline = new Tizen.NUI.Text.Outline();
2161         /// outline.Width = 2.0f;
2162         /// outline.Color = new Color("#45B39D");
2163         /// editor.SetOutline(outline);
2164         /// </code>
2165         /// </example>
2166         [EditorBrowsable(EditorBrowsableState.Never)]
2167         public void SetOutline(Outline outline)
2168         {
2169             using (var outlineMap = TextMapHelper.GetOutlineMap(outline))
2170             {
2171                 SetValue(OutlineProperty, outlineMap);
2172             }
2173         }
2174
2175         /// <summary>
2176         /// Get Outline from TextEditor. <br />
2177         /// </summary>
2178         /// <returns>The Outline</returns>
2179         /// <remarks>
2180         /// <see cref="Tizen.NUI.Text.Outline"/>
2181         /// </remarks>
2182         [EditorBrowsable(EditorBrowsableState.Never)]
2183         public Outline GetOutline()
2184         {
2185             Outline outline;
2186             using (var outlineMap = (PropertyMap)GetValue(OutlineProperty))
2187             {
2188                 outline = TextMapHelper.GetOutlineStruct(outlineMap);
2189             }
2190             return outline;
2191         }
2192
2193         /// <summary>
2194         /// The InputOutline property.<br />
2195         /// The outline parameters of the new input text.<br />
2196         /// </summary>
2197         /// <since_tizen> 3 </since_tizen>
2198         public string InputOutline
2199         {
2200             get
2201             {
2202                 if (NUIApplication.IsUsingXaml)
2203                 {
2204                     return (string)GetValue(InputOutlineProperty);
2205                 }
2206                 else
2207                 {
2208                     return (string)GetInternalInputOutlineProperty(this);
2209                 }
2210             }
2211             set
2212             {
2213                 if (NUIApplication.IsUsingXaml)
2214                 {
2215                     SetValue(InputOutlineProperty, value);
2216                 }
2217                 else
2218                 {
2219                     SetInternalInputOutlineProperty(this, null, value);
2220                 }
2221                 NotifyPropertyChanged();
2222             }
2223         }
2224
2225         /// <summary>
2226         /// The SmoothScroll property.<br />
2227         /// Enable or disable the smooth scroll animation.<br />
2228         /// </summary>
2229         /// <since_tizen> 3 </since_tizen>
2230         public bool SmoothScroll
2231         {
2232             get
2233             {
2234                 if (NUIApplication.IsUsingXaml)
2235                 {
2236                     return (bool)GetValue(SmoothScrollProperty);
2237                 }
2238                 else
2239                 {
2240                     return (bool)GetInternalSmoothScrollProperty(this);
2241                 }
2242             }
2243             set
2244             {
2245                 if (NUIApplication.IsUsingXaml)
2246                 {
2247                     SetValue(SmoothScrollProperty, value);
2248                 }
2249                 else
2250                 {
2251                     SetInternalSmoothScrollProperty(this, null, value);
2252                 }
2253                 NotifyPropertyChanged();
2254             }
2255         }
2256
2257         /// <summary>
2258         /// The SmoothScrollDuration property.<br />
2259         /// Sets the duration of smooth scroll animation.<br />
2260         /// </summary>
2261         /// <since_tizen> 3 </since_tizen>
2262         public float SmoothScrollDuration
2263         {
2264             get
2265             {
2266                 if (NUIApplication.IsUsingXaml)
2267                 {
2268                     return (float)GetValue(SmoothScrollDurationProperty);
2269                 }
2270                 else
2271                 {
2272                     return (float)GetInternalSmoothScrollDurationProperty(this);
2273                 }
2274             }
2275             set
2276             {
2277                 if (NUIApplication.IsUsingXaml)
2278                 {
2279                     SetValue(SmoothScrollDurationProperty, value);
2280                 }
2281                 else
2282                 {
2283                     SetInternalSmoothScrollDurationProperty(this, null, value);
2284                 }
2285                 NotifyPropertyChanged();
2286             }
2287         }
2288
2289         /// <summary>
2290         /// The EnableScrollBar property.<br />
2291         /// Enable or disable the scroll bar.<br />
2292         /// </summary>
2293         /// <since_tizen> 3 </since_tizen>
2294         public bool EnableScrollBar
2295         {
2296             get
2297             {
2298                 if (NUIApplication.IsUsingXaml)
2299                 {
2300                     return (bool)GetValue(EnableScrollBarProperty);
2301                 }
2302                 else
2303                 {
2304                     return (bool)GetInternalEnableScrollBarProperty(this);
2305                 }
2306             }
2307             set
2308             {
2309                 if (NUIApplication.IsUsingXaml)
2310                 {
2311                     SetValue(EnableScrollBarProperty, value);
2312                 }
2313                 else
2314                 {
2315                     SetInternalEnableScrollBarProperty(this, null, value);
2316                 }
2317                 NotifyPropertyChanged();
2318             }
2319         }
2320
2321         /// <summary>
2322         /// The ScrollBarShowDuration property.<br />
2323         /// Sets the duration of scroll bar to show.<br />
2324         /// </summary>
2325         /// <since_tizen> 3 </since_tizen>
2326         public float ScrollBarShowDuration
2327         {
2328             get
2329             {
2330                 if (NUIApplication.IsUsingXaml)
2331                 {
2332                     return (float)GetValue(ScrollBarShowDurationProperty);
2333                 }
2334                 else
2335                 {
2336                     return (float)GetInternalScrollBarShowDurationProperty(this);
2337                 }
2338             }
2339             set
2340             {
2341                 if (NUIApplication.IsUsingXaml)
2342                 {
2343                     SetValue(ScrollBarShowDurationProperty, value);
2344                 }
2345                 else
2346                 {
2347                     SetInternalScrollBarShowDurationProperty(this, null, value);
2348                 }
2349                 NotifyPropertyChanged();
2350             }
2351         }
2352
2353         /// <summary>
2354         /// The ScrollBarFadeDuration property.<br />
2355         /// Sets the duration of scroll bar to fade out.<br />
2356         /// </summary>
2357         /// <since_tizen> 3 </since_tizen>
2358         public float ScrollBarFadeDuration
2359         {
2360             get
2361             {
2362                 if (NUIApplication.IsUsingXaml)
2363                 {
2364                     return (float)GetValue(ScrollBarFadeDurationProperty);
2365                 }
2366                 else
2367                 {
2368                     return (float)GetInternalScrollBarFadeDurationProperty(this);
2369                 }
2370             }
2371             set
2372             {
2373                 if (NUIApplication.IsUsingXaml)
2374                 {
2375                     SetValue(ScrollBarFadeDurationProperty, value);
2376                 }
2377                 else
2378                 {
2379                     SetInternalScrollBarFadeDurationProperty(this, null, value);
2380                 }
2381                 NotifyPropertyChanged();
2382             }
2383         }
2384
2385         /// <summary>
2386         /// The PixelSize property.<br />
2387         /// The size of font in pixels.<br />
2388         /// </summary>
2389         /// <since_tizen> 3 </since_tizen>
2390         [Binding.TypeConverter(typeof(FloatGraphicsTypeConverter))]
2391         public float PixelSize
2392         {
2393             get
2394             {
2395                 if (NUIApplication.IsUsingXaml)
2396                 {
2397                     return (float)GetValue(PixelSizeProperty);
2398                 }
2399                 else
2400                 {
2401                     return (float)GetInternalPixelSizeProperty(this);
2402                 }
2403             }
2404             set
2405             {
2406                 if (NUIApplication.IsUsingXaml)
2407                 {
2408                     SetValue(PixelSizeProperty, value);
2409                 }
2410                 else
2411                 {
2412                     SetInternalPixelSizeProperty(this, null, value);
2413                 }
2414                 NotifyPropertyChanged();
2415             }
2416         }
2417
2418         /// <summary>
2419         /// The line count of the text.
2420         /// </summary>
2421         /// <since_tizen> 3 </since_tizen>
2422         public int LineCount
2423         {
2424             get
2425             {
2426                 int lineCount = 0;
2427                 using (var propertyValue = GetProperty(TextEditor.Property.LineCount))
2428                 {
2429                     propertyValue.Get(out lineCount);
2430                 }
2431                 return lineCount;
2432             }
2433         }
2434
2435         /// <summary>
2436         /// The text to display when the TextEditor is empty and inactive.
2437         /// </summary>
2438         /// <since_tizen> 3 </since_tizen>
2439         public string PlaceholderText
2440         {
2441             get
2442             {
2443                 if (NUIApplication.IsUsingXaml)
2444                 {
2445                     return (string)GetValue(PlaceholderTextProperty);
2446                 }
2447                 else
2448                 {
2449                     return (string)GetInternalPlaceholderTextProperty(this);
2450                 }
2451             }
2452             set
2453             {
2454                 if (NUIApplication.IsUsingXaml)
2455                 {
2456                     SetValue(PlaceholderTextProperty, value);
2457                 }
2458                 else
2459                 {
2460                     SetInternalPlaceholderTextProperty(this, null, value);
2461                 }
2462                 NotifyPropertyChanged();
2463             }
2464         }
2465
2466         /// <summary>
2467         /// The portion of the text that has been selected by the user.
2468         /// </summary>
2469         /// <remarks>
2470         /// Empty string when nothing is selected.
2471         /// </remarks>
2472         /// <since_tizen> 9 </since_tizen>
2473         public string SelectedText
2474         {
2475             get
2476             {
2477                 string selectedText;
2478                 using (var propertyValue = GetProperty(TextEditor.Property.SelectedText))
2479                 {
2480                     propertyValue.Get(out selectedText);
2481                 }
2482                 return selectedText;
2483             }
2484         }
2485
2486         /// <summary>
2487         /// The Placeholder text color.
2488         /// </summary>
2489         /// <remarks>
2490         /// The property cascade chaining set is possible. For example, this (textEditor.PlaceholderTextColor.X = 0.1f;) is possible.
2491         /// </remarks>
2492         /// <since_tizen> 3 </since_tizen>
2493         public Color PlaceholderTextColor
2494         {
2495             get
2496             {
2497                 Color temp;
2498                 if (NUIApplication.IsUsingXaml)
2499                 {
2500                     temp = (Color)GetValue(PlaceholderTextColorProperty);
2501                 }
2502                 else
2503                 {
2504                     temp = (Color)GetInternalPlaceholderTextColorProperty(this);
2505                 }
2506                 return new Color(OnPlaceholderTextColorChanged, temp.R, temp.G, temp.B, temp.A);
2507             }
2508             set
2509             {
2510                 if (NUIApplication.IsUsingXaml)
2511                 {
2512                     SetValue(PlaceholderTextColorProperty, value);
2513                 }
2514                 else
2515                 {
2516                     SetInternalPlaceholderTextColorProperty(this, null, value);
2517                 }
2518                 NotifyPropertyChanged();
2519             }
2520         }
2521
2522         /// <summary>
2523         /// The Enable selection property.<br />
2524         /// Enables Text selection, such as the cursor, handle, clipboard, and highlight color.<br />
2525         /// </summary>
2526         /// <since_tizen> 3 </since_tizen>
2527         public bool EnableSelection
2528         {
2529             get
2530             {
2531                 if (NUIApplication.IsUsingXaml)
2532                 {
2533                     return (bool)GetValue(EnableSelectionProperty);
2534                 }
2535                 else
2536                 {
2537                     return (bool)GetInternalEnableSelectionProperty(this);
2538                 }
2539             }
2540             set
2541             {
2542                 if (NUIApplication.IsUsingXaml)
2543                 {
2544                     SetValue(EnableSelectionProperty, value);
2545                 }
2546                 else
2547                 {
2548                     SetInternalEnableSelectionProperty(this, null, value);
2549                 }
2550                 NotifyPropertyChanged();
2551             }
2552         }
2553
2554         /// <summary>
2555         /// The start index for selection.
2556         /// </summary>
2557         /// <remarks>
2558         /// When there is no selection, the index is current cursor position.
2559         /// </remarks>
2560         /// <since_tizen> 9 </since_tizen>
2561         public int SelectedTextStart
2562         {
2563             get
2564             {
2565                 int selectedTextStart;
2566                 using (var propertyValue = GetProperty(TextEditor.Property.SelectedTextStart))
2567                 {
2568                     propertyValue.Get(out selectedTextStart);
2569                 }
2570                 return selectedTextStart;
2571             }
2572         }
2573
2574         /// <summary>
2575         /// The end index for selection.
2576         /// </summary>
2577         /// <remarks>
2578         /// When there is no selection, the index is current cursor position.
2579         /// </remarks>
2580         /// <since_tizen> 9 </since_tizen>
2581         public int SelectedTextEnd
2582         {
2583             get
2584             {
2585                 int selectedTextEnd;
2586                 using (var propertyValue = GetProperty(TextEditor.Property.SelectedTextEnd))
2587                 {
2588                     propertyValue.Get(out selectedTextEnd);
2589                 }
2590                 return selectedTextEnd;
2591             }
2592         }
2593
2594         /// <summary>
2595         /// Enable editing in text control.
2596         /// </summary>
2597         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
2598         [EditorBrowsable(EditorBrowsableState.Never)]
2599         public bool EnableEditing
2600         {
2601             get
2602             {
2603                 if (NUIApplication.IsUsingXaml)
2604                 {
2605                     return (bool)GetValue(EnableEditingProperty);
2606                 }
2607                 else
2608                 {
2609                     return (bool)GetInternalEnableEditingProperty(this);
2610                 }
2611             }
2612             set
2613             {
2614                 if (NUIApplication.IsUsingXaml)
2615                 {
2616                     SetValue(EnableEditingProperty, value);
2617                 }
2618                 else
2619                 {
2620                     SetInternalEnableEditingProperty(this, null, value);
2621                 }
2622             }
2623         }
2624
2625         private bool InternalEnableEditing
2626         {
2627             get
2628             {
2629                 bool enableEditing;
2630                 using (var propertyValue = GetProperty(TextEditor.Property.EnableEditing))
2631                 {
2632                     propertyValue.Get(out enableEditing);
2633                 }
2634                 return enableEditing;
2635             }
2636             set
2637             {
2638                 using (var propertyValue = new PropertyValue(value))
2639                 {
2640                     SetProperty(TextEditor.Property.EnableEditing, propertyValue);
2641                     NotifyPropertyChanged();
2642                 }
2643             }
2644         }
2645
2646         /// <summary>
2647         /// Specify horizontal scroll position in text control.
2648         /// </summary>
2649         [EditorBrowsable(EditorBrowsableState.Never)]
2650         public int HorizontalScrollPosition
2651         {
2652             get
2653             {
2654                 if (NUIApplication.IsUsingXaml)
2655                 {
2656                     return (int)GetValue(HorizontalScrollPositionProperty);
2657                 }
2658                 else
2659                 {
2660                     return (int)GetInternalHorizontalScrollPositionProperty(this);
2661                 }
2662             }
2663             set
2664             {
2665                 if (NUIApplication.IsUsingXaml)
2666                 {
2667                     SetValue(HorizontalScrollPositionProperty, value);
2668                 }
2669                 else
2670                 {
2671                     SetInternalHorizontalScrollPositionProperty(this, null, value);
2672                 }
2673             }
2674         }
2675
2676         private int InternalHorizontalScrollPosition
2677         {
2678             get
2679             {
2680                 int horizontalScrollPosition;
2681                 using (var propertyValue = GetProperty(TextEditor.Property.HorizontalScrollPosition))
2682                 {
2683                     propertyValue.Get(out horizontalScrollPosition);
2684                 }
2685                 return horizontalScrollPosition;
2686             }
2687             set
2688             {
2689                 using (var propertyValue = new PropertyValue(value))
2690                 {
2691                     SetProperty(TextEditor.Property.HorizontalScrollPosition, propertyValue);
2692                     NotifyPropertyChanged();
2693                 }
2694             }
2695         }
2696
2697         /// <summary>
2698         /// Specify vertical scroll position in text control.
2699         /// </summary>
2700         [EditorBrowsable(EditorBrowsableState.Never)]
2701         public int VerticalScrollPosition
2702         {
2703             get
2704             {
2705                 if (NUIApplication.IsUsingXaml)
2706                 {
2707                     return (int)GetValue(VerticalScrollPositionProperty);
2708                 }
2709                 else
2710                 {
2711                     return (int)GetInternalVerticalScrollPositionProperty(this);
2712                 }
2713             }
2714             set
2715             {
2716                 if (NUIApplication.IsUsingXaml)
2717                 {
2718                     SetValue(VerticalScrollPositionProperty, value);
2719                 }
2720                 else
2721                 {
2722                     SetInternalVerticalScrollPositionProperty(this, null, value);
2723                 }
2724             }
2725         }
2726
2727         private int InternalVerticalScrollPosition
2728         {
2729             get
2730             {
2731                 int verticalScrollPosition;
2732                 using (var propertyValue = GetProperty(TextEditor.Property.VerticalScrollPosition))
2733                 {
2734                     propertyValue.Get(out verticalScrollPosition);
2735                 }
2736                 return verticalScrollPosition;
2737             }
2738             set
2739             {
2740                 using (var propertyValue = new PropertyValue(value))
2741                 {
2742                     SetProperty(TextEditor.Property.VerticalScrollPosition, propertyValue);
2743                     NotifyPropertyChanged();
2744                 }
2745             }
2746         }
2747
2748         /// <summary>
2749         /// PrimaryCursorPosition property.<br />
2750         /// Specify the position of the primary cursor (caret) in text control.
2751         /// </summary>
2752         /// <remarks>
2753         /// If the value set is out of range (negative or greater than or equal the number of characters in Text) then the PrimaryCursorPosition is moved to the end of Text (the number of characters in Text).
2754         /// </remarks>
2755         /// <since_tizen> 10 </since_tizen>
2756         public int PrimaryCursorPosition
2757         {
2758             get
2759             {
2760                 if (NUIApplication.IsUsingXaml)
2761                 {
2762                     return (int)GetValue(PrimaryCursorPositionProperty);
2763                 }
2764                 else
2765                 {
2766                     return (int)GetInternalPrimaryCursorPositionProperty(this);
2767                 }
2768             }
2769             set
2770             {
2771                 if (NUIApplication.IsUsingXaml)
2772                 {
2773                     SetValue(PrimaryCursorPositionProperty, value);
2774                 }
2775                 else
2776                 {
2777                     SetInternalPrimaryCursorPositionProperty(this, null, value);
2778                 }
2779             }
2780         }
2781
2782         private int InternalPrimaryCursorPosition
2783         {
2784             get
2785             {
2786                 int primaryCursorPosition;
2787                 using (var propertyValue = GetProperty(TextEditor.Property.PrimaryCursorPosition))
2788                 {
2789                     propertyValue.Get(out primaryCursorPosition);
2790                 }
2791                 return primaryCursorPosition;
2792             }
2793             set
2794             {
2795                 using (var propertyValue = new PropertyValue(value))
2796                 {
2797                     SetProperty(TextEditor.Property.PrimaryCursorPosition, propertyValue);
2798                     NotifyPropertyChanged();
2799                 }
2800             }
2801         }
2802
2803         /// <summary>
2804         /// The GrabHandleColor property.
2805         /// </summary>
2806         /// <remarks>
2807         /// The property cascade chaining set is possible. For example, this (textEditor.GrabHandleColor.X = 0.1f;) is possible.
2808         /// </remarks>
2809         [EditorBrowsable(EditorBrowsableState.Never)]
2810         public Color GrabHandleColor
2811         {
2812             get
2813             {
2814                 Color temp;
2815                 if (NUIApplication.IsUsingXaml)
2816                 {
2817                     temp = (Color)GetValue(GrabHandleColorProperty);
2818                 }
2819                 else
2820                 {
2821                     temp = (Color)GetInternalGrabHandleColorProperty(this);
2822                 }
2823                 return new Color(OnGrabHandleColorChanged, temp.R, temp.G, temp.B, temp.A);
2824             }
2825             set
2826             {
2827                 if (NUIApplication.IsUsingXaml)
2828                 {
2829                     SetValue(GrabHandleColorProperty, value);
2830                 }
2831                 else
2832                 {
2833                     SetInternalGrabHandleColorProperty(this, null, value);  
2834                 }
2835                 NotifyPropertyChanged();
2836             }
2837         }
2838
2839         /// <summary>
2840         /// Set InputFilter to TextEditor.
2841         /// </summary>
2842         /// <param name="inputFilter">The InputFilter</param>
2843         /// <remarks>
2844         /// <see cref="Tizen.NUI.Text.InputFilter"/> filters input based on regular expressions. <br />
2845         /// InputFiltered signal is emitted when the input is filtered by InputFilter <br />
2846         /// See <see cref="InputFiltered"/>, <see cref="InputFilterType"/> and <see cref="InputFilteredEventArgs"/> for a detailed description.
2847         /// </remarks>
2848         /// <example>
2849         /// The following example demonstrates how to use the SetInputFilter method.
2850         /// <code>
2851         /// var inputFilter = new Tizen.NUI.Text.InputFilter();
2852         /// inputFilter.Accepted = @"[\d]"; // accept whole digits
2853         /// inputFilter.Rejected = "[0-3]"; // reject 0, 1, 2, 3
2854         /// editor.SetInputFilter(inputFilter); // acceptable inputs are 4, 5, 6, 7, 8, 9
2855         /// </code>
2856         /// </example>
2857         /// <since_tizen> 9 </since_tizen>
2858         public void SetInputFilter(InputFilter inputFilter)
2859         {
2860             using (var map = TextMapHelper.GetInputFilterMap(inputFilter))
2861             using (var propertyValue = new PropertyValue(map))
2862             {
2863                 SetProperty(TextEditor.Property.InputFilter, propertyValue);
2864             }
2865         }
2866
2867         /// <summary>
2868         /// Get InputFilter from TextEditor. <br />
2869         /// </summary>
2870         /// <returns>The InputFilter</returns>
2871         /// <remarks>
2872         /// <see cref="Tizen.NUI.Text.InputFilter"/>
2873         /// </remarks>
2874         /// <since_tizen> 9 </since_tizen>
2875         public InputFilter GetInputFilter()
2876         {
2877             InputFilter inputFilter;
2878             using (var propertyValue = GetProperty(TextEditor.Property.InputFilter))
2879             using (var map = new PropertyMap())
2880             {
2881                 propertyValue.Get(map);
2882                 inputFilter = TextMapHelper.GetInputFilterStruct(map);
2883             }
2884             return inputFilter;
2885         }
2886
2887         /// <summary>
2888         /// Set Strikethrough to TextEditor. <br />
2889         /// </summary>
2890         /// <param name="strikethrough">The Strikethrough</param>
2891         /// <remarks>
2892         /// SetStrikethrough specifies the strikethrough of the text through <see cref="Tizen.NUI.Text.Strikethrough"/>. <br />
2893         /// </remarks>
2894         /// <example>
2895         /// The following example demonstrates how to use the SetStrikethrough method.
2896         /// <code>
2897         /// var strikethrough = new Tizen.NUI.Text.Strikethrough();
2898         /// strikethrough.Enable = true;
2899         /// strikethrough.Color = new Color("#3498DB");
2900         /// strikethrough.Height = 2.0f;
2901         /// editor.SetStrikethrough(strikethrough);
2902         /// </code>
2903         /// </example>
2904         [EditorBrowsable(EditorBrowsableState.Never)]
2905         public void SetStrikethrough(Strikethrough strikethrough)
2906         {
2907             using (var map = TextMapHelper.GetStrikethroughMap(strikethrough))
2908             using (var propertyValue = new PropertyValue(map))
2909             {
2910                 SetProperty(TextEditor.Property.Strikethrough, propertyValue);
2911             }
2912         }
2913
2914         /// <summary>
2915         /// Get Strikethrough from TextEditor. <br />
2916         /// </summary>
2917         /// <returns>The Strikethrough</returns>
2918         /// <remarks>
2919         /// <see cref="Tizen.NUI.Text.Strikethrough"/>
2920         /// </remarks>
2921         [EditorBrowsable(EditorBrowsableState.Never)]
2922         public Strikethrough GetStrikethrough()
2923         {
2924             Strikethrough strikethrough;
2925             using (var propertyValue = GetProperty(TextEditor.Property.Strikethrough))
2926             using (var map = new PropertyMap())
2927             {
2928                 propertyValue.Get(map);
2929                 strikethrough = TextMapHelper.GetStrikethroughStruct(map);
2930             }
2931             return strikethrough;
2932         }
2933
2934         /// <summary>
2935         /// The Placeholder property.
2936         /// The placeholder map contains the following keys :<br />
2937         /// <list type="table">
2938         /// <item><term>text (string)</term><description>The text to display when the TextEditor is empty and inactive</description></item>
2939         /// <item><term>textFocused (string)</term><description>The text to display when the placeholder has focus</description></item>
2940         /// <item><term>color (Color)</term><description>The color of the placeholder text</description></item>
2941         /// <item><term>fontFamily (string)</term><description>The fontFamily of the placeholder text</description></item>
2942         /// <item><term>fontStyle (PropertyMap)</term><description>The fontStyle of the placeholder text</description></item>
2943         /// <item><term>pointSize (float)</term><description>The pointSize of the placeholder text</description></item>
2944         /// <item><term>pixelSize (float)</term><description>The pixelSize of the placeholder text</description></item>
2945         /// <item><term>ellipsis (bool)</term><description>The ellipsis of the placeholder text</description></item>
2946         /// </list>
2947         /// </summary>
2948         /// <example>
2949         /// The following example demonstrates how to set the placeholder property.
2950         /// <code>
2951         /// PropertyMap propertyMap = new PropertyMap();
2952         /// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
2953         /// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
2954         /// propertyMap.Add("color", new PropertyValue(Color.Red));
2955         /// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
2956         /// propertyMap.Add("pointSize", new PropertyValue(12.0f));
2957         ///
2958         /// PropertyMap fontStyleMap = new PropertyMap();
2959         /// fontStyleMap.Add("weight", new PropertyValue("bold"));
2960         /// fontStyleMap.Add("width", new PropertyValue("condensed"));
2961         /// fontStyleMap.Add("slant", new PropertyValue("italic"));
2962         /// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
2963         ///
2964         /// TextEditor editor = new TextEditor();
2965         /// editor.Placeholder = propertyMap;
2966         /// </code>
2967         /// </example>
2968         /// <since_tizen> 3 </since_tizen>
2969         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
2970         public Tizen.NUI.PropertyMap Placeholder
2971         {
2972             get
2973             {
2974                 PropertyMap map;
2975                 if (NUIApplication.IsUsingXaml)
2976                 {
2977                     map = (PropertyMap)GetValue(PlaceholderProperty);
2978                 }
2979                 else
2980                 {
2981                     map = (PropertyMap)GetInternalPlaceholderProperty(this);
2982                 }
2983                 string defalutText = "";
2984
2985                 if (TextMapHelper.IsValue(map, 0))
2986                     map.Add("text", TextMapHelper.GetStringFromMap(map, 0, defalutText));
2987
2988                 if (TextMapHelper.IsValue(map, 1))
2989                     map.Add("textFocused", TextMapHelper.GetStringFromMap(map, 1, defalutText));
2990
2991                 if (TextMapHelper.IsValue(map, 2))
2992                 {
2993                     using (var color = TextMapHelper.GetColorFromMap(map, 2))
2994                     {
2995                         map.Add("color", color);
2996                     }
2997                 }
2998
2999                 if (TextMapHelper.IsValue(map, 3))
3000                     map.Add("fontFamily", TextMapHelper.GetStringFromMap(map, 3, defalutText));
3001
3002                 if (TextMapHelper.IsValue(map, 4))
3003                 {
3004                     using (var properyValue = map.Find(4))
3005                     using (var fontStyle = new PropertyMap())
3006                     {
3007                         properyValue.Get(fontStyle);
3008                         using (var fontStyleValue = new PropertyValue(fontStyle))
3009                         {
3010                             map.Add("fontStyle", fontStyleValue);
3011                         }
3012                     }
3013                 }
3014
3015                 if (TextMapHelper.IsValue(map, 5))
3016                     map.Add("pointSize", TextMapHelper.GetNullableFloatFromMap(map, 5));
3017
3018                 if (TextMapHelper.IsValue(map, 6))
3019                     map.Add("pixelSize", TextMapHelper.GetNullableFloatFromMap(map, 6));
3020
3021                 if (TextMapHelper.IsValue(map, 7))
3022                     map.Add("ellipsis", TextMapHelper.GetBoolFromMap(map, 7, false));
3023
3024                 return map;
3025             }
3026             set
3027             {
3028                 if (NUIApplication.IsUsingXaml)
3029                 {
3030                     SetValue(PlaceholderProperty, value);
3031                 }
3032                 else
3033                 {
3034                     SetInternalPlaceholderProperty(this, null, value);
3035                 }
3036                 NotifyPropertyChanged();
3037             }
3038         }
3039
3040         /// <summary>
3041         /// Set Placeholder to TextEditor. <br />
3042         /// </summary>
3043         /// <param name="placeholder">The Placeholder</param>
3044         /// <remarks>
3045         /// SetPlaceholder specifies the attributes of the placeholder property through <see cref="Tizen.NUI.Text.Placeholder"/>. <br />
3046         /// </remarks>
3047         /// <example>
3048         /// The following example demonstrates how to use the SetPlaceholder method.
3049         /// <code>
3050         /// var placeholder = new Tizen.NUI.Text.Placeholder();
3051         /// placeholder.Text = "placeholder text";
3052         /// placeholder.TextFocused = "placeholder textFocused";
3053         /// placeholder.Color = new Color("#45B39D");
3054         /// placeholder.FontFamily = "BreezeSans";
3055         /// placeholder.FontStyle = new Tizen.NUI.Text.FontStyle()
3056         /// {
3057         ///     Width = FontWidthType.Expanded,
3058         ///     Weight = FontWeightType.ExtraLight,
3059         ///     Slant = FontSlantType.Italic,
3060         /// };
3061         /// placeholder.PointSize = 25.0f;
3062         /// //placeholder.PixelSize = 50.0f;
3063         /// placeholder.Ellipsis = true;
3064         /// editor.SetPlaceholder(placeholder);
3065         /// </code>
3066         /// </example>
3067         [EditorBrowsable(EditorBrowsableState.Never)]
3068         public void SetPlaceholder(Placeholder placeholder)
3069         {
3070             using (var placeholderMap = TextMapHelper.GetPlaceholderMap(placeholder))
3071             {
3072                 SetValue(PlaceholderProperty, placeholderMap);
3073             }
3074         }
3075
3076         /// <summary>
3077         /// Get Placeholder from TextEditor. <br />
3078         /// </summary>
3079         /// <returns>The Placeholder</returns>
3080         /// <remarks>
3081         /// <see cref="Tizen.NUI.Text.Placeholder"/>
3082         /// </remarks>
3083         [EditorBrowsable(EditorBrowsableState.Never)]
3084         public Placeholder GetPlaceholder()
3085         {
3086             Placeholder placeholder;
3087             using (var placeholderMap = (PropertyMap)GetValue(PlaceholderProperty))
3088             {
3089                 placeholder = TextMapHelper.GetPlaceholderStruct(placeholderMap);
3090             }
3091             return placeholder;
3092         }
3093
3094         /// <summary>
3095         /// The Ellipsis property.<br />
3096         /// Enable or disable the ellipsis.<br />
3097         /// </summary>
3098         /// <since_tizen> 9 </since_tizen>
3099         public bool Ellipsis
3100         {
3101             get
3102             {
3103                 if (NUIApplication.IsUsingXaml)
3104                 {
3105                     return (bool)GetValue(EllipsisProperty);
3106                     
3107                 }
3108                 else
3109                 {
3110                     return (bool)GetInternalEllipsisProperty(this);
3111                 }
3112             }
3113             set
3114             {
3115                 if (NUIApplication.IsUsingXaml)
3116                 {
3117                     SetValue(EllipsisProperty, value);
3118                 }
3119                 else
3120                 {
3121                     SetInternalEllipsisProperty(this, null, value);
3122                 }
3123                 NotifyPropertyChanged();
3124             }
3125         }
3126
3127
3128         /// <summary>
3129         /// The ellipsis position of the text.
3130         /// Specifies which portion of the text should be replaced with an ellipsis when the text size exceeds the layout size.<br />
3131         /// </summary>
3132         /// <since_tizen> 9 </since_tizen>
3133         public EllipsisPosition EllipsisPosition
3134         {
3135             get
3136             {
3137                 if (NUIApplication.IsUsingXaml)
3138                 {
3139                     return (EllipsisPosition)GetValue(EllipsisPositionProperty);
3140                 }
3141                 else
3142                 {
3143                     return (EllipsisPosition)GetInternalEllipsisPositionProperty(this);
3144                 }
3145             }
3146             set
3147             {
3148                 if (NUIApplication.IsUsingXaml)
3149                 {
3150                     SetValue(EllipsisPositionProperty, value);
3151                 }
3152                 else
3153                 {
3154                     SetInternalEllipsisPositionProperty(this, null, value);
3155                 }
3156                 NotifyPropertyChanged();
3157             }
3158         }
3159
3160         /// <summary>
3161         /// The LineWrapMode property.<br />
3162         /// The line wrap mode when the text lines over the layout width.<br />
3163         /// </summary>
3164         /// <since_tizen> 4 </since_tizen>
3165         public LineWrapMode LineWrapMode
3166         {
3167             get
3168             {
3169                 if (NUIApplication.IsUsingXaml)
3170                 {
3171                     return (LineWrapMode)GetValue(LineWrapModeProperty);
3172                 }
3173                 else
3174                 {
3175                     return (LineWrapMode)GetInternalLineWrapModeProperty(this);
3176                 }
3177             }
3178             set
3179             {
3180                 if (NUIApplication.IsUsingXaml)
3181                 {
3182                     SetValue(LineWrapModeProperty, value);
3183                 }
3184                 else
3185                 {
3186                     SetInternalLineWrapModeProperty(this, null, value);
3187                 }
3188                 NotifyPropertyChanged();
3189             }
3190         }
3191
3192         /// <summary>
3193         /// Enables Text selection using Shift key.
3194         /// </summary>
3195         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
3196         [EditorBrowsable(EditorBrowsableState.Never)]
3197         public bool EnableShiftSelection
3198         {
3199             get
3200             {
3201                 if (NUIApplication.IsUsingXaml)
3202                 {
3203                     return (bool)GetValue(EnableShiftSelectionProperty);
3204                 }
3205                 else
3206                 {
3207                     return (bool)GetInternalEnableShiftSelectionProperty(this);
3208                 }
3209             }
3210             set
3211             {
3212                 if (NUIApplication.IsUsingXaml)
3213                 {
3214                     SetValue(EnableShiftSelectionProperty, value);
3215                 }
3216                 else
3217                 {
3218                     SetInternalEnableShiftSelectionProperty(this, null, value);
3219                 }
3220                 NotifyPropertyChanged();
3221             }
3222         }
3223
3224         /// <summary>
3225         /// The text alignment to match the direction of the system language.
3226         /// </summary>
3227         /// <since_tizen> 6 </since_tizen>
3228         public bool MatchSystemLanguageDirection
3229         {
3230             get
3231             {
3232                 if (NUIApplication.IsUsingXaml)
3233                 {
3234                     return (bool)GetValue(MatchSystemLanguageDirectionProperty);
3235                 }
3236                 else
3237                 {
3238                     return (bool)GetInternalMatchSystemLanguageDirectionProperty(this);
3239                 }
3240             }
3241             set
3242             {
3243                 if (NUIApplication.IsUsingXaml)
3244                 {
3245                     SetValue(MatchSystemLanguageDirectionProperty, value);
3246                 }
3247                 else
3248                 {
3249                     SetInternalMatchSystemLanguageDirectionProperty(this, null, value);
3250                 }
3251                 NotifyPropertyChanged();
3252             }
3253         }
3254
3255         /// <summary>
3256         /// The MaxLength property.<br />
3257         /// The maximum number of characters that can be inserted.<br />
3258         /// </summary>
3259         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
3260         [EditorBrowsable(EditorBrowsableState.Never)]
3261         public int MaxLength
3262         {
3263             get
3264             {
3265                 if (NUIApplication.IsUsingXaml)
3266                 {
3267                     return (int)GetValue(MaxLengthProperty);
3268                 }
3269                 else
3270                 {
3271                     return (int)GetInternalMaxLengthProperty(this);
3272                 }
3273             }
3274             set
3275             {
3276                 if (NUIApplication.IsUsingXaml)
3277                 {
3278                     SetValue(MaxLengthProperty, value);
3279                 }
3280                 else
3281                 {
3282                     SetInternalMaxLengthProperty(this, null, value);
3283                 }
3284                 NotifyPropertyChanged();
3285             }
3286         }
3287
3288         /// <summary>
3289         /// The FontSizeScale property. <br />
3290         /// The default value is 1.0. <br />
3291         /// The given font size scale value is used for multiplying the specified font size before querying fonts. <br />
3292         /// If FontSizeScale.UseSystemSetting, will use the SystemSettings.FontSize internally. <br />
3293         /// </summary>
3294         /// <since_tizen> 9 </since_tizen>
3295         public float FontSizeScale
3296         {
3297             get
3298             {
3299                 if (NUIApplication.IsUsingXaml)
3300                 {
3301                     return (float)GetValue(FontSizeScaleProperty);
3302                 }
3303                 else
3304                 {
3305                     return (float)GetInternalFontSizeScaleProperty(this);
3306                 }
3307             }
3308             set
3309             {
3310                 if (NUIApplication.IsUsingXaml)
3311                 {
3312                     SetValue(FontSizeScaleProperty, value);
3313                 }
3314                 else
3315                 {
3316                     SetInternalFontSizeScaleProperty(this, null, value);
3317                 }
3318                 NotifyPropertyChanged();
3319             }
3320         }
3321
3322         private float InternalFontSizeScale
3323         {
3324             get
3325             {
3326                 return fontSizeScale;
3327             }
3328             set
3329             {
3330                 float newFontSizeScale;
3331
3332                 if (fontSizeScale == value) return;
3333
3334                 fontSizeScale = value;
3335                 if (fontSizeScale == Tizen.NUI.FontSizeScale.UseSystemSetting)
3336                 {
3337                     SystemSettingsFontSize systemSettingsFontSize;
3338
3339                     try
3340                     {
3341                         systemSettingsFontSize = SystemSettings.FontSize;
3342                     }
3343                     catch (Exception e)
3344                     {
3345                         Console.WriteLine("{0} Exception caught.", e);
3346                         systemSettingsFontSize = SystemSettingsFontSize.Normal;
3347                     }
3348                     newFontSizeScale = TextUtils.GetFontSizeScale(systemSettingsFontSize);
3349                     AddSystemSettingsFontSizeChanged();
3350                 }
3351                 else
3352                 {
3353                     newFontSizeScale = fontSizeScale;
3354                     RemoveSystemSettingsFontSizeChanged();
3355                 }
3356
3357                 SetInternalFontSizeScale(newFontSizeScale);
3358             }
3359         }
3360
3361         private void SetInternalFontSizeScale(float fontSizeScale)
3362         {
3363
3364             Object.InternalSetPropertyFloat(this.SwigCPtr, TextEditor.Property.FontSizeScale, (float)fontSizeScale);
3365         }
3366
3367         /// <summary>
3368         /// The EnableFontSizeScale property.<br />
3369         /// Whether the font size scale is enabled. (The default value is true)
3370         /// </summary>
3371         [EditorBrowsable(EditorBrowsableState.Never)]
3372         public bool EnableFontSizeScale
3373         {
3374             get
3375             {
3376                 if (NUIApplication.IsUsingXaml)
3377                 {
3378                     return (bool)GetValue(EnableFontSizeScaleProperty);
3379                 }
3380                 else
3381                 {
3382                     return (bool)GetInternalEnableFontSizeScaleProperty(this);
3383                 }
3384             }
3385             set
3386             {
3387                 if (NUIApplication.IsUsingXaml)
3388                 {
3389                     SetValue(EnableFontSizeScaleProperty, value);
3390                 }
3391                 else
3392                 {
3393                     SetInternalEnableFontSizeScaleProperty(this, null, value);
3394                 }
3395                 NotifyPropertyChanged();
3396             }
3397         }
3398
3399         /// <summary>
3400         /// The InputMethodSettings property.<br />
3401         /// The settings to relating to the System's Input Method, Key and Value.<br />
3402         /// </summary>
3403         /// <remarks>
3404         /// <see cref="InputMethod"/> is a class encapsulating the input method map. Use the <see cref="InputMethod"/> class for this property.
3405         /// </remarks>
3406         /// <example>
3407         /// The following example demonstrates how to set the InputMethodSettings property.
3408         /// <code>
3409         /// InputMethod method = new InputMethod();
3410         /// method.PanelLayout = InputMethod.PanelLayoutType.Normal;
3411         /// method.ActionButton = InputMethod.ActionButtonTitleType.Default;
3412         /// method.AutoCapital = InputMethod.AutoCapitalType.Word;
3413         /// method.Variation = 1;
3414         /// textEditor.InputMethodSettings = method.OutputMap;
3415         /// </code>
3416         /// </example>
3417         [EditorBrowsable(EditorBrowsableState.Never)]
3418         public PropertyMap InputMethodSettings
3419         {
3420             get
3421             {
3422                 if (NUIApplication.IsUsingXaml)
3423                 {
3424                     return (PropertyMap)GetValue(InputMethodSettingsProperty);
3425                 }
3426                 else
3427                 {
3428                     return (PropertyMap)GetInternalInputMethodSettingsProperty(this);
3429                 }
3430             }
3431             set
3432             {
3433                 if (NUIApplication.IsUsingXaml)
3434                 {
3435                     SetValue(InputMethodSettingsProperty, value);
3436                 }
3437                 else
3438                 {
3439                     SetInternalInputMethodSettingsProperty(this, null, value);
3440                 }
3441                 NotifyPropertyChanged();
3442             }
3443         }
3444
3445         /// <summary>
3446         /// Scroll the text control by specific amount..
3447         /// </summary>
3448         /// <param name="scroll">The amount (in pixels) of scrolling in horizontal &amp; vertical directions.</param>
3449         [EditorBrowsable(EditorBrowsableState.Never)]
3450         public void ScrollBy(Vector2 scroll)
3451         {
3452             Interop.TextEditor.ScrollBy(SwigCPtr, Vector2.getCPtr(scroll));
3453             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3454         }
3455
3456         /// <summary>
3457         /// Get the InputMethodContext instance.
3458         /// </summary>
3459         /// <returns>The InputMethodContext instance.</returns>
3460         /// <since_tizen> 5 </since_tizen>
3461         public InputMethodContext GetInputMethodContext()
3462         {
3463             if (inputMethodContext == null)
3464             {
3465                 /*Avoid raising InputMethodContext reference count.*/
3466                 inputMethodContext = new InputMethodContext(Interop.TextEditor.GetInputMethodContext(SwigCPtr), true);
3467                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3468             }
3469             return inputMethodContext;
3470         }
3471
3472         /// <summary>
3473         /// Select the whole text.
3474         /// </summary>
3475         /// <since_tizen> 9 </since_tizen>
3476         public void SelectWholeText()
3477         {
3478             Interop.TextEditor.SelectWholeText(SwigCPtr);
3479             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3480         }
3481
3482         /// <summary>
3483         /// Select text from start to end index. <br />
3484         /// The index is valid when 0 or positive.
3485         /// </summary>
3486         /// <param name="start">The start index for selection.</param>
3487         /// <param name="end">The end index for selection.</param>
3488         /// <remarks>
3489         /// If the end index exceeds the maximum value, it is set to the length of the text.
3490         /// </remarks>
3491         /// <since_tizen> 9 </since_tizen>
3492         public void SelectText(int start, int end)
3493         {
3494             if (start < 0)
3495                 throw new global::System.ArgumentOutOfRangeException(nameof(start), "Value is less than zero");
3496             if (end < 0)
3497                 throw new global::System.ArgumentOutOfRangeException(nameof(end), "Value is less than zero");
3498
3499             Interop.TextEditor.SelectText(SwigCPtr, (uint)start, (uint)end);
3500             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3501         }
3502
3503         /// <summary>
3504         /// Clear selection of the text. <br />
3505         /// Valid when selection is activate.
3506         /// </summary>
3507         /// <since_tizen> 9 </since_tizen>
3508         public void SelectNone()
3509         {
3510             _ = Interop.TextEditor.SelectNone(SwigCPtr);
3511             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3512         }
3513
3514         /// <summary>
3515         /// The Enable grab handle property.<br />
3516         /// Enables the grab handles for text selection.<br />
3517         /// The default value is true, which means the grab handles are enabled by default.<br />
3518         /// </summary>
3519         [EditorBrowsable(EditorBrowsableState.Never)]
3520         public bool EnableGrabHandle
3521         {
3522             get
3523             {
3524                 if (NUIApplication.IsUsingXaml)
3525                 {
3526                     return (bool)GetValue(EnableGrabHandleProperty);
3527                 }
3528                 else
3529                 {
3530                     return (bool)GetInternalEnableGrabHandleProperty(this);
3531                 }
3532             }
3533             set
3534             {
3535                 if (NUIApplication.IsUsingXaml)
3536                 {
3537                     SetValue(EnableGrabHandleProperty, value);
3538                 }
3539                 else
3540                 {
3541                     SetInternalEnableGrabHandleProperty(this, null, value);
3542                 }
3543                 NotifyPropertyChanged();
3544             }
3545         }
3546
3547         /// <summary>
3548         /// The Enable grab handle popup property.<br />
3549         /// Enables the grab handle popup for text selection.<br />
3550         /// The default value is true, which means the grab handle popup is enabled by default.<br />
3551         /// </summary>
3552         [EditorBrowsable(EditorBrowsableState.Never)]
3553         public bool EnableGrabHandlePopup
3554         {
3555             get
3556             {
3557                 if (NUIApplication.IsUsingXaml)
3558                 {
3559                     return (bool)GetValue(EnableGrabHandlePopupProperty);
3560                 }
3561                 else
3562                 {
3563                     return (bool)GetInternalEnableGrabHandlePopupProperty(this);
3564                 }
3565             }
3566             set
3567             {
3568                 if (NUIApplication.IsUsingXaml)
3569                 {
3570                     SetValue(EnableGrabHandlePopupProperty, value);
3571                 }
3572                 else
3573                 {
3574                     SetInternalEnableGrabHandlePopupProperty(this, null, value);
3575                 }
3576                 NotifyPropertyChanged();
3577             }
3578         }
3579
3580         /// <summary>
3581         /// Minimum line size to be used.<br />
3582         /// The height of the line in points. <br />
3583         /// If the font size is larger than the line size, it works with the font size. <br />
3584         /// </summary>
3585         [EditorBrowsable(EditorBrowsableState.Never)]
3586         public float MinLineSize
3587         {
3588             get
3589             {
3590                 if (NUIApplication.IsUsingXaml)
3591                 {
3592                     return (float)GetValue(MinLineSizeProperty);
3593                 }
3594                 else
3595                 {
3596                     return (float)GetInternalMinLineSizeProperty(this);
3597                 }
3598             }
3599             set
3600             {
3601                 if (NUIApplication.IsUsingXaml)
3602                 {
3603                     SetValue(MinLineSizeProperty, value);
3604                 }
3605                 else
3606                 {
3607                     SetInternalMinLineSizeProperty(this, null, value);
3608                 }
3609                 NotifyPropertyChanged();
3610             }
3611         }
3612
3613         internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t InputStyleChangedSignal()
3614         {
3615             SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t(Interop.TextEditor.InputStyleChangedSignal(SwigCPtr));
3616             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3617             return ret;
3618         }
3619
3620         /// <summary>
3621         /// The spaces between characters in Pixels.
3622         /// <remarks>
3623         /// A positive value will make the characters far apart (expanded) and a negative value will bring them closer (condensed).<br />
3624         /// The default value is 0.f which does nothing.
3625         ///</remarks>
3626         /// </summary>
3627         [EditorBrowsable(EditorBrowsableState.Never)]
3628         public float CharacterSpacing
3629         {
3630             get
3631             {
3632                 if (NUIApplication.IsUsingXaml)
3633                 {
3634                     return (float)GetValue(CharacterSpacingProperty);
3635                 }
3636                 else
3637                 {
3638                     return (float)GetInternalCharacterSpacingProperty(this);
3639                 }
3640             }
3641             set
3642             {
3643                 if (NUIApplication.IsUsingXaml)
3644                 {
3645                     SetValue(CharacterSpacingProperty, value);
3646                 }
3647                 else
3648                 {
3649                     SetInternalCharacterSpacingProperty(this, null, value);
3650                 }
3651                 NotifyPropertyChanged();
3652             }
3653         }
3654
3655         /// <summary>
3656         /// Dispose.
3657         /// </summary>
3658         /// <since_tizen> 3 </since_tizen>
3659         protected override void Dispose(DisposeTypes type)
3660         {
3661             if (disposed)
3662             {
3663                 return;
3664             }
3665
3666             internalPlaceholderTextColor?.Dispose();
3667             internalPrimaryCursorColor?.Dispose();
3668             internalSecondaryCursorColor?.Dispose();
3669             internalSelectionHighlightColor?.Dispose();
3670             internalInputColor?.Dispose();
3671             internalTextColor?.Dispose();
3672             internalGrabHandleColor?.Dispose();
3673
3674             if (hasSystemLanguageChanged)
3675             {
3676                 systemLocaleLanguageChanged.Remove(SystemSettings_LocaleLanguageChanged);
3677             }
3678
3679             RemoveSystemSettingsFontTypeChanged();
3680             RemoveSystemSettingsFontSizeChanged();
3681
3682             //Release your own unmanaged resources here.
3683             //You should not access any managed member here except static instance.
3684             //because the execution order of Finalizes is non-deterministic.
3685
3686             if (this.HasBody())
3687             {
3688                 if (textEditorTextChangedCallbackDelegate != null)
3689                 {
3690                     TextChangedSignal().Disconnect(textEditorTextChangedCallbackDelegate);
3691                 }
3692
3693                 if (textEditorMaxLengthReachedCallbackDelegate != null)
3694                 {
3695                     this.MaxLengthReachedSignal().Disconnect(textEditorMaxLengthReachedCallbackDelegate);
3696                 }
3697
3698                 if (textEditorSelectionStartedCallbackDelegate != null)
3699                 {
3700                     this.SelectionStartedSignal().Disconnect(textEditorSelectionStartedCallbackDelegate);
3701                 }
3702
3703                 if (textEditorSelectionClearedCallbackDelegate != null)
3704                 {
3705                     this.SelectionClearedSignal().Disconnect(textEditorSelectionClearedCallbackDelegate);
3706                 }
3707
3708                 if (textEditorCursorPositionChangedCallbackDelegate != null)
3709                 {
3710                     this.CursorPositionChangedSignal().Disconnect(textEditorCursorPositionChangedCallbackDelegate);
3711                 }
3712
3713                 if (textEditorSelectionChangedCallbackDelegate != null)
3714                 {
3715                     this.SelectionChangedSignal().Disconnect(textEditorSelectionChangedCallbackDelegate);
3716                 }
3717             }
3718
3719             TextChanged -= TextEditorTextChanged;
3720             GetInputMethodContext()?.DestroyContext();
3721
3722             base.Dispose(type);
3723         }
3724
3725         /// This will not be public opened.
3726         [EditorBrowsable(EditorBrowsableState.Never)]
3727         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
3728         {
3729             Interop.TextEditor.DeleteTextEditor(swigCPtr);
3730         }
3731
3732         internal override LayoutItem CreateDefaultLayout()
3733         {
3734             return new TextEditorLayout();
3735         }
3736
3737         internal void SetTextWithoutTextChanged(string text)
3738         {
3739             invokeTextChanged = false;
3740             Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, TextEditor.Property.TEXT, new Tizen.NUI.PropertyValue(text));
3741             invokeTextChanged = true;
3742         }
3743
3744         private string SetTranslatable(string textEditorSid)
3745         {
3746             string translatableText = null;
3747             translatableText = NUIApplication.MultilingualResourceManager?.GetString(textEditorSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
3748             if (translatableText != null)
3749             {
3750                 if (hasSystemLanguageChanged == false)
3751                 {
3752                     systemLocaleLanguageChanged.Add(SystemSettings_LocaleLanguageChanged);
3753                     hasSystemLanguageChanged = true;
3754                 }
3755                 return translatableText;
3756             }
3757             else
3758             {
3759                 translatableText = "";
3760                 return translatableText;
3761             }
3762         }
3763
3764         private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
3765         {
3766             if (textEditorTextSid != null)
3767             {
3768                 Text = NUIApplication.MultilingualResourceManager?.GetString(textEditorTextSid, new CultureInfo(e.Value.Replace("_", "-")));
3769             }
3770             if (textEditorPlaceHolderTextSid != null)
3771             {
3772                 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textEditorPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
3773             }
3774         }
3775
3776         private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e)
3777         {
3778             float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value);
3779             SetInternalFontSizeScale(newFontSizeScale);
3780         }
3781
3782         private void AddSystemSettingsFontSizeChanged()
3783         {
3784             if (hasSystemFontSizeChanged != true)
3785             {
3786                 try
3787                 {
3788                     SystemFontSizeChangedManager.Add(SystemSettingsFontSizeChanged);
3789                     hasSystemFontSizeChanged = true;
3790                 }
3791                 catch (Exception e)
3792                 {
3793                     Console.WriteLine("{0} Exception caught.", e);
3794                     hasSystemFontSizeChanged = false;
3795                 }
3796             }
3797         }
3798
3799         private void RemoveSystemSettingsFontSizeChanged()
3800         {
3801             if (hasSystemFontSizeChanged == true)
3802             {
3803                 try
3804                 {
3805                     SystemFontSizeChangedManager.Remove(SystemSettingsFontSizeChanged);
3806                     hasSystemFontSizeChanged = false;
3807                 }
3808                 catch (Exception e)
3809                 {
3810                     Console.WriteLine("{0} Exception caught.", e);
3811                     hasSystemFontSizeChanged = true;
3812                 }
3813             }
3814         }
3815
3816         private void SystemSettingsFontTypeChanged(object sender, FontTypeChangedEventArgs e)
3817         {
3818             SetInternalFontFamily(e.Value);
3819         }
3820
3821         private void AddSystemSettingsFontTypeChanged()
3822         {
3823             if (HasStyle() && !hasSystemFontTypeChanged)
3824             {
3825                 try
3826                 {
3827                     systemFontTypeChanged.Add(SystemSettingsFontTypeChanged);
3828                     hasSystemFontTypeChanged = true;
3829                 }
3830                 catch (Exception e)
3831                 {
3832                     Console.WriteLine("{0} Exception caught.", e);
3833                     hasSystemFontTypeChanged = false;
3834                 }
3835             }
3836         }
3837         
3838         private void RemoveSystemSettingsFontTypeChanged()
3839         {
3840             if (hasSystemFontTypeChanged)
3841             {
3842                 try
3843                 {
3844                     systemFontTypeChanged.Remove(SystemSettingsFontTypeChanged);
3845                     hasSystemFontTypeChanged = false;
3846                 }
3847                 catch (Exception e)
3848                 {
3849                     Console.WriteLine("{0} Exception caught.", e);
3850                     hasSystemFontTypeChanged = true;
3851                 }
3852             }
3853         }
3854
3855         private void TextEditorTextChanged(object sender, TextChangedEventArgs e)
3856         {
3857             if (!isSettingTextInCSharp)
3858             {
3859                 EnforceNotifyBindedInstance(TextProperty);
3860             }
3861         }
3862
3863         internal new class Property
3864         {
3865             internal static readonly int TEXT = Interop.TextEditor.TextGet();
3866             internal static readonly int TextColor = Interop.TextEditor.TextColorGet();
3867             internal static readonly int FontFamily = Interop.TextEditor.FontFamilyGet();
3868             internal static readonly int FontStyle = Interop.TextEditor.FontStyleGet();
3869             internal static readonly int PointSize = Interop.TextEditor.PointSizeGet();
3870             internal static readonly int HorizontalAlignment = Interop.TextEditor.HorizontalAlignmentGet();
3871             internal static readonly int VerticalAlignment = Interop.TextEditor.VerticalAlignmentGet();
3872             internal static readonly int ScrollThreshold = Interop.TextEditor.ScrollThresholdGet();
3873             internal static readonly int ScrollSpeed = Interop.TextEditor.ScrollSpeedGet();
3874             internal static readonly int PrimaryCursorColor = Interop.TextEditor.PrimaryCursorColorGet();
3875             internal static readonly int SecondaryCursorColor = Interop.TextEditor.SecondaryCursorColorGet();
3876             internal static readonly int EnableCursorBlink = Interop.TextEditor.EnableCursorBlinkGet();
3877             internal static readonly int CursorBlinkInterval = Interop.TextEditor.CursorBlinkIntervalGet();
3878             internal static readonly int CursorBlinkDuration = Interop.TextEditor.CursorBlinkDurationGet();
3879             internal static readonly int CursorWidth = Interop.TextEditor.CursorWidthGet();
3880             internal static readonly int GrabHandleImage = Interop.TextEditor.GrabHandleImageGet();
3881             internal static readonly int GrabHandlePressedImage = Interop.TextEditor.GrabHandlePressedImageGet();
3882             internal static readonly int SelectionPopupStyle = Interop.TextEditor.SelectionPopupStyleGet();
3883             internal static readonly int SelectionHandleImageLeft = Interop.TextEditor.SelectionHandleImageLeftGet();
3884             internal static readonly int SelectionHandleImageRight = Interop.TextEditor.SelectionHandleImageRightGet();
3885             internal static readonly int SelectionHandlePressedImageLeft = Interop.TextEditor.SelectionHandlePressedImageLeftGet();
3886             internal static readonly int SelectionHandlePressedImageRight = Interop.TextEditor.SelectionHandlePressedImageRightGet();
3887             internal static readonly int SelectionHandleMarkerImageLeft = Interop.TextEditor.SelectionHandleMarkerImageLeftGet();
3888             internal static readonly int SelectionHandleMarkerImageRight = Interop.TextEditor.SelectionHandleMarkerImageRightGet();
3889             internal static readonly int SelectionHighlightColor = Interop.TextEditor.SelectionHighlightColorGet();
3890             internal static readonly int DecorationBoundingBox = Interop.TextEditor.DecorationBoundingBoxGet();
3891             internal static readonly int EnableMarkup = Interop.TextEditor.EnableMarkupGet();
3892             internal static readonly int InputColor = Interop.TextEditor.InputColorGet();
3893             internal static readonly int InputFontFamily = Interop.TextEditor.InputFontFamilyGet();
3894             internal static readonly int InputFontStyle = Interop.TextEditor.InputFontStyleGet();
3895             internal static readonly int InputPointSize = Interop.TextEditor.InputPointSizeGet();
3896             internal static readonly int LineSpacing = Interop.TextEditor.LineSpacingGet();
3897             internal static readonly int InputLineSpacing = Interop.TextEditor.InputLineSpacingGet();
3898             internal static readonly int RelativeLineHeight = Interop.TextEditor.RelativeLineHeightGet();
3899             internal static readonly int UNDERLINE = Interop.TextEditor.UnderlineGet();
3900             internal static readonly int InputUnderline = Interop.TextEditor.InputUnderlineGet();
3901             internal static readonly int SHADOW = Interop.TextEditor.ShadowGet();
3902             internal static readonly int InputShadow = Interop.TextEditor.InputShadowGet();
3903             internal static readonly int EMBOSS = Interop.TextEditor.EmbossGet();
3904             internal static readonly int InputEmboss = Interop.TextEditor.InputEmbossGet();
3905             internal static readonly int OUTLINE = Interop.TextEditor.OutlineGet();
3906             internal static readonly int InputOutline = Interop.TextEditor.InputOutlineGet();
3907             internal static readonly int SmoothScroll = Interop.TextEditor.SmoothScrollGet();
3908             internal static readonly int SmoothScrollDuration = Interop.TextEditor.SmoothScrollDurationGet();
3909             internal static readonly int EnableScrollBar = Interop.TextEditor.EnableScrollBarGet();
3910             internal static readonly int ScrollBarShowDuration = Interop.TextEditor.ScrollBarShowDurationGet();
3911             internal static readonly int ScrollBarFadeDuration = Interop.TextEditor.ScrollBarFadeDurationGet();
3912             internal static readonly int PixelSize = Interop.TextEditor.PixelSizeGet();
3913             internal static readonly int LineCount = Interop.TextEditor.LineCountGet();
3914             internal static readonly int EnableSelection = Interop.TextEditor.EnableSelectionGet();
3915             internal static readonly int PLACEHOLDER = Interop.TextEditor.PlaceholderGet();
3916             internal static readonly int LineWrapMode = Interop.TextEditor.LineWrapModeGet();
3917             internal static readonly int PlaceholderText = Interop.TextEditor.PlaceholderTextGet();
3918             internal static readonly int PlaceholderTextColor = Interop.TextEditor.PlaceholderTextColorGet();
3919             internal static readonly int EnableShiftSelection = Interop.TextEditor.EnableShiftSelectionGet();
3920             internal static readonly int MatchSystemLanguageDirection = Interop.TextEditor.MatchSystemLanguageDirectionGet();
3921             internal static readonly int MaxLength = Interop.TextEditor.MaxLengthGet();
3922             internal static readonly int SelectedTextStart = Interop.TextEditor.SelectedTextStartGet();
3923             internal static readonly int SelectedTextEnd = Interop.TextEditor.SelectedTextEndGet();
3924             internal static readonly int EnableEditing = Interop.TextEditor.EnableEditingGet();
3925             internal static readonly int SelectedText = Interop.TextEditor.SelectedTextGet();
3926             internal static readonly int HorizontalScrollPosition = Interop.TextEditor.HorizontalScrollPositionGet();
3927             internal static readonly int VerticalScrollPosition = Interop.TextEditor.VerticalScrollPositionGet();
3928             internal static readonly int PrimaryCursorPosition = Interop.TextEditor.PrimaryCursorPositionGet();
3929             internal static readonly int FontSizeScale = Interop.TextEditor.FontSizeScaleGet();
3930             internal static readonly int EnableFontSizeScale = Interop.TextEditor.EnableFontSizeScaleGet();
3931             internal static readonly int GrabHandleColor = Interop.TextEditor.GrabHandleColorGet();
3932             internal static readonly int EnableGrabHandle = Interop.TextEditor.EnableGrabHandleGet();
3933             internal static readonly int EnableGrabHandlePopup = Interop.TextEditor.EnableGrabHandlePopupGet();
3934             internal static readonly int InputMethodSettings = Interop.TextEditor.InputMethodSettingsGet();
3935             internal static readonly int ELLIPSIS = Interop.TextEditor.EllipsisGet();
3936             internal static readonly int EllipsisPosition = Interop.TextEditor.EllipsisPositionGet();
3937             internal static readonly int MinLineSize = Interop.TextEditor.MinLineSizeGet();
3938             internal static readonly int InputFilter = Interop.TextEditor.InputFilterGet();
3939             internal static readonly int Strikethrough = Interop.TextEditor.StrikethroughGet();
3940             internal static readonly int CharacterSpacing = Interop.TextEditor.CharacterSpacingGet();
3941
3942             internal static void Preload()
3943             {
3944                 // Do nothing. Just call for load static values.
3945             }
3946         }
3947
3948         internal class InputStyle
3949         {
3950             internal enum Mask
3951             {
3952                 None = 0x0000,
3953                 Color = 0x0001,
3954                 FontFamily = 0x0002,
3955                 PointSize = 0x0004,
3956                 FontStyle = 0x0008,
3957                 LineSpacing = 0x0010,
3958                 Underline = 0x0020,
3959                 Shadow = 0x0040,
3960                 Emboss = 0x0080,
3961                 Outline = 0x0100
3962             }
3963         }
3964
3965         private void OnDecorationBoundingBoxChanged(int x, int y, int width, int height)
3966         {
3967             DecorationBoundingBox = new Rectangle(x, y, width, height);
3968         }
3969         private void OnInputColorChanged(float x, float y, float z, float w)
3970         {
3971             InputColor = new Vector4(x, y, z, w);
3972         }
3973         private void OnPlaceholderTextColorChanged(float r, float g, float b, float a)
3974         {
3975             PlaceholderTextColor = new Color(r, g, b, a);
3976         }
3977         private void OnPrimaryCursorColorChanged(float x, float y, float z, float w)
3978         {
3979             PrimaryCursorColor = new Vector4(x, y, z, w);
3980         }
3981         private void OnSecondaryCursorColorChanged(float x, float y, float z, float w)
3982         {
3983             SecondaryCursorColor = new Vector4(x, y, z, w);
3984         }
3985         private void OnSelectionHighlightColorChanged(float x, float y, float z, float w)
3986         {
3987             SelectionHighlightColor = new Vector4(x, y, z, w);
3988         }
3989         private void OnTextColorChanged(float x, float y, float z, float w)
3990         {
3991             TextColor = new Vector4(x, y, z, w);
3992         }
3993         private void OnGrabHandleColorChanged(float r, float g, float b, float a)
3994         {
3995             GrabHandleColor = new Color(r, g, b, a);
3996         }
3997
3998         internal class TextEditorLayout : LayoutItem
3999         {
4000             protected override void OnMeasure(MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec)
4001             {
4002                 // Padding will be automatically applied by DALi TextEditor.
4003                 var totalWidth = widthMeasureSpec.Size.AsDecimal();
4004                 var totalHeight = heightMeasureSpec.Size.AsDecimal();
4005                 var minSize = Owner.MinimumSize;
4006                 var maxSize = Owner.MaximumSize;
4007                 var naturalSize = Owner.GetNaturalSize();
4008
4009                 if (((TextEditor)Owner).Text.Length == 0)
4010                 {
4011                     // Calculate height of TextEditor by setting Text with " ".
4012                     // By calling SetTextWithoutTextChanged, TextChanged callback is not called for this.
4013                     ((TextEditor)Owner).SetTextWithoutTextChanged(" ");
4014
4015                     // Store original WidthSpecification to restore it after setting ResizePolicy.
4016                     var widthSpecification = Owner.WidthSpecification;
4017
4018                     // In DALi's Size logic, if Width or Height is set to be 0, then
4019                     // ResizePolicy is not changed to Fixed.
4020                     // This causes Size changes after NUI Layout's OnMeasure is finished.
4021                     // e.g. TextEditor's Width fills to its parent although Text is null and
4022                     //      WidthSpecification is WrapContent.
4023                     // To prevent the Size changes, WidthResizePolicy is set to be Fixed
4024                     // in advance if Text is null.
4025                     Owner.WidthResizePolicy = ResizePolicyType.Fixed;
4026
4027                     // Restore WidthSpecification because ResizePolicy changes WidthSpecification.
4028                     Owner.WidthSpecification = widthSpecification;
4029
4030                     naturalSize = Owner.GetNaturalSize();
4031
4032                     // Restore TextEditor's Text after calculating height of TextEditor.
4033                     // By calling SetTextWithoutTextChanged, TextChanged callback is not called for this.
4034                     ((TextEditor)Owner).SetTextWithoutTextChanged("");
4035                 }
4036
4037                 if (widthMeasureSpec.Mode != MeasureSpecification.ModeType.Exactly)
4038                 {
4039                     float width = naturalSize != null ? naturalSize.Width : 0;
4040                     totalWidth = Math.Min(Math.Max(width, minSize.Width), maxSize.Width);
4041                 }
4042
4043                 if (heightMeasureSpec.Mode != MeasureSpecification.ModeType.Exactly)
4044                 {
4045                     float height = naturalSize != null ? naturalSize.Height : 0;
4046                     totalHeight = Math.Min(Math.Max(height, minSize.Height), maxSize.Height);
4047                 }
4048
4049                 widthMeasureSpec = new MeasureSpecification(new LayoutLength(totalWidth), MeasureSpecification.ModeType.Exactly);
4050                 heightMeasureSpec = new MeasureSpecification(new LayoutLength(totalHeight), MeasureSpecification.ModeType.Exactly);
4051
4052                 MeasuredSize.StateType childWidthState = MeasuredSize.StateType.MeasuredSizeOK;
4053                 MeasuredSize.StateType childHeightState = MeasuredSize.StateType.MeasuredSizeOK;
4054
4055                 SetMeasuredDimensions(ResolveSizeAndState(new LayoutLength(totalWidth), widthMeasureSpec, childWidthState),
4056                                       ResolveSizeAndState(new LayoutLength(totalHeight), heightMeasureSpec, childHeightState));
4057             }
4058         }
4059     }
4060 }