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