2 * Copyright(c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 extern alias TizenSystemSettings;
18 using TizenSystemSettings.Tizen.System;
19 namespace Tizen.NUI.BaseComponents
23 using System.Runtime.InteropServices;
24 using System.Globalization;
26 /// A control which provides a single line editable text field.
28 public class TextField : View
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31 private string textFieldTextSid = null;
32 private string textFieldPlaceHolderTextSid = null;
33 private bool systemlangTextFlag = false;
35 internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextField_SWIGUpcast(cPtr), cMemoryOwn)
37 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
40 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj)
42 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
48 protected override void Dispose(DisposeTypes type)
52 DisposeQueue.Instance.Add(this);
56 if (type == DisposeTypes.Explicit)
59 //Release your own managed resources here.
60 //You should release all of your own disposable objects here.
63 //Release your own unmanaged resources here.
64 //You should not access any managed member here except static instance.
65 //because the execution order of Finalizes is non-deterministic.
67 if (_textFieldMaxLengthReachedCallbackDelegate != null)
69 this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
72 if (_textFieldTextChangedCallbackDelegate != null)
74 TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
77 if (swigCPtr.Handle != global::System.IntPtr.Zero)
82 NDalicPINVOKE.delete_TextField(swigCPtr);
84 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
91 /// The TextChanged event arguments.
93 public class TextChangedEventArgs : EventArgs
95 private TextField _textField;
100 /// <since_tizen> 3 </since_tizen>
101 public TextField TextField
115 /// The MaxLengthReached event arguments.
117 public class MaxLengthReachedEventArgs : EventArgs
119 private TextField _textField;
124 /// <since_tizen> 3 </since_tizen>
125 public TextField TextField
139 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
140 private delegate void TextChangedCallbackDelegate(IntPtr textField);
141 private EventHandler<TextChangedEventArgs> _textFieldTextChangedEventHandler;
142 private TextChangedCallbackDelegate _textFieldTextChangedCallbackDelegate;
144 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
145 private delegate void MaxLengthReachedCallbackDelegate(IntPtr textField);
146 private EventHandler<MaxLengthReachedEventArgs> _textFieldMaxLengthReachedEventHandler;
147 private MaxLengthReachedCallbackDelegate _textFieldMaxLengthReachedCallbackDelegate;
150 /// The TextChanged event.
152 /// <since_tizen> 3 </since_tizen>
153 public event EventHandler<TextChangedEventArgs> TextChanged
157 if (_textFieldTextChangedEventHandler == null)
159 _textFieldTextChangedCallbackDelegate = (OnTextChanged);
160 TextChangedSignal().Connect(_textFieldTextChangedCallbackDelegate);
162 _textFieldTextChangedEventHandler += value;
166 _textFieldTextChangedEventHandler -= value;
167 if (_textFieldTextChangedEventHandler == null && TextChangedSignal().Empty() == false)
169 TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
174 private void OnTextChanged(IntPtr textField)
176 TextChangedEventArgs e = new TextChangedEventArgs();
178 // Populate all members of "e" (TextChangedEventArgs) with real data
179 e.TextField = Registry.GetManagedBaseHandleFromNativePtr(textField) as TextField;
181 if (_textFieldTextChangedEventHandler != null)
183 //here we send all data to user event handlers
184 _textFieldTextChangedEventHandler(this, e);
190 /// The MaxLengthReached event.
192 /// <since_tizen> 3 </since_tizen>
193 public event EventHandler<MaxLengthReachedEventArgs> MaxLengthReached
197 if (_textFieldMaxLengthReachedEventHandler == null)
199 _textFieldMaxLengthReachedCallbackDelegate = (OnMaxLengthReached);
200 MaxLengthReachedSignal().Connect(_textFieldMaxLengthReachedCallbackDelegate);
202 _textFieldMaxLengthReachedEventHandler += value;
206 if (_textFieldMaxLengthReachedEventHandler == null && MaxLengthReachedSignal().Empty() == false)
208 this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
210 _textFieldMaxLengthReachedEventHandler -= value;
214 private void OnMaxLengthReached(IntPtr textField)
216 MaxLengthReachedEventArgs e = new MaxLengthReachedEventArgs();
218 // Populate all members of "e" (MaxLengthReachedEventArgs) with real data
219 e.TextField = Registry.GetManagedBaseHandleFromNativePtr(textField) as TextField;
221 if (_textFieldMaxLengthReachedEventHandler != null)
223 //here we send all data to user event handlers
224 _textFieldMaxLengthReachedEventHandler(this, e);
229 internal new class Property
231 internal static readonly int RENDERING_BACKEND = NDalicPINVOKE.TextField_Property_RENDERING_BACKEND_get();
232 internal static readonly int TEXT = NDalicPINVOKE.TextField_Property_TEXT_get();
233 internal static readonly int PLACEHOLDER_TEXT = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_get();
234 internal static readonly int PLACEHOLDER_TEXT_FOCUSED = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_FOCUSED_get();
235 internal static readonly int FONT_FAMILY = NDalicPINVOKE.TextField_Property_FONT_FAMILY_get();
236 internal static readonly int FONT_STYLE = NDalicPINVOKE.TextField_Property_FONT_STYLE_get();
237 internal static readonly int POINT_SIZE = NDalicPINVOKE.TextField_Property_POINT_SIZE_get();
238 internal static readonly int MAX_LENGTH = NDalicPINVOKE.TextField_Property_MAX_LENGTH_get();
239 internal static readonly int EXCEED_POLICY = NDalicPINVOKE.TextField_Property_EXCEED_POLICY_get();
240 internal static readonly int HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TextField_Property_HORIZONTAL_ALIGNMENT_get();
241 internal static readonly int VERTICAL_ALIGNMENT = NDalicPINVOKE.TextField_Property_VERTICAL_ALIGNMENT_get();
242 internal static readonly int TEXT_COLOR = NDalicPINVOKE.TextField_Property_TEXT_COLOR_get();
243 internal static readonly int PLACEHOLDER_TEXT_COLOR = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_COLOR_get();
244 internal static readonly int SHADOW_OFFSET = NDalicPINVOKE.TextField_Property_SHADOW_OFFSET_get();
245 internal static readonly int SHADOW_COLOR = NDalicPINVOKE.TextField_Property_SHADOW_COLOR_get();
246 internal static readonly int PRIMARY_CURSOR_COLOR = NDalicPINVOKE.TextField_Property_PRIMARY_CURSOR_COLOR_get();
247 internal static readonly int SECONDARY_CURSOR_COLOR = NDalicPINVOKE.TextField_Property_SECONDARY_CURSOR_COLOR_get();
248 internal static readonly int ENABLE_CURSOR_BLINK = NDalicPINVOKE.TextField_Property_ENABLE_CURSOR_BLINK_get();
249 internal static readonly int CURSOR_BLINK_INTERVAL = NDalicPINVOKE.TextField_Property_CURSOR_BLINK_INTERVAL_get();
250 internal static readonly int CURSOR_BLINK_DURATION = NDalicPINVOKE.TextField_Property_CURSOR_BLINK_DURATION_get();
251 internal static readonly int CURSOR_WIDTH = NDalicPINVOKE.TextField_Property_CURSOR_WIDTH_get();
252 internal static readonly int GRAB_HANDLE_IMAGE = NDalicPINVOKE.TextField_Property_GRAB_HANDLE_IMAGE_get();
253 internal static readonly int GRAB_HANDLE_PRESSED_IMAGE = NDalicPINVOKE.TextField_Property_GRAB_HANDLE_PRESSED_IMAGE_get();
254 internal static readonly int SCROLL_THRESHOLD = NDalicPINVOKE.TextField_Property_SCROLL_THRESHOLD_get();
255 internal static readonly int SCROLL_SPEED = NDalicPINVOKE.TextField_Property_SCROLL_SPEED_get();
256 internal static readonly int SELECTION_HANDLE_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_IMAGE_LEFT_get();
257 internal static readonly int SELECTION_HANDLE_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_IMAGE_RIGHT_get();
258 internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_LEFT_get();
259 internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT_get();
260 internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_LEFT_get();
261 internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_RIGHT_get();
262 internal static readonly int SELECTION_HIGHLIGHT_COLOR = NDalicPINVOKE.TextField_Property_SELECTION_HIGHLIGHT_COLOR_get();
263 internal static readonly int DECORATION_BOUNDING_BOX = NDalicPINVOKE.TextField_Property_DECORATION_BOUNDING_BOX_get();
264 internal static readonly int INPUT_METHOD_SETTINGS = NDalicPINVOKE.TextField_Property_INPUT_METHOD_SETTINGS_get();
265 internal static readonly int INPUT_COLOR = NDalicPINVOKE.TextField_Property_INPUT_COLOR_get();
266 internal static readonly int ENABLE_MARKUP = NDalicPINVOKE.TextField_Property_ENABLE_MARKUP_get();
267 internal static readonly int INPUT_FONT_FAMILY = NDalicPINVOKE.TextField_Property_INPUT_FONT_FAMILY_get();
268 internal static readonly int INPUT_FONT_STYLE = NDalicPINVOKE.TextField_Property_INPUT_FONT_STYLE_get();
269 internal static readonly int INPUT_POINT_SIZE = NDalicPINVOKE.TextField_Property_INPUT_POINT_SIZE_get();
270 internal static readonly int UNDERLINE = NDalicPINVOKE.TextField_Property_UNDERLINE_get();
271 internal static readonly int INPUT_UNDERLINE = NDalicPINVOKE.TextField_Property_INPUT_UNDERLINE_get();
272 internal static readonly int SHADOW = NDalicPINVOKE.TextField_Property_SHADOW_get();
273 internal static readonly int INPUT_SHADOW = NDalicPINVOKE.TextField_Property_INPUT_SHADOW_get();
274 internal static readonly int EMBOSS = NDalicPINVOKE.TextField_Property_EMBOSS_get();
275 internal static readonly int INPUT_EMBOSS = NDalicPINVOKE.TextField_Property_INPUT_EMBOSS_get();
276 internal static readonly int OUTLINE = NDalicPINVOKE.TextField_Property_OUTLINE_get();
277 internal static readonly int INPUT_OUTLINE = NDalicPINVOKE.TextField_Property_INPUT_OUTLINE_get();
278 internal static readonly int HIDDEN_INPUT_SETTINGS = NDalicManualPINVOKE.TextField_Property_HIDDEN_INPUT_SETTINGS_get();
279 internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextField_Property_PIXEL_SIZE_get();
280 internal static readonly int ENABLE_SELECTION = NDalicManualPINVOKE.TextField_Property_ENABLE_SELECTION_get();
281 internal static readonly int PLACEHOLDER = NDalicManualPINVOKE.TextField_Property_PLACEHOLDER_get();
282 internal static readonly int ELLIPSIS = NDalicManualPINVOKE.TextField_Property_ELLIPSIS_get();
285 internal class InputStyle
303 /// Creates the TextField control.
305 /// <since_tizen> 3 </since_tizen>
306 public TextField() : this(NDalicPINVOKE.TextField_New(), true)
308 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
311 internal TextField(TextField handle) : this(NDalicPINVOKE.new_TextField__SWIG_1(TextField.getCPtr(handle)), true)
313 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317 /// [Obsolete("Please do not use! this will be deprecated")]
319 /// <since_tizen> 3 </since_tizen>
320 [Obsolete("Please do not use! this will be deprecated")]
321 public new static TextField DownCast(BaseHandle handle)
323 TextField ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextField;
324 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
328 internal TextFieldSignal TextChangedSignal()
330 TextFieldSignal ret = new TextFieldSignal(NDalicPINVOKE.TextField_TextChangedSignal(swigCPtr), false);
331 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
335 internal TextFieldSignal MaxLengthReachedSignal()
337 TextFieldSignal ret = new TextFieldSignal(NDalicPINVOKE.TextField_MaxLengthReachedSignal(swigCPtr), false);
338 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
342 internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t InputStyleChangedSignal()
344 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(NDalicPINVOKE.TextField_InputStyleChangedSignal(swigCPtr), false);
345 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
349 internal enum ExceedPolicyType
351 ExceedPolicyOriginal,
356 /// The TranslatableText property.<br />
357 /// The text can set the SID value.<br />
359 /// <exception cref='ArgumentNullException'>
360 /// ResourceManager about multilingual is null.
362 /// <since_tizen> 4 </since_tizen>
363 public string TranslatableText
367 return textFieldTextSid;
371 if (NUIApplication.MultilingualResourceManager == null)
373 throw new ArgumentNullException("ResourceManager about multilingual is null");
375 textFieldTextSid = value;
376 Text = SetTranslatable(textFieldTextSid);
380 /// The TranslatablePlaceholderText property.<br />
381 /// The text can set the SID value.<br />
383 /// <exception cref='ArgumentNullException'>
384 /// ResourceManager about multilingual is null.
386 /// <since_tizen> 4 </since_tizen>
387 public string TranslatablePlaceholderText
391 return textFieldPlaceHolderTextSid;
395 if (NUIApplication.MultilingualResourceManager == null)
397 throw new ArgumentNullException("ResourceManager about multilingual is null");
399 textFieldPlaceHolderTextSid = value;
400 PlaceholderText = SetTranslatable(textFieldPlaceHolderTextSid);
403 private string SetTranslatable(string textFieldSid)
405 string translatableText = null;
406 translatableText = NUIApplication.MultilingualResourceManager?.GetString(textFieldSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
407 if (translatableText != null)
409 if (systemlangTextFlag == false)
411 SystemSettings.LocaleLanguageChanged += new WeakEventHandler<LocaleLanguageChangedEventArgs>(SystemSettings_LocaleLanguageChanged).Handler;
412 systemlangTextFlag = true;
414 return translatableText;
418 translatableText = "";
419 return translatableText;
422 private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
424 if (textFieldTextSid != null)
426 Text = NUIApplication.MultilingualResourceManager?.GetString(textFieldTextSid, new CultureInfo(e.Value.Replace("_", "-")));
428 if (textFieldPlaceHolderTextSid != null)
430 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
434 /// The Text property.
436 /// <since_tizen> 3 </since_tizen>
442 GetProperty(TextField.Property.TEXT).Get(out temp);
447 SetProperty(TextField.Property.TEXT, new Tizen.NUI.PropertyValue(value));
452 /// The PlaceholderText property.
454 /// <since_tizen> 3 </since_tizen>
455 public string PlaceholderText
460 GetProperty(TextField.Property.PLACEHOLDER_TEXT).Get(out temp);
465 SetProperty(TextField.Property.PLACEHOLDER_TEXT, new Tizen.NUI.PropertyValue(value));
470 /// The PlaceholderTextFocused property.
472 /// <since_tizen> 3 </since_tizen>
473 public string PlaceholderTextFocused
478 GetProperty(TextField.Property.PLACEHOLDER_TEXT_FOCUSED).Get(out temp);
483 SetProperty(TextField.Property.PLACEHOLDER_TEXT_FOCUSED, new Tizen.NUI.PropertyValue(value));
488 /// The FontFamily property.
490 /// <since_tizen> 3 </since_tizen>
491 public string FontFamily
496 GetProperty(TextField.Property.FONT_FAMILY).Get(out temp);
501 SetProperty(TextField.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
506 /// The FontStyle property.
508 /// <since_tizen> 3 </since_tizen>
509 public PropertyMap FontStyle
513 PropertyMap temp = new PropertyMap();
514 GetProperty(TextField.Property.FONT_STYLE).Get(temp);
519 SetProperty(TextField.Property.FONT_STYLE, new Tizen.NUI.PropertyValue(value));
524 /// The PointSize property.
526 /// <since_tizen> 3 </since_tizen>
527 public float PointSize
532 GetProperty(TextField.Property.POINT_SIZE).Get(out temp);
537 SetProperty(TextField.Property.POINT_SIZE, new Tizen.NUI.PropertyValue(value));
542 /// The MaxLength property.
544 /// <since_tizen> 3 </since_tizen>
550 GetProperty(TextField.Property.MAX_LENGTH).Get(out temp);
555 SetProperty(TextField.Property.MAX_LENGTH, new Tizen.NUI.PropertyValue(value));
560 /// The ExceedPolicy property.
562 /// <since_tizen> 3 </since_tizen>
563 public int ExceedPolicy
568 GetProperty(TextField.Property.EXCEED_POLICY).Get(out temp);
573 SetProperty(TextField.Property.EXCEED_POLICY, new Tizen.NUI.PropertyValue(value));
578 /// The HorizontalAlignment property.
580 /// <since_tizen> 3 </since_tizen>
581 public HorizontalAlignment HorizontalAlignment
586 if (GetProperty(TextField.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
588 NUILog.Error("HorizontalAlignment get error!");
594 return HorizontalAlignment.Begin;
596 return HorizontalAlignment.Center;
598 return HorizontalAlignment.End;
600 return HorizontalAlignment.Begin;
605 string valueToString = "";
608 case HorizontalAlignment.Begin:
610 valueToString = "BEGIN";
613 case HorizontalAlignment.Center:
615 valueToString = "CENTER";
618 case HorizontalAlignment.End:
620 valueToString = "END";
625 valueToString = "BEGIN";
629 SetProperty(TextField.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
634 /// The VerticalAlignment property.
636 /// <since_tizen> 3 </since_tizen>
637 public VerticalAlignment VerticalAlignment
642 if (GetProperty(TextField.Property.VERTICAL_ALIGNMENT).Get(out temp) == false)
644 NUILog.Error("VerticalAlignment get error!");
650 return VerticalAlignment.Top;
652 return VerticalAlignment.Center;
654 return VerticalAlignment.Bottom;
656 return VerticalAlignment.Bottom;
661 string valueToString = "";
664 case VerticalAlignment.Top:
666 valueToString = "TOP";
669 case VerticalAlignment.Center:
671 valueToString = "CENTER";
674 case VerticalAlignment.Bottom:
676 valueToString = "BOTTOM";
681 valueToString = "BOTTOM";
685 SetProperty(TextField.Property.VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
690 /// The TextColor property.
692 /// <since_tizen> 3 </since_tizen>
693 public Color TextColor
697 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
698 GetProperty(TextField.Property.TEXT_COLOR).Get(temp);
703 SetProperty(TextField.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
708 /// The PlaceholderTextColor property.
710 /// <since_tizen> 3 </since_tizen>
711 public Vector4 PlaceholderTextColor
715 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
716 GetProperty(TextField.Property.PLACEHOLDER_TEXT_COLOR).Get(temp);
721 SetProperty(TextField.Property.PLACEHOLDER_TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
726 /// The ShadowOffset property.
728 /// <since_tizen> 3 </since_tizen>
729 public Vector2 ShadowOffset
733 Vector2 temp = new Vector2(0.0f, 0.0f);
734 GetProperty(TextField.Property.SHADOW_OFFSET).Get(temp);
739 SetProperty(TextField.Property.SHADOW_OFFSET, new Tizen.NUI.PropertyValue(value));
744 /// The ShadowColor property.
746 /// <since_tizen> 3 </since_tizen>
747 public Vector4 ShadowColor
751 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
752 GetProperty(TextField.Property.SHADOW_COLOR).Get(temp);
757 SetProperty(TextField.Property.SHADOW_COLOR, new Tizen.NUI.PropertyValue(value));
762 /// The PrimaryCursorColor property.
764 /// <since_tizen> 3 </since_tizen>
765 public Vector4 PrimaryCursorColor
769 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
770 GetProperty(TextField.Property.PRIMARY_CURSOR_COLOR).Get(temp);
775 SetProperty(TextField.Property.PRIMARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue(value));
780 /// The SecondaryCursorColor property.
782 /// <since_tizen> 3 </since_tizen>
783 public Vector4 SecondaryCursorColor
787 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
788 GetProperty(TextField.Property.SECONDARY_CURSOR_COLOR).Get(temp);
793 SetProperty(TextField.Property.SECONDARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue(value));
798 /// The EnableCursorBlink property.
800 /// <since_tizen> 3 </since_tizen>
801 public bool EnableCursorBlink
806 GetProperty(TextField.Property.ENABLE_CURSOR_BLINK).Get(out temp);
811 SetProperty(TextField.Property.ENABLE_CURSOR_BLINK, new Tizen.NUI.PropertyValue(value));
816 /// The CursorBlinkInterval property.
818 /// <since_tizen> 3 </since_tizen>
819 public float CursorBlinkInterval
824 GetProperty(TextField.Property.CURSOR_BLINK_INTERVAL).Get(out temp);
829 SetProperty(TextField.Property.CURSOR_BLINK_INTERVAL, new Tizen.NUI.PropertyValue(value));
834 /// The CursorBlinkDuration property.
836 /// <since_tizen> 3 </since_tizen>
837 public float CursorBlinkDuration
842 GetProperty(TextField.Property.CURSOR_BLINK_DURATION).Get(out temp);
847 SetProperty(TextField.Property.CURSOR_BLINK_DURATION, new Tizen.NUI.PropertyValue(value));
852 /// The CursorWidth property.
854 /// <since_tizen> 3 </since_tizen>
855 public int CursorWidth
860 GetProperty(TextField.Property.CURSOR_WIDTH).Get(out temp);
865 SetProperty(TextField.Property.CURSOR_WIDTH, new Tizen.NUI.PropertyValue(value));
870 /// The GrabHandleImage property.
872 /// <since_tizen> 3 </since_tizen>
873 public string GrabHandleImage
878 GetProperty(TextField.Property.GRAB_HANDLE_IMAGE).Get(out temp);
883 SetProperty(TextField.Property.GRAB_HANDLE_IMAGE, new Tizen.NUI.PropertyValue(value));
888 /// The GrabHandlePressedImage property.
890 /// <since_tizen> 3 </since_tizen>
891 public string GrabHandlePressedImage
896 GetProperty(TextField.Property.GRAB_HANDLE_PRESSED_IMAGE).Get(out temp);
901 SetProperty(TextField.Property.GRAB_HANDLE_PRESSED_IMAGE, new Tizen.NUI.PropertyValue(value));
906 /// The ScrollThreshold property.
908 /// <since_tizen> 3 </since_tizen>
909 public float ScrollThreshold
914 GetProperty(TextField.Property.SCROLL_THRESHOLD).Get(out temp);
919 SetProperty(TextField.Property.SCROLL_THRESHOLD, new Tizen.NUI.PropertyValue(value));
924 /// The ScrollSpeed property.
926 /// <since_tizen> 3 </since_tizen>
927 public float ScrollSpeed
932 GetProperty(TextField.Property.SCROLL_SPEED).Get(out temp);
937 SetProperty(TextField.Property.SCROLL_SPEED, new Tizen.NUI.PropertyValue(value));
942 /// The SelectionHandleImageLeft property.
944 /// <since_tizen> 3 </since_tizen>
945 public PropertyMap SelectionHandleImageLeft
949 PropertyMap temp = new PropertyMap();
950 GetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_LEFT).Get(temp);
955 SetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
960 /// The SelectionHandleImageRight property.
962 /// <since_tizen> 3 </since_tizen>
963 public PropertyMap SelectionHandleImageRight
967 PropertyMap temp = new PropertyMap();
968 GetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_RIGHT).Get(temp);
973 SetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
978 /// The SelectionHandlePressedImageLeft property.
980 /// <since_tizen> 3 </since_tizen>
981 public PropertyMap SelectionHandlePressedImageLeft
985 PropertyMap temp = new PropertyMap();
986 GetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT).Get(temp);
991 SetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
996 /// The SelectionHandlePressedImageRight property.
998 /// <since_tizen> 3 </since_tizen>
999 public PropertyMap SelectionHandlePressedImageRight
1003 PropertyMap temp = new PropertyMap();
1004 GetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT).Get(temp);
1009 SetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
1014 /// The SelectionHandleMarkerImageLeft property.
1016 /// <since_tizen> 3 </since_tizen>
1017 public PropertyMap SelectionHandleMarkerImageLeft
1021 PropertyMap temp = new PropertyMap();
1022 GetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT).Get(temp);
1027 SetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
1032 /// The SelectionHandleMarkerImageRight property.
1034 /// <since_tizen> 3 </since_tizen>
1035 public PropertyMap SelectionHandleMarkerImageRight
1039 PropertyMap temp = new PropertyMap();
1040 GetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT).Get(temp);
1045 SetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
1050 /// The SelectionHighlightColor property.
1052 /// <since_tizen> 3 </since_tizen>
1053 public Vector4 SelectionHighlightColor
1057 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1058 GetProperty(TextField.Property.SELECTION_HIGHLIGHT_COLOR).Get(temp);
1063 SetProperty(TextField.Property.SELECTION_HIGHLIGHT_COLOR, new Tizen.NUI.PropertyValue(value));
1068 /// The DecorationBoundingBox property.
1070 /// <since_tizen> 3 </since_tizen>
1071 public Rectangle DecorationBoundingBox
1075 Rectangle temp = new Rectangle(0, 0, 0, 0);
1076 GetProperty(TextField.Property.DECORATION_BOUNDING_BOX).Get(temp);
1081 SetProperty(TextField.Property.DECORATION_BOUNDING_BOX, new Tizen.NUI.PropertyValue(value));
1086 /// The InputMethodSettings property.
1088 /// <since_tizen> 3 </since_tizen>
1089 public PropertyMap InputMethodSettings
1093 PropertyMap temp = new PropertyMap();
1094 GetProperty(TextField.Property.INPUT_METHOD_SETTINGS).Get(temp);
1099 SetProperty(TextField.Property.INPUT_METHOD_SETTINGS, new Tizen.NUI.PropertyValue(value));
1104 /// The InputColor property.
1106 /// <since_tizen> 3 </since_tizen>
1107 public Vector4 InputColor
1111 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1112 GetProperty(TextField.Property.INPUT_COLOR).Get(temp);
1117 SetProperty(TextField.Property.INPUT_COLOR, new Tizen.NUI.PropertyValue(value));
1122 /// The EnableMarkup property.
1124 /// <since_tizen> 3 </since_tizen>
1125 public bool EnableMarkup
1130 GetProperty(TextField.Property.ENABLE_MARKUP).Get(out temp);
1135 SetProperty(TextField.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue(value));
1140 /// The InputFontFamily property.
1142 /// <since_tizen> 3 </since_tizen>
1143 public string InputFontFamily
1148 GetProperty(TextField.Property.INPUT_FONT_FAMILY).Get(out temp);
1153 SetProperty(TextField.Property.INPUT_FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
1158 /// The InputFontStyle property.
1160 /// <since_tizen> 3 </since_tizen>
1161 public PropertyMap InputFontStyle
1165 PropertyMap temp = new PropertyMap();
1166 GetProperty(TextField.Property.INPUT_FONT_STYLE).Get(temp);
1171 SetProperty(TextField.Property.INPUT_FONT_STYLE, new Tizen.NUI.PropertyValue(value));
1176 /// The InputPointSize property.
1178 /// <since_tizen> 3 </since_tizen>
1179 public float InputPointSize
1184 GetProperty(TextField.Property.INPUT_POINT_SIZE).Get(out temp);
1189 SetProperty(TextField.Property.INPUT_POINT_SIZE, new Tizen.NUI.PropertyValue(value));
1194 /// The Underline property.
1196 /// <since_tizen> 3 </since_tizen>
1197 public PropertyMap Underline
1201 PropertyMap temp = new PropertyMap();
1202 GetProperty(TextField.Property.UNDERLINE).Get(temp);
1207 SetProperty(TextField.Property.UNDERLINE, new Tizen.NUI.PropertyValue(value));
1212 /// The InputUnderline property.
1214 /// <since_tizen> 3 </since_tizen>
1215 public string InputUnderline
1220 GetProperty(TextField.Property.INPUT_UNDERLINE).Get(out temp);
1225 SetProperty(TextField.Property.INPUT_UNDERLINE, new Tizen.NUI.PropertyValue(value));
1230 /// The Shadow property.
1232 /// <since_tizen> 3 </since_tizen>
1233 public PropertyMap Shadow
1237 PropertyMap temp = new PropertyMap();
1238 GetProperty(TextField.Property.SHADOW).Get(temp);
1243 SetProperty(TextField.Property.SHADOW, new Tizen.NUI.PropertyValue(value));
1248 /// The InputShadow property.
1250 /// <since_tizen> 3 </since_tizen>
1251 public string InputShadow
1256 GetProperty(TextField.Property.INPUT_SHADOW).Get(out temp);
1261 SetProperty(TextField.Property.INPUT_SHADOW, new Tizen.NUI.PropertyValue(value));
1266 /// The Emboss property.
1268 /// <since_tizen> 3 </since_tizen>
1269 public string Emboss
1274 GetProperty(TextField.Property.EMBOSS).Get(out temp);
1279 SetProperty(TextField.Property.EMBOSS, new Tizen.NUI.PropertyValue(value));
1284 /// The InputEmboss property.
1286 /// <since_tizen> 3 </since_tizen>
1287 public string InputEmboss
1292 GetProperty(TextField.Property.INPUT_EMBOSS).Get(out temp);
1297 SetProperty(TextField.Property.INPUT_EMBOSS, new Tizen.NUI.PropertyValue(value));
1302 /// The Outline property.
1304 /// <since_tizen> 3 </since_tizen>
1305 public PropertyMap Outline
1309 PropertyMap temp = new PropertyMap();
1310 GetProperty(TextField.Property.OUTLINE).Get(temp);
1315 SetProperty(TextField.Property.OUTLINE, new Tizen.NUI.PropertyValue(value));
1320 /// The InputOutline property.
1322 /// <since_tizen> 3 </since_tizen>
1323 public string InputOutline
1328 GetProperty(TextField.Property.INPUT_OUTLINE).Get(out temp);
1333 SetProperty(TextField.Property.INPUT_OUTLINE, new Tizen.NUI.PropertyValue(value));
1338 /// The HiddenInputSettings property.
1340 /// <since_tizen> 3 </since_tizen>
1341 public Tizen.NUI.PropertyMap HiddenInputSettings
1345 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1346 GetProperty(TextField.Property.HIDDEN_INPUT_SETTINGS).Get(temp);
1351 SetProperty(TextField.Property.HIDDEN_INPUT_SETTINGS, new Tizen.NUI.PropertyValue(value));
1356 /// The PixelSize property.
1358 /// <since_tizen> 3 </since_tizen>
1359 public float PixelSize
1364 GetProperty(TextField.Property.PIXEL_SIZE).Get(out temp);
1369 SetProperty(TextField.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue(value));
1374 /// The Enable selection property.
1376 /// <since_tizen> 4 </since_tizen>
1377 public bool EnableSelection
1382 GetProperty(TextField.Property.ENABLE_SELECTION).Get(out temp);
1387 SetProperty(TextField.Property.ENABLE_SELECTION, new Tizen.NUI.PropertyValue(value));
1392 /// The Placeholder property.
1393 /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
1396 /// The following example demonstrates how to set the Placeholder property.
1398 /// PropertyMap propertyMap = new PropertyMap();
1399 /// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
1400 /// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
1401 /// propertyMap.Add("color", new PropertyValue(Color.Red));
1402 /// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
1403 /// propertyMap.Add("pointSize", new PropertyValue(12.0f));
1405 /// PropertyMap fontStyleMap = new PropertyMap();
1406 /// fontStyleMap.Add("weight", new PropertyValue("bold"));
1407 /// fontStyleMap.Add("width", new PropertyValue("condensed"));
1408 /// fontStyleMap.Add("slant", new PropertyValue("italic"));
1409 /// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
1411 /// TextField field = new TextField();
1412 /// field.Placeholder = propertyMap;
1415 /// <since_tizen> 4 </since_tizen>
1416 public Tizen.NUI.PropertyMap Placeholder
1420 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1421 GetProperty(TextField.Property.PLACEHOLDER).Get(temp);
1426 SetProperty(TextField.Property.PLACEHOLDER, new Tizen.NUI.PropertyValue(value));
1431 /// The Ellipsis property.<br />
1432 /// Enable or disable the ellipsis.<br />
1433 /// Placeholder PropertyMap is used to add ellipsis to placeholder text.
1435 /// <since_tizen> 4 </since_tizen>
1436 public bool Ellipsis
1441 GetProperty(TextField.Property.ELLIPSIS).Get(out temp);
1446 SetProperty(TextField.Property.ELLIPSIS, new Tizen.NUI.PropertyValue(value));