[NUI] fix warning about internal methods of text components
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextField.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 extern alias TizenSystemSettings;
18 using TizenSystemSettings.Tizen.System;
19
20 using System;
21 using System.Globalization;
22 using System.ComponentModel;
23 using Tizen.NUI.Binding;
24 using Tizen.NUI.Text;
25
26 namespace Tizen.NUI.BaseComponents
27 {
28     /// <summary>
29     /// A control which provides a single line editable text field.
30     /// </summary>
31     /// <since_tizen> 3 </since_tizen>
32     public partial class TextField : View
33     {
34         private string textFieldTextSid = null;
35         private string textFieldPlaceHolderTextSid = null;
36         private string textFieldPlaceHolderTextFocusedSid = null;
37         private bool systemlangTextFlag = false;
38         private InputMethodContext inputMethodCotext = null;
39         private float fontSizeScale = 1.0f;
40         private bool hasFontSizeChangedCallback = false;
41
42         static TextField() { }
43
44         /// <summary>
45         /// Creates the TextField control.
46         /// </summary>
47         /// <since_tizen> 3 </since_tizen>
48         public TextField() : this(Interop.TextField.New(), true)
49         {
50             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
51         }
52
53         /// <summary>
54         /// Creates the TextField with setting the status of shown or hidden.
55         /// </summary>
56         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
57         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
58         [EditorBrowsable(EditorBrowsableState.Never)]
59         public TextField(bool shown) : this(Interop.TextField.New(), true)
60         {
61             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
62             SetVisible(shown);
63         }
64
65         /// <summary>
66         /// Get attributes, it is abstract function and must be override.
67         /// </summary>
68         [EditorBrowsable(EditorBrowsableState.Never)]
69         protected override ViewStyle CreateViewStyle()
70         {
71             return new TextFieldStyle();
72         }
73
74         internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : base(cPtr, cMemoryOwn, viewStyle)
75         {
76             if (!shown)
77             {
78                 SetVisible(false);
79             }
80         }
81
82         internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(cPtr, cMemoryOwn, null)
83         {
84             if (!shown)
85             {
86                 SetVisible(false);
87             }
88         }
89
90         internal TextField(TextField handle, bool shown = true) : this(Interop.TextField.NewTextField(TextField.getCPtr(handle)), true)
91         {
92             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
93
94             if (!shown)
95             {
96                 SetVisible(false);
97             }
98         }
99
100         internal enum ExceedPolicyType
101         {
102             ExceedPolicyOriginal,
103             ExceedPolicyClip
104         }
105
106         /// <summary>
107         /// The TranslatableText property.<br />
108         /// The text can set the SID value.<br />
109         /// </summary>
110         /// <exception cref='ArgumentNullException'>
111         /// ResourceManager about multilingual is null.
112         /// </exception>
113         /// <since_tizen> 4 </since_tizen>
114         public string TranslatableText
115         {
116             get
117             {
118                 return (string)GetValue(TranslatableTextProperty);
119             }
120             set
121             {
122                 SetValue(TranslatableTextProperty, value);
123             }
124         }
125         private string translatableText
126         {
127             get
128             {
129                 return textFieldTextSid;
130             }
131             set
132             {
133                 if (NUIApplication.MultilingualResourceManager == null)
134                 {
135                     throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
136                 }
137                 textFieldTextSid = value;
138                 Text = SetTranslatable(textFieldTextSid);
139                 NotifyPropertyChanged();
140             }
141         }
142
143         /// <summary>
144         /// The TranslatablePlaceholderText property.<br />
145         /// The text can set the SID value.<br />
146         /// </summary>
147         /// <exception cref='ArgumentNullException'>
148         /// ResourceManager about multilingual is null.
149         /// </exception>
150         /// <since_tizen> 4 </since_tizen>
151         public string TranslatablePlaceholderText
152         {
153             get
154             {
155                 return (string)GetValue(TranslatablePlaceholderTextProperty);
156             }
157             set
158             {
159                 SetValue(TranslatablePlaceholderTextProperty, value);
160             }
161         }
162         private string translatablePlaceholderText
163         {
164             get
165             {
166                 return textFieldPlaceHolderTextSid;
167             }
168             set
169             {
170                 if (NUIApplication.MultilingualResourceManager == null)
171                 {
172                     throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
173                 }
174                 textFieldPlaceHolderTextSid = value;
175                 PlaceholderText = SetTranslatable(textFieldPlaceHolderTextSid);
176                 NotifyPropertyChanged();
177             }
178         }
179
180         /// <summary>
181         /// The TranslatablePlaceholderTextFocused property.<br />
182         /// The text can set the SID value.<br />
183         /// </summary>
184         /// <exception cref='ArgumentNullException'>
185         /// ResourceManager about multilingual is null.
186         /// </exception>
187         /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
188         [EditorBrowsable(EditorBrowsableState.Never)]
189         public string TranslatablePlaceholderTextFocused
190         {
191             get
192             {
193                 return (string)GetValue(TranslatablePlaceholderTextFocusedProperty);
194             }
195             set
196             {
197                 SetValue(TranslatablePlaceholderTextFocusedProperty, value);
198             }
199         }
200         private string translatablePlaceholderTextFocused
201         {
202             get
203             {
204                 return textFieldPlaceHolderTextFocusedSid;
205             }
206             set
207             {
208                 if (NUIApplication.MultilingualResourceManager == null)
209                 {
210                     throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
211                 }
212                 textFieldPlaceHolderTextFocusedSid = value;
213                 PlaceholderTextFocused = SetTranslatable(textFieldPlaceHolderTextFocusedSid);
214                 NotifyPropertyChanged();
215             }
216         }
217
218         /// <summary>
219         /// The Text property.<br />
220         /// The text to display in the UTF-8 format.<br />
221         /// </summary>
222         /// <since_tizen> 3 </since_tizen>
223         public string Text
224         {
225             get
226             {
227                 return (string)GetValue(TextProperty);
228             }
229             set
230             {
231                 SetValueAndForceSendChangeSignal(TextProperty, value);
232                 NotifyPropertyChanged();
233             }
234         }
235
236         /// <summary>
237         /// The PlaceholderText property.<br />
238         /// The text to display when the TextField is empty and inactive. <br />
239         /// </summary>
240         /// <since_tizen> 3 </since_tizen>
241         public string PlaceholderText
242         {
243             get
244             {
245                 return (string)GetValue(PlaceholderTextProperty);
246             }
247             set
248             {
249                 SetValue(PlaceholderTextProperty, value);
250                 NotifyPropertyChanged();
251             }
252         }
253
254         /// <summary>
255         /// The PlaceholderTextFocused property. <br />
256         /// The text to display when the TextField is empty with input focus. <br />
257         /// </summary>
258         /// <since_tizen> 3 </since_tizen>
259         public string PlaceholderTextFocused
260         {
261             get
262             {
263                 return (string)GetValue(PlaceholderTextFocusedProperty);
264             }
265             set
266             {
267                 SetValue(PlaceholderTextFocusedProperty, value);
268                 NotifyPropertyChanged();
269             }
270         }
271
272         /// <summary>
273         /// The FontFamily property.<br />
274         /// The requested font family to use.<br />
275         /// </summary>
276         /// <since_tizen> 3 </since_tizen>
277         public string FontFamily
278         {
279             get
280             {
281                 return (string)GetValue(FontFamilyProperty);
282             }
283             set
284             {
285                 SetValue(FontFamilyProperty, value);
286                 NotifyPropertyChanged();
287             }
288         }
289
290         /// <summary>
291         /// The FontStyle property.<br />
292         /// The requested font style to use.<br />
293         /// The fontStyle map contains the following keys :<br />
294         /// <list type="table">
295         /// <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>
296         /// <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>
297         /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
298         /// </list>
299         /// </summary>
300         /// <since_tizen> 3 </since_tizen>
301         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
302         public PropertyMap FontStyle
303         {
304             get
305             {
306                 return (PropertyMap)GetValue(FontStyleProperty);
307             }
308             set
309             {
310                 SetValue(FontStyleProperty, value);
311                 NotifyPropertyChanged();
312             }
313         }
314
315         /// <summary>
316         /// Set FontStyle to TextField. <br />
317         /// </summary>
318         /// <param name="fontStyle">The FontStyle</param>
319         /// <remarks>
320         /// SetFontStyle specifies the requested font style through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
321         /// </remarks>
322         /// <example>
323         /// The following example demonstrates how to use the SetFontStyle method.
324         /// <code>
325         /// var fontStyle = new Tizen.NUI.Text.FontStyle();
326         /// fontStyle.Width = FontWidthType.Expanded;
327         /// fontStyle.Weight = FontWeightType.Bold;
328         /// fontStyle.Slant = FontSlantType.Italic;
329         /// field.SetFontStyle(fontStyle);
330         /// </code>
331         /// </example>
332         [EditorBrowsable(EditorBrowsableState.Never)]
333         public void SetFontStyle(FontStyle fontStyle)
334         {
335             using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
336             {
337                 SetValue(FontStyleProperty, fontStyleMap);
338             }
339         }
340
341         /// <summary>
342         /// Get FontStyle from TextField. <br />
343         /// </summary>
344         /// <returns>The FontStyle</returns>
345         /// <remarks>
346         /// <see cref="Tizen.NUI.Text.FontStyle"/>
347         /// </remarks>
348         [EditorBrowsable(EditorBrowsableState.Never)]
349         public FontStyle GetFontStyle()
350         {
351             FontStyle fontStyle;
352             using (var fontStyleMap = (PropertyMap)GetValue(FontStyleProperty))
353             {
354                 fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
355             }
356             return fontStyle;
357         }
358
359         /// <summary>
360         /// The PointSize property.<br />
361         /// The size of font in points.<br />
362         /// </summary>
363         /// <since_tizen> 3 </since_tizen>
364         public float PointSize
365         {
366             get
367             {
368                 return (float)GetValue(PointSizeProperty);
369             }
370             set
371             {
372                 SetValue(PointSizeProperty, value);
373                 NotifyPropertyChanged();
374             }
375         }
376
377         /// <summary>
378         /// The MaxLength property.<br />
379         /// The maximum number of characters that can be inserted.<br />
380         /// </summary>
381         /// <since_tizen> 3 </since_tizen>
382         public int MaxLength
383         {
384             get
385             {
386                 return (int)GetValue(MaxLengthProperty);
387             }
388             set
389             {
390                 SetValue(MaxLengthProperty, value);
391                 NotifyPropertyChanged();
392             }
393         }
394
395         /// <summary>
396         /// The ExceedPolicy property.<br />
397         /// Specifies how the text is truncated when it does not fit.<br />
398         /// </summary>
399         /// <since_tizen> 3 </since_tizen>
400         public int ExceedPolicy
401         {
402             get
403             {
404                 return (int)GetValue(ExceedPolicyProperty);
405             }
406             set
407             {
408                 SetValue(ExceedPolicyProperty, value);
409                 NotifyPropertyChanged();
410             }
411         }
412
413         /// <summary>
414         /// The HorizontalAlignment property.<br />
415         /// The line horizontal alignment.<br />
416         /// </summary>
417         /// <since_tizen> 3 </since_tizen>
418         public HorizontalAlignment HorizontalAlignment
419         {
420             get
421             {
422                 return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
423             }
424             set
425             {
426                 SetValue(HorizontalAlignmentProperty, value);
427                 NotifyPropertyChanged();
428             }
429         }
430
431         /// <summary>
432         /// The VerticalAlignment property.<br />
433         /// The line vertical alignment.<br />
434         /// </summary>
435         /// <since_tizen> 3 </since_tizen>
436         public VerticalAlignment VerticalAlignment
437         {
438             get
439             {
440                 return (VerticalAlignment)GetValue(VerticalAlignmentProperty);
441             }
442             set
443             {
444                 SetValue(VerticalAlignmentProperty, value);
445                 NotifyPropertyChanged();
446                 NotifyPropertyChanged();
447             }
448         }
449
450         /// <summary>
451         /// The TextColor property.<br />
452         /// The color of the text.<br />
453         /// </summary>
454         /// <remarks>
455         /// The property cascade chaining set is possible. For example, this (textField.TextColor.X = 0.1f;) is possible.
456         /// </remarks>
457         /// <since_tizen> 3 </since_tizen>
458         public Color TextColor
459         {
460             get
461             {
462                 Color temp = (Color)GetValue(TextColorProperty);
463                 return new Color(OnTextColorChanged, temp.R, temp.G, temp.B, temp.A);
464             }
465             set
466             {
467                 SetValue(TextColorProperty, value);
468                 NotifyPropertyChanged();
469             }
470         }
471
472         /// <summary>
473         /// The PlaceholderTextColor property.
474         /// </summary>
475         /// <remarks>
476         /// The property cascade chaining set is possible. For example, this (textField.PlaceholderTextColor.X = 0.1f;) is possible.
477         /// </remarks>
478         /// <since_tizen> 3 </since_tizen>
479         public Vector4 PlaceholderTextColor
480         {
481             get
482             {
483                 Vector4 temp = (Vector4)GetValue(PlaceholderTextColorProperty);
484                 return new Vector4(OnPlaceholderTextColorChanged, temp.X, temp.Y, temp.Z, temp.W);
485             }
486             set
487             {
488                 SetValue(PlaceholderTextColorProperty, value);
489                 NotifyPropertyChanged();
490             }
491         }
492
493         /// <summary>
494         /// The ShadowOffset property.
495         /// </summary>
496         /// <since_tizen> 3 </since_tizen>
497         /// <remarks>
498         /// Deprecated.(API Level 6) Use Shadow instead.
499         /// The property cascade chaining set is possible. For example, this (textField.ShadowOffset.X = 0.1f;) is possible.
500         /// </remarks>
501         [Obsolete("Please do not use this ShadowOffset(Deprecated). Please use Shadow instead.")]
502         public Vector2 ShadowOffset
503         {
504             get
505             {
506                 return GetValue(ShadowOffsetProperty) as Vector2;
507             }
508             set
509             {
510                 SetValue(ShadowOffsetProperty, value);
511             }
512         }
513
514         private Vector2 InternalShadowOffset
515         {
516             get
517             {
518                 float x = 0.0f, y = 0.0f;
519                 using (var propertyValue = Shadow.Find(TextField.Property.SHADOW, "offset"))
520                 using (var shadowOffset = new Vector2())
521                 {
522                     if (null != propertyValue)
523                     {
524                         propertyValue.Get(shadowOffset);
525                         x = shadowOffset.X;
526                         y = shadowOffset.Y;
527                     }
528                 }
529                 return new Vector2(OnShadowOffsetChanged, x, y);
530             }
531             set
532             {
533                 using (var map = new PropertyMap())
534                 {
535                     map.Add("offset", value);
536                     var shadowMap = Shadow;
537                     shadowMap.Merge(map);
538                     SetValue(ShadowProperty, shadowMap);
539                     NotifyPropertyChanged();
540                 }
541             }
542         }
543
544         /// <summary>
545         /// The ShadowColor property.
546         /// </summary>
547         /// <since_tizen> 3 </since_tizen>
548         /// <remarks>
549         /// Deprecated.(API Level 6) Use Shadow instead.
550         /// The property cascade chaining set is possible. For example, this (textField.ShadowColor.X = 0.1f;) is possible.
551         /// </remarks>
552         [Obsolete("Please do not use this ShadowColor(Deprecated). Please use Shadow instead.")]
553         public Vector4 ShadowColor
554         {
555             get
556             {
557                 return GetValue(ShadowColorProperty) as Vector4;
558             }
559             set
560             {
561                 SetValue(ShadowColorProperty, value);
562             }
563         }
564
565         private Vector4 InternalShadowColor
566         {
567             get
568             {
569                 float x = 0.0f, y = 0.0f, z = 0.0f, w = 0.0f;
570                 using (var propertyValue = Shadow.Find(TextField.Property.SHADOW, "color"))
571                 using (var shadowColor = new Vector4())
572                 {
573                     if (null != propertyValue)
574                     {
575                         propertyValue.Get(shadowColor);
576                         x = shadowColor.X;
577                         y = shadowColor.Y;
578                         z = shadowColor.Z;
579                         w = shadowColor.W;
580                     }
581                 }
582                 return new Vector4(OnShadowColorChanged, x, y, z, w);
583             }
584             set
585             {
586                 using (var map = new PropertyMap())
587                 {
588                     map.Add("color", value);
589                     var shadowMap = Shadow;
590                     shadowMap.Merge(map);
591                     SetValue(ShadowProperty, shadowMap);
592                     NotifyPropertyChanged();
593                 }
594             }
595         }
596
597         /// <summary>
598         /// The PrimaryCursorColor property.<br />
599         /// The color to apply to the primary cursor.<br />
600         /// </summary>
601         /// <remarks>
602         /// The property cascade chaining set is possible. For example, this (textField.PrimaryCursorColor.X = 0.1f;) is possible.
603         /// </remarks>
604         /// <since_tizen> 3 </since_tizen>
605         public Vector4 PrimaryCursorColor
606         {
607             get
608             {
609                 Vector4 temp = (Vector4)GetValue(PrimaryCursorColorProperty);
610                 return new Vector4(OnPrimaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
611             }
612             set
613             {
614                 SetValue(PrimaryCursorColorProperty, value);
615                 NotifyPropertyChanged();
616             }
617         }
618
619         /// <summary>
620         /// The SecondaryCursorColor property.<br />
621         /// The color to apply to the secondary cursor.<br />
622         /// </summary>
623         /// <remarks>
624         /// The property cascade chaining set is possible. For example, this (textField.SecondaryCursorColor.X = 0.1f;) is possible.
625         /// </remarks>
626         /// <since_tizen> 3 </since_tizen>
627         public Vector4 SecondaryCursorColor
628         {
629             get
630             {
631                 Vector4 temp = (Vector4)GetValue(SecondaryCursorColorProperty);
632                 return new Vector4(OnSecondaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
633             }
634             set
635             {
636                 SetValue(SecondaryCursorColorProperty, value);
637                 NotifyPropertyChanged();
638             }
639         }
640
641         /// <summary>
642         /// The EnableCursorBlink property.<br />
643         /// Whether the cursor should blink or not.<br />
644         /// </summary>
645         /// <since_tizen> 3 </since_tizen>
646         public bool EnableCursorBlink
647         {
648             get
649             {
650                 return (bool)GetValue(EnableCursorBlinkProperty);
651             }
652             set
653             {
654                 SetValue(EnableCursorBlinkProperty, value);
655                 NotifyPropertyChanged();
656             }
657         }
658
659         /// <summary>
660         /// The CursorBlinkInterval property.<br />
661         /// The time interval in seconds between cursor on/off states.<br />
662         /// </summary>
663         /// <since_tizen> 3 </since_tizen>
664         public float CursorBlinkInterval
665         {
666             get
667             {
668                 return (float)GetValue(CursorBlinkIntervalProperty);
669             }
670             set
671             {
672                 SetValue(CursorBlinkIntervalProperty, value);
673                 NotifyPropertyChanged();
674             }
675         }
676
677         /// <summary>
678         /// The CursorBlinkDuration property.<br />
679         /// The cursor will stop blinking after this number of seconds (if non-zero).<br />
680         /// </summary>
681         /// <since_tizen> 3 </since_tizen>
682         public float CursorBlinkDuration
683         {
684             get
685             {
686                 return (float)GetValue(CursorBlinkDurationProperty);
687             }
688             set
689             {
690                 SetValue(CursorBlinkDurationProperty, value);
691                 NotifyPropertyChanged();
692             }
693         }
694
695         /// <summary>
696         /// The CursorWidth property.
697         /// </summary>
698         /// <since_tizen> 3 </since_tizen>
699         public int CursorWidth
700         {
701             get
702             {
703                 return (int)GetValue(CursorWidthProperty);
704             }
705             set
706             {
707                 SetValue(CursorWidthProperty, value);
708                 NotifyPropertyChanged();
709             }
710         }
711
712         /// <summary>
713         /// The GrabHandleImage property.<br />
714         /// The image to display for the grab handle.<br />
715         /// </summary>
716         /// <since_tizen> 3 </since_tizen>
717         public string GrabHandleImage
718         {
719             get
720             {
721                 return (string)GetValue(GrabHandleImageProperty);
722             }
723             set
724             {
725                 SetValue(GrabHandleImageProperty, value);
726                 NotifyPropertyChanged();
727             }
728         }
729
730         /// <summary>
731         /// The GrabHandlePressedImage property.<br />
732         /// The image to display when the grab handle is pressed.<br />
733         /// </summary>
734         /// <since_tizen> 3 </since_tizen>
735         public string GrabHandlePressedImage
736         {
737             get
738             {
739                 return (string)GetValue(GrabHandlePressedImageProperty);
740             }
741             set
742             {
743                 SetValue(GrabHandlePressedImageProperty, value);
744                 NotifyPropertyChanged();
745             }
746         }
747
748         /// <summary>
749         /// The ScrollThreshold property.<br />
750         /// Horizontal scrolling will occur if the cursor is this close to the control border.<br />
751         /// </summary>
752         /// <since_tizen> 3 </since_tizen>
753         public float ScrollThreshold
754         {
755             get
756             {
757                 return (float)GetValue(ScrollThresholdProperty);
758             }
759             set
760             {
761                 SetValue(ScrollThresholdProperty, value);
762                 NotifyPropertyChanged();
763             }
764         }
765
766         /// <summary>
767         /// The ScrollSpeed property.<br />
768         /// The scroll speed in pixels per second.<br />
769         /// </summary>
770         /// <since_tizen> 3 </since_tizen>
771         public float ScrollSpeed
772         {
773             get
774             {
775                 return (float)GetValue(ScrollSpeedProperty);
776             }
777             set
778             {
779                 SetValue(ScrollSpeedProperty, value);
780                 NotifyPropertyChanged();
781             }
782         }
783
784         /// <summary>
785         /// The SelectionHandleImageLeft property.<br />
786         /// The image to display for the left selection handle.<br />
787         /// The selectionHandleImageLeft map contains the following key :<br />
788         /// <list type="table">
789         /// <item><term>filename (string)</term><description>The path of image file</description></item>
790         /// </list>
791         /// </summary>
792         /// <since_tizen> 3 </since_tizen>
793         public PropertyMap SelectionHandleImageLeft
794         {
795             get
796             {
797                 return (PropertyMap)GetValue(SelectionHandleImageLeftProperty);
798             }
799             set
800             {
801                 SetValue(SelectionHandleImageLeftProperty, value);
802                 NotifyPropertyChanged();
803             }
804         }
805
806         /// <summary>
807         /// The SelectionHandleImageRight property.<br />
808         /// The image to display for the right selection handle.<br />
809         /// The selectionHandleImageRight map contains the following key :<br />
810         /// <list type="table">
811         /// <item><term>filename (string)</term><description>The path of image file</description></item>
812         /// </list>
813         /// </summary>
814         /// <since_tizen> 3 </since_tizen>
815         public PropertyMap SelectionHandleImageRight
816         {
817             get
818             {
819                 return (PropertyMap)GetValue(SelectionHandleImageRightProperty);
820             }
821             set
822             {
823                 SetValue(SelectionHandleImageRightProperty, value);
824                 NotifyPropertyChanged();
825             }
826         }
827
828         /// <summary>
829         /// Set SelectionHandleImage to TextField. <br />
830         /// </summary>
831         /// <param name="selectionHandleImage">The SelectionHandleImage</param>
832         /// <remarks>
833         /// SetSelectionHandleImage specifies the display image used for the selection handle through <see cref="Tizen.NUI.Text.SelectionHandleImage"/>. <br />
834         /// </remarks>
835         /// <example>
836         /// The following example demonstrates how to use the SetSelectionHandleImage method.
837         /// <code>
838         /// var selectionHandleImage = new Tizen.NUI.Text.SelectionHandleImage();
839         /// selectionHandleImage.LeftImageUrl = "handle_downleft.png";
840         /// selectionHandleImage.RightImageUrl = "handle_downright.png";
841         /// field.SetSelectionHandleImage(selectionHandleImage);
842         /// </code>
843         /// </example>
844         [EditorBrowsable(EditorBrowsableState.Never)]
845         public void SetSelectionHandleImage(SelectionHandleImage selectionHandleImage)
846         {
847             if (!String.IsNullOrEmpty(selectionHandleImage.LeftImageUrl))
848             {
849                 using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandleImage.LeftImageUrl))
850                 {
851                     SetValue(SelectionHandleImageLeftProperty, leftImageMap);
852                 }
853             }
854
855             if (!String.IsNullOrEmpty(selectionHandleImage.RightImageUrl))
856             {
857                 using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandleImage.RightImageUrl))
858                 {
859                     SetValue(SelectionHandleImageRightProperty, rightImageMap);
860                 }
861             }
862         }
863
864         /// <summary>
865         /// Get SelectionHandleImage from TextField. <br />
866         /// </summary>
867         /// <returns>The SelectionHandleImage</returns>
868         /// <remarks>
869         /// <see cref="Tizen.NUI.Text.SelectionHandleImage"/>
870         /// </remarks>
871         [EditorBrowsable(EditorBrowsableState.Never)]
872         public SelectionHandleImage GetSelectionHandleImage()
873         {
874             SelectionHandleImage selectionHandleImage;
875             using (var leftImageMap = (PropertyMap)GetValue(SelectionHandleImageLeftProperty))
876             using (var rightImageMap = (PropertyMap)GetValue(SelectionHandleImageRightProperty))
877             {
878                 selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
879             }
880             return selectionHandleImage;
881         }
882
883         /// <summary>
884         /// The SelectionHandlePressedImageLeft property.<br />
885         /// The image to display when the left selection handle is pressed.<br />
886         /// The selectionHandlePressedImageLeft map contains the following key :<br />
887         /// <list type="table">
888         /// <item><term>filename (string)</term><description>The path of image file</description></item>
889         /// </list>
890         /// </summary>
891         /// <since_tizen> 3 </since_tizen>
892         public PropertyMap SelectionHandlePressedImageLeft
893         {
894             get
895             {
896                 return (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty);
897             }
898             set
899             {
900                 SetValue(SelectionHandlePressedImageLeftProperty, value);
901                 NotifyPropertyChanged();
902             }
903         }
904
905         /// <summary>
906         /// The SelectionHandlePressedImageRight property.<br />
907         /// The image to display when the right selection handle is pressed.<br />
908         /// The selectionHandlePressedImageRight map contains the following key :<br />
909         /// <list type="table">
910         /// <item><term>filename (string)</term><description>The path of image file</description></item>
911         /// </list>
912         /// </summary>
913         /// <since_tizen> 3 </since_tizen>
914         public PropertyMap SelectionHandlePressedImageRight
915         {
916             get
917             {
918                 return (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty);
919             }
920             set
921             {
922                 SetValue(SelectionHandlePressedImageRightProperty, value);
923                 NotifyPropertyChanged();
924             }
925         }
926
927         /// <summary>
928         /// Set SelectionHandlePressedImage to TextField. <br />
929         /// </summary>
930         /// <param name="selectionHandlePressedImage">The SelectionHandleImage</param>
931         /// <remarks>
932         /// SetSelectionHandlePressedImage specifies the display image used for the selection handle through <see cref="Tizen.NUI.Text.SelectionHandleImage"/>. <br />
933         /// </remarks>
934         /// <example>
935         /// The following example demonstrates how to use the SetSelectionHandlePressedImage method.
936         /// <code>
937         /// var selectionHandlePressedImage = new Tizen.NUI.Text.SelectionHandleImage();
938         /// selectionHandlePressedImage.LeftImageUrl = "handle_pressed_downleft.png";
939         /// selectionHandlePressedImage.RightImageUrl = "handle_pressed_downright.png";
940         /// field.SetSelectionHandlePressedImage(selectionHandlePressedImage);
941         /// </code>
942         /// </example>
943         [EditorBrowsable(EditorBrowsableState.Never)]
944         public void SetSelectionHandlePressedImage(SelectionHandleImage selectionHandlePressedImage)
945         {
946             if (!String.IsNullOrEmpty(selectionHandlePressedImage.LeftImageUrl))
947             {
948                 using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandlePressedImage.LeftImageUrl))
949                 {
950                     SetValue(SelectionHandlePressedImageLeftProperty, leftImageMap);
951                 }
952             }
953
954             if (!String.IsNullOrEmpty(selectionHandlePressedImage.RightImageUrl))
955             {
956                 using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandlePressedImage.RightImageUrl))
957                 {
958                     SetValue(SelectionHandlePressedImageRightProperty, rightImageMap);
959                 }
960             }
961         }
962
963         /// <summary>
964         /// Get SelectionHandlePressedImage from TextField. <br />
965         /// </summary>
966         /// <returns>The SelectionHandlePressedImage</returns>
967         /// <remarks>
968         /// <see cref="Tizen.NUI.Text.SelectionHandleImage"/>
969         /// </remarks>
970         [EditorBrowsable(EditorBrowsableState.Never)]
971         public SelectionHandleImage GetSelectionHandlePressedImage()
972         {
973             SelectionHandleImage selectionHandleImage;
974             using (var leftImageMap = (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty))
975             using (var rightImageMap = (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty))
976             {
977                 selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
978             }
979             return selectionHandleImage;
980         }
981
982         /// <summary>
983         /// The SelectionHandleMarkerImageLeft property.<br />
984         /// The image to display for the left selection handle marker.<br />
985         /// The selectionHandleMarkerImageLeft map contains the following key :<br />
986         /// <list type="table">
987         /// <item><term>filename (string)</term><description>The path of image file</description></item>
988         /// </list>
989         /// </summary>
990         /// <since_tizen> 3 </since_tizen>
991         public PropertyMap SelectionHandleMarkerImageLeft
992         {
993             get
994             {
995                 return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty);
996             }
997             set
998             {
999                 SetValue(SelectionHandleMarkerImageLeftProperty, value);
1000                 NotifyPropertyChanged();
1001             }
1002         }
1003
1004         /// <summary>
1005         /// The SelectionHandleMarkerImageRight property.<br />
1006         /// The image to display for the right selection handle marker.<br />
1007         /// The selectionHandleMarkerImageRight map contains the following key :<br />
1008         /// <list type="table">
1009         /// <item><term>filename (string)</term><description>The path of image file</description></item>
1010         /// </list>
1011         /// </summary>
1012         /// <since_tizen> 3 </since_tizen>
1013         public PropertyMap SelectionHandleMarkerImageRight
1014         {
1015             get
1016             {
1017                 return (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty);
1018             }
1019             set
1020             {
1021                 SetValue(SelectionHandleMarkerImageRightProperty, value);
1022                 NotifyPropertyChanged();
1023             }
1024         }
1025
1026         /// <summary>
1027         /// Set SelectionHandleMarkerImage to TextField. <br />
1028         /// </summary>
1029         /// <param name="selectionHandleMarkerImage">The SelectionHandleImage</param>
1030         /// <remarks>
1031         /// SetSelectionHandleMarkerImage specifies the display image used for the selection handle through <see cref="Tizen.NUI.Text.SelectionHandleImage"/>. <br />
1032         /// </remarks>
1033         /// <example>
1034         /// The following example demonstrates how to use the SetSelectionHandleMarkerImage method.
1035         /// <code>
1036         /// var selectionHandleMarkerImage = new Tizen.NUI.Text.SelectionHandleImage();
1037         /// selectionHandleMarkerImage.LeftImageUrl = "handle_pressed_downleft.png";
1038         /// selectionHandleMarkerImage.RightImageUrl = "handle_pressed_downright.png";
1039         /// field.SetSelectionHandleMarkerImage(selectionHandleMarkerImage);
1040         /// </code>
1041         /// </example>
1042         [EditorBrowsable(EditorBrowsableState.Never)]
1043         public void SetSelectionHandleMarkerImage(SelectionHandleImage selectionHandleMarkerImage)
1044         {
1045             if (!String.IsNullOrEmpty(selectionHandleMarkerImage.LeftImageUrl))
1046             {
1047                 using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.LeftImageUrl))
1048                 {
1049                     SetValue(SelectionHandleMarkerImageLeftProperty, leftImageMap);
1050                 }
1051             }
1052
1053             if (!String.IsNullOrEmpty(selectionHandleMarkerImage.RightImageUrl))
1054             {
1055                 using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.RightImageUrl))
1056                 {
1057                     SetValue(SelectionHandleMarkerImageRightProperty, rightImageMap);
1058                 }
1059             }
1060         }
1061
1062         /// <summary>
1063         /// Get SelectionHandleMarkerImage from TextField. <br />
1064         /// </summary>
1065         /// <returns>The SelectionHandleMarkerImage</returns>
1066         /// <remarks>
1067         /// <see cref="Tizen.NUI.Text.SelectionHandleImage"/>
1068         /// </remarks>
1069         [EditorBrowsable(EditorBrowsableState.Never)]
1070         public SelectionHandleImage GetSelectionHandleMarkerImage()
1071         {
1072             SelectionHandleImage selectionHandleImage;
1073             using (var leftImageMap = (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty))
1074             using (var rightImageMap = (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty))
1075             {
1076                 selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
1077             }
1078             return selectionHandleImage;
1079         }
1080
1081         /// <summary>
1082         /// The SelectionHighlightColor property.<br />
1083         /// The color of the selection highlight.<br />
1084         /// </summary>
1085         /// <remarks>
1086         /// The property cascade chaining set is possible. For example, this (textField.SelectionHighlightColor.X = 0.1f;) is possible.
1087         /// </remarks>
1088         /// <since_tizen> 3 </since_tizen>
1089         public Vector4 SelectionHighlightColor
1090         {
1091             get
1092             {
1093                 Vector4 temp = (Vector4)GetValue(SelectionHighlightColorProperty);
1094                 return new Vector4(OnSelectionHighlightColorChanged, temp.X, temp.Y, temp.Z, temp.W);
1095             }
1096             set
1097             {
1098                 SetValue(SelectionHighlightColorProperty, value);
1099                 NotifyPropertyChanged();
1100             }
1101         }
1102
1103         /// <summary>
1104         /// The DecorationBoundingBox property.<br />
1105         /// The decorations (handles etc) will positioned within this area on-screen.<br />
1106         /// </summary>
1107         /// <remarks>
1108         /// The property cascade chaining set is possible. For example, this (textField.DecorationBoundingBox.X = 0.1f;) is possible.
1109         /// </remarks>
1110         /// <since_tizen> 3 </since_tizen>
1111         public Rectangle DecorationBoundingBox
1112         {
1113             get
1114             {
1115                 Rectangle temp = (Rectangle)GetValue(DecorationBoundingBoxProperty);
1116                 return new Rectangle(OnDecorationBoundingBoxChanged, temp.X, temp.Y, temp.Width, temp.Height);
1117             }
1118             set
1119             {
1120                 SetValue(DecorationBoundingBoxProperty, value);
1121                 NotifyPropertyChanged();
1122             }
1123         }
1124
1125         /// <summary>
1126         /// The InputMethodSettings property.<br />
1127         /// The settings to relating to the System's Input Method, Key and Value.<br />
1128         /// </summary>
1129         /// <remarks>
1130         /// <see cref="InputMethod"/> is a class encapsulating the input method map. Please use the <see cref="InputMethod"/> class for this property.
1131         /// </remarks>
1132         /// <example>
1133         /// The following example demonstrates how to set the InputMethodSettings property.
1134         /// <code>
1135         /// InputMethod method = new InputMethod();
1136         /// method.PanelLayout = InputMethod.PanelLayoutType.Normal;
1137         /// method.ActionButton = InputMethod.ActionButtonTitleType.Default;
1138         /// method.AutoCapital = InputMethod.AutoCapitalType.Word;
1139         /// method.Variation = 1;
1140         /// textField.InputMethodSettings = method.OutputMap;
1141         /// </code>
1142         /// </example>
1143         /// <since_tizen> 3 </since_tizen>
1144         public PropertyMap InputMethodSettings
1145         {
1146             get
1147             {
1148                 return (PropertyMap)GetValue(InputMethodSettingsProperty);
1149             }
1150             set
1151             {
1152                 SetValue(InputMethodSettingsProperty, value);
1153                 NotifyPropertyChanged();
1154             }
1155         }
1156
1157         /// <summary>
1158         /// The InputColor property.<br />
1159         /// The color of the new input text.<br />
1160         /// </summary>
1161         /// <remarks>
1162         /// The property cascade chaining set is possible. For example, this (textField.InputColor.X = 0.1f;) is possible.
1163         /// </remarks>
1164         /// <since_tizen> 3 </since_tizen>
1165         public Vector4 InputColor
1166         {
1167             get
1168             {
1169                 Vector4 temp = (Vector4)GetValue(InputColorProperty);
1170                 return new Vector4(OnInputColorChanged, temp.X, temp.Y, temp.Z, temp.W);
1171             }
1172             set
1173             {
1174                 SetValue(InputColorProperty, value);
1175                 NotifyPropertyChanged();
1176             }
1177         }
1178
1179         /// <summary>
1180         /// The EnableMarkup property.<br />
1181         /// Whether the mark-up processing is enabled.<br />
1182         /// </summary>
1183         /// <since_tizen> 3 </since_tizen>
1184         public bool EnableMarkup
1185         {
1186             get
1187             {
1188                 return (bool)GetValue(EnableMarkupProperty);
1189             }
1190             set
1191             {
1192                 SetValue(EnableMarkupProperty, value);
1193                 NotifyPropertyChanged();
1194             }
1195         }
1196
1197         /// <summary>
1198         /// The InputFontFamily property.<br />
1199         /// The font's family of the new input text.<br />
1200         /// </summary>
1201         /// <since_tizen> 3 </since_tizen>
1202         public string InputFontFamily
1203         {
1204             get
1205             {
1206                 return (string)GetValue(InputFontFamilyProperty);
1207             }
1208             set
1209             {
1210                 SetValue(InputFontFamilyProperty, value);
1211                 NotifyPropertyChanged();
1212             }
1213         }
1214
1215         /// <summary>
1216         /// The InputFontStyle property.<br />
1217         /// The font's style of the new input text.<br />
1218         /// The inputFontStyle map contains the following keys :<br />
1219         /// <list type="table">
1220         /// <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>
1221         /// <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>
1222         /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
1223         /// </list>
1224         /// </summary>
1225         /// <since_tizen> 3 </since_tizen>
1226         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1227         public PropertyMap InputFontStyle
1228         {
1229             get
1230             {
1231                 return (PropertyMap)GetValue(InputFontStyleProperty);
1232             }
1233             set
1234             {
1235                 SetValue(InputFontStyleProperty, value);
1236                 NotifyPropertyChanged();
1237             }
1238         }
1239
1240         /// <summary>
1241         /// Set InputFontStyle to TextField. <br />
1242         /// </summary>
1243         /// <param name="fontStyle">The FontStyle</param>
1244         /// <remarks>
1245         /// SetInputFontStyle specifies the requested font style for new input text through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
1246         /// </remarks>
1247         /// <example>
1248         /// The following example demonstrates how to use the SetInputFontStyle method.
1249         /// <code>
1250         /// var fontStyle = new Tizen.NUI.Text.FontStyle();
1251         /// fontStyle.Width = FontWidthType.Expanded;
1252         /// fontStyle.Weight = FontWeightType.Bold;
1253         /// fontStyle.Slant = FontSlantType.Italic;
1254         /// field.SetInputFontStyle(fontStyle);
1255         /// </code>
1256         /// </example>
1257         [EditorBrowsable(EditorBrowsableState.Never)]
1258         public void SetInputFontStyle(FontStyle fontStyle)
1259         {
1260             using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
1261             {
1262                 SetValue(InputFontStyleProperty, fontStyleMap);
1263             }
1264         }
1265
1266         /// <summary>
1267         /// Get InputFontStyle from TextField. <br />
1268         /// </summary>
1269         /// <returns>The FontStyle</returns>
1270         /// <remarks>
1271         /// <see cref="Tizen.NUI.Text.FontStyle"/>
1272         /// </remarks>
1273         [EditorBrowsable(EditorBrowsableState.Never)]
1274         public FontStyle GetInputFontStyle()
1275         {
1276             FontStyle fontStyle;
1277             using (var fontStyleMap = (PropertyMap)GetValue(InputFontStyleProperty))
1278             {
1279                 fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
1280             }
1281             return fontStyle;
1282         }
1283
1284         /// <summary>
1285         /// The InputPointSize property.<br />
1286         /// The font's size of the new input text in points.<br />
1287         /// </summary>
1288         /// <since_tizen> 3 </since_tizen>
1289         public float InputPointSize
1290         {
1291             get
1292             {
1293                 return (float)GetValue(InputPointSizeProperty);
1294             }
1295             set
1296             {
1297                 SetValue(InputPointSizeProperty, value);
1298                 NotifyPropertyChanged();
1299             }
1300         }
1301
1302         /// <summary>
1303         /// The Underline property.<br />
1304         /// The default underline parameters.<br />
1305         /// The underline map contains the following keys :<br />
1306         /// <list type="table">
1307         /// <item><term>enable (bool)</term><description>Whether the underline is enabled (the default value is false)</description></item>
1308         /// <item><term>color (Color)</term><description>The color of the underline (If not provided then the color of the text is used)</description></item>
1309         /// <item><term>height (float)</term><description>The height in pixels of the underline (the default value is 1.f)</description></item>
1310         /// </list>
1311         /// </summary>
1312         /// <since_tizen> 3 </since_tizen>
1313         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1314         public PropertyMap Underline
1315         {
1316             get
1317             {
1318                 return (PropertyMap)GetValue(UnderlineProperty);
1319             }
1320             set
1321             {
1322                 SetValue(UnderlineProperty, value);
1323                 NotifyPropertyChanged();
1324             }
1325         }
1326
1327         /// <summary>
1328         /// Set Underline to TextField. <br />
1329         /// </summary>
1330         /// <param name="underline">The Underline</param>
1331         /// <remarks>
1332         /// SetUnderline specifies the underline of the text through <see cref="Tizen.NUI.Text.Underline"/>. <br />
1333         /// </remarks>
1334         /// <example>
1335         /// The following example demonstrates how to use the SetUnderline method.
1336         /// <code>
1337         /// var underline = new Tizen.NUI.Text.Underline();
1338         /// underline.Enable = true;
1339         /// underline.Color = new Color("#3498DB");
1340         /// underline.Height = 2.0f;
1341         /// field.SetUnderline(underline);
1342         /// </code>
1343         /// </example>
1344         [EditorBrowsable(EditorBrowsableState.Never)]
1345         public void SetUnderline(Underline underline)
1346         {
1347             using (var underlineMap = TextMapHelper.GetUnderlineMap(underline))
1348             {
1349                 SetValue(UnderlineProperty, underlineMap);
1350             }
1351         }
1352
1353         /// <summary>
1354         /// Get Underline from TextField. <br />
1355         /// </summary>
1356         /// <returns>The Underline</returns>
1357         /// <remarks>
1358         /// <see cref="Tizen.NUI.Text.Underline"/>
1359         /// </remarks>
1360         [EditorBrowsable(EditorBrowsableState.Never)]
1361         public Underline GetUnderline()
1362         {
1363             Underline underline;
1364             using (var underlineMap = (PropertyMap)GetValue(UnderlineProperty))
1365             {
1366                 underline = TextMapHelper.GetUnderlineStruct(underlineMap);
1367             }
1368             return underline;
1369         }
1370
1371         /// <summary>
1372         /// The InputUnderline property.<br />
1373         /// The underline parameters of the new input text.<br />
1374         /// </summary>
1375         /// <since_tizen> 3 </since_tizen>
1376         public string InputUnderline
1377         {
1378             get
1379             {
1380                 return (string)GetValue(InputUnderlineProperty);
1381             }
1382             set
1383             {
1384                 SetValue(InputUnderlineProperty, value);
1385                 NotifyPropertyChanged();
1386             }
1387         }
1388
1389         /// <summary>
1390         /// The Shadow property.<br />
1391         /// The default shadow parameters.<br />
1392         /// The shadow map contains the following keys :<br />
1393         /// <list type="table">
1394         /// <item><term>color (Color)</term><description>The color of the shadow (the default color is Color.Black)</description></item>
1395         /// <item><term>offset (Vector2)</term><description>The offset in pixels of the shadow (If not provided then the shadow is not enabled)</description></item>
1396         /// <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>
1397         /// </list>
1398         /// </summary>
1399         /// <since_tizen> 3 </since_tizen>
1400         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1401         public PropertyMap Shadow
1402         {
1403             get
1404             {
1405                 return (PropertyMap)GetValue(ShadowProperty);
1406             }
1407             set
1408             {
1409                 SetValue(ShadowProperty, value);
1410                 NotifyPropertyChanged();
1411             }
1412         }
1413
1414         /// <summary>
1415         /// Set Shadow to TextField. <br />
1416         /// </summary>
1417         /// <param name="shadow">The Shadow</param>
1418         /// <remarks>
1419         /// SetShadow specifies the shadow of the text through <see cref="Tizen.NUI.Text.Shadow"/>. <br />
1420         /// </remarks>
1421         /// <example>
1422         /// The following example demonstrates how to use the SetShadow method.
1423         /// <code>
1424         /// var shadow = new Tizen.NUI.Text.Shadow();
1425         /// shadow.Offset = new Vector2(3, 3);
1426         /// shadow.Color = new Color("#F1C40F");
1427         /// field.SetShadow(shadow);
1428         /// </code>
1429         /// </example>
1430         [EditorBrowsable(EditorBrowsableState.Never)]
1431         public void SetShadow(Tizen.NUI.Text.Shadow shadow)
1432         {
1433             using (var shadowMap = TextMapHelper.GetShadowMap(shadow))
1434             {
1435                 SetValue(ShadowProperty, shadowMap);
1436             }
1437         }
1438
1439         /// <summary>
1440         /// Get Shadow from TextField. <br />
1441         /// </summary>
1442         /// <returns>The Shadow</returns>
1443         /// <remarks>
1444         /// <see cref="Tizen.NUI.Text.Shadow"/>
1445         /// </remarks>
1446         [EditorBrowsable(EditorBrowsableState.Never)]
1447         public Tizen.NUI.Text.Shadow GetShadow()
1448         {
1449             Tizen.NUI.Text.Shadow shadow;
1450             using (var shadowMap = (PropertyMap)GetValue(ShadowProperty))
1451             {
1452                 shadow = TextMapHelper.GetShadowStruct(shadowMap);
1453             }
1454             return shadow;
1455         }
1456
1457         /// <summary>
1458         /// The InputShadow property.<br />
1459         /// The shadow parameters of the new input text.<br />
1460         /// </summary>
1461         /// <since_tizen> 3 </since_tizen>
1462         public string InputShadow
1463         {
1464             get
1465             {
1466                 return (string)GetValue(InputShadowProperty);
1467             }
1468             set
1469             {
1470                 SetValue(InputShadowProperty, value);
1471                 NotifyPropertyChanged();
1472             }
1473         }
1474
1475         /// <summary>
1476         /// The Emboss property.<br />
1477         /// The default emboss parameters.<br />
1478         /// </summary>
1479         /// <since_tizen> 3 </since_tizen>
1480         public string Emboss
1481         {
1482             get
1483             {
1484                 return (string)GetValue(EmbossProperty);
1485             }
1486             set
1487             {
1488                 SetValue(EmbossProperty, value);
1489                 NotifyPropertyChanged();
1490             }
1491         }
1492
1493         /// <summary>
1494         /// The InputEmboss property.<br />
1495         /// The emboss parameters of the new input text.<br />
1496         /// </summary>
1497         /// <since_tizen> 3 </since_tizen>
1498         public string InputEmboss
1499         {
1500             get
1501             {
1502                 return (string)GetValue(InputEmbossProperty);
1503             }
1504             set
1505             {
1506                 SetValue(InputEmbossProperty, value);
1507                 NotifyPropertyChanged();
1508             }
1509         }
1510
1511         /// <summary>
1512         /// The Outline property.<br />
1513         /// The default outline parameters.<br />
1514         /// The outline map contains the following keys :<br />
1515         /// <list type="table">
1516         /// <item><term>color (Color)</term><description>The color of the outline (the default color is Color.White)</description></item>
1517         /// <item><term>width (float)</term><description>The width in pixels of the outline (If not provided then the outline is not enabled)</description></item>
1518         /// </list>
1519         /// </summary>
1520         /// <since_tizen> 3 </since_tizen>
1521         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1522         public PropertyMap Outline
1523         {
1524             get
1525             {
1526                 return (PropertyMap)GetValue(OutlineProperty);
1527             }
1528             set
1529             {
1530                 SetValue(OutlineProperty, value);
1531                 NotifyPropertyChanged();
1532             }
1533         }
1534
1535         /// <summary>
1536         /// Set Outline to TextField. <br />
1537         /// </summary>
1538         /// <param name="outline">The Outline</param>
1539         /// <remarks>
1540         /// SetOutline specifies the outline of the text through <see cref="Tizen.NUI.Text.Outline"/>. <br />
1541         /// </remarks>
1542         /// <example>
1543         /// The following example demonstrates how to use the SetOutline method.
1544         /// <code>
1545         /// var outline = new Tizen.NUI.Text.Outline();
1546         /// outline.Width = 2.0f;
1547         /// outline.Color = new Color("#45B39D");
1548         /// field.SetOutline(outline);
1549         /// </code>
1550         /// </example>
1551         [EditorBrowsable(EditorBrowsableState.Never)]
1552         public void SetOutline(Outline outline)
1553         {
1554             using (var outlineMap = TextMapHelper.GetOutlineMap(outline))
1555             {
1556                 SetValue(OutlineProperty, outlineMap);
1557             }
1558         }
1559
1560         /// <summary>
1561         /// Get Outline from TextField. <br />
1562         /// </summary>
1563         /// <returns>The Outline</returns>
1564         /// <remarks>
1565         /// <see cref="Tizen.NUI.Text.Outline"/>
1566         /// </remarks>
1567         [EditorBrowsable(EditorBrowsableState.Never)]
1568         public Outline GetOutline()
1569         {
1570             Outline outline;
1571             using (var outlineMap = (PropertyMap)GetValue(OutlineProperty))
1572             {
1573                 outline = TextMapHelper.GetOutlineStruct(outlineMap);
1574             }
1575             return outline;
1576         }
1577
1578         /// <summary>
1579         /// The InputOutline property.<br />
1580         /// The outline parameters of the new input text.<br />
1581         /// </summary>
1582         /// <since_tizen> 3 </since_tizen>
1583         public string InputOutline
1584         {
1585             get
1586             {
1587                 return (string)GetValue(InputOutlineProperty);
1588             }
1589             set
1590             {
1591                 SetValue(InputOutlineProperty, value);
1592                 NotifyPropertyChanged();
1593             }
1594         }
1595
1596         /// <summary>
1597         /// The HiddenInputSettings property.<br />
1598         /// Hides the input characters and instead shows a default character for password or pin entry.<br />
1599         /// The hiddenInputSettings map contains the following keys :<br />
1600         /// <list type="table">
1601         /// <item><term>HiddenInputProperty.Mode (int)</term><description>The mode for input text display (Use HiddenInputModeType)</description></item>
1602         /// <item><term>HiddenInputProperty.SubstituteCharacter (int)</term><description>All input characters are substituted by this character</description></item>
1603         /// <item><term>HiddenInputProperty.SubstituteCount (int)</term><description>Length of text to show or hide, available when HideCount/ShowCount mode is used</description></item>
1604         /// <item><term>HiddenInputProperty.ShowLastCharacterDuration (int)</term><description>Hide last character after this duration, available when ShowLastCharacter mode</description></item>
1605         /// </list>
1606         /// </summary>
1607         /// <remarks>
1608         /// See <see cref="HiddenInputProperty"/> and <see cref="HiddenInputModeType"/> for a detailed description.
1609         /// </remarks>
1610         /// <example>
1611         /// The following example demonstrates how to set the HiddenInputSettings property.
1612         /// <code>
1613         /// PropertyMap map = new PropertyMap();
1614         /// map.Add(HiddenInputProperty.Mode, new PropertyValue((int)HiddenInputModeType.ShowLastCharacter));
1615         /// map.Add(HiddenInputProperty.ShowLastCharacterDuration, new PropertyValue(500));
1616         /// map.Add(HiddenInputProperty.SubstituteCharacter, new PropertyValue(0x2A));
1617         /// textField.HiddenInputSettings = map;
1618         /// </code>
1619         /// </example>
1620         /// <since_tizen> 3 </since_tizen>
1621         public Tizen.NUI.PropertyMap HiddenInputSettings
1622         {
1623             get
1624             {
1625                 return (PropertyMap)GetValue(HiddenInputSettingsProperty);
1626             }
1627             set
1628             {
1629                 SetValue(HiddenInputSettingsProperty, value);
1630                 NotifyPropertyChanged();
1631             }
1632         }
1633
1634         /// <summary>
1635         /// Set HiddenInput to TextField. <br />
1636         /// </summary>
1637         /// <param name="hiddenInput">The HiddenInput</param>
1638         /// <remarks>
1639         /// SetHiddenInput specifies the requested font style through <see cref="Tizen.NUI.Text.HiddenInput"/>. <br />
1640         /// </remarks>
1641         /// <example>
1642         /// The following example demonstrates how to use the SetHiddenInput method.
1643         /// <code>
1644         /// var hiddenInput = new Tizen.NUI.Text.HiddenInput();
1645         /// hiddenInput.Mode = HiddenInputModeType.ShowLastCharacter;
1646         /// hiddenInput.SubstituteCharacter = '★';
1647         /// hiddenInput.SubstituteCount = 0;
1648         /// hiddenInput.ShowLastCharacterDuration = 1000;
1649         /// field.SetHiddenInput(hiddenInput);
1650         /// </code>
1651         /// </example>
1652         [EditorBrowsable(EditorBrowsableState.Never)]
1653         public void SetHiddenInput(HiddenInput hiddenInput)
1654         {
1655             using (var hiddenInputMap = TextMapHelper.GetHiddenInputMap(hiddenInput))
1656             {
1657                 SetValue(HiddenInputSettingsProperty, hiddenInputMap);
1658             }
1659         }
1660
1661         /// <summary>
1662         /// Get HiddenInput from TextField. <br />
1663         /// </summary>
1664         /// <returns>The HiddenInput</returns>
1665         /// <remarks>
1666         /// <see cref="Tizen.NUI.Text.HiddenInput"/>
1667         /// </remarks>
1668         [EditorBrowsable(EditorBrowsableState.Never)]
1669         public HiddenInput GetHiddenInput()
1670         {
1671             HiddenInput hiddenInput;
1672             using (var hiddenInputMap = (PropertyMap)GetValue(HiddenInputSettingsProperty))
1673             {
1674                 hiddenInput = TextMapHelper.GetHiddenInputStruct(hiddenInputMap);
1675             }
1676             return hiddenInput;
1677         }
1678
1679         /// <summary>
1680         /// The PixelSize property.<br />
1681         /// The size of font in pixels.<br />
1682         /// </summary>
1683         /// <since_tizen> 3 </since_tizen>
1684         public float PixelSize
1685         {
1686             get
1687             {
1688                 return (float)GetValue(PixelSizeProperty);
1689             }
1690             set
1691             {
1692                 SetValue(PixelSizeProperty, value);
1693                 NotifyPropertyChanged();
1694             }
1695         }
1696
1697         /// <summary>
1698         /// The Enable selection property.<br />
1699         /// Enables Text selection, such as the cursor, handle, clipboard, and highlight color.<br />
1700         /// </summary>
1701         /// <since_tizen> 3 </since_tizen>
1702         public bool EnableSelection
1703         {
1704             get
1705             {
1706                 return (bool)GetValue(EnableSelectionProperty);
1707             }
1708             set
1709             {
1710                 SetValue(EnableSelectionProperty, value);
1711                 NotifyPropertyChanged();
1712             }
1713         }
1714
1715         /// <summary>
1716         /// The Enable grab handle property.<br />
1717         /// Enables the grab handles for text selection.<br />
1718         /// The default value is true, which means the grab handles are enabled by default.<br />
1719         /// </summary>
1720         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
1721         [EditorBrowsable(EditorBrowsableState.Never)]
1722         public bool EnableGrabHandle
1723         {
1724             get
1725             {
1726                 return (bool)GetValue(EnableGrabHandleProperty);
1727             }
1728             set
1729             {
1730                 SetValue(EnableGrabHandleProperty, value);
1731                 NotifyPropertyChanged();
1732             }
1733         }
1734
1735         /// <summary>
1736         /// The Enable grab handle popup property.<br />
1737         /// Enables the grab handle popup for text selection.<br />
1738         /// The default value is true, which means the grab handle popup is enabled by default.<br />
1739         /// </summary>
1740         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
1741         [EditorBrowsable(EditorBrowsableState.Never)]
1742         public bool EnableGrabHandlePopup
1743         {
1744             get
1745             {
1746                 return (bool)GetValue(EnableGrabHandlePopupProperty);
1747             }
1748             set
1749             {
1750                 SetValue(EnableGrabHandlePopupProperty, value);
1751                 NotifyPropertyChanged();
1752             }
1753         }
1754
1755         /// <summary>
1756         /// The portion of the text that has been selected by the user.
1757         /// </summary>
1758         /// <remarks>
1759         /// Empty string when nothing is selected.
1760         /// </remarks>
1761         /// <since_tizen> 9 </since_tizen>
1762         public string SelectedText
1763         {
1764             get
1765             {
1766                 string selectedText;
1767                 using (var propertyValue = GetProperty(TextField.Property.SelectedText))
1768                 {
1769                     propertyValue.Get(out selectedText);
1770                 }                
1771                 return selectedText;
1772             }
1773         }
1774
1775         /// <summary>
1776         /// The start index for selection.
1777         /// </summary>
1778         /// <remarks>
1779         /// When there is no selection, the index is current cursor position.
1780         /// </remarks>
1781         /// <since_tizen> 9 </since_tizen>
1782         public int SelectedTextStart
1783         {
1784             get
1785             {
1786                 int selectedTextStart;
1787                 using (var propertyValue = GetProperty(TextField.Property.SelectedTextStart))
1788                 {
1789                     propertyValue.Get(out selectedTextStart);
1790                 }                
1791                 return selectedTextStart;
1792             }
1793         }
1794
1795         /// <summary>
1796         /// The end index for selection.
1797         /// </summary>
1798         /// <remarks>
1799         /// When there is no selection, the index is current cursor position.
1800         /// </remarks>
1801         /// <since_tizen> 9 </since_tizen>
1802         public int SelectedTextEnd
1803         {
1804             get
1805             {
1806                 int selectedTextEnd;
1807                 using (var propertyValue = GetProperty(TextField.Property.SelectedTextEnd))
1808                 {
1809                     propertyValue.Get(out selectedTextEnd);
1810                 }                
1811                 return selectedTextEnd;
1812             }
1813         }
1814
1815         /// <summary>
1816         /// Enable editing in text control.
1817         /// </summary>
1818         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
1819         [EditorBrowsable(EditorBrowsableState.Never)]
1820         public bool EnableEditing
1821         {
1822             get
1823             {
1824                 return (bool)GetValue(EnableEditingProperty);
1825             }
1826             set
1827             {
1828                 SetValue(EnableEditingProperty, value);
1829             }
1830         }
1831
1832         private bool InternalEnableEditing
1833         {
1834             get
1835             {
1836                 bool enableEditing;
1837                 using (var propertyValue = GetProperty(TextField.Property.EnableEditing))
1838                 {
1839                     propertyValue.Get(out enableEditing);
1840                 }
1841                 return enableEditing;
1842             }
1843             set
1844             {
1845                 using (var propertyValue = new PropertyValue(value))
1846                 {
1847                     SetProperty(TextField.Property.EnableEditing, propertyValue);
1848                     NotifyPropertyChanged();
1849                 }
1850             }
1851         }
1852
1853         /// <summary>
1854         /// Specify primary cursor (caret) position in text control.
1855         /// </summary>
1856         [EditorBrowsable(EditorBrowsableState.Never)]
1857         public int PrimaryCursorPosition
1858         {
1859             get
1860             {
1861                 return (int)GetValue(PrimaryCursorPositionProperty);
1862             }
1863             set
1864             {
1865                 SetValue(PrimaryCursorPositionProperty, value);
1866             }
1867         }
1868
1869         private int InternalPrimaryCursorPosition
1870         {
1871             get
1872             {
1873                 int primaryCursorPosition;
1874                 using (var propertyValue = GetProperty(TextField.Property.PrimaryCursorPosition))
1875                 {
1876                     propertyValue.Get(out primaryCursorPosition);
1877                 }
1878                 return primaryCursorPosition;
1879             }
1880             set
1881             {
1882                 using (PropertyValue propertyValue = new PropertyValue(value))
1883                 {
1884                     SetProperty(TextField.Property.PrimaryCursorPosition, propertyValue);
1885                     NotifyPropertyChanged();
1886                 }
1887             }
1888         }
1889
1890         /// <summary>
1891         /// The GrabHandleColor property.
1892         /// </summary>
1893         /// <remarks>
1894         /// The property cascade chaining set is possible. For example, this (textField.GrabHandleColor.X = 0.1f;) is possible.
1895         /// </remarks>
1896         [EditorBrowsable(EditorBrowsableState.Never)]
1897         public Color GrabHandleColor
1898         {
1899             get
1900             {
1901                 Color temp = (Color)GetValue(GrabHandleColorProperty);
1902                 return new Color(OnGrabHandleColorChanged, temp.R, temp.G, temp.B, temp.A);
1903             }
1904             set
1905             {
1906                 SetValue(GrabHandleColorProperty, value);
1907                 NotifyPropertyChanged();
1908             }
1909         }
1910
1911         /// <summary>
1912         /// The ellipsis position of the text.
1913         /// Specifies which portion of the text should be replaced with an ellipsis when the text size exceeds the layout size.<br />
1914         /// </summary>
1915         /// <since_tizen> 9 </since_tizen>
1916         public EllipsisPosition EllipsisPosition
1917         {
1918             get
1919             {
1920                 return (EllipsisPosition)GetValue(EllipsisPositionProperty);
1921             }
1922             set
1923             {
1924                 SetValue(EllipsisPositionProperty, value);
1925                 NotifyPropertyChanged();
1926             }
1927         }
1928
1929         /// <summary>
1930         /// Set InputFilter to TextField.
1931         /// </summary>
1932         /// <param name="inputFilter">The InputFilter</param>
1933         /// <remarks>
1934         /// <see cref="Tizen.NUI.Text.InputFilter"/> filters input based on regular expressions. <br />
1935         /// InputFiltered signal is emitted when the input is filtered by InputFilter <br />
1936         /// See <see cref="InputFiltered"/>, <see cref="InputFilterType"/> and <see cref="InputFilteredEventArgs"/> for a detailed description.
1937         /// </remarks>
1938         /// <example>
1939         /// The following example demonstrates how to use the SetInputFilter method.
1940         /// <code>
1941         /// var inputFilter = new Tizen.NUI.Text.InputFilter();
1942         /// inputFilter.Accepted = @"[\d]"; // accept whole digits
1943         /// inputFilter.Rejected = "[0-3]"; // reject 0, 1, 2, 3
1944         /// field.SetInputFilter(inputFilter); // acceptable inputs are 4, 5, 6, 7, 8, 9
1945         /// </code>
1946         /// </example>
1947         /// <since_tizen> 9 </since_tizen>
1948         public void SetInputFilter(InputFilter inputFilter)
1949         {
1950             using (var map = TextMapHelper.GetInputFilterMap(inputFilter))
1951             using (var propertyValue = new PropertyValue(map))
1952             {
1953                 SetProperty(TextField.Property.InputFilter, propertyValue);
1954             }
1955         }
1956
1957         /// <summary>
1958         /// Get InputFilter from TextField.
1959         /// </summary>
1960         /// <returns>The InputFilter</returns>
1961         /// <remarks>
1962         /// <see cref="Tizen.NUI.Text.InputFilter"/>
1963         /// </remarks>
1964         /// <since_tizen> 9 </since_tizen>
1965         public InputFilter GetInputFilter()
1966         {
1967             InputFilter inputFilter;
1968             using (var propertyValue = GetProperty(TextField.Property.InputFilter))
1969             using (var map = new PropertyMap())
1970             {
1971                 propertyValue.Get(map);
1972                 inputFilter = TextMapHelper.GetInputFilterStruct(map);
1973             }
1974             return inputFilter;
1975         }
1976
1977         /// <summary>
1978         /// The Placeholder property.
1979         /// The placeholder map contains the following keys :<br />
1980         /// <list type="table">
1981         /// <item><term>text (string)</term><description>The text to display when the TextField is empty and inactive</description></item>
1982         /// <item><term>textFocused (string)</term><description>The text to display when the placeholder has focus</description></item>
1983         /// <item><term>color (Color)</term><description>The color of the placeholder text</description></item>
1984         /// <item><term>fontFamily (string)</term><description>The fontFamily of the placeholder text</description></item>
1985         /// <item><term>fontStyle (PropertyMap)</term><description>The fontStyle of the placeholder text</description></item>
1986         /// <item><term>pointSize (float)</term><description>The pointSize of the placeholder text</description></item>
1987         /// <item><term>pixelSize (float)</term><description>The pixelSize of the placeholder text</description></item>
1988         /// <item><term>ellipsis (bool)</term><description>The ellipsis of the placeholder text</description></item>
1989         /// </list>
1990         /// </summary>
1991         /// <example>
1992         /// The following example demonstrates how to set the Placeholder property.
1993         /// <code>
1994         /// PropertyMap propertyMap = new PropertyMap();
1995         /// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
1996         /// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
1997         /// propertyMap.Add("color", new PropertyValue(Color.Red));
1998         /// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
1999         /// propertyMap.Add("pointSize", new PropertyValue(12.0f));
2000         ///
2001         /// PropertyMap fontStyleMap = new PropertyMap();
2002         /// fontStyleMap.Add("weight", new PropertyValue("bold"));
2003         /// fontStyleMap.Add("width", new PropertyValue("condensed"));
2004         /// fontStyleMap.Add("slant", new PropertyValue("italic"));
2005         /// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
2006         ///
2007         /// TextField field = new TextField();
2008         /// field.Placeholder = propertyMap;
2009         /// </code>
2010         /// </example>
2011         /// <since_tizen> 3 </since_tizen>
2012         [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
2013         public Tizen.NUI.PropertyMap Placeholder
2014         {
2015             get
2016             {
2017                 PropertyMap map = (PropertyMap)GetValue(PlaceholderProperty);
2018                 string defalutText = "";
2019
2020                 if (TextMapHelper.IsValue(map, 0))
2021                     map.Add("text", TextMapHelper.GetStringFromMap(map, 0, defalutText));
2022
2023                 if (TextMapHelper.IsValue(map, 1))
2024                     map.Add("textFocused", TextMapHelper.GetStringFromMap(map, 1, defalutText));
2025                 
2026                 if (TextMapHelper.IsValue(map, 2))
2027                 {
2028                     using (var color = TextMapHelper.GetColorFromMap(map, 2))
2029                     {
2030                         map.Add("color", color);
2031                     }
2032                 }
2033
2034                 if (TextMapHelper.IsValue(map, 3))
2035                     map.Add("fontFamily", TextMapHelper.GetStringFromMap(map, 3, defalutText));
2036
2037                 if (TextMapHelper.IsValue(map, 4))
2038                 {
2039                     using (var properyValue = map.Find(4))
2040                     using (var fontStyle = new PropertyMap())
2041                     {
2042                         properyValue.Get(fontStyle);
2043                         using (var fontStyleValue = new PropertyValue(fontStyle))
2044                         {
2045                             map.Add("fontStyle", fontStyleValue);
2046                         }
2047                     }
2048                 }
2049
2050                 if (TextMapHelper.IsValue(map, 5))
2051                     map.Add("pointSize", TextMapHelper.GetNullableFloatFromMap(map, 5));
2052                 
2053                 if (TextMapHelper.IsValue(map, 6))
2054                     map.Add("pixelSize", TextMapHelper.GetNullableFloatFromMap(map, 6));
2055                 
2056                 if (TextMapHelper.IsValue(map, 7))
2057                     map.Add("ellipsis", TextMapHelper.GetBoolFromMap(map, 7, false));
2058
2059                 return map;
2060             }
2061             set
2062             {
2063                 SetValue(PlaceholderProperty, value);
2064                 NotifyPropertyChanged();
2065             }
2066         }
2067
2068         /// <summary>
2069         /// Set Placeholder to TextField. <br />
2070         /// </summary>
2071         /// <param name="placeholder">The Placeholder</param>
2072         /// <remarks>
2073         /// SetPlaceholder specifies the attributes of the placeholder property through <see cref="Tizen.NUI.Text.Placeholder"/>. <br />
2074         /// </remarks>
2075         /// <example>
2076         /// The following example demonstrates how to use the SetPlaceholder method.
2077         /// <code>
2078         /// var placeholder = new Tizen.NUI.Text.Placeholder();
2079         /// placeholder.Text = "placeholder text";
2080         /// placeholder.TextFocused = "placeholder textFocused";
2081         /// placeholder.Color = new Color("#45B39D");
2082         /// placeholder.FontFamily = "BreezeSans";
2083         /// placeholder.FontStyle = new Tizen.NUI.Text.FontStyle()
2084         /// {
2085         ///     Width = FontWidthType.Expanded,
2086         ///     Weight = FontWeightType.ExtraLight,
2087         ///     Slant = FontSlantType.Italic,
2088         /// };
2089         /// placeholder.PointSize = 25.0f;
2090         /// //placeholder.PixelSize = 50.0f;
2091         /// placeholder.Ellipsis = true;
2092         /// field.SetPlaceholder(placeholder);
2093         /// </code>
2094         /// </example>
2095         [EditorBrowsable(EditorBrowsableState.Never)]
2096         public void SetPlaceholder(Placeholder placeholder)
2097         {
2098             using (var placeholderMap = TextMapHelper.GetPlaceholderMap(placeholder))
2099             {
2100                 SetValue(PlaceholderProperty, placeholderMap);
2101             }
2102         }
2103
2104         /// <summary>
2105         /// Get Placeholder from TextField. <br />
2106         /// </summary>
2107         /// <returns>The Placeholder</returns>
2108         /// <remarks>
2109         /// <see cref="Tizen.NUI.Text.Placeholder"/>
2110         /// </remarks>
2111         [EditorBrowsable(EditorBrowsableState.Never)]
2112         public Placeholder GetPlaceholder()
2113         {
2114             Placeholder placeholder;
2115             using (var placeholderMap = (PropertyMap)GetValue(PlaceholderProperty))
2116             {
2117                 placeholder = TextMapHelper.GetPlaceholderStruct(placeholderMap);
2118             }
2119             return placeholder;
2120         }
2121
2122         /// <summary>
2123         /// The Ellipsis property.<br />
2124         /// Enable or disable the ellipsis.<br />
2125         /// Placeholder PropertyMap is used to add ellipsis to placeholder text.
2126         /// </summary>
2127         /// <since_tizen> 4 </since_tizen>
2128         public bool Ellipsis
2129         {
2130             get
2131             {
2132                 return (bool)GetValue(EllipsisProperty);
2133             }
2134             set
2135             {
2136                 SetValue(EllipsisProperty, value);
2137                 NotifyPropertyChanged();
2138             }
2139         }
2140
2141         /// <summary>
2142         /// Enables selection of the text using the Shift key.
2143         /// </summary>
2144         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
2145         [EditorBrowsable(EditorBrowsableState.Never)]
2146         public bool EnableShiftSelection
2147         {
2148             get
2149             {
2150                 return (bool)GetValue(EnableShiftSelectionProperty);
2151             }
2152             set
2153             {
2154                 SetValue(EnableShiftSelectionProperty, value);
2155                 NotifyPropertyChanged();
2156             }
2157         }
2158
2159         /// <summary>
2160         /// The text alignment to match the direction of the system language.<br />
2161         /// The default value is true.<br />
2162         /// </summary>
2163         /// <since_tizen> 6 </since_tizen>
2164         public bool MatchSystemLanguageDirection
2165         {
2166             get
2167             {
2168                 return (bool)GetValue(MatchSystemLanguageDirectionProperty);
2169             }
2170             set
2171             {
2172                 SetValue(MatchSystemLanguageDirectionProperty, value);
2173                 NotifyPropertyChanged();
2174             }
2175         }
2176
2177         /// <summary>
2178         /// The FontSizeScale property. <br />
2179         /// The default value is 1.0. <br />
2180         /// The given font size scale value is used for multiplying the specified font size before querying fonts. <br />
2181         /// If FontSizeScale.UseSystemSetting, will use the SystemSettings.FontSize internally. <br />
2182         /// </summary>
2183         /// <since_tizen> 9 </since_tizen>
2184         public float FontSizeScale
2185         {
2186             get
2187             {
2188                 return fontSizeScale;
2189             }
2190             set
2191             {
2192                 float newFontSizeScale;
2193
2194                 if (fontSizeScale == value) return;
2195
2196                 fontSizeScale = value;
2197                 if (fontSizeScale == Tizen.NUI.FontSizeScale.UseSystemSetting)
2198                 {
2199                     SystemSettingsFontSize systemSettingsFontSize;
2200
2201                     try
2202                     {
2203                         systemSettingsFontSize = SystemSettings.FontSize;
2204                     }
2205                     catch (Exception e)
2206                     {
2207                         Console.WriteLine("{0} Exception caught.", e);
2208                         systemSettingsFontSize = SystemSettingsFontSize.Normal;
2209                     }
2210                     newFontSizeScale = TextUtils.GetFontSizeScale(systemSettingsFontSize);
2211                     addFontSizeChangedCallback();
2212                 }
2213                 else
2214                 {
2215                     newFontSizeScale = fontSizeScale;
2216                     removeFontSizeChangedCallback();
2217                 }
2218
2219                 SetValue(FontSizeScaleProperty, newFontSizeScale);
2220                 NotifyPropertyChanged();
2221             }
2222         }
2223
2224         /// Only used by the IL of xaml, will never changed to not hidden.
2225         [EditorBrowsable(EditorBrowsableState.Never)]
2226         public override bool IsCreateByXaml
2227         {
2228             get
2229             {
2230                 return base.IsCreateByXaml;
2231             }
2232             set
2233             {
2234                 base.IsCreateByXaml = value;
2235
2236                 if (value == true)
2237                 {
2238                     this.TextChanged += (obj, e) =>
2239                     {
2240                         this.Text = e.TextField.Text;
2241                     };
2242                 }
2243             }
2244         }
2245
2246         /// <summary>
2247         /// Get the InputMethodContext instance.
2248         /// </summary>
2249         /// <returns>The InputMethodContext instance.</returns>
2250         /// <since_tizen> 5 </since_tizen>
2251         public InputMethodContext GetInputMethodContext()
2252         {
2253             if (inputMethodCotext == null)
2254             {
2255                 /*Avoid raising InputMethodContext reference count.*/
2256                 inputMethodCotext = new InputMethodContext(Interop.TextField.GetInputMethodContext(SwigCPtr), true);
2257                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2258             }
2259             return inputMethodCotext;
2260         }
2261
2262         /// <summary>
2263         /// Select the whole text.
2264         /// </summary>
2265         /// <since_tizen> 9 </since_tizen>
2266         public void SelectWholeText()
2267         {
2268             Interop.TextField.SelectWholeText(SwigCPtr);
2269             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2270         }
2271
2272         /// <summary>
2273         /// Select text from start to end index. <br />
2274         /// The index is valid when 0 or positive.
2275         /// </summary>
2276         /// <param name="start">The start index for selection.</param>
2277         /// <param name="end">The end index for selection.</param>
2278         /// <remarks>
2279         /// If the end index exceeds the maximum value, it is set to the length of the text.
2280         /// </remarks>
2281         /// <since_tizen> 9 </since_tizen>
2282         public void SelectText(int start, int end)
2283         {
2284             if (start < 0)
2285                 throw new global::System.ArgumentOutOfRangeException(nameof(start), "Value is less than zero");
2286             if (end < 0)
2287                 throw new global::System.ArgumentOutOfRangeException(nameof(end), "Value is less than zero");
2288
2289             Interop.TextField.SelectText(SwigCPtr, (uint)start, (uint)end);
2290             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2291         }
2292
2293         /// <summary>
2294         /// Clear selection of the text. <br />
2295         /// Valid when selection is activate.
2296         /// </summary>
2297         /// <since_tizen> 9 </since_tizen>
2298         public void SelectNone()
2299         {
2300             _ = Interop.TextField.SelectNone(SwigCPtr);
2301             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2302         }
2303
2304         internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t InputStyleChangedSignal()
2305         {
2306             SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t(Interop.TextField.InputStyleChangedSignal(SwigCPtr));
2307             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2308             return ret;
2309         }
2310
2311         /// <summary>
2312         /// Dispose.
2313         /// </summary>
2314         /// <since_tizen> 3 </since_tizen>
2315         protected override void Dispose(DisposeTypes type)
2316         {
2317             if (disposed)
2318             {
2319                 DisposeQueue.Instance.Add(this);
2320                 return;
2321             }
2322
2323             if (systemlangTextFlag)
2324             {
2325                 SystemSettings.LocaleLanguageChanged -= SystemSettings_LocaleLanguageChanged;
2326             }
2327
2328             removeFontSizeChangedCallback();
2329
2330             if (type == DisposeTypes.Explicit)
2331             {
2332                 //Called by User
2333                 //Release your own managed resources here.
2334                 //You should release all of your own disposable objects here.
2335             }
2336
2337             //Release your own unmanaged resources here.
2338             //You should not access any managed member here except static instance.
2339             //because the execution order of Finalizes is non-deterministic.
2340             if (this.HasBody())
2341             {
2342                 if (textFieldCursorPositionChangedCallbackDelegate != null)
2343                 {
2344                     this.CursorPositionChangedSignal().Disconnect(textFieldCursorPositionChangedCallbackDelegate);
2345                 }
2346
2347                 if (textFieldMaxLengthReachedCallbackDelegate != null)
2348                 {
2349                     this.MaxLengthReachedSignal().Disconnect(textFieldMaxLengthReachedCallbackDelegate);
2350                 }
2351
2352                 if (textFieldSelectionClearedCallbackDelegate != null)
2353                 {
2354                     this.SelectionClearedSignal().Disconnect(textFieldSelectionClearedCallbackDelegate);
2355                 }
2356
2357                 if (textFieldSelectionChangedCallbackDelegate != null)
2358                 {
2359                     this.SelectionChangedSignal().Disconnect(textFieldSelectionChangedCallbackDelegate);
2360                 }
2361
2362                 if (textFieldTextChangedCallbackDelegate != null)
2363                 {
2364                     TextChangedSignal().Disconnect(textFieldTextChangedCallbackDelegate);
2365                 }
2366             }
2367
2368             base.Dispose(type);
2369         }
2370
2371         /// This will not be public opened.
2372         [EditorBrowsable(EditorBrowsableState.Never)]
2373         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
2374         {
2375             // In order to speed up IME hide, temporarily add
2376             GetInputMethodContext()?.DestroyContext();
2377             Interop.TextField.DeleteTextField(swigCPtr);
2378         }
2379
2380         private string SetTranslatable(string textFieldSid)
2381         {
2382             string translatableText = null;
2383             translatableText = NUIApplication.MultilingualResourceManager?.GetString(textFieldSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
2384             if (translatableText != null)
2385             {
2386                 if (systemlangTextFlag == false)
2387                 {
2388                     SystemSettings.LocaleLanguageChanged += SystemSettings_LocaleLanguageChanged;
2389                     systemlangTextFlag = true;
2390                 }
2391                 return translatableText;
2392             }
2393             else
2394             {
2395                 translatableText = "";
2396                 return translatableText;
2397             }
2398         }
2399
2400         private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
2401         {
2402             if (textFieldTextSid != null)
2403             {
2404                 Text = NUIApplication.MultilingualResourceManager?.GetString(textFieldTextSid, new CultureInfo(e.Value.Replace("_", "-")));
2405             }
2406             if (textFieldPlaceHolderTextSid != null)
2407             {
2408                 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
2409             }
2410             if (textFieldPlaceHolderTextFocusedSid != null)
2411             {
2412                 PlaceholderTextFocused = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextFocusedSid, new CultureInfo(e.Value.Replace("_", "-")));
2413             }
2414         }
2415
2416         private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e)
2417         {
2418             float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value);
2419             SetValue(FontSizeScaleProperty, newFontSizeScale);
2420             NotifyPropertyChanged();
2421         }
2422
2423         private void addFontSizeChangedCallback()
2424         {
2425             if (hasFontSizeChangedCallback != true)
2426             {
2427                 try
2428                 {
2429                     SystemSettings.FontSizeChanged += SystemSettingsFontSizeChanged;
2430                     hasFontSizeChangedCallback = true;
2431                 }
2432                 catch (Exception e)
2433                 {
2434                     Console.WriteLine("{0} Exception caught.", e);
2435                     hasFontSizeChangedCallback = false;
2436                 }
2437             }
2438         }
2439
2440         private void removeFontSizeChangedCallback()
2441         {
2442             if (hasFontSizeChangedCallback == true)
2443             {
2444                 try
2445                 {
2446                     SystemSettings.FontSizeChanged -= SystemSettingsFontSizeChanged;
2447                     hasFontSizeChangedCallback = false;
2448                 }
2449                 catch (Exception e)
2450                 {
2451                     Console.WriteLine("{0} Exception caught.", e);
2452                     hasFontSizeChangedCallback = true;
2453                 }
2454             }
2455         }
2456
2457         internal new class Property
2458         {
2459             internal static readonly int TEXT = Interop.TextField.TextGet();
2460             internal static readonly int PlaceholderText = Interop.TextField.PlaceholderTextGet();
2461             internal static readonly int PlaceholderTextFocused = Interop.TextField.PlaceholderTextFocusedGet();
2462             internal static readonly int FontFamily = Interop.TextField.FontFamilyGet();
2463             internal static readonly int FontStyle = Interop.TextField.FontStyleGet();
2464             internal static readonly int PointSize = Interop.TextField.PointSizeGet();
2465             internal static readonly int MaxLength = Interop.TextField.MaxLengthGet();
2466             internal static readonly int ExceedPolicy = Interop.TextField.ExceedPolicyGet();
2467             internal static readonly int HorizontalAlignment = Interop.TextField.HorizontalAlignmentGet();
2468             internal static readonly int VerticalAlignment = Interop.TextField.VerticalAlignmentGet();
2469             internal static readonly int TextColor = Interop.TextField.TextColorGet();
2470             internal static readonly int PlaceholderTextColor = Interop.TextField.PlaceholderTextColorGet();
2471             internal static readonly int PrimaryCursorColor = Interop.TextField.PrimaryCursorColorGet();
2472             internal static readonly int SecondaryCursorColor = Interop.TextField.SecondaryCursorColorGet();
2473             internal static readonly int EnableCursorBlink = Interop.TextField.EnableCursorBlinkGet();
2474             internal static readonly int CursorBlinkInterval = Interop.TextField.CursorBlinkIntervalGet();
2475             internal static readonly int CursorBlinkDuration = Interop.TextField.CursorBlinkDurationGet();
2476             internal static readonly int CursorWidth = Interop.TextField.CursorWidthGet();
2477             internal static readonly int GrabHandleImage = Interop.TextField.GrabHandleImageGet();
2478             internal static readonly int GrabHandlePressedImage = Interop.TextField.GrabHandlePressedImageGet();
2479             internal static readonly int ScrollThreshold = Interop.TextField.ScrollThresholdGet();
2480             internal static readonly int ScrollSpeed = Interop.TextField.ScrollSpeedGet();
2481             internal static readonly int SelectionHandleImageLeft = Interop.TextField.SelectionHandleImageLeftGet();
2482             internal static readonly int SelectionHandleImageRight = Interop.TextField.SelectionHandleImageRightGet();
2483             internal static readonly int SelectionHandlePressedImageLeft = Interop.TextField.SelectionHandlePressedImageLeftGet();
2484             internal static readonly int SelectionHandlePressedImageRight = Interop.TextField.SelectionHandlePressedImageRightGet();
2485             internal static readonly int SelectionHandleMarkerImageLeft = Interop.TextField.SelectionHandleMarkerImageLeftGet();
2486             internal static readonly int SelectionHandleMarkerImageRight = Interop.TextField.SelectionHandleMarkerImageRightGet();
2487             internal static readonly int SelectionHighlightColor = Interop.TextField.SelectionHighlightColorGet();
2488             internal static readonly int DecorationBoundingBox = Interop.TextField.DecorationBoundingBoxGet();
2489             internal static readonly int InputMethodSettings = Interop.TextField.InputMethodSettingsGet();
2490             internal static readonly int InputColor = Interop.TextField.InputColorGet();
2491             internal static readonly int EnableMarkup = Interop.TextField.EnableMarkupGet();
2492             internal static readonly int InputFontFamily = Interop.TextField.InputFontFamilyGet();
2493             internal static readonly int InputFontStyle = Interop.TextField.InputFontStyleGet();
2494             internal static readonly int InputPointSize = Interop.TextField.InputPointSizeGet();
2495             internal static readonly int UNDERLINE = Interop.TextField.UnderlineGet();
2496             internal static readonly int InputUnderline = Interop.TextField.InputUnderlineGet();
2497             internal static readonly int SHADOW = Interop.TextField.ShadowGet();
2498             internal static readonly int InputShadow = Interop.TextField.InputShadowGet();
2499             internal static readonly int EMBOSS = Interop.TextField.EmbossGet();
2500             internal static readonly int InputEmboss = Interop.TextField.InputEmbossGet();
2501             internal static readonly int OUTLINE = Interop.TextField.OutlineGet();
2502             internal static readonly int InputOutline = Interop.TextField.InputOutlineGet();
2503             internal static readonly int HiddenInputSettings = Interop.TextField.HiddenInputSettingsGet();
2504             internal static readonly int PixelSize = Interop.TextField.PixelSizeGet();
2505             internal static readonly int EnableSelection = Interop.TextField.EnableSelectionGet();
2506             internal static readonly int PLACEHOLDER = Interop.TextField.PlaceholderGet();
2507             internal static readonly int ELLIPSIS = Interop.TextField.EllipsisGet();
2508             internal static readonly int EnableShiftSelection = Interop.TextField.EnableShiftSelectionGet();
2509             internal static readonly int MatchSystemLanguageDirection = Interop.TextField.MatchSystemLanguageDirectionGet();
2510             internal static readonly int EnableGrabHandle = Interop.TextField.EnableGrabHandleGet();
2511             internal static readonly int EnableGrabHandlePopup = Interop.TextField.EnableGrabHandlePopupGet();
2512             internal static readonly int SelectedText = Interop.TextField.SelectedTextGet();
2513             internal static readonly int SelectedTextStart = Interop.TextField.SelectedTextStartGet();
2514             internal static readonly int SelectedTextEnd = Interop.TextField.SelectedTextEndGet();
2515             internal static readonly int EnableEditing = Interop.TextField.EnableEditingGet();
2516             internal static readonly int PrimaryCursorPosition = Interop.TextField.PrimaryCursorPositionGet();
2517             internal static readonly int FontSizeScale = Interop.TextField.FontSizeScaleGet();
2518             internal static readonly int GrabHandleColor = Interop.TextField.GrabHandleColorGet();
2519             internal static readonly int EllipsisPosition = Interop.TextField.EllipsisPositionGet();
2520             internal static readonly int InputFilter = Interop.TextField.InputFilterGet();
2521         }
2522
2523         internal class InputStyle
2524         {
2525             internal enum Mask
2526             {
2527                 None = 0x0000,
2528                 Color = 0x0001,
2529                 FontFamily = 0x0002,
2530                 PointSize = 0x0004,
2531                 FontStyle = 0x0008,
2532                 Underline = 0x0010,
2533                 Shadow = 0x0020,
2534                 Emboss = 0x0040,
2535                 Outline = 0x0080
2536             }
2537         }
2538
2539         private void OnDecorationBoundingBoxChanged(int x, int y, int width, int height)
2540         {
2541             DecorationBoundingBox = new Rectangle(x, y, width, height);
2542         }
2543         private void OnInputColorChanged(float x, float y, float z, float w)
2544         {
2545             InputColor = new Vector4(x, y, z, w);
2546         }
2547         private void OnPlaceholderTextColorChanged(float r, float g, float b, float a)
2548         {
2549             PlaceholderTextColor = new Vector4(r, g, b, a);
2550         }
2551         private void OnPrimaryCursorColorChanged(float x, float y, float z, float w)
2552         {
2553             PrimaryCursorColor = new Vector4(x, y, z, w);
2554         }
2555         private void OnSecondaryCursorColorChanged(float x, float y, float z, float w)
2556         {
2557             SecondaryCursorColor = new Vector4(x, y, z, w);
2558         }
2559         private void OnSelectionHighlightColorChanged(float x, float y, float z, float w)
2560         {
2561             SelectionHighlightColor = new Vector4(x, y, z, w);
2562         }
2563         private void OnShadowColorChanged(float x, float y, float z, float w)
2564         {
2565             ShadowColor = new Vector4(x, y, z, w);
2566         }
2567         private void OnShadowOffsetChanged(float x, float y)
2568         {
2569             ShadowOffset = new Vector2(x, y);
2570         }
2571         private void OnTextColorChanged(float r, float g, float b, float a)
2572         {
2573             TextColor = new Color(r, g, b, a);
2574         }
2575         private void OnGrabHandleColorChanged(float r, float g, float b, float a)
2576         {
2577             GrabHandleColor = new Color(r, g, b, a);
2578         }
2579     }
2580 }