5082d64767e0177cecafe93afb561277b95245d4
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TextField.cs
1 /*
2  * Copyright(c) 2019 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
25 namespace Tizen.NUI.BaseComponents
26 {
27     /// <summary>
28     /// A control which provides a single line editable text field.
29     /// </summary>
30     /// <since_tizen> 3 </since_tizen>
31     public partial class TextField : View
32     {
33         private string textFieldTextSid = null;
34         private string textFieldPlaceHolderTextSid = null;
35         private bool systemlangTextFlag = false;
36         private InputMethodContext inputMethodCotext = null;
37         private TextFieldSelectorData selectorData;
38
39         static TextField() { }
40
41         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
42         [EditorBrowsable(EditorBrowsableState.Never)]
43         public TextFieldStyle Style => new TextFieldStyle(this);
44
45         /// <summary>
46         /// Creates the TextField control.
47         /// </summary>
48         /// <since_tizen> 3 </since_tizen>
49         public TextField() : this(Interop.TextField.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.TextField_New(), true)
61         {
62             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
63             SetVisible(shown);
64         }
65
66         /// <summary>
67         /// Get attribues, it is abstract function and must be override.
68         /// </summary>
69         /// <since_tizen> 6 </since_tizen>
70         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
71         [EditorBrowsable(EditorBrowsableState.Never)]
72         protected override ViewStyle GetViewStyle()
73         {
74             return new TextFieldStyle();
75         }
76
77         internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : base(Interop.TextField.TextField_SWIGUpcast(cPtr), cMemoryOwn, viewStyle)
78         {
79             if (!shown)
80             {
81                 SetVisible(false);
82             }
83         }
84
85         internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(Interop.TextField.TextField_SWIGUpcast(cPtr), cMemoryOwn, null)
86         {
87             if (!shown)
88             {
89                 SetVisible(false);
90             }
91         }
92
93         internal TextField(TextField handle, bool shown = true) : this(Interop.TextField.new_TextField__SWIG_1(TextField.getCPtr(handle)), true)
94         {
95             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
96
97             if (!shown)
98             {
99                 SetVisible(false);
100             }
101         }
102
103         internal enum ExceedPolicyType
104         {
105             ExceedPolicyOriginal,
106             ExceedPolicyClip
107         }
108
109         /// <summary>
110         /// The TranslatableText property.<br />
111         /// The text can set the SID value.<br />
112         /// </summary>
113         /// <exception cref='ArgumentNullException'>
114         /// ResourceManager about multilingual is null.
115         /// </exception>
116         /// <since_tizen> 4 </since_tizen>
117         public string TranslatableText
118         {
119             get
120             {
121                 return (string)GetValue(TranslatableTextProperty);
122             }
123             set
124             {
125                 selectorData?.TranslatableText.UpdateIfNeeds(this, value);
126                 SetValue(TranslatableTextProperty, value);
127             }
128         }
129         private string translatableText
130         {
131             get
132             {
133                 return textFieldTextSid;
134             }
135             set
136             {
137                 if (NUIApplication.MultilingualResourceManager == null)
138                 {
139                     throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
140                 }
141                 textFieldTextSid = value;
142                 Text = SetTranslatable(textFieldTextSid);
143                 NotifyPropertyChanged();
144             }
145         }
146
147         /// <summary>
148         /// The TranslatablePlaceholderText property.<br />
149         /// The text can set the SID value.<br />
150         /// </summary>
151         /// <exception cref='ArgumentNullException'>
152         /// ResourceManager about multilingual is null.
153         /// </exception>
154         /// <since_tizen> 4 </since_tizen>
155         public string TranslatablePlaceholderText
156         {
157             get
158             {
159                 return (string)GetValue(TranslatablePlaceholderTextProperty);
160             }
161             set
162             {
163                 SetValue(TranslatablePlaceholderTextProperty, value);
164                 selectorData?.TranslatablePlaceholderText.UpdateIfNeeds(this, value);
165             }
166         }
167         private string translatablePlaceholderText
168         {
169             get
170             {
171                 return textFieldPlaceHolderTextSid;
172             }
173             set
174             {
175                 if (NUIApplication.MultilingualResourceManager == null)
176                 {
177                     throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
178                 }
179                 textFieldPlaceHolderTextSid = value;
180                 PlaceholderText = SetTranslatable(textFieldPlaceHolderTextSid);
181                 NotifyPropertyChanged();
182             }
183         }
184
185         /// <summary>
186         /// The Text property.
187         /// </summary>
188         /// <since_tizen> 3 </since_tizen>
189         public string Text
190         {
191             get
192             {
193                 return (string)GetValue(TextProperty);
194             }
195             set
196             {
197                 SetValueAndForceSendChangeSignal(TextProperty, value);
198                 selectorData?.Text.UpdateIfNeeds(this, value);
199                 NotifyPropertyChanged();
200             }
201         }
202
203         /// <summary>
204         /// The PlaceholderText property.
205         /// </summary>
206         /// <since_tizen> 3 </since_tizen>
207         public string PlaceholderText
208         {
209             get
210             {
211                 return (string)GetValue(PlaceholderTextProperty);
212             }
213             set
214             {
215                 SetValue(PlaceholderTextProperty, value);
216                 NotifyPropertyChanged();
217             }
218         }
219
220         /// <summary>
221         /// The PlaceholderTextFocused property.
222         /// </summary>
223         /// <since_tizen> 3 </since_tizen>
224         public string PlaceholderTextFocused
225         {
226             get
227             {
228                 return (string)GetValue(PlaceholderTextFocusedProperty);
229             }
230             set
231             {
232                 SetValue(PlaceholderTextFocusedProperty, value);
233                 NotifyPropertyChanged();
234             }
235         }
236
237         /// <summary>
238         /// The FontFamily property.
239         /// </summary>
240         /// <since_tizen> 3 </since_tizen>
241         public string FontFamily
242         {
243             get
244             {
245                 return (string)GetValue(FontFamilyProperty);
246             }
247             set
248             {
249                 SetValue(FontFamilyProperty, value);
250                 selectorData?.FontFamily.UpdateIfNeeds(this, value);
251                 NotifyPropertyChanged();
252             }
253         }
254
255         /// <summary>
256         /// The FontStyle property.
257         /// </summary>
258         /// <since_tizen> 3 </since_tizen>
259         public PropertyMap FontStyle
260         {
261             get
262             {
263                 return (PropertyMap)GetValue(FontStyleProperty);
264             }
265             set
266             {
267                 SetValue(FontStyleProperty, value);
268                 NotifyPropertyChanged();
269             }
270         }
271
272         /// <summary>
273         /// The PointSize property.
274         /// </summary>
275         /// <since_tizen> 3 </since_tizen>
276         public float PointSize
277         {
278             get
279             {
280                 return (float)GetValue(PointSizeProperty);
281             }
282             set
283             {
284                 SetValue(PointSizeProperty, value);
285                 selectorData?.PointSize.UpdateIfNeeds(this, value);
286                 NotifyPropertyChanged();
287             }
288         }
289
290         /// <summary>
291         /// The MaxLength property.
292         /// </summary>
293         /// <since_tizen> 3 </since_tizen>
294         public int MaxLength
295         {
296             get
297             {
298                 return (int)GetValue(MaxLengthProperty);
299             }
300             set
301             {
302                 SetValue(MaxLengthProperty, value);
303                 NotifyPropertyChanged();
304             }
305         }
306
307         /// <summary>
308         /// The ExceedPolicy property.
309         /// </summary>
310         /// <since_tizen> 3 </since_tizen>
311         public int ExceedPolicy
312         {
313             get
314             {
315                 return (int)GetValue(ExceedPolicyProperty);
316             }
317             set
318             {
319                 SetValue(ExceedPolicyProperty, value);
320                 NotifyPropertyChanged();
321             }
322         }
323
324         /// <summary>
325         /// The HorizontalAlignment property.
326         /// </summary>
327         /// <since_tizen> 3 </since_tizen>
328         public HorizontalAlignment HorizontalAlignment
329         {
330             get
331             {
332                 return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
333             }
334             set
335             {
336                 SetValue(HorizontalAlignmentProperty, value);
337                 NotifyPropertyChanged();
338             }
339         }
340
341         /// <summary>
342         /// The VerticalAlignment property.
343         /// </summary>
344         /// <since_tizen> 3 </since_tizen>
345         public VerticalAlignment VerticalAlignment
346         {
347             get
348             {
349                 return (VerticalAlignment)GetValue(VerticalAlignmentProperty);
350             }
351             set
352             {
353                 SetValue(VerticalAlignmentProperty, value);
354                 NotifyPropertyChanged();
355                 NotifyPropertyChanged();
356             }
357         }
358
359         /// <summary>
360         /// The TextColor property.
361         /// </summary>
362         /// <remarks>
363         /// The property cascade chaining set is possible. For example, this (textField.TextColor.X = 0.1f;) is possible.
364         /// </remarks>
365         /// <since_tizen> 3 </since_tizen>
366         public Color TextColor
367         {
368             get
369             {
370                 Color temp = (Color)GetValue(TextColorProperty);
371                 return new Color(OnTextColorChanged, temp.R, temp.G, temp.B, temp.A);
372             }
373             set
374             {
375                 SetValue(TextColorProperty, value);
376                 selectorData?.TextColor.UpdateIfNeeds(this, value);
377                 NotifyPropertyChanged();
378             }
379         }
380
381         /// <summary>
382         /// The PlaceholderTextColor property.
383         /// </summary>
384         /// <remarks>
385         /// The property cascade chaining set is possible. For example, this (textField.PlaceholderTextColor.X = 0.1f;) is possible.
386         /// </remarks>
387         /// <since_tizen> 3 </since_tizen>
388         public Vector4 PlaceholderTextColor
389         {
390             get
391             {
392                 Vector4 temp = (Vector4)GetValue(PlaceholderTextColorProperty);
393                 return new Vector4(OnPlaceholderTextColorChanged, temp.X, temp.Y, temp.Z, temp.W);
394             }
395             set
396             {
397                 SetValue(PlaceholderTextColorProperty, value);
398                 selectorData?.PlaceholderTextColor.UpdateIfNeeds(this, value);
399                 NotifyPropertyChanged();
400             }
401         }
402
403         /// <summary>
404         /// The ShadowOffset property.
405         /// </summary>
406         /// <since_tizen> 3 </since_tizen>
407         /// <remarks>
408         /// Deprecated.(API Level 6) Use Shadow instead.
409         /// The property cascade chaining set is possible. For example, this (textField.ShadowOffset.X = 0.1f;) is possible.
410         /// </remarks>
411         [Obsolete("Please do not use this ShadowOffset(Deprecated). Please use Shadow instead.")]
412         public Vector2 ShadowOffset
413         {
414             get
415             {
416                 PropertyMap map = new PropertyMap();
417                 GetProperty(TextField.Property.SHADOW).Get(map);
418                 Vector2 shadowOffset = new Vector2();
419                 map.Find(TextField.Property.SHADOW, "offset")?.Get(shadowOffset);
420                 return new Vector2(OnShadowOffsetChanged, shadowOffset.X, shadowOffset.Y);
421             }
422             set
423             {
424                 PropertyMap temp = new PropertyMap();
425                 temp.Insert("offset", new PropertyValue(value));
426                 SetValue(ShadowProperty, temp);
427                 NotifyPropertyChanged();
428             }
429         }
430
431         /// <summary>
432         /// The ShadowColor property.
433         /// </summary>
434         /// <since_tizen> 3 </since_tizen>
435         /// <remarks>
436         /// Deprecated.(API Level 6) Use Shadow instead.
437         /// The property cascade chaining set is possible. For example, this (textField.ShadowColor.X = 0.1f;) is possible.
438         /// </remarks>
439         [Obsolete("Please do not use this ShadowColor(Deprecated). Please use Shadow instead.")]
440         public Vector4 ShadowColor
441         {
442             get
443             {
444                 PropertyMap map = new PropertyMap();
445                 GetProperty(TextField.Property.SHADOW).Get(map);
446                 Vector4 shadowColor = new Vector4();
447                 map.Find(TextField.Property.SHADOW, "color")?.Get(shadowColor);
448                 return new Vector4(OnShadowColorChanged, shadowColor.X, shadowColor.Y, shadowColor.Z, shadowColor.W);
449             }
450             set
451             {
452                 PropertyMap temp = new PropertyMap();
453                 temp.Insert("color", new PropertyValue(value));
454                 SetValue(ShadowProperty, temp);
455                 NotifyPropertyChanged();
456             }
457         }
458
459         /// <summary>
460         /// The PrimaryCursorColor property.
461         /// </summary>
462         /// <remarks>
463         /// The property cascade chaining set is possible. For example, this (textField.PrimaryCursorColor.X = 0.1f;) is possible.
464         /// </remarks>
465         /// <since_tizen> 3 </since_tizen>
466         public Vector4 PrimaryCursorColor
467         {
468             get
469             {
470                 Vector4 temp = (Vector4)GetValue(PrimaryCursorColorProperty);
471                 return new Vector4(OnPrimaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
472             }
473             set
474             {
475                 SetValue(PrimaryCursorColorProperty, value);
476                 selectorData?.PrimaryCursorColor.UpdateIfNeeds(this, value);
477                 NotifyPropertyChanged();
478             }
479         }
480
481         /// <summary>
482         /// The SecondaryCursorColor property.
483         /// </summary>
484         /// <remarks>
485         /// The property cascade chaining set is possible. For example, this (textField.SecondaryCursorColor.X = 0.1f;) is possible.
486         /// </remarks>
487         /// <since_tizen> 3 </since_tizen>
488         public Vector4 SecondaryCursorColor
489         {
490             get
491             {
492                 Vector4 temp = (Vector4)GetValue(SecondaryCursorColorProperty);
493                 return new Vector4(OnSecondaryCursorColorChanged, temp.X, temp.Y, temp.Z, temp.W);
494             }
495             set
496             {
497                 SetValue(SecondaryCursorColorProperty, value);
498                 NotifyPropertyChanged();
499             }
500         }
501
502         /// <summary>
503         /// The EnableCursorBlink property.
504         /// </summary>
505         /// <since_tizen> 3 </since_tizen>
506         public bool EnableCursorBlink
507         {
508             get
509             {
510                 return (bool)GetValue(EnableCursorBlinkProperty);
511             }
512             set
513             {
514                 SetValue(EnableCursorBlinkProperty, value);
515                 NotifyPropertyChanged();
516             }
517         }
518
519         /// <summary>
520         /// The CursorBlinkInterval property.
521         /// </summary>
522         /// <since_tizen> 3 </since_tizen>
523         public float CursorBlinkInterval
524         {
525             get
526             {
527                 return (float)GetValue(CursorBlinkIntervalProperty);
528             }
529             set
530             {
531                 SetValue(CursorBlinkIntervalProperty, value);
532                 NotifyPropertyChanged();
533             }
534         }
535
536         /// <summary>
537         /// The CursorBlinkDuration property.
538         /// </summary>
539         /// <since_tizen> 3 </since_tizen>
540         public float CursorBlinkDuration
541         {
542             get
543             {
544                 return (float)GetValue(CursorBlinkDurationProperty);
545             }
546             set
547             {
548                 SetValue(CursorBlinkDurationProperty, value);
549                 NotifyPropertyChanged();
550             }
551         }
552
553         /// <summary>
554         /// The CursorWidth property.
555         /// </summary>
556         /// <since_tizen> 3 </since_tizen>
557         public int CursorWidth
558         {
559             get
560             {
561                 return (int)GetValue(CursorWidthProperty);
562             }
563             set
564             {
565                 SetValue(CursorWidthProperty, value);
566                 NotifyPropertyChanged();
567             }
568         }
569
570         /// <summary>
571         /// The GrabHandleImage property.
572         /// </summary>
573         /// <since_tizen> 3 </since_tizen>
574         public string GrabHandleImage
575         {
576             get
577             {
578                 return (string)GetValue(GrabHandleImageProperty);
579             }
580             set
581             {
582                 SetValue(GrabHandleImageProperty, value);
583                 NotifyPropertyChanged();
584             }
585         }
586
587         /// <summary>
588         /// The GrabHandlePressedImage property.
589         /// </summary>
590         /// <since_tizen> 3 </since_tizen>
591         public string GrabHandlePressedImage
592         {
593             get
594             {
595                 return (string)GetValue(GrabHandlePressedImageProperty);
596             }
597             set
598             {
599                 SetValue(GrabHandlePressedImageProperty, value);
600                 NotifyPropertyChanged();
601             }
602         }
603
604         /// <summary>
605         /// The ScrollThreshold property.
606         /// </summary>
607         /// <since_tizen> 3 </since_tizen>
608         public float ScrollThreshold
609         {
610             get
611             {
612                 return (float)GetValue(ScrollThresholdProperty);
613             }
614             set
615             {
616                 SetValue(ScrollThresholdProperty, value);
617                 NotifyPropertyChanged();
618             }
619         }
620
621         /// <summary>
622         /// The ScrollSpeed property.
623         /// </summary>
624         /// <since_tizen> 3 </since_tizen>
625         public float ScrollSpeed
626         {
627             get
628             {
629                 return (float)GetValue(ScrollSpeedProperty);
630             }
631             set
632             {
633                 SetValue(ScrollSpeedProperty, value);
634                 NotifyPropertyChanged();
635             }
636         }
637
638         /// <summary>
639         /// The SelectionHandleImageLeft property.
640         /// </summary>
641         /// <since_tizen> 3 </since_tizen>
642         public PropertyMap SelectionHandleImageLeft
643         {
644             get
645             {
646                 return (PropertyMap)GetValue(SelectionHandleImageLeftProperty);
647             }
648             set
649             {
650                 SetValue(SelectionHandleImageLeftProperty, value);
651                 NotifyPropertyChanged();
652             }
653         }
654
655         /// <summary>
656         /// The SelectionHandleImageRight property.
657         /// </summary>
658         /// <since_tizen> 3 </since_tizen>
659         public PropertyMap SelectionHandleImageRight
660         {
661             get
662             {
663                 return (PropertyMap)GetValue(SelectionHandleImageRightProperty);
664             }
665             set
666             {
667                 SetValue(SelectionHandleImageRightProperty, value);
668                 NotifyPropertyChanged();
669             }
670         }
671
672         /// <summary>
673         /// The SelectionHandlePressedImageLeft property.
674         /// </summary>
675         /// <since_tizen> 3 </since_tizen>
676         public PropertyMap SelectionHandlePressedImageLeft
677         {
678             get
679             {
680                 return (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty);
681             }
682             set
683             {
684                 SetValue(SelectionHandlePressedImageLeftProperty, value);
685                 NotifyPropertyChanged();
686             }
687         }
688
689         /// <summary>
690         /// The SelectionHandlePressedImageRight property.
691         /// </summary>
692         /// <since_tizen> 3 </since_tizen>
693         public PropertyMap SelectionHandlePressedImageRight
694         {
695             get
696             {
697                 return (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty);
698             }
699             set
700             {
701                 SetValue(SelectionHandlePressedImageRightProperty, value);
702                 NotifyPropertyChanged();
703             }
704         }
705
706         /// <summary>
707         /// The SelectionHandleMarkerImageLeft property.
708         /// </summary>
709         /// <since_tizen> 3 </since_tizen>
710         public PropertyMap SelectionHandleMarkerImageLeft
711         {
712             get
713             {
714                 return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty);
715             }
716             set
717             {
718                 SetValue(SelectionHandleMarkerImageLeftProperty, value);
719                 NotifyPropertyChanged();
720             }
721         }
722
723         /// <summary>
724         /// The SelectionHandleMarkerImageRight property.
725         /// </summary>
726         /// <since_tizen> 3 </since_tizen>
727         public PropertyMap SelectionHandleMarkerImageRight
728         {
729             get
730             {
731                 return (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty);
732             }
733             set
734             {
735                 SetValue(SelectionHandleMarkerImageRightProperty, value);
736                 NotifyPropertyChanged();
737             }
738         }
739
740         /// <summary>
741         /// The SelectionHighlightColor property.
742         /// </summary>
743         /// <remarks>
744         /// The property cascade chaining set is possible. For example, this (textField.SelectionHighlightColor.X = 0.1f;) is possible.
745         /// </remarks>
746         /// <since_tizen> 3 </since_tizen>
747         public Vector4 SelectionHighlightColor
748         {
749             get
750             {
751                 Vector4 temp = (Vector4)GetValue(SelectionHighlightColorProperty);
752                 return new Vector4(OnSelectionHighlightColorChanged, temp.X, temp.Y, temp.Z, temp.W);
753             }
754             set
755             {
756                 SetValue(SelectionHighlightColorProperty, value);
757                 NotifyPropertyChanged();
758             }
759         }
760
761         /// <summary>
762         /// The DecorationBoundingBox property.
763         /// </summary>
764         /// <remarks>
765         /// The property cascade chaining set is possible. For example, this (textField.DecorationBoundingBox.X = 0.1f;) is possible.
766         /// </remarks>
767         /// <since_tizen> 3 </since_tizen>
768         public Rectangle DecorationBoundingBox
769         {
770             get
771             {
772                 Rectangle temp = (Rectangle)GetValue(DecorationBoundingBoxProperty);
773                 return new Rectangle(OnDecorationBoundingBoxChanged, temp.X, temp.Y, temp.Width, temp.Height);
774             }
775             set
776             {
777                 SetValue(DecorationBoundingBoxProperty, value);
778                 NotifyPropertyChanged();
779             }
780         }
781
782         /// <summary>
783         /// The InputMethodSettings property.
784         /// </summary>
785         /// <since_tizen> 3 </since_tizen>
786         public PropertyMap InputMethodSettings
787         {
788             get
789             {
790                 return (PropertyMap)GetValue(InputMethodSettingsProperty);
791             }
792             set
793             {
794                 SetValue(InputMethodSettingsProperty, value);
795                 NotifyPropertyChanged();
796             }
797         }
798
799         /// <summary>
800         /// The InputColor property.
801         /// </summary>
802         /// <remarks>
803         /// The property cascade chaining set is possible. For example, this (textField.InputColor.X = 0.1f;) is possible.
804         /// </remarks>
805         /// <since_tizen> 3 </since_tizen>
806         public Vector4 InputColor
807         {
808             get
809             {
810                 Vector4 temp = (Vector4)GetValue(InputColorProperty);
811                 return new Vector4(OnInputColorChanged, temp.X, temp.Y, temp.Z, temp.W);
812             }
813             set
814             {
815                 SetValue(InputColorProperty, value);
816                 NotifyPropertyChanged();
817             }
818         }
819
820         /// <summary>
821         /// The EnableMarkup property.
822         /// </summary>
823         /// <since_tizen> 3 </since_tizen>
824         public bool EnableMarkup
825         {
826             get
827             {
828                 return (bool)GetValue(EnableMarkupProperty);
829             }
830             set
831             {
832                 SetValue(EnableMarkupProperty, value);
833                 NotifyPropertyChanged();
834             }
835         }
836
837         /// <summary>
838         /// The InputFontFamily property.
839         /// </summary>
840         /// <since_tizen> 3 </since_tizen>
841         public string InputFontFamily
842         {
843             get
844             {
845                 return (string)GetValue(InputFontFamilyProperty);
846             }
847             set
848             {
849                 SetValue(InputFontFamilyProperty, value);
850                 NotifyPropertyChanged();
851             }
852         }
853
854         /// <summary>
855         /// The InputFontStyle property.
856         /// </summary>
857         /// <since_tizen> 3 </since_tizen>
858         public PropertyMap InputFontStyle
859         {
860             get
861             {
862                 return (PropertyMap)GetValue(InputFontStyleProperty);
863             }
864             set
865             {
866                 SetValue(InputFontStyleProperty, value);
867                 NotifyPropertyChanged();
868             }
869         }
870
871         /// <summary>
872         /// The InputPointSize property.
873         /// </summary>
874         /// <since_tizen> 3 </since_tizen>
875         public float InputPointSize
876         {
877             get
878             {
879                 return (float)GetValue(InputPointSizeProperty);
880             }
881             set
882             {
883                 SetValue(InputPointSizeProperty, value);
884                 NotifyPropertyChanged();
885             }
886         }
887
888         /// <summary>
889         /// The Underline property.
890         /// </summary>
891         /// <since_tizen> 3 </since_tizen>
892         public PropertyMap Underline
893         {
894             get
895             {
896                 return (PropertyMap)GetValue(UnderlineProperty);
897             }
898             set
899             {
900                 SetValue(UnderlineProperty, value);
901                 NotifyPropertyChanged();
902             }
903         }
904
905         /// <summary>
906         /// The InputUnderline property.
907         /// </summary>
908         /// <since_tizen> 3 </since_tizen>
909         public string InputUnderline
910         {
911             get
912             {
913                 return (string)GetValue(InputUnderlineProperty);
914             }
915             set
916             {
917                 SetValue(InputUnderlineProperty, value);
918                 NotifyPropertyChanged();
919             }
920         }
921
922         /// <summary>
923         /// The Shadow property.
924         /// </summary>
925         /// <since_tizen> 3 </since_tizen>
926         public PropertyMap Shadow
927         {
928             get
929             {
930                 return (PropertyMap)GetValue(ShadowProperty);
931             }
932             set
933             {
934                 SetValue(ShadowProperty, value);
935                 NotifyPropertyChanged();
936             }
937         }
938
939         /// <summary>
940         /// The InputShadow property.
941         /// </summary>
942         /// <since_tizen> 3 </since_tizen>
943         public string InputShadow
944         {
945             get
946             {
947                 return (string)GetValue(InputShadowProperty);
948             }
949             set
950             {
951                 SetValue(InputShadowProperty, value);
952                 NotifyPropertyChanged();
953             }
954         }
955
956         /// <summary>
957         /// The Emboss property.
958         /// </summary>
959         /// <since_tizen> 3 </since_tizen>
960         public string Emboss
961         {
962             get
963             {
964                 return (string)GetValue(EmbossProperty);
965             }
966             set
967             {
968                 SetValue(EmbossProperty, value);
969                 NotifyPropertyChanged();
970             }
971         }
972
973         /// <summary>
974         /// The InputEmboss property.
975         /// </summary>
976         /// <since_tizen> 3 </since_tizen>
977         public string InputEmboss
978         {
979             get
980             {
981                 return (string)GetValue(InputEmbossProperty);
982             }
983             set
984             {
985                 SetValue(InputEmbossProperty, value);
986                 NotifyPropertyChanged();
987             }
988         }
989
990         /// <summary>
991         /// The Outline property.
992         /// </summary>
993         /// <since_tizen> 3 </since_tizen>
994         public PropertyMap Outline
995         {
996             get
997             {
998                 return (PropertyMap)GetValue(OutlineProperty);
999             }
1000             set
1001             {
1002                 SetValue(OutlineProperty, value);
1003                 NotifyPropertyChanged();
1004             }
1005         }
1006
1007         /// <summary>
1008         /// The InputOutline property.
1009         /// </summary>
1010         /// <since_tizen> 3 </since_tizen>
1011         public string InputOutline
1012         {
1013             get
1014             {
1015                 return (string)GetValue(InputOutlineProperty);
1016             }
1017             set
1018             {
1019                 SetValue(InputOutlineProperty, value);
1020                 NotifyPropertyChanged();
1021             }
1022         }
1023
1024         /// <summary>
1025         /// The HiddenInputSettings property.
1026         /// </summary>
1027         /// <since_tizen> 3 </since_tizen>
1028         public Tizen.NUI.PropertyMap HiddenInputSettings
1029         {
1030             get
1031             {
1032                 return (PropertyMap)GetValue(HiddenInputSettingsProperty);
1033             }
1034             set
1035             {
1036                 SetValue(HiddenInputSettingsProperty, value);
1037                 NotifyPropertyChanged();
1038             }
1039         }
1040
1041         /// <summary>
1042         /// The PixelSize property.
1043         /// </summary>
1044         /// <since_tizen> 3 </since_tizen>
1045         public float PixelSize
1046         {
1047             get
1048             {
1049                 return (float)GetValue(PixelSizeProperty);
1050             }
1051             set
1052             {
1053                 SetValue(PixelSizeProperty, value);
1054                 NotifyPropertyChanged();
1055             }
1056         }
1057
1058         /// <summary>
1059         /// The Enable selection property.
1060         /// </summary>
1061         /// <since_tizen> 3 </since_tizen>
1062         public bool EnableSelection
1063         {
1064             get
1065             {
1066                 return (bool)GetValue(EnableSelectionProperty);
1067             }
1068             set
1069             {
1070                 SetValue(EnableSelectionProperty, value);
1071                 NotifyPropertyChanged();
1072             }
1073         }
1074
1075         /// <summary>
1076         /// The Enable selection property.
1077         /// </summary>
1078         /// <since_tizen> 6 </since_tizen>
1079         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1080         [EditorBrowsable(EditorBrowsableState.Never)]
1081         public bool EnableGrabHandle
1082         {
1083             get
1084             {
1085                 return (bool)GetValue(EnableGrabHandleProperty);
1086             }
1087             set
1088             {
1089                 SetValue(EnableGrabHandleProperty, value);
1090                 NotifyPropertyChanged();
1091             }
1092         }
1093
1094         /// <summary>
1095         /// The Enable selection property.
1096         /// </summary>
1097         /// <since_tizen> 6 </since_tizen>
1098         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1099         [EditorBrowsable(EditorBrowsableState.Never)]
1100         public bool EnableGrabHandlePopup
1101         {
1102             get
1103             {
1104                 return (bool)GetValue(EnableGrabHandlePopupProperty);
1105             }
1106             set
1107             {
1108                 SetValue(EnableGrabHandlePopupProperty, value);
1109                 NotifyPropertyChanged();
1110             }
1111         }
1112
1113         /// <summary>
1114         /// The Selected Text property.
1115         /// </summary>
1116         /// <since_tizen> 8 </since_tizen>
1117         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1118         [EditorBrowsable(EditorBrowsableState.Never)]
1119         public string SelectedText
1120         {
1121             get
1122             {
1123                 string temp;
1124                 GetProperty(TextField.Property.SELECTED_TEXT).Get(out temp);
1125                 return temp;
1126             }
1127         }
1128
1129         /// <summary>
1130         /// The start index for selection.
1131         /// </summary>
1132         /// <since_tizen> 8 </since_tizen>
1133         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1134         [EditorBrowsable(EditorBrowsableState.Never)]
1135         public int SelectedTextStart
1136         {
1137             get
1138             {
1139                 int temp;
1140                 GetProperty(TextField.Property.SELECTED_TEXT_START).Get(out temp);
1141                 return temp;
1142             }
1143             set
1144             {
1145                 SetProperty(TextField.Property.SELECTED_TEXT_START, new PropertyValue(value));
1146                 NotifyPropertyChanged();
1147             }
1148         }
1149
1150         /// <summary>
1151         /// The end index for selection.
1152         /// </summary>
1153         /// <since_tizen> 8 </since_tizen>
1154         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1155         [EditorBrowsable(EditorBrowsableState.Never)]
1156         public int SelectedTextEnd
1157         {
1158             get
1159             {
1160                 int temp;
1161                 GetProperty(TextField.Property.SELECTED_TEXT_END).Get(out temp);
1162                 return temp;
1163             }
1164             set
1165             {
1166                 SetProperty(TextField.Property.SELECTED_TEXT_END, new PropertyValue(value));
1167                 NotifyPropertyChanged();
1168             }
1169         }
1170
1171         /// Enable editing in text control.
1172         /// </summary>
1173         /// <since_tizen> 8 </since_tizen>
1174         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1175         [EditorBrowsable(EditorBrowsableState.Never)]
1176         public bool EnableEditing
1177         {
1178             get
1179             {
1180                 bool temp;
1181                 GetProperty(TextField.Property.ENABLE_EDITING).Get(out temp);
1182                 return temp;
1183             }
1184             set
1185             {
1186                 SetProperty(TextField.Property.ENABLE_EDITING, new PropertyValue(value));
1187                 NotifyPropertyChanged();
1188             }
1189         }
1190
1191         /// <summary>
1192         /// The Placeholder property.
1193         /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
1194         /// </summary>
1195         /// <example>
1196         /// The following example demonstrates how to set the Placeholder property.
1197         /// <code>
1198         /// PropertyMap propertyMap = new PropertyMap();
1199         /// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
1200         /// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
1201         /// propertyMap.Add("color", new PropertyValue(Color.Red));
1202         /// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
1203         /// propertyMap.Add("pointSize", new PropertyValue(12.0f));
1204         ///
1205         /// PropertyMap fontStyleMap = new PropertyMap();
1206         /// fontStyleMap.Add("weight", new PropertyValue("bold"));
1207         /// fontStyleMap.Add("width", new PropertyValue("condensed"));
1208         /// fontStyleMap.Add("slant", new PropertyValue("italic"));
1209         /// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
1210         ///
1211         /// TextField field = new TextField();
1212         /// field.Placeholder = propertyMap;
1213         /// </code>
1214         /// </example>
1215         /// <since_tizen> 3 </since_tizen>
1216         public Tizen.NUI.PropertyMap Placeholder
1217         {
1218             get
1219             {
1220                 return (PropertyMap)GetValue(PlaceholderProperty);
1221             }
1222             set
1223             {
1224                 SetValue(PlaceholderProperty, value);
1225                 NotifyPropertyChanged();
1226             }
1227         }
1228
1229         /// <summary>
1230         /// The Ellipsis property.<br />
1231         /// Enable or disable the ellipsis.<br />
1232         /// Placeholder PropertyMap is used to add ellipsis to placeholder text.
1233         /// </summary>
1234         /// <since_tizen> 4 </since_tizen>
1235         public bool Ellipsis
1236         {
1237             get
1238             {
1239                 return (bool)GetValue(EllipsisProperty);
1240             }
1241             set
1242             {
1243                 SetValue(EllipsisProperty, value);
1244                 NotifyPropertyChanged();
1245             }
1246         }
1247
1248         /// <summary>
1249         /// Enables selection of the text using the Shift key.
1250         /// </summary>
1251         /// <since_tizen> 5 </since_tizen>
1252         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1253         [EditorBrowsable(EditorBrowsableState.Never)]
1254         public bool EnableShiftSelection
1255         {
1256             get
1257             {
1258                 return (bool)GetValue(EnableShiftSelectionProperty);
1259             }
1260             set
1261             {
1262                 SetValue(EnableShiftSelectionProperty, value);
1263                 NotifyPropertyChanged();
1264             }
1265         }
1266
1267         /// <summary>
1268         /// The text alignment to match the direction of the system language.
1269         /// </summary>
1270         /// <since_tizen> 6 </since_tizen>
1271         public bool MatchSystemLanguageDirection
1272         {
1273             get
1274             {
1275                 return (bool)GetValue(MatchSystemLanguageDirectionProperty);
1276             }
1277             set
1278             {
1279                 SetValue(MatchSystemLanguageDirectionProperty, value);
1280                 NotifyPropertyChanged();
1281             }
1282         }
1283
1284         /// Only used by the IL of xaml, will never changed to not hidden.
1285         [EditorBrowsable(EditorBrowsableState.Never)]
1286         public override bool IsCreateByXaml
1287         {
1288             get
1289             {
1290                 return base.IsCreateByXaml;
1291             }
1292             set
1293             {
1294                 base.IsCreateByXaml = value;
1295
1296                 if (value == true)
1297                 {
1298                     this.TextChanged += (obj, e) =>
1299                     {
1300                         this.Text = e.TextField.Text;
1301                     };
1302                 }
1303             }
1304         }
1305
1306         private TextFieldSelectorData SelectorData
1307         {
1308             get
1309             {
1310                 if (selectorData == null)
1311                 {
1312                     selectorData = new TextFieldSelectorData();
1313                 }
1314                 return selectorData;
1315             }
1316         }
1317
1318         /// <summary>
1319         /// Get the InputMethodContext instance.
1320         /// </summary>
1321         /// <returns>The InputMethodContext instance.</returns>
1322         /// <since_tizen> 5 </since_tizen>
1323         public InputMethodContext GetInputMethodContext()
1324         {
1325             if (inputMethodCotext == null)
1326             {
1327                 /*Avoid raising InputMethodContext reference count.*/
1328                 inputMethodCotext = new InputMethodContext(Interop.TextField.TextField_GetInputMethodContext(swigCPtr), true);
1329                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1330             }
1331             return inputMethodCotext;
1332         }
1333
1334         /// <summary>
1335         /// Select the whole text.
1336         /// </summary>
1337         /// <since_tizen> 6 </since_tizen>
1338         /// This will be released at Tizen.NET API Level 5.5, so currently this would be used as inhouse API.
1339         [EditorBrowsable(EditorBrowsableState.Never)]
1340         public void SelectWholeText()
1341         {
1342             Interop.TextField.TextField_SelectWholeText(swigCPtr);
1343             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1344         }
1345
1346         /// <summary>
1347         /// Clear selection of the text.
1348         /// </summary>
1349         /// <since_tizen> 8 </since_tizen>
1350         /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API.
1351         [EditorBrowsable(EditorBrowsableState.Never)]
1352         public void SelectNone()
1353         {
1354             Interop.TextField.TextField_SelectNone(swigCPtr);
1355             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1356         }
1357
1358         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj)
1359         {
1360             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1361         }
1362
1363         internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t InputStyleChangedSignal()
1364         {
1365             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.TextField_InputStyleChangedSignal(swigCPtr));
1366             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1367             return ret;
1368         }
1369
1370         /// <summary>
1371         /// Dispose.
1372         /// </summary>
1373         /// <since_tizen> 3 </since_tizen>
1374         protected override void Dispose(DisposeTypes type)
1375         {
1376             if (disposed)
1377             {
1378                 DisposeQueue.Instance.Add(this);
1379                 return;
1380             }
1381
1382             if (systemlangTextFlag)
1383             {
1384                 SystemSettings.LocaleLanguageChanged -= SystemSettings_LocaleLanguageChanged;
1385             }
1386
1387             if (type == DisposeTypes.Explicit)
1388             {
1389                 //Called by User
1390                 //Release your own managed resources here.
1391                 //You should release all of your own disposable objects here.
1392                 selectorData?.Reset(this);
1393             }
1394
1395             //Release your own unmanaged resources here.
1396             //You should not access any managed member here except static instance.
1397             //because the execution order of Finalizes is non-deterministic.
1398             if (this.HasBody())
1399             {
1400                 if (_textFieldMaxLengthReachedCallbackDelegate != null)
1401                 {
1402                     this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
1403                 }
1404
1405                 if (_textFieldTextChangedCallbackDelegate != null)
1406                 {
1407                     TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
1408                 }
1409             }
1410
1411             base.Dispose(type);
1412         }
1413
1414         /// This will not be public opened.
1415         [EditorBrowsable(EditorBrowsableState.Never)]
1416         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
1417         {
1418             // In order to speed up IME hide, temporarily add
1419             GetInputMethodContext()?.DestroyContext();
1420             Interop.TextField.delete_TextField(swigCPtr);
1421         }
1422
1423         private string SetTranslatable(string textFieldSid)
1424         {
1425             string translatableText = null;
1426             translatableText = NUIApplication.MultilingualResourceManager?.GetString(textFieldSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
1427             if (translatableText != null)
1428             {
1429                 if (systemlangTextFlag == false)
1430                 {
1431                     SystemSettings.LocaleLanguageChanged += SystemSettings_LocaleLanguageChanged;
1432                     systemlangTextFlag = true;
1433                 }
1434                 return translatableText;
1435             }
1436             else
1437             {
1438                 translatableText = "";
1439                 return translatableText;
1440             }
1441         }
1442
1443         private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
1444         {
1445             if (textFieldTextSid != null)
1446             {
1447                 Text = NUIApplication.MultilingualResourceManager?.GetString(textFieldTextSid, new CultureInfo(e.Value.Replace("_", "-")));
1448             }
1449             if (textFieldPlaceHolderTextSid != null)
1450             {
1451                 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
1452             }
1453         }
1454
1455         internal new class Property
1456         {
1457             internal static readonly int TEXT = Interop.TextField.TextField_Property_TEXT_get();
1458             internal static readonly int PLACEHOLDER_TEXT = Interop.TextField.TextField_Property_PLACEHOLDER_TEXT_get();
1459             internal static readonly int PLACEHOLDER_TEXT_FOCUSED = Interop.TextField.TextField_Property_PLACEHOLDER_TEXT_FOCUSED_get();
1460             internal static readonly int FONT_FAMILY = Interop.TextField.TextField_Property_FONT_FAMILY_get();
1461             internal static readonly int FONT_STYLE = Interop.TextField.TextField_Property_FONT_STYLE_get();
1462             internal static readonly int POINT_SIZE = Interop.TextField.TextField_Property_POINT_SIZE_get();
1463             internal static readonly int MAX_LENGTH = Interop.TextField.TextField_Property_MAX_LENGTH_get();
1464             internal static readonly int EXCEED_POLICY = Interop.TextField.TextField_Property_EXCEED_POLICY_get();
1465             internal static readonly int HORIZONTAL_ALIGNMENT = Interop.TextField.TextField_Property_HORIZONTAL_ALIGNMENT_get();
1466             internal static readonly int VERTICAL_ALIGNMENT = Interop.TextField.TextField_Property_VERTICAL_ALIGNMENT_get();
1467             internal static readonly int TEXT_COLOR = Interop.TextField.TextField_Property_TEXT_COLOR_get();
1468             internal static readonly int PLACEHOLDER_TEXT_COLOR = Interop.TextField.TextField_Property_PLACEHOLDER_TEXT_COLOR_get();
1469             internal static readonly int PRIMARY_CURSOR_COLOR = Interop.TextField.TextField_Property_PRIMARY_CURSOR_COLOR_get();
1470             internal static readonly int SECONDARY_CURSOR_COLOR = Interop.TextField.TextField_Property_SECONDARY_CURSOR_COLOR_get();
1471             internal static readonly int ENABLE_CURSOR_BLINK = Interop.TextField.TextField_Property_ENABLE_CURSOR_BLINK_get();
1472             internal static readonly int CURSOR_BLINK_INTERVAL = Interop.TextField.TextField_Property_CURSOR_BLINK_INTERVAL_get();
1473             internal static readonly int CURSOR_BLINK_DURATION = Interop.TextField.TextField_Property_CURSOR_BLINK_DURATION_get();
1474             internal static readonly int CURSOR_WIDTH = Interop.TextField.TextField_Property_CURSOR_WIDTH_get();
1475             internal static readonly int GRAB_HANDLE_IMAGE = Interop.TextField.TextField_Property_GRAB_HANDLE_IMAGE_get();
1476             internal static readonly int GRAB_HANDLE_PRESSED_IMAGE = Interop.TextField.TextField_Property_GRAB_HANDLE_PRESSED_IMAGE_get();
1477             internal static readonly int SCROLL_THRESHOLD = Interop.TextField.TextField_Property_SCROLL_THRESHOLD_get();
1478             internal static readonly int SCROLL_SPEED = Interop.TextField.TextField_Property_SCROLL_SPEED_get();
1479             internal static readonly int SELECTION_HANDLE_IMAGE_LEFT = Interop.TextField.TextField_Property_SELECTION_HANDLE_IMAGE_LEFT_get();
1480             internal static readonly int SELECTION_HANDLE_IMAGE_RIGHT = Interop.TextField.TextField_Property_SELECTION_HANDLE_IMAGE_RIGHT_get();
1481             internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_LEFT = Interop.TextField.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_LEFT_get();
1482             internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = Interop.TextField.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT_get();
1483             internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_LEFT = Interop.TextField.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_LEFT_get();
1484             internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_RIGHT = Interop.TextField.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_RIGHT_get();
1485             internal static readonly int SELECTION_HIGHLIGHT_COLOR = Interop.TextField.TextField_Property_SELECTION_HIGHLIGHT_COLOR_get();
1486             internal static readonly int DECORATION_BOUNDING_BOX = Interop.TextField.TextField_Property_DECORATION_BOUNDING_BOX_get();
1487             internal static readonly int INPUT_METHOD_SETTINGS = Interop.TextField.TextField_Property_INPUT_METHOD_SETTINGS_get();
1488             internal static readonly int INPUT_COLOR = Interop.TextField.TextField_Property_INPUT_COLOR_get();
1489             internal static readonly int ENABLE_MARKUP = Interop.TextField.TextField_Property_ENABLE_MARKUP_get();
1490             internal static readonly int INPUT_FONT_FAMILY = Interop.TextField.TextField_Property_INPUT_FONT_FAMILY_get();
1491             internal static readonly int INPUT_FONT_STYLE = Interop.TextField.TextField_Property_INPUT_FONT_STYLE_get();
1492             internal static readonly int INPUT_POINT_SIZE = Interop.TextField.TextField_Property_INPUT_POINT_SIZE_get();
1493             internal static readonly int UNDERLINE = Interop.TextField.TextField_Property_UNDERLINE_get();
1494             internal static readonly int INPUT_UNDERLINE = Interop.TextField.TextField_Property_INPUT_UNDERLINE_get();
1495             internal static readonly int SHADOW = Interop.TextField.TextField_Property_SHADOW_get();
1496             internal static readonly int INPUT_SHADOW = Interop.TextField.TextField_Property_INPUT_SHADOW_get();
1497             internal static readonly int EMBOSS = Interop.TextField.TextField_Property_EMBOSS_get();
1498             internal static readonly int INPUT_EMBOSS = Interop.TextField.TextField_Property_INPUT_EMBOSS_get();
1499             internal static readonly int OUTLINE = Interop.TextField.TextField_Property_OUTLINE_get();
1500             internal static readonly int INPUT_OUTLINE = Interop.TextField.TextField_Property_INPUT_OUTLINE_get();
1501             internal static readonly int HIDDEN_INPUT_SETTINGS = Interop.TextField.TextField_Property_HIDDEN_INPUT_SETTINGS_get();
1502             internal static readonly int PIXEL_SIZE = Interop.TextField.TextField_Property_PIXEL_SIZE_get();
1503             internal static readonly int ENABLE_SELECTION = Interop.TextField.TextField_Property_ENABLE_SELECTION_get();
1504             internal static readonly int PLACEHOLDER = Interop.TextField.TextField_Property_PLACEHOLDER_get();
1505             internal static readonly int ELLIPSIS = Interop.TextField.TextField_Property_ELLIPSIS_get();
1506             internal static readonly int ENABLE_SHIFT_SELECTION = Interop.TextField.TextField_Property_ENABLE_SHIFT_SELECTION_get();
1507             internal static readonly int MATCH_SYSTEM_LANGUAGE_DIRECTION = Interop.TextField.TextField_Property_MATCH_SYSTEM_LANGUAGE_DIRECTION_get();
1508             internal static readonly int ENABLE_GRAB_HANDLE = Interop.TextField.TextField_Property_ENABLE_GRAB_HANDLE_get();
1509             internal static readonly int ENABLE_GRAB_HANDLE_POPUP = Interop.TextField.TextField_Property_ENABLE_GRAB_HANDLE_POPUP_get();
1510             internal static readonly int SELECTED_TEXT = Interop.TextField.TextField_Property_SELECTED_TEXT_get();
1511             internal static readonly int SELECTED_TEXT_START = Interop.TextField.TextField_Property_SELECTED_TEXT_START_get();
1512             internal static readonly int SELECTED_TEXT_END = Interop.TextField.TextField_Property_SELECTED_TEXT_END_get();
1513             internal static readonly int ENABLE_EDITING = Interop.TextField.TextField_Property_ENABLE_EDITING_get();
1514         }
1515
1516         internal class InputStyle
1517         {
1518             internal enum Mask
1519             {
1520                 None = 0x0000,
1521                 Color = 0x0001,
1522                 FontFamily = 0x0002,
1523                 PointSize = 0x0004,
1524                 FontStyle = 0x0008,
1525                 Underline = 0x0010,
1526                 Shadow = 0x0020,
1527                 Emboss = 0x0040,
1528                 Outline = 0x0080
1529             }
1530         }
1531
1532         private void OnDecorationBoundingBoxChanged(int x, int y, int width, int height)
1533         {
1534             DecorationBoundingBox = new Rectangle(x, y, width, height);
1535         }
1536         private void OnInputColorChanged(float x, float y, float z, float w)
1537         {
1538             InputColor = new Vector4(x, y, z, w);
1539         }
1540         private void OnPlaceholderTextColorChanged(float r, float g, float b, float a)
1541         {
1542             PlaceholderTextColor = new Vector4(r, g, b, a);
1543         }
1544         private void OnPrimaryCursorColorChanged(float x, float y, float z, float w)
1545         {
1546             PrimaryCursorColor = new Vector4(x, y, z, w);
1547         }
1548         private void OnSecondaryCursorColorChanged(float x, float y, float z, float w)
1549         {
1550             SecondaryCursorColor = new Vector4(x, y, z, w);
1551         }
1552         private void OnSelectionHighlightColorChanged(float x, float y, float z, float w)
1553         {
1554             SelectionHighlightColor = new Vector4(x, y, z, w);
1555         }
1556         private void OnShadowColorChanged(float x, float y, float z, float w)
1557         {
1558             ShadowColor = new Vector4(x, y, z, w);
1559         }
1560         private void OnShadowOffsetChanged(float x, float y)
1561         {
1562             ShadowOffset = new Vector2(x, y);
1563         }
1564         private void OnTextColorChanged(float r, float g, float b, float a)
1565         {
1566             TextColor = new Color(r, g, b, a);
1567         }
1568     }
1569 }