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 /// <since_tizen> 3 </since_tizen>
31 public class TextField : View
33 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
34 private string textFieldTextSid = null;
35 private string textFieldPlaceHolderTextSid = null;
36 private bool systemlangTextFlag = false;
38 internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextField_SWIGUpcast(cPtr), cMemoryOwn)
40 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
43 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj)
45 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
51 /// <since_tizen> 3 </since_tizen>
52 protected override void Dispose(DisposeTypes type)
56 DisposeQueue.Instance.Add(this);
60 if (type == DisposeTypes.Explicit)
63 //Release your own managed resources here.
64 //You should release all of your own disposable objects here.
67 //Release your own unmanaged resources here.
68 //You should not access any managed member here except static instance.
69 //because the execution order of Finalizes is non-deterministic.
71 if (_textFieldMaxLengthReachedCallbackDelegate != null)
73 this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
76 if (_textFieldTextChangedCallbackDelegate != null)
78 TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
81 if (swigCPtr.Handle != global::System.IntPtr.Zero)
86 NDalicPINVOKE.delete_TextField(swigCPtr);
88 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
95 /// The TextChanged event arguments.
97 /// <since_tizen> 3 </since_tizen>
98 public class TextChangedEventArgs : EventArgs
100 private TextField _textField;
105 /// <since_tizen> 3 </since_tizen>
106 public TextField TextField
120 /// The MaxLengthReached event arguments.
122 /// <since_tizen> 3 </since_tizen>
123 public class MaxLengthReachedEventArgs : EventArgs
125 private TextField _textField;
130 /// <since_tizen> 3 </since_tizen>
131 public TextField TextField
145 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
146 private delegate void TextChangedCallbackDelegate(IntPtr textField);
147 private EventHandler<TextChangedEventArgs> _textFieldTextChangedEventHandler;
148 private TextChangedCallbackDelegate _textFieldTextChangedCallbackDelegate;
150 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
151 private delegate void MaxLengthReachedCallbackDelegate(IntPtr textField);
152 private EventHandler<MaxLengthReachedEventArgs> _textFieldMaxLengthReachedEventHandler;
153 private MaxLengthReachedCallbackDelegate _textFieldMaxLengthReachedCallbackDelegate;
156 /// The TextChanged event.
158 /// <since_tizen> 3 </since_tizen>
159 public event EventHandler<TextChangedEventArgs> TextChanged
163 if (_textFieldTextChangedEventHandler == null)
165 _textFieldTextChangedCallbackDelegate = (OnTextChanged);
166 TextChangedSignal().Connect(_textFieldTextChangedCallbackDelegate);
168 _textFieldTextChangedEventHandler += value;
172 _textFieldTextChangedEventHandler -= value;
173 if (_textFieldTextChangedEventHandler == null && TextChangedSignal().Empty() == false)
175 TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
180 private void OnTextChanged(IntPtr textField)
182 TextChangedEventArgs e = new TextChangedEventArgs();
184 // Populate all members of "e" (TextChangedEventArgs) with real data
185 e.TextField = Registry.GetManagedBaseHandleFromNativePtr(textField) as TextField;
187 if (_textFieldTextChangedEventHandler != null)
189 //here we send all data to user event handlers
190 _textFieldTextChangedEventHandler(this, e);
196 /// The MaxLengthReached event.
198 /// <since_tizen> 3 </since_tizen>
199 public event EventHandler<MaxLengthReachedEventArgs> MaxLengthReached
203 if (_textFieldMaxLengthReachedEventHandler == null)
205 _textFieldMaxLengthReachedCallbackDelegate = (OnMaxLengthReached);
206 MaxLengthReachedSignal().Connect(_textFieldMaxLengthReachedCallbackDelegate);
208 _textFieldMaxLengthReachedEventHandler += value;
212 if (_textFieldMaxLengthReachedEventHandler == null && MaxLengthReachedSignal().Empty() == false)
214 this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
216 _textFieldMaxLengthReachedEventHandler -= value;
220 private void OnMaxLengthReached(IntPtr textField)
222 MaxLengthReachedEventArgs e = new MaxLengthReachedEventArgs();
224 // Populate all members of "e" (MaxLengthReachedEventArgs) with real data
225 e.TextField = Registry.GetManagedBaseHandleFromNativePtr(textField) as TextField;
227 if (_textFieldMaxLengthReachedEventHandler != null)
229 //here we send all data to user event handlers
230 _textFieldMaxLengthReachedEventHandler(this, e);
235 internal new class Property
237 internal static readonly int RENDERING_BACKEND = NDalicPINVOKE.TextField_Property_RENDERING_BACKEND_get();
238 internal static readonly int TEXT = NDalicPINVOKE.TextField_Property_TEXT_get();
239 internal static readonly int PLACEHOLDER_TEXT = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_get();
240 internal static readonly int PLACEHOLDER_TEXT_FOCUSED = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_FOCUSED_get();
241 internal static readonly int FONT_FAMILY = NDalicPINVOKE.TextField_Property_FONT_FAMILY_get();
242 internal static readonly int FONT_STYLE = NDalicPINVOKE.TextField_Property_FONT_STYLE_get();
243 internal static readonly int POINT_SIZE = NDalicPINVOKE.TextField_Property_POINT_SIZE_get();
244 internal static readonly int MAX_LENGTH = NDalicPINVOKE.TextField_Property_MAX_LENGTH_get();
245 internal static readonly int EXCEED_POLICY = NDalicPINVOKE.TextField_Property_EXCEED_POLICY_get();
246 internal static readonly int HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TextField_Property_HORIZONTAL_ALIGNMENT_get();
247 internal static readonly int VERTICAL_ALIGNMENT = NDalicPINVOKE.TextField_Property_VERTICAL_ALIGNMENT_get();
248 internal static readonly int TEXT_COLOR = NDalicPINVOKE.TextField_Property_TEXT_COLOR_get();
249 internal static readonly int PLACEHOLDER_TEXT_COLOR = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_COLOR_get();
250 internal static readonly int SHADOW_OFFSET = NDalicPINVOKE.TextField_Property_SHADOW_OFFSET_get();
251 internal static readonly int SHADOW_COLOR = NDalicPINVOKE.TextField_Property_SHADOW_COLOR_get();
252 internal static readonly int PRIMARY_CURSOR_COLOR = NDalicPINVOKE.TextField_Property_PRIMARY_CURSOR_COLOR_get();
253 internal static readonly int SECONDARY_CURSOR_COLOR = NDalicPINVOKE.TextField_Property_SECONDARY_CURSOR_COLOR_get();
254 internal static readonly int ENABLE_CURSOR_BLINK = NDalicPINVOKE.TextField_Property_ENABLE_CURSOR_BLINK_get();
255 internal static readonly int CURSOR_BLINK_INTERVAL = NDalicPINVOKE.TextField_Property_CURSOR_BLINK_INTERVAL_get();
256 internal static readonly int CURSOR_BLINK_DURATION = NDalicPINVOKE.TextField_Property_CURSOR_BLINK_DURATION_get();
257 internal static readonly int CURSOR_WIDTH = NDalicPINVOKE.TextField_Property_CURSOR_WIDTH_get();
258 internal static readonly int GRAB_HANDLE_IMAGE = NDalicPINVOKE.TextField_Property_GRAB_HANDLE_IMAGE_get();
259 internal static readonly int GRAB_HANDLE_PRESSED_IMAGE = NDalicPINVOKE.TextField_Property_GRAB_HANDLE_PRESSED_IMAGE_get();
260 internal static readonly int SCROLL_THRESHOLD = NDalicPINVOKE.TextField_Property_SCROLL_THRESHOLD_get();
261 internal static readonly int SCROLL_SPEED = NDalicPINVOKE.TextField_Property_SCROLL_SPEED_get();
262 internal static readonly int SELECTION_HANDLE_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_IMAGE_LEFT_get();
263 internal static readonly int SELECTION_HANDLE_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_IMAGE_RIGHT_get();
264 internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_LEFT_get();
265 internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT_get();
266 internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_LEFT_get();
267 internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_RIGHT_get();
268 internal static readonly int SELECTION_HIGHLIGHT_COLOR = NDalicPINVOKE.TextField_Property_SELECTION_HIGHLIGHT_COLOR_get();
269 internal static readonly int DECORATION_BOUNDING_BOX = NDalicPINVOKE.TextField_Property_DECORATION_BOUNDING_BOX_get();
270 internal static readonly int INPUT_METHOD_SETTINGS = NDalicPINVOKE.TextField_Property_INPUT_METHOD_SETTINGS_get();
271 internal static readonly int INPUT_COLOR = NDalicPINVOKE.TextField_Property_INPUT_COLOR_get();
272 internal static readonly int ENABLE_MARKUP = NDalicPINVOKE.TextField_Property_ENABLE_MARKUP_get();
273 internal static readonly int INPUT_FONT_FAMILY = NDalicPINVOKE.TextField_Property_INPUT_FONT_FAMILY_get();
274 internal static readonly int INPUT_FONT_STYLE = NDalicPINVOKE.TextField_Property_INPUT_FONT_STYLE_get();
275 internal static readonly int INPUT_POINT_SIZE = NDalicPINVOKE.TextField_Property_INPUT_POINT_SIZE_get();
276 internal static readonly int UNDERLINE = NDalicPINVOKE.TextField_Property_UNDERLINE_get();
277 internal static readonly int INPUT_UNDERLINE = NDalicPINVOKE.TextField_Property_INPUT_UNDERLINE_get();
278 internal static readonly int SHADOW = NDalicPINVOKE.TextField_Property_SHADOW_get();
279 internal static readonly int INPUT_SHADOW = NDalicPINVOKE.TextField_Property_INPUT_SHADOW_get();
280 internal static readonly int EMBOSS = NDalicPINVOKE.TextField_Property_EMBOSS_get();
281 internal static readonly int INPUT_EMBOSS = NDalicPINVOKE.TextField_Property_INPUT_EMBOSS_get();
282 internal static readonly int OUTLINE = NDalicPINVOKE.TextField_Property_OUTLINE_get();
283 internal static readonly int INPUT_OUTLINE = NDalicPINVOKE.TextField_Property_INPUT_OUTLINE_get();
284 internal static readonly int HIDDEN_INPUT_SETTINGS = NDalicManualPINVOKE.TextField_Property_HIDDEN_INPUT_SETTINGS_get();
285 internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextField_Property_PIXEL_SIZE_get();
286 internal static readonly int ENABLE_SELECTION = NDalicManualPINVOKE.TextField_Property_ENABLE_SELECTION_get();
287 internal static readonly int PLACEHOLDER = NDalicManualPINVOKE.TextField_Property_PLACEHOLDER_get();
288 internal static readonly int ELLIPSIS = NDalicManualPINVOKE.TextField_Property_ELLIPSIS_get();
291 internal class InputStyle
309 /// Creates the TextField control.
311 /// <since_tizen> 3 </since_tizen>
312 public TextField() : this(NDalicPINVOKE.TextField_New(), true)
314 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317 internal TextField(TextField handle) : this(NDalicPINVOKE.new_TextField__SWIG_1(TextField.getCPtr(handle)), true)
319 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323 /// Downcasts a handle to textField handle.
325 /// <since_tizen> 3 </since_tizen>
326 /// Please do not use! this will be deprecated!
327 /// Instead please use as keyword.
328 [Obsolete("Please do not use! This will be deprecated! Please use as keyword instead!")]
329 [EditorBrowsable(EditorBrowsableState.Never)]
330 public new static TextField DownCast(BaseHandle handle)
332 TextField ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextField;
333 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
337 internal TextFieldSignal TextChangedSignal()
339 TextFieldSignal ret = new TextFieldSignal(NDalicPINVOKE.TextField_TextChangedSignal(swigCPtr), false);
340 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
344 internal TextFieldSignal MaxLengthReachedSignal()
346 TextFieldSignal ret = new TextFieldSignal(NDalicPINVOKE.TextField_MaxLengthReachedSignal(swigCPtr), false);
347 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
351 internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t InputStyleChangedSignal()
353 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);
354 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
358 internal enum ExceedPolicyType
360 ExceedPolicyOriginal,
365 /// The TranslatableText property.<br />
366 /// The text can set the SID value.<br />
368 /// <exception cref='ArgumentNullException'>
369 /// ResourceManager about multilingual is null.
371 /// <since_tizen> 4 </since_tizen>
372 public string TranslatableText
376 return textFieldTextSid;
380 if (NUIApplication.MultilingualResourceManager == null)
382 throw new ArgumentNullException("ResourceManager about multilingual is null");
384 textFieldTextSid = value;
385 Text = SetTranslatable(textFieldTextSid);
389 /// The TranslatablePlaceholderText property.<br />
390 /// The text can set the SID value.<br />
392 /// <exception cref='ArgumentNullException'>
393 /// ResourceManager about multilingual is null.
395 /// <since_tizen> 4 </since_tizen>
396 public string TranslatablePlaceholderText
400 return textFieldPlaceHolderTextSid;
404 if (NUIApplication.MultilingualResourceManager == null)
406 throw new ArgumentNullException("ResourceManager about multilingual is null");
408 textFieldPlaceHolderTextSid = value;
409 PlaceholderText = SetTranslatable(textFieldPlaceHolderTextSid);
412 private string SetTranslatable(string textFieldSid)
414 string translatableText = null;
415 translatableText = NUIApplication.MultilingualResourceManager?.GetString(textFieldSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
416 if (translatableText != null)
418 if (systemlangTextFlag == false)
420 SystemSettings.LocaleLanguageChanged += new WeakEventHandler<LocaleLanguageChangedEventArgs>(SystemSettings_LocaleLanguageChanged).Handler;
421 systemlangTextFlag = true;
423 return translatableText;
427 translatableText = "";
428 return translatableText;
431 private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
433 if (textFieldTextSid != null)
435 Text = NUIApplication.MultilingualResourceManager?.GetString(textFieldTextSid, new CultureInfo(e.Value.Replace("_", "-")));
437 if (textFieldPlaceHolderTextSid != null)
439 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
443 /// The Text property.
445 /// <since_tizen> 3 </since_tizen>
451 GetProperty(TextField.Property.TEXT).Get(out temp);
456 SetProperty(TextField.Property.TEXT, new Tizen.NUI.PropertyValue(value));
461 /// The PlaceholderText property.
463 /// <since_tizen> 3 </since_tizen>
464 public string PlaceholderText
469 GetProperty(TextField.Property.PLACEHOLDER_TEXT).Get(out temp);
474 SetProperty(TextField.Property.PLACEHOLDER_TEXT, new Tizen.NUI.PropertyValue(value));
479 /// The PlaceholderTextFocused property.
481 /// <since_tizen> 3 </since_tizen>
482 public string PlaceholderTextFocused
487 GetProperty(TextField.Property.PLACEHOLDER_TEXT_FOCUSED).Get(out temp);
492 SetProperty(TextField.Property.PLACEHOLDER_TEXT_FOCUSED, new Tizen.NUI.PropertyValue(value));
497 /// The FontFamily property.
499 /// <since_tizen> 3 </since_tizen>
500 public string FontFamily
505 GetProperty(TextField.Property.FONT_FAMILY).Get(out temp);
510 SetProperty(TextField.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
515 /// The FontStyle property.
517 /// <since_tizen> 3 </since_tizen>
518 public PropertyMap FontStyle
522 PropertyMap temp = new PropertyMap();
523 GetProperty(TextField.Property.FONT_STYLE).Get(temp);
528 SetProperty(TextField.Property.FONT_STYLE, new Tizen.NUI.PropertyValue(value));
533 /// The PointSize property.
535 /// <since_tizen> 3 </since_tizen>
536 public float PointSize
541 GetProperty(TextField.Property.POINT_SIZE).Get(out temp);
546 SetProperty(TextField.Property.POINT_SIZE, new Tizen.NUI.PropertyValue(value));
551 /// The MaxLength property.
553 /// <since_tizen> 3 </since_tizen>
559 GetProperty(TextField.Property.MAX_LENGTH).Get(out temp);
564 SetProperty(TextField.Property.MAX_LENGTH, new Tizen.NUI.PropertyValue(value));
569 /// The ExceedPolicy property.
571 /// <since_tizen> 3 </since_tizen>
572 public int ExceedPolicy
577 GetProperty(TextField.Property.EXCEED_POLICY).Get(out temp);
582 SetProperty(TextField.Property.EXCEED_POLICY, new Tizen.NUI.PropertyValue(value));
587 /// The HorizontalAlignment property.
589 /// <since_tizen> 3 </since_tizen>
590 public HorizontalAlignment HorizontalAlignment
595 if (GetProperty(TextField.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
597 NUILog.Error("HorizontalAlignment get error!");
603 return HorizontalAlignment.Begin;
605 return HorizontalAlignment.Center;
607 return HorizontalAlignment.End;
609 return HorizontalAlignment.Begin;
614 string valueToString = "";
617 case HorizontalAlignment.Begin:
619 valueToString = "BEGIN";
622 case HorizontalAlignment.Center:
624 valueToString = "CENTER";
627 case HorizontalAlignment.End:
629 valueToString = "END";
634 valueToString = "BEGIN";
638 SetProperty(TextField.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
643 /// The VerticalAlignment property.
645 /// <since_tizen> 3 </since_tizen>
646 public VerticalAlignment VerticalAlignment
651 if (GetProperty(TextField.Property.VERTICAL_ALIGNMENT).Get(out temp) == false)
653 NUILog.Error("VerticalAlignment get error!");
659 return VerticalAlignment.Top;
661 return VerticalAlignment.Center;
663 return VerticalAlignment.Bottom;
665 return VerticalAlignment.Bottom;
670 string valueToString = "";
673 case VerticalAlignment.Top:
675 valueToString = "TOP";
678 case VerticalAlignment.Center:
680 valueToString = "CENTER";
683 case VerticalAlignment.Bottom:
685 valueToString = "BOTTOM";
690 valueToString = "BOTTOM";
694 SetProperty(TextField.Property.VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
699 /// The TextColor property.
701 /// <since_tizen> 3 </since_tizen>
702 public Color TextColor
706 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
707 GetProperty(TextField.Property.TEXT_COLOR).Get(temp);
712 SetProperty(TextField.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
717 /// The PlaceholderTextColor property.
719 /// <since_tizen> 3 </since_tizen>
720 public Vector4 PlaceholderTextColor
724 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
725 GetProperty(TextField.Property.PLACEHOLDER_TEXT_COLOR).Get(temp);
730 SetProperty(TextField.Property.PLACEHOLDER_TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
735 /// The ShadowOffset property.
737 /// <since_tizen> 3 </since_tizen>
738 public Vector2 ShadowOffset
742 Vector2 temp = new Vector2(0.0f, 0.0f);
743 GetProperty(TextField.Property.SHADOW_OFFSET).Get(temp);
748 SetProperty(TextField.Property.SHADOW_OFFSET, new Tizen.NUI.PropertyValue(value));
753 /// The ShadowColor property.
755 /// <since_tizen> 3 </since_tizen>
756 public Vector4 ShadowColor
760 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
761 GetProperty(TextField.Property.SHADOW_COLOR).Get(temp);
766 SetProperty(TextField.Property.SHADOW_COLOR, new Tizen.NUI.PropertyValue(value));
771 /// The PrimaryCursorColor property.
773 /// <since_tizen> 3 </since_tizen>
774 public Vector4 PrimaryCursorColor
778 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
779 GetProperty(TextField.Property.PRIMARY_CURSOR_COLOR).Get(temp);
784 SetProperty(TextField.Property.PRIMARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue(value));
789 /// The SecondaryCursorColor property.
791 /// <since_tizen> 3 </since_tizen>
792 public Vector4 SecondaryCursorColor
796 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
797 GetProperty(TextField.Property.SECONDARY_CURSOR_COLOR).Get(temp);
802 SetProperty(TextField.Property.SECONDARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue(value));
807 /// The EnableCursorBlink property.
809 /// <since_tizen> 3 </since_tizen>
810 public bool EnableCursorBlink
815 GetProperty(TextField.Property.ENABLE_CURSOR_BLINK).Get(out temp);
820 SetProperty(TextField.Property.ENABLE_CURSOR_BLINK, new Tizen.NUI.PropertyValue(value));
825 /// The CursorBlinkInterval property.
827 /// <since_tizen> 3 </since_tizen>
828 public float CursorBlinkInterval
833 GetProperty(TextField.Property.CURSOR_BLINK_INTERVAL).Get(out temp);
838 SetProperty(TextField.Property.CURSOR_BLINK_INTERVAL, new Tizen.NUI.PropertyValue(value));
843 /// The CursorBlinkDuration property.
845 /// <since_tizen> 3 </since_tizen>
846 public float CursorBlinkDuration
851 GetProperty(TextField.Property.CURSOR_BLINK_DURATION).Get(out temp);
856 SetProperty(TextField.Property.CURSOR_BLINK_DURATION, new Tizen.NUI.PropertyValue(value));
861 /// The CursorWidth property.
863 /// <since_tizen> 3 </since_tizen>
864 public int CursorWidth
869 GetProperty(TextField.Property.CURSOR_WIDTH).Get(out temp);
874 SetProperty(TextField.Property.CURSOR_WIDTH, new Tizen.NUI.PropertyValue(value));
879 /// The GrabHandleImage property.
881 /// <since_tizen> 3 </since_tizen>
882 public string GrabHandleImage
887 GetProperty(TextField.Property.GRAB_HANDLE_IMAGE).Get(out temp);
892 SetProperty(TextField.Property.GRAB_HANDLE_IMAGE, new Tizen.NUI.PropertyValue(value));
897 /// The GrabHandlePressedImage property.
899 /// <since_tizen> 3 </since_tizen>
900 public string GrabHandlePressedImage
905 GetProperty(TextField.Property.GRAB_HANDLE_PRESSED_IMAGE).Get(out temp);
910 SetProperty(TextField.Property.GRAB_HANDLE_PRESSED_IMAGE, new Tizen.NUI.PropertyValue(value));
915 /// The ScrollThreshold property.
917 /// <since_tizen> 3 </since_tizen>
918 public float ScrollThreshold
923 GetProperty(TextField.Property.SCROLL_THRESHOLD).Get(out temp);
928 SetProperty(TextField.Property.SCROLL_THRESHOLD, new Tizen.NUI.PropertyValue(value));
933 /// The ScrollSpeed property.
935 /// <since_tizen> 3 </since_tizen>
936 public float ScrollSpeed
941 GetProperty(TextField.Property.SCROLL_SPEED).Get(out temp);
946 SetProperty(TextField.Property.SCROLL_SPEED, new Tizen.NUI.PropertyValue(value));
951 /// The SelectionHandleImageLeft property.
953 /// <since_tizen> 3 </since_tizen>
954 public PropertyMap SelectionHandleImageLeft
958 PropertyMap temp = new PropertyMap();
959 GetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_LEFT).Get(temp);
964 SetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
969 /// The SelectionHandleImageRight property.
971 /// <since_tizen> 3 </since_tizen>
972 public PropertyMap SelectionHandleImageRight
976 PropertyMap temp = new PropertyMap();
977 GetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_RIGHT).Get(temp);
982 SetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
987 /// The SelectionHandlePressedImageLeft property.
989 /// <since_tizen> 3 </since_tizen>
990 public PropertyMap SelectionHandlePressedImageLeft
994 PropertyMap temp = new PropertyMap();
995 GetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT).Get(temp);
1000 SetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
1005 /// The SelectionHandlePressedImageRight property.
1007 /// <since_tizen> 3 </since_tizen>
1008 public PropertyMap SelectionHandlePressedImageRight
1012 PropertyMap temp = new PropertyMap();
1013 GetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT).Get(temp);
1018 SetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
1023 /// The SelectionHandleMarkerImageLeft property.
1025 /// <since_tizen> 3 </since_tizen>
1026 public PropertyMap SelectionHandleMarkerImageLeft
1030 PropertyMap temp = new PropertyMap();
1031 GetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT).Get(temp);
1036 SetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
1041 /// The SelectionHandleMarkerImageRight property.
1043 /// <since_tizen> 3 </since_tizen>
1044 public PropertyMap SelectionHandleMarkerImageRight
1048 PropertyMap temp = new PropertyMap();
1049 GetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT).Get(temp);
1054 SetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
1059 /// The SelectionHighlightColor property.
1061 /// <since_tizen> 3 </since_tizen>
1062 public Vector4 SelectionHighlightColor
1066 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1067 GetProperty(TextField.Property.SELECTION_HIGHLIGHT_COLOR).Get(temp);
1072 SetProperty(TextField.Property.SELECTION_HIGHLIGHT_COLOR, new Tizen.NUI.PropertyValue(value));
1077 /// The DecorationBoundingBox property.
1079 /// <since_tizen> 3 </since_tizen>
1080 public Rectangle DecorationBoundingBox
1084 Rectangle temp = new Rectangle(0, 0, 0, 0);
1085 GetProperty(TextField.Property.DECORATION_BOUNDING_BOX).Get(temp);
1090 SetProperty(TextField.Property.DECORATION_BOUNDING_BOX, new Tizen.NUI.PropertyValue(value));
1095 /// The InputMethodSettings property.
1097 /// <since_tizen> 3 </since_tizen>
1098 public PropertyMap InputMethodSettings
1102 PropertyMap temp = new PropertyMap();
1103 GetProperty(TextField.Property.INPUT_METHOD_SETTINGS).Get(temp);
1108 SetProperty(TextField.Property.INPUT_METHOD_SETTINGS, new Tizen.NUI.PropertyValue(value));
1113 /// The InputColor property.
1115 /// <since_tizen> 3 </since_tizen>
1116 public Vector4 InputColor
1120 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1121 GetProperty(TextField.Property.INPUT_COLOR).Get(temp);
1126 SetProperty(TextField.Property.INPUT_COLOR, new Tizen.NUI.PropertyValue(value));
1131 /// The EnableMarkup property.
1133 /// <since_tizen> 3 </since_tizen>
1134 public bool EnableMarkup
1139 GetProperty(TextField.Property.ENABLE_MARKUP).Get(out temp);
1144 SetProperty(TextField.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue(value));
1149 /// The InputFontFamily property.
1151 /// <since_tizen> 3 </since_tizen>
1152 public string InputFontFamily
1157 GetProperty(TextField.Property.INPUT_FONT_FAMILY).Get(out temp);
1162 SetProperty(TextField.Property.INPUT_FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
1167 /// The InputFontStyle property.
1169 /// <since_tizen> 3 </since_tizen>
1170 public PropertyMap InputFontStyle
1174 PropertyMap temp = new PropertyMap();
1175 GetProperty(TextField.Property.INPUT_FONT_STYLE).Get(temp);
1180 SetProperty(TextField.Property.INPUT_FONT_STYLE, new Tizen.NUI.PropertyValue(value));
1185 /// The InputPointSize property.
1187 /// <since_tizen> 3 </since_tizen>
1188 public float InputPointSize
1193 GetProperty(TextField.Property.INPUT_POINT_SIZE).Get(out temp);
1198 SetProperty(TextField.Property.INPUT_POINT_SIZE, new Tizen.NUI.PropertyValue(value));
1203 /// The Underline property.
1205 /// <since_tizen> 3 </since_tizen>
1206 public PropertyMap Underline
1210 PropertyMap temp = new PropertyMap();
1211 GetProperty(TextField.Property.UNDERLINE).Get(temp);
1216 SetProperty(TextField.Property.UNDERLINE, new Tizen.NUI.PropertyValue(value));
1221 /// The InputUnderline property.
1223 /// <since_tizen> 3 </since_tizen>
1224 public string InputUnderline
1229 GetProperty(TextField.Property.INPUT_UNDERLINE).Get(out temp);
1234 SetProperty(TextField.Property.INPUT_UNDERLINE, new Tizen.NUI.PropertyValue(value));
1239 /// The Shadow property.
1241 /// <since_tizen> 3 </since_tizen>
1242 public PropertyMap Shadow
1246 PropertyMap temp = new PropertyMap();
1247 GetProperty(TextField.Property.SHADOW).Get(temp);
1252 SetProperty(TextField.Property.SHADOW, new Tizen.NUI.PropertyValue(value));
1257 /// The InputShadow property.
1259 /// <since_tizen> 3 </since_tizen>
1260 public string InputShadow
1265 GetProperty(TextField.Property.INPUT_SHADOW).Get(out temp);
1270 SetProperty(TextField.Property.INPUT_SHADOW, new Tizen.NUI.PropertyValue(value));
1275 /// The Emboss property.
1277 /// <since_tizen> 3 </since_tizen>
1278 public string Emboss
1283 GetProperty(TextField.Property.EMBOSS).Get(out temp);
1288 SetProperty(TextField.Property.EMBOSS, new Tizen.NUI.PropertyValue(value));
1293 /// The InputEmboss property.
1295 /// <since_tizen> 3 </since_tizen>
1296 public string InputEmboss
1301 GetProperty(TextField.Property.INPUT_EMBOSS).Get(out temp);
1306 SetProperty(TextField.Property.INPUT_EMBOSS, new Tizen.NUI.PropertyValue(value));
1311 /// The Outline property.
1313 /// <since_tizen> 3 </since_tizen>
1314 public PropertyMap Outline
1318 PropertyMap temp = new PropertyMap();
1319 GetProperty(TextField.Property.OUTLINE).Get(temp);
1324 SetProperty(TextField.Property.OUTLINE, new Tizen.NUI.PropertyValue(value));
1329 /// The InputOutline property.
1331 /// <since_tizen> 3 </since_tizen>
1332 public string InputOutline
1337 GetProperty(TextField.Property.INPUT_OUTLINE).Get(out temp);
1342 SetProperty(TextField.Property.INPUT_OUTLINE, new Tizen.NUI.PropertyValue(value));
1347 /// The HiddenInputSettings property.
1349 /// <since_tizen> 3 </since_tizen>
1350 public Tizen.NUI.PropertyMap HiddenInputSettings
1354 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1355 GetProperty(TextField.Property.HIDDEN_INPUT_SETTINGS).Get(temp);
1360 SetProperty(TextField.Property.HIDDEN_INPUT_SETTINGS, new Tizen.NUI.PropertyValue(value));
1365 /// The PixelSize property.
1367 /// <since_tizen> 3 </since_tizen>
1368 public float PixelSize
1373 GetProperty(TextField.Property.PIXEL_SIZE).Get(out temp);
1378 SetProperty(TextField.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue(value));
1383 /// The Enable selection property.
1385 /// <since_tizen> 3 </since_tizen>
1386 public bool EnableSelection
1391 GetProperty(TextField.Property.ENABLE_SELECTION).Get(out temp);
1396 SetProperty(TextField.Property.ENABLE_SELECTION, new Tizen.NUI.PropertyValue(value));
1401 /// The Placeholder property.
1402 /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
1405 /// The following example demonstrates how to set the Placeholder property.
1407 /// PropertyMap propertyMap = new PropertyMap();
1408 /// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
1409 /// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
1410 /// propertyMap.Add("color", new PropertyValue(Color.Red));
1411 /// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
1412 /// propertyMap.Add("pointSize", new PropertyValue(12.0f));
1414 /// PropertyMap fontStyleMap = new PropertyMap();
1415 /// fontStyleMap.Add("weight", new PropertyValue("bold"));
1416 /// fontStyleMap.Add("width", new PropertyValue("condensed"));
1417 /// fontStyleMap.Add("slant", new PropertyValue("italic"));
1418 /// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
1420 /// TextField field = new TextField();
1421 /// field.Placeholder = propertyMap;
1424 /// <since_tizen> 3 </since_tizen>
1425 public Tizen.NUI.PropertyMap Placeholder
1429 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1430 GetProperty(TextField.Property.PLACEHOLDER).Get(temp);
1435 SetProperty(TextField.Property.PLACEHOLDER, new Tizen.NUI.PropertyValue(value));
1440 /// The Ellipsis property.<br />
1441 /// Enable or disable the ellipsis.<br />
1442 /// Placeholder PropertyMap is used to add ellipsis to placeholder text.
1444 /// <since_tizen> 4 </since_tizen>
1445 public bool Ellipsis
1450 GetProperty(TextField.Property.ELLIPSIS).Get(out temp);
1455 SetProperty(TextField.Property.ELLIPSIS, new Tizen.NUI.PropertyValue(value));