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;
21 using System.Runtime.InteropServices;
22 using System.Globalization;
23 using System.ComponentModel;
25 namespace Tizen.NUI.BaseComponents
28 /// A control which provides a single line editable text field.
30 public class TextField : View
32 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
33 private string textFieldTextSid = null;
34 private string textFieldPlaceHolderTextSid = null;
35 private bool systemlangTextFlag = false;
37 internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextField_SWIGUpcast(cPtr), cMemoryOwn)
39 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
42 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj)
44 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
50 protected override void Dispose(DisposeTypes type)
54 DisposeQueue.Instance.Add(this);
58 if (type == DisposeTypes.Explicit)
61 //Release your own managed resources here.
62 //You should release all of your own disposable objects here.
65 //Release your own unmanaged resources here.
66 //You should not access any managed member here except static instance.
67 //because the execution order of Finalizes is non-deterministic.
69 if (_textFieldMaxLengthReachedCallbackDelegate != null)
71 this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
74 if (_textFieldTextChangedCallbackDelegate != null)
76 TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
79 if (swigCPtr.Handle != global::System.IntPtr.Zero)
84 NDalicPINVOKE.delete_TextField(swigCPtr);
86 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
93 /// The TextChanged event arguments.
95 public class TextChangedEventArgs : EventArgs
97 private TextField _textField;
102 /// <since_tizen> 3 </since_tizen>
103 public TextField TextField
117 /// The MaxLengthReached event arguments.
119 public class MaxLengthReachedEventArgs : EventArgs
121 private TextField _textField;
126 /// <since_tizen> 3 </since_tizen>
127 public TextField TextField
141 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
142 private delegate void TextChangedCallbackDelegate(IntPtr textField);
143 private EventHandler<TextChangedEventArgs> _textFieldTextChangedEventHandler;
144 private TextChangedCallbackDelegate _textFieldTextChangedCallbackDelegate;
146 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
147 private delegate void MaxLengthReachedCallbackDelegate(IntPtr textField);
148 private EventHandler<MaxLengthReachedEventArgs> _textFieldMaxLengthReachedEventHandler;
149 private MaxLengthReachedCallbackDelegate _textFieldMaxLengthReachedCallbackDelegate;
152 /// The TextChanged event.
154 /// <since_tizen> 3 </since_tizen>
155 public event EventHandler<TextChangedEventArgs> TextChanged
159 if (_textFieldTextChangedEventHandler == null)
161 _textFieldTextChangedCallbackDelegate = (OnTextChanged);
162 TextChangedSignal().Connect(_textFieldTextChangedCallbackDelegate);
164 _textFieldTextChangedEventHandler += value;
168 _textFieldTextChangedEventHandler -= value;
169 if (_textFieldTextChangedEventHandler == null && TextChangedSignal().Empty() == false)
171 TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
176 private void OnTextChanged(IntPtr textField)
178 TextChangedEventArgs e = new TextChangedEventArgs();
180 // Populate all members of "e" (TextChangedEventArgs) with real data
181 e.TextField = Registry.GetManagedBaseHandleFromNativePtr(textField) as TextField;
183 if (_textFieldTextChangedEventHandler != null)
185 //here we send all data to user event handlers
186 _textFieldTextChangedEventHandler(this, e);
192 /// The MaxLengthReached event.
194 /// <since_tizen> 3 </since_tizen>
195 public event EventHandler<MaxLengthReachedEventArgs> MaxLengthReached
199 if (_textFieldMaxLengthReachedEventHandler == null)
201 _textFieldMaxLengthReachedCallbackDelegate = (OnMaxLengthReached);
202 MaxLengthReachedSignal().Connect(_textFieldMaxLengthReachedCallbackDelegate);
204 _textFieldMaxLengthReachedEventHandler += value;
208 if (_textFieldMaxLengthReachedEventHandler == null && MaxLengthReachedSignal().Empty() == false)
210 this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
212 _textFieldMaxLengthReachedEventHandler -= value;
216 private void OnMaxLengthReached(IntPtr textField)
218 MaxLengthReachedEventArgs e = new MaxLengthReachedEventArgs();
220 // Populate all members of "e" (MaxLengthReachedEventArgs) with real data
221 e.TextField = Registry.GetManagedBaseHandleFromNativePtr(textField) as TextField;
223 if (_textFieldMaxLengthReachedEventHandler != null)
225 //here we send all data to user event handlers
226 _textFieldMaxLengthReachedEventHandler(this, e);
231 internal new class Property
233 internal static readonly int RENDERING_BACKEND = NDalicPINVOKE.TextField_Property_RENDERING_BACKEND_get();
234 internal static readonly int TEXT = NDalicPINVOKE.TextField_Property_TEXT_get();
235 internal static readonly int PLACEHOLDER_TEXT = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_get();
236 internal static readonly int PLACEHOLDER_TEXT_FOCUSED = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_FOCUSED_get();
237 internal static readonly int FONT_FAMILY = NDalicPINVOKE.TextField_Property_FONT_FAMILY_get();
238 internal static readonly int FONT_STYLE = NDalicPINVOKE.TextField_Property_FONT_STYLE_get();
239 internal static readonly int POINT_SIZE = NDalicPINVOKE.TextField_Property_POINT_SIZE_get();
240 internal static readonly int MAX_LENGTH = NDalicPINVOKE.TextField_Property_MAX_LENGTH_get();
241 internal static readonly int EXCEED_POLICY = NDalicPINVOKE.TextField_Property_EXCEED_POLICY_get();
242 internal static readonly int HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TextField_Property_HORIZONTAL_ALIGNMENT_get();
243 internal static readonly int VERTICAL_ALIGNMENT = NDalicPINVOKE.TextField_Property_VERTICAL_ALIGNMENT_get();
244 internal static readonly int TEXT_COLOR = NDalicPINVOKE.TextField_Property_TEXT_COLOR_get();
245 internal static readonly int PLACEHOLDER_TEXT_COLOR = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_COLOR_get();
246 internal static readonly int SHADOW_OFFSET = NDalicPINVOKE.TextField_Property_SHADOW_OFFSET_get();
247 internal static readonly int SHADOW_COLOR = NDalicPINVOKE.TextField_Property_SHADOW_COLOR_get();
248 internal static readonly int PRIMARY_CURSOR_COLOR = NDalicPINVOKE.TextField_Property_PRIMARY_CURSOR_COLOR_get();
249 internal static readonly int SECONDARY_CURSOR_COLOR = NDalicPINVOKE.TextField_Property_SECONDARY_CURSOR_COLOR_get();
250 internal static readonly int ENABLE_CURSOR_BLINK = NDalicPINVOKE.TextField_Property_ENABLE_CURSOR_BLINK_get();
251 internal static readonly int CURSOR_BLINK_INTERVAL = NDalicPINVOKE.TextField_Property_CURSOR_BLINK_INTERVAL_get();
252 internal static readonly int CURSOR_BLINK_DURATION = NDalicPINVOKE.TextField_Property_CURSOR_BLINK_DURATION_get();
253 internal static readonly int CURSOR_WIDTH = NDalicPINVOKE.TextField_Property_CURSOR_WIDTH_get();
254 internal static readonly int GRAB_HANDLE_IMAGE = NDalicPINVOKE.TextField_Property_GRAB_HANDLE_IMAGE_get();
255 internal static readonly int GRAB_HANDLE_PRESSED_IMAGE = NDalicPINVOKE.TextField_Property_GRAB_HANDLE_PRESSED_IMAGE_get();
256 internal static readonly int SCROLL_THRESHOLD = NDalicPINVOKE.TextField_Property_SCROLL_THRESHOLD_get();
257 internal static readonly int SCROLL_SPEED = NDalicPINVOKE.TextField_Property_SCROLL_SPEED_get();
258 internal static readonly int SELECTION_HANDLE_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_IMAGE_LEFT_get();
259 internal static readonly int SELECTION_HANDLE_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_IMAGE_RIGHT_get();
260 internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_LEFT_get();
261 internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT_get();
262 internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_LEFT_get();
263 internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_RIGHT_get();
264 internal static readonly int SELECTION_HIGHLIGHT_COLOR = NDalicPINVOKE.TextField_Property_SELECTION_HIGHLIGHT_COLOR_get();
265 internal static readonly int DECORATION_BOUNDING_BOX = NDalicPINVOKE.TextField_Property_DECORATION_BOUNDING_BOX_get();
266 internal static readonly int INPUT_METHOD_SETTINGS = NDalicPINVOKE.TextField_Property_INPUT_METHOD_SETTINGS_get();
267 internal static readonly int INPUT_COLOR = NDalicPINVOKE.TextField_Property_INPUT_COLOR_get();
268 internal static readonly int ENABLE_MARKUP = NDalicPINVOKE.TextField_Property_ENABLE_MARKUP_get();
269 internal static readonly int INPUT_FONT_FAMILY = NDalicPINVOKE.TextField_Property_INPUT_FONT_FAMILY_get();
270 internal static readonly int INPUT_FONT_STYLE = NDalicPINVOKE.TextField_Property_INPUT_FONT_STYLE_get();
271 internal static readonly int INPUT_POINT_SIZE = NDalicPINVOKE.TextField_Property_INPUT_POINT_SIZE_get();
272 internal static readonly int UNDERLINE = NDalicPINVOKE.TextField_Property_UNDERLINE_get();
273 internal static readonly int INPUT_UNDERLINE = NDalicPINVOKE.TextField_Property_INPUT_UNDERLINE_get();
274 internal static readonly int SHADOW = NDalicPINVOKE.TextField_Property_SHADOW_get();
275 internal static readonly int INPUT_SHADOW = NDalicPINVOKE.TextField_Property_INPUT_SHADOW_get();
276 internal static readonly int EMBOSS = NDalicPINVOKE.TextField_Property_EMBOSS_get();
277 internal static readonly int INPUT_EMBOSS = NDalicPINVOKE.TextField_Property_INPUT_EMBOSS_get();
278 internal static readonly int OUTLINE = NDalicPINVOKE.TextField_Property_OUTLINE_get();
279 internal static readonly int INPUT_OUTLINE = NDalicPINVOKE.TextField_Property_INPUT_OUTLINE_get();
280 internal static readonly int HIDDEN_INPUT_SETTINGS = NDalicManualPINVOKE.TextField_Property_HIDDEN_INPUT_SETTINGS_get();
281 internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextField_Property_PIXEL_SIZE_get();
282 internal static readonly int ENABLE_SELECTION = NDalicManualPINVOKE.TextField_Property_ENABLE_SELECTION_get();
283 internal static readonly int PLACEHOLDER = NDalicManualPINVOKE.TextField_Property_PLACEHOLDER_get();
284 internal static readonly int ELLIPSIS = NDalicManualPINVOKE.TextField_Property_ELLIPSIS_get();
287 internal class InputStyle
305 /// Creates the TextField control.
307 /// <since_tizen> 3 </since_tizen>
308 public TextField() : this(NDalicPINVOKE.TextField_New(), true)
310 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
313 internal TextField(TextField handle) : this(NDalicPINVOKE.new_TextField__SWIG_1(TextField.getCPtr(handle)), true)
315 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
319 /// Downcasts a handle to textField handle.
321 /// <since_tizen> 3 </since_tizen>
322 /// Please do not use! this will be deprecated!
323 /// Instead please use as keyword.
324 [Obsolete("Please DO NOT use! This will be deprecated, instead please USE as keyword.")]
325 [EditorBrowsable(EditorBrowsableState.Never)]
326 public new static TextField DownCast(BaseHandle handle)
328 TextField ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextField;
329 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
333 internal TextFieldSignal TextChangedSignal()
335 TextFieldSignal ret = new TextFieldSignal(NDalicPINVOKE.TextField_TextChangedSignal(swigCPtr), false);
336 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
340 internal TextFieldSignal MaxLengthReachedSignal()
342 TextFieldSignal ret = new TextFieldSignal(NDalicPINVOKE.TextField_MaxLengthReachedSignal(swigCPtr), false);
343 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
347 internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t InputStyleChangedSignal()
349 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);
350 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
354 internal enum ExceedPolicyType
356 ExceedPolicyOriginal,
361 /// The TranslatableText property.<br />
362 /// The text can set the SID value.<br />
364 /// <exception cref='ArgumentNullException'>
365 /// ResourceManager about multilingual is null.
367 /// <since_tizen> 4 </since_tizen>
368 public string TranslatableText
372 return textFieldTextSid;
376 if (NUIApplication.MultilingualResourceManager == null)
378 throw new ArgumentNullException("ResourceManager about multilingual is null");
380 textFieldTextSid = value;
381 Text = SetTranslatable(textFieldTextSid);
385 /// The TranslatablePlaceholderText property.<br />
386 /// The text can set the SID value.<br />
388 /// <exception cref='ArgumentNullException'>
389 /// ResourceManager about multilingual is null.
391 /// <since_tizen> 4 </since_tizen>
392 public string TranslatablePlaceholderText
396 return textFieldPlaceHolderTextSid;
400 if (NUIApplication.MultilingualResourceManager == null)
402 throw new ArgumentNullException("ResourceManager about multilingual is null");
404 textFieldPlaceHolderTextSid = value;
405 PlaceholderText = SetTranslatable(textFieldPlaceHolderTextSid);
408 private string SetTranslatable(string textFieldSid)
410 string translatableText = null;
411 translatableText = NUIApplication.MultilingualResourceManager?.GetString(textFieldSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
412 if (translatableText != null)
414 if (systemlangTextFlag == false)
416 SystemSettings.LocaleLanguageChanged += new WeakEventHandler<LocaleLanguageChangedEventArgs>(SystemSettings_LocaleLanguageChanged).Handler;
417 systemlangTextFlag = true;
419 return translatableText;
423 translatableText = "";
424 return translatableText;
427 private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
429 if (textFieldTextSid != null)
431 Text = NUIApplication.MultilingualResourceManager?.GetString(textFieldTextSid, new CultureInfo(e.Value.Replace("_", "-")));
433 if (textFieldPlaceHolderTextSid != null)
435 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
439 /// The Text property.
441 /// <since_tizen> 3 </since_tizen>
447 GetProperty(TextField.Property.TEXT).Get(out temp);
452 SetProperty(TextField.Property.TEXT, new Tizen.NUI.PropertyValue(value));
457 /// The PlaceholderText property.
459 /// <since_tizen> 3 </since_tizen>
460 public string PlaceholderText
465 GetProperty(TextField.Property.PLACEHOLDER_TEXT).Get(out temp);
470 SetProperty(TextField.Property.PLACEHOLDER_TEXT, new Tizen.NUI.PropertyValue(value));
475 /// The PlaceholderTextFocused property.
477 /// <since_tizen> 3 </since_tizen>
478 public string PlaceholderTextFocused
483 GetProperty(TextField.Property.PLACEHOLDER_TEXT_FOCUSED).Get(out temp);
488 SetProperty(TextField.Property.PLACEHOLDER_TEXT_FOCUSED, new Tizen.NUI.PropertyValue(value));
493 /// The FontFamily property.
495 /// <since_tizen> 3 </since_tizen>
496 public string FontFamily
501 GetProperty(TextField.Property.FONT_FAMILY).Get(out temp);
506 SetProperty(TextField.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
511 /// The FontStyle property.
513 /// <since_tizen> 3 </since_tizen>
514 public PropertyMap FontStyle
518 PropertyMap temp = new PropertyMap();
519 GetProperty(TextField.Property.FONT_STYLE).Get(temp);
524 SetProperty(TextField.Property.FONT_STYLE, new Tizen.NUI.PropertyValue(value));
529 /// The PointSize property.
531 /// <since_tizen> 3 </since_tizen>
532 public float PointSize
537 GetProperty(TextField.Property.POINT_SIZE).Get(out temp);
542 SetProperty(TextField.Property.POINT_SIZE, new Tizen.NUI.PropertyValue(value));
547 /// The MaxLength property.
549 /// <since_tizen> 3 </since_tizen>
555 GetProperty(TextField.Property.MAX_LENGTH).Get(out temp);
560 SetProperty(TextField.Property.MAX_LENGTH, new Tizen.NUI.PropertyValue(value));
565 /// The ExceedPolicy property.
567 /// <since_tizen> 3 </since_tizen>
568 public int ExceedPolicy
573 GetProperty(TextField.Property.EXCEED_POLICY).Get(out temp);
578 SetProperty(TextField.Property.EXCEED_POLICY, new Tizen.NUI.PropertyValue(value));
583 /// The HorizontalAlignment property.
585 /// <since_tizen> 3 </since_tizen>
586 public HorizontalAlignment HorizontalAlignment
591 if (GetProperty(TextField.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
593 NUILog.Error("HorizontalAlignment get error!");
599 return HorizontalAlignment.Begin;
601 return HorizontalAlignment.Center;
603 return HorizontalAlignment.End;
605 return HorizontalAlignment.Begin;
610 string valueToString = "";
613 case HorizontalAlignment.Begin:
615 valueToString = "BEGIN";
618 case HorizontalAlignment.Center:
620 valueToString = "CENTER";
623 case HorizontalAlignment.End:
625 valueToString = "END";
630 valueToString = "BEGIN";
634 SetProperty(TextField.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
639 /// The VerticalAlignment property.
641 /// <since_tizen> 3 </since_tizen>
642 public VerticalAlignment VerticalAlignment
647 if (GetProperty(TextField.Property.VERTICAL_ALIGNMENT).Get(out temp) == false)
649 NUILog.Error("VerticalAlignment get error!");
655 return VerticalAlignment.Top;
657 return VerticalAlignment.Center;
659 return VerticalAlignment.Bottom;
661 return VerticalAlignment.Bottom;
666 string valueToString = "";
669 case VerticalAlignment.Top:
671 valueToString = "TOP";
674 case VerticalAlignment.Center:
676 valueToString = "CENTER";
679 case VerticalAlignment.Bottom:
681 valueToString = "BOTTOM";
686 valueToString = "BOTTOM";
690 SetProperty(TextField.Property.VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
695 /// The TextColor property.
697 /// <since_tizen> 3 </since_tizen>
698 public Color TextColor
702 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
703 GetProperty(TextField.Property.TEXT_COLOR).Get(temp);
708 SetProperty(TextField.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
713 /// The PlaceholderTextColor property.
715 /// <since_tizen> 3 </since_tizen>
716 public Vector4 PlaceholderTextColor
720 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
721 GetProperty(TextField.Property.PLACEHOLDER_TEXT_COLOR).Get(temp);
726 SetProperty(TextField.Property.PLACEHOLDER_TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
731 /// The ShadowOffset property.
733 /// <since_tizen> 3 </since_tizen>
734 public Vector2 ShadowOffset
738 Vector2 temp = new Vector2(0.0f, 0.0f);
739 GetProperty(TextField.Property.SHADOW_OFFSET).Get(temp);
744 SetProperty(TextField.Property.SHADOW_OFFSET, new Tizen.NUI.PropertyValue(value));
749 /// The ShadowColor property.
751 /// <since_tizen> 3 </since_tizen>
752 public Vector4 ShadowColor
756 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
757 GetProperty(TextField.Property.SHADOW_COLOR).Get(temp);
762 SetProperty(TextField.Property.SHADOW_COLOR, new Tizen.NUI.PropertyValue(value));
767 /// The PrimaryCursorColor property.
769 /// <since_tizen> 3 </since_tizen>
770 public Vector4 PrimaryCursorColor
774 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
775 GetProperty(TextField.Property.PRIMARY_CURSOR_COLOR).Get(temp);
780 SetProperty(TextField.Property.PRIMARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue(value));
785 /// The SecondaryCursorColor property.
787 /// <since_tizen> 3 </since_tizen>
788 public Vector4 SecondaryCursorColor
792 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
793 GetProperty(TextField.Property.SECONDARY_CURSOR_COLOR).Get(temp);
798 SetProperty(TextField.Property.SECONDARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue(value));
803 /// The EnableCursorBlink property.
805 /// <since_tizen> 3 </since_tizen>
806 public bool EnableCursorBlink
811 GetProperty(TextField.Property.ENABLE_CURSOR_BLINK).Get(out temp);
816 SetProperty(TextField.Property.ENABLE_CURSOR_BLINK, new Tizen.NUI.PropertyValue(value));
821 /// The CursorBlinkInterval property.
823 /// <since_tizen> 3 </since_tizen>
824 public float CursorBlinkInterval
829 GetProperty(TextField.Property.CURSOR_BLINK_INTERVAL).Get(out temp);
834 SetProperty(TextField.Property.CURSOR_BLINK_INTERVAL, new Tizen.NUI.PropertyValue(value));
839 /// The CursorBlinkDuration property.
841 /// <since_tizen> 3 </since_tizen>
842 public float CursorBlinkDuration
847 GetProperty(TextField.Property.CURSOR_BLINK_DURATION).Get(out temp);
852 SetProperty(TextField.Property.CURSOR_BLINK_DURATION, new Tizen.NUI.PropertyValue(value));
857 /// The CursorWidth property.
859 /// <since_tizen> 3 </since_tizen>
860 public int CursorWidth
865 GetProperty(TextField.Property.CURSOR_WIDTH).Get(out temp);
870 SetProperty(TextField.Property.CURSOR_WIDTH, new Tizen.NUI.PropertyValue(value));
875 /// The GrabHandleImage property.
877 /// <since_tizen> 3 </since_tizen>
878 public string GrabHandleImage
883 GetProperty(TextField.Property.GRAB_HANDLE_IMAGE).Get(out temp);
888 SetProperty(TextField.Property.GRAB_HANDLE_IMAGE, new Tizen.NUI.PropertyValue(value));
893 /// The GrabHandlePressedImage property.
895 /// <since_tizen> 3 </since_tizen>
896 public string GrabHandlePressedImage
901 GetProperty(TextField.Property.GRAB_HANDLE_PRESSED_IMAGE).Get(out temp);
906 SetProperty(TextField.Property.GRAB_HANDLE_PRESSED_IMAGE, new Tizen.NUI.PropertyValue(value));
911 /// The ScrollThreshold property.
913 /// <since_tizen> 3 </since_tizen>
914 public float ScrollThreshold
919 GetProperty(TextField.Property.SCROLL_THRESHOLD).Get(out temp);
924 SetProperty(TextField.Property.SCROLL_THRESHOLD, new Tizen.NUI.PropertyValue(value));
929 /// The ScrollSpeed property.
931 /// <since_tizen> 3 </since_tizen>
932 public float ScrollSpeed
937 GetProperty(TextField.Property.SCROLL_SPEED).Get(out temp);
942 SetProperty(TextField.Property.SCROLL_SPEED, new Tizen.NUI.PropertyValue(value));
947 /// The SelectionHandleImageLeft property.
949 /// <since_tizen> 3 </since_tizen>
950 public PropertyMap SelectionHandleImageLeft
954 PropertyMap temp = new PropertyMap();
955 GetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_LEFT).Get(temp);
960 SetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
965 /// The SelectionHandleImageRight property.
967 /// <since_tizen> 3 </since_tizen>
968 public PropertyMap SelectionHandleImageRight
972 PropertyMap temp = new PropertyMap();
973 GetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_RIGHT).Get(temp);
978 SetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
983 /// The SelectionHandlePressedImageLeft property.
985 /// <since_tizen> 3 </since_tizen>
986 public PropertyMap SelectionHandlePressedImageLeft
990 PropertyMap temp = new PropertyMap();
991 GetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT).Get(temp);
996 SetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
1001 /// The SelectionHandlePressedImageRight property.
1003 /// <since_tizen> 3 </since_tizen>
1004 public PropertyMap SelectionHandlePressedImageRight
1008 PropertyMap temp = new PropertyMap();
1009 GetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT).Get(temp);
1014 SetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
1019 /// The SelectionHandleMarkerImageLeft property.
1021 /// <since_tizen> 3 </since_tizen>
1022 public PropertyMap SelectionHandleMarkerImageLeft
1026 PropertyMap temp = new PropertyMap();
1027 GetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT).Get(temp);
1032 SetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
1037 /// The SelectionHandleMarkerImageRight property.
1039 /// <since_tizen> 3 </since_tizen>
1040 public PropertyMap SelectionHandleMarkerImageRight
1044 PropertyMap temp = new PropertyMap();
1045 GetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT).Get(temp);
1050 SetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
1055 /// The SelectionHighlightColor property.
1057 /// <since_tizen> 3 </since_tizen>
1058 public Vector4 SelectionHighlightColor
1062 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1063 GetProperty(TextField.Property.SELECTION_HIGHLIGHT_COLOR).Get(temp);
1068 SetProperty(TextField.Property.SELECTION_HIGHLIGHT_COLOR, new Tizen.NUI.PropertyValue(value));
1073 /// The DecorationBoundingBox property.
1075 /// <since_tizen> 3 </since_tizen>
1076 public Rectangle DecorationBoundingBox
1080 Rectangle temp = new Rectangle(0, 0, 0, 0);
1081 GetProperty(TextField.Property.DECORATION_BOUNDING_BOX).Get(temp);
1086 SetProperty(TextField.Property.DECORATION_BOUNDING_BOX, new Tizen.NUI.PropertyValue(value));
1091 /// The InputMethodSettings property.
1093 /// <since_tizen> 3 </since_tizen>
1094 public PropertyMap InputMethodSettings
1098 PropertyMap temp = new PropertyMap();
1099 GetProperty(TextField.Property.INPUT_METHOD_SETTINGS).Get(temp);
1104 SetProperty(TextField.Property.INPUT_METHOD_SETTINGS, new Tizen.NUI.PropertyValue(value));
1109 /// The InputColor property.
1111 /// <since_tizen> 3 </since_tizen>
1112 public Vector4 InputColor
1116 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1117 GetProperty(TextField.Property.INPUT_COLOR).Get(temp);
1122 SetProperty(TextField.Property.INPUT_COLOR, new Tizen.NUI.PropertyValue(value));
1127 /// The EnableMarkup property.
1129 /// <since_tizen> 3 </since_tizen>
1130 public bool EnableMarkup
1135 GetProperty(TextField.Property.ENABLE_MARKUP).Get(out temp);
1140 SetProperty(TextField.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue(value));
1145 /// The InputFontFamily property.
1147 /// <since_tizen> 3 </since_tizen>
1148 public string InputFontFamily
1153 GetProperty(TextField.Property.INPUT_FONT_FAMILY).Get(out temp);
1158 SetProperty(TextField.Property.INPUT_FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
1163 /// The InputFontStyle property.
1165 /// <since_tizen> 3 </since_tizen>
1166 public PropertyMap InputFontStyle
1170 PropertyMap temp = new PropertyMap();
1171 GetProperty(TextField.Property.INPUT_FONT_STYLE).Get(temp);
1176 SetProperty(TextField.Property.INPUT_FONT_STYLE, new Tizen.NUI.PropertyValue(value));
1181 /// The InputPointSize property.
1183 /// <since_tizen> 3 </since_tizen>
1184 public float InputPointSize
1189 GetProperty(TextField.Property.INPUT_POINT_SIZE).Get(out temp);
1194 SetProperty(TextField.Property.INPUT_POINT_SIZE, new Tizen.NUI.PropertyValue(value));
1199 /// The Underline property.
1201 /// <since_tizen> 3 </since_tizen>
1202 public PropertyMap Underline
1206 PropertyMap temp = new PropertyMap();
1207 GetProperty(TextField.Property.UNDERLINE).Get(temp);
1212 SetProperty(TextField.Property.UNDERLINE, new Tizen.NUI.PropertyValue(value));
1217 /// The InputUnderline property.
1219 /// <since_tizen> 3 </since_tizen>
1220 public string InputUnderline
1225 GetProperty(TextField.Property.INPUT_UNDERLINE).Get(out temp);
1230 SetProperty(TextField.Property.INPUT_UNDERLINE, new Tizen.NUI.PropertyValue(value));
1235 /// The Shadow property.
1237 /// <since_tizen> 3 </since_tizen>
1238 public PropertyMap Shadow
1242 PropertyMap temp = new PropertyMap();
1243 GetProperty(TextField.Property.SHADOW).Get(temp);
1248 SetProperty(TextField.Property.SHADOW, new Tizen.NUI.PropertyValue(value));
1253 /// The InputShadow property.
1255 /// <since_tizen> 3 </since_tizen>
1256 public string InputShadow
1261 GetProperty(TextField.Property.INPUT_SHADOW).Get(out temp);
1266 SetProperty(TextField.Property.INPUT_SHADOW, new Tizen.NUI.PropertyValue(value));
1271 /// The Emboss property.
1273 /// <since_tizen> 3 </since_tizen>
1274 public string Emboss
1279 GetProperty(TextField.Property.EMBOSS).Get(out temp);
1284 SetProperty(TextField.Property.EMBOSS, new Tizen.NUI.PropertyValue(value));
1289 /// The InputEmboss property.
1291 /// <since_tizen> 3 </since_tizen>
1292 public string InputEmboss
1297 GetProperty(TextField.Property.INPUT_EMBOSS).Get(out temp);
1302 SetProperty(TextField.Property.INPUT_EMBOSS, new Tizen.NUI.PropertyValue(value));
1307 /// The Outline property.
1309 /// <since_tizen> 3 </since_tizen>
1310 public PropertyMap Outline
1314 PropertyMap temp = new PropertyMap();
1315 GetProperty(TextField.Property.OUTLINE).Get(temp);
1320 SetProperty(TextField.Property.OUTLINE, new Tizen.NUI.PropertyValue(value));
1325 /// The InputOutline property.
1327 /// <since_tizen> 3 </since_tizen>
1328 public string InputOutline
1333 GetProperty(TextField.Property.INPUT_OUTLINE).Get(out temp);
1338 SetProperty(TextField.Property.INPUT_OUTLINE, new Tizen.NUI.PropertyValue(value));
1343 /// The HiddenInputSettings property.
1345 /// <since_tizen> 3 </since_tizen>
1346 public Tizen.NUI.PropertyMap HiddenInputSettings
1350 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1351 GetProperty(TextField.Property.HIDDEN_INPUT_SETTINGS).Get(temp);
1356 SetProperty(TextField.Property.HIDDEN_INPUT_SETTINGS, new Tizen.NUI.PropertyValue(value));
1361 /// The PixelSize property.
1363 /// <since_tizen> 3 </since_tizen>
1364 public float PixelSize
1369 GetProperty(TextField.Property.PIXEL_SIZE).Get(out temp);
1374 SetProperty(TextField.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue(value));
1379 /// The Enable selection property.
1381 /// <since_tizen> 4 </since_tizen>
1382 public bool EnableSelection
1387 GetProperty(TextField.Property.ENABLE_SELECTION).Get(out temp);
1392 SetProperty(TextField.Property.ENABLE_SELECTION, new Tizen.NUI.PropertyValue(value));
1397 /// The Placeholder property.
1398 /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
1401 /// The following example demonstrates how to set the Placeholder property.
1403 /// PropertyMap propertyMap = new PropertyMap();
1404 /// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
1405 /// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
1406 /// propertyMap.Add("color", new PropertyValue(Color.Red));
1407 /// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
1408 /// propertyMap.Add("pointSize", new PropertyValue(12.0f));
1410 /// PropertyMap fontStyleMap = new PropertyMap();
1411 /// fontStyleMap.Add("weight", new PropertyValue("bold"));
1412 /// fontStyleMap.Add("width", new PropertyValue("condensed"));
1413 /// fontStyleMap.Add("slant", new PropertyValue("italic"));
1414 /// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
1416 /// TextField field = new TextField();
1417 /// field.Placeholder = propertyMap;
1420 /// <since_tizen> 4 </since_tizen>
1421 public Tizen.NUI.PropertyMap Placeholder
1425 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1426 GetProperty(TextField.Property.PLACEHOLDER).Get(temp);
1431 SetProperty(TextField.Property.PLACEHOLDER, new Tizen.NUI.PropertyValue(value));
1436 /// The Ellipsis property.<br />
1437 /// Enable or disable the ellipsis.<br />
1438 /// Placeholder PropertyMap is used to add ellipsis to placeholder text.
1440 /// <since_tizen> 4 </since_tizen>
1441 public bool Ellipsis
1446 GetProperty(TextField.Property.ELLIPSIS).Get(out temp);
1451 SetProperty(TextField.Property.ELLIPSIS, new Tizen.NUI.PropertyValue(value));