1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 extern alias TizenSystemSettings;
17 using TizenSystemSettings.Tizen.System;
18 namespace Tizen.NUI.BaseComponents
22 using System.Runtime.InteropServices;
23 using System.Globalization;
25 /// A control which provides a single-line editable text field.
27 public class TextField : View
29 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
30 private string textFieldTextSid = null;
31 private string textFieldPlaceHolderTextSid = null;
32 private bool systemlangTextFlag = false;
34 internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextField_SWIGUpcast(cPtr), cMemoryOwn)
36 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
39 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj)
41 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
47 protected override void Dispose(DisposeTypes type)
51 DisposeQueue.Instance.Add(this);
55 if(type == DisposeTypes.Explicit)
58 //Release your own managed resources here.
59 //You should release all of your own disposable objects here.
62 //Release your own unmanaged resources here.
63 //You should not access any managed member here except static instance.
64 //because the execution order of Finalizes is non-deterministic.
66 if (_textFieldMaxLengthReachedCallbackDelegate != null)
68 this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
71 if (_textFieldTextChangedCallbackDelegate != null)
73 TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
76 if (swigCPtr.Handle != global::System.IntPtr.Zero)
81 NDalicPINVOKE.delete_TextField(swigCPtr);
83 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
90 /// Text changed event arguments.
92 public class TextChangedEventArgs : EventArgs
94 private TextField _textField;
99 public TextField TextField
113 /// MaxLengthReached event arguments.
115 public class MaxLengthReachedEventArgs : EventArgs
117 private TextField _textField;
122 public TextField TextField
136 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
137 private delegate void TextChangedCallbackDelegate(IntPtr textField);
138 private EventHandler<TextChangedEventArgs> _textFieldTextChangedEventHandler;
139 private TextChangedCallbackDelegate _textFieldTextChangedCallbackDelegate;
141 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
142 private delegate void MaxLengthReachedCallbackDelegate(IntPtr textField);
143 private EventHandler<MaxLengthReachedEventArgs> _textFieldMaxLengthReachedEventHandler;
144 private MaxLengthReachedCallbackDelegate _textFieldMaxLengthReachedCallbackDelegate;
147 /// TextChanged event.
149 public event EventHandler<TextChangedEventArgs> TextChanged
153 if (_textFieldTextChangedEventHandler == null)
155 _textFieldTextChangedCallbackDelegate = (OnTextChanged);
156 TextChangedSignal().Connect(_textFieldTextChangedCallbackDelegate);
158 _textFieldTextChangedEventHandler += value;
162 _textFieldTextChangedEventHandler -= value;
163 if (_textFieldTextChangedEventHandler == null && TextChangedSignal().Empty() == false)
165 TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
170 private void OnTextChanged(IntPtr textField)
172 TextChangedEventArgs e = new TextChangedEventArgs();
174 // Populate all members of "e" (TextChangedEventArgs) with real data
175 e.TextField = Registry.GetManagedBaseHandleFromNativePtr(textField) as TextField;
177 if (_textFieldTextChangedEventHandler != null)
179 //here we send all data to user event handlers
180 _textFieldTextChangedEventHandler(this, e);
186 /// MaxLengthReached event.
188 public event EventHandler<MaxLengthReachedEventArgs> MaxLengthReached
192 if (_textFieldMaxLengthReachedEventHandler == null)
194 _textFieldMaxLengthReachedCallbackDelegate = (OnMaxLengthReached);
195 MaxLengthReachedSignal().Connect(_textFieldMaxLengthReachedCallbackDelegate);
197 _textFieldMaxLengthReachedEventHandler += value;
201 if (_textFieldMaxLengthReachedEventHandler == null && MaxLengthReachedSignal().Empty() == false)
203 this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
205 _textFieldMaxLengthReachedEventHandler -= value;
209 private void OnMaxLengthReached(IntPtr textField)
211 MaxLengthReachedEventArgs e = new MaxLengthReachedEventArgs();
213 // Populate all members of "e" (MaxLengthReachedEventArgs) with real data
214 e.TextField = Registry.GetManagedBaseHandleFromNativePtr(textField) as TextField;
216 if (_textFieldMaxLengthReachedEventHandler != null)
218 //here we send all data to user event handlers
219 _textFieldMaxLengthReachedEventHandler(this, e);
224 internal class Property
226 internal static readonly int RENDERING_BACKEND = NDalicPINVOKE.TextField_Property_RENDERING_BACKEND_get();
227 internal static readonly int TEXT = NDalicPINVOKE.TextField_Property_TEXT_get();
228 internal static readonly int PLACEHOLDER_TEXT = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_get();
229 internal static readonly int PLACEHOLDER_TEXT_FOCUSED = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_FOCUSED_get();
230 internal static readonly int FONT_FAMILY = NDalicPINVOKE.TextField_Property_FONT_FAMILY_get();
231 internal static readonly int FONT_STYLE = NDalicPINVOKE.TextField_Property_FONT_STYLE_get();
232 internal static readonly int POINT_SIZE = NDalicPINVOKE.TextField_Property_POINT_SIZE_get();
233 internal static readonly int MAX_LENGTH = NDalicPINVOKE.TextField_Property_MAX_LENGTH_get();
234 internal static readonly int EXCEED_POLICY = NDalicPINVOKE.TextField_Property_EXCEED_POLICY_get();
235 internal static readonly int HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TextField_Property_HORIZONTAL_ALIGNMENT_get();
236 internal static readonly int VERTICAL_ALIGNMENT = NDalicPINVOKE.TextField_Property_VERTICAL_ALIGNMENT_get();
237 internal static readonly int TEXT_COLOR = NDalicPINVOKE.TextField_Property_TEXT_COLOR_get();
238 internal static readonly int PLACEHOLDER_TEXT_COLOR = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_COLOR_get();
239 internal static readonly int SHADOW_OFFSET = NDalicPINVOKE.TextField_Property_SHADOW_OFFSET_get();
240 internal static readonly int SHADOW_COLOR = NDalicPINVOKE.TextField_Property_SHADOW_COLOR_get();
241 internal static readonly int PRIMARY_CURSOR_COLOR = NDalicPINVOKE.TextField_Property_PRIMARY_CURSOR_COLOR_get();
242 internal static readonly int SECONDARY_CURSOR_COLOR = NDalicPINVOKE.TextField_Property_SECONDARY_CURSOR_COLOR_get();
243 internal static readonly int ENABLE_CURSOR_BLINK = NDalicPINVOKE.TextField_Property_ENABLE_CURSOR_BLINK_get();
244 internal static readonly int CURSOR_BLINK_INTERVAL = NDalicPINVOKE.TextField_Property_CURSOR_BLINK_INTERVAL_get();
245 internal static readonly int CURSOR_BLINK_DURATION = NDalicPINVOKE.TextField_Property_CURSOR_BLINK_DURATION_get();
246 internal static readonly int CURSOR_WIDTH = NDalicPINVOKE.TextField_Property_CURSOR_WIDTH_get();
247 internal static readonly int GRAB_HANDLE_IMAGE = NDalicPINVOKE.TextField_Property_GRAB_HANDLE_IMAGE_get();
248 internal static readonly int GRAB_HANDLE_PRESSED_IMAGE = NDalicPINVOKE.TextField_Property_GRAB_HANDLE_PRESSED_IMAGE_get();
249 internal static readonly int SCROLL_THRESHOLD = NDalicPINVOKE.TextField_Property_SCROLL_THRESHOLD_get();
250 internal static readonly int SCROLL_SPEED = NDalicPINVOKE.TextField_Property_SCROLL_SPEED_get();
251 internal static readonly int SELECTION_HANDLE_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_IMAGE_LEFT_get();
252 internal static readonly int SELECTION_HANDLE_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_IMAGE_RIGHT_get();
253 internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_LEFT_get();
254 internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT_get();
255 internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_LEFT_get();
256 internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_RIGHT_get();
257 internal static readonly int SELECTION_HIGHLIGHT_COLOR = NDalicPINVOKE.TextField_Property_SELECTION_HIGHLIGHT_COLOR_get();
258 internal static readonly int DECORATION_BOUNDING_BOX = NDalicPINVOKE.TextField_Property_DECORATION_BOUNDING_BOX_get();
259 internal static readonly int INPUT_METHOD_SETTINGS = NDalicPINVOKE.TextField_Property_INPUT_METHOD_SETTINGS_get();
260 internal static readonly int INPUT_COLOR = NDalicPINVOKE.TextField_Property_INPUT_COLOR_get();
261 internal static readonly int ENABLE_MARKUP = NDalicPINVOKE.TextField_Property_ENABLE_MARKUP_get();
262 internal static readonly int INPUT_FONT_FAMILY = NDalicPINVOKE.TextField_Property_INPUT_FONT_FAMILY_get();
263 internal static readonly int INPUT_FONT_STYLE = NDalicPINVOKE.TextField_Property_INPUT_FONT_STYLE_get();
264 internal static readonly int INPUT_POINT_SIZE = NDalicPINVOKE.TextField_Property_INPUT_POINT_SIZE_get();
265 internal static readonly int UNDERLINE = NDalicPINVOKE.TextField_Property_UNDERLINE_get();
266 internal static readonly int INPUT_UNDERLINE = NDalicPINVOKE.TextField_Property_INPUT_UNDERLINE_get();
267 internal static readonly int SHADOW = NDalicPINVOKE.TextField_Property_SHADOW_get();
268 internal static readonly int INPUT_SHADOW = NDalicPINVOKE.TextField_Property_INPUT_SHADOW_get();
269 internal static readonly int EMBOSS = NDalicPINVOKE.TextField_Property_EMBOSS_get();
270 internal static readonly int INPUT_EMBOSS = NDalicPINVOKE.TextField_Property_INPUT_EMBOSS_get();
271 internal static readonly int OUTLINE = NDalicPINVOKE.TextField_Property_OUTLINE_get();
272 internal static readonly int INPUT_OUTLINE = NDalicPINVOKE.TextField_Property_INPUT_OUTLINE_get();
273 internal static readonly int HIDDEN_INPUT_SETTINGS = NDalicManualPINVOKE.TextField_Property_HIDDEN_INPUT_SETTINGS_get();
274 internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextField_Property_PIXEL_SIZE_get();
275 internal static readonly int ENABLE_SELECTION = NDalicManualPINVOKE.TextField_Property_ENABLE_SELECTION_get();
276 internal static readonly int PLACEHOLDER = NDalicManualPINVOKE.TextField_Property_PLACEHOLDER_get();
280 internal class InputStyle
298 /// Creates the TextField control.
300 public TextField() : this(NDalicPINVOKE.TextField_New(), true)
302 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
305 internal TextField(TextField handle) : this(NDalicPINVOKE.new_TextField__SWIG_1(TextField.getCPtr(handle)), true)
307 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
310 [Obsolete("Please do not use! this will be deprecated")]
311 public new static TextField DownCast(BaseHandle handle)
313 TextField ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextField;
314 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
318 internal TextFieldSignal TextChangedSignal()
320 TextFieldSignal ret = new TextFieldSignal(NDalicPINVOKE.TextField_TextChangedSignal(swigCPtr), false);
321 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
325 internal TextFieldSignal MaxLengthReachedSignal()
327 TextFieldSignal ret = new TextFieldSignal(NDalicPINVOKE.TextField_MaxLengthReachedSignal(swigCPtr), false);
328 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
332 internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t InputStyleChangedSignal()
334 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);
335 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
339 internal enum ExceedPolicyType
341 ExceedPolicyOriginal,
346 /// TranslatableText property.<br>
347 /// The text can be set SID value.<br>
349 /// <exception cref='ArgumentNullException'>
350 /// ResourceManager about multilingual is null
352 public string TranslatableText
356 return textFieldTextSid;
360 if (NUIApplication.MultilingualResourceManager == null)
362 throw new ArgumentNullException("ResourceManager about multilingual is null");
364 textFieldTextSid = value;
365 Text = SetTranslatable(textFieldTextSid);
369 /// TranslatablePlaceholderText property.<br>
370 /// The text can be set SID value.<br>
372 /// <exception cref='ArgumentNullException'>
373 /// ResourceManager about multilingual is null
375 public string TranslatablePlaceholderText
379 return textFieldPlaceHolderTextSid;
383 if (NUIApplication.MultilingualResourceManager == null)
385 throw new ArgumentNullException("ResourceManager about multilingual is null");
387 textFieldPlaceHolderTextSid = value;
388 PlaceholderText = SetTranslatable(textFieldPlaceHolderTextSid);
391 private string SetTranslatable(string textFieldSid)
393 string translatableText = null;
394 translatableText = NUIApplication.MultilingualResourceManager?.GetString(textFieldSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
395 if (translatableText != null)
397 if (systemlangTextFlag == false)
399 SystemSettings.LocaleLanguageChanged += new WeakEventHandler<LocaleLanguageChangedEventArgs>(SystemSettings_LocaleLanguageChanged).Handler;
400 systemlangTextFlag = true;
402 return translatableText;
406 translatableText = "";
407 return translatableText;
410 private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
412 if (textFieldTextSid != null)
414 Text = NUIApplication.MultilingualResourceManager?.GetString(textFieldTextSid, new CultureInfo(e.Value.Replace("_", "-")));
416 if (textFieldPlaceHolderTextSid != null)
418 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
428 GetProperty(TextField.Property.TEXT).Get(out temp);
433 SetProperty(TextField.Property.TEXT, new Tizen.NUI.PropertyValue(value));
438 /// PlaceholderText property.
440 public string PlaceholderText
445 GetProperty(TextField.Property.PLACEHOLDER_TEXT).Get(out temp);
450 SetProperty(TextField.Property.PLACEHOLDER_TEXT, new Tizen.NUI.PropertyValue(value));
455 /// PlaceholderTextFocused property.
457 public string PlaceholderTextFocused
462 GetProperty(TextField.Property.PLACEHOLDER_TEXT_FOCUSED).Get(out temp);
467 SetProperty(TextField.Property.PLACEHOLDER_TEXT_FOCUSED, new Tizen.NUI.PropertyValue(value));
472 /// FontFamily property.
474 public string FontFamily
479 GetProperty(TextField.Property.FONT_FAMILY).Get(out temp);
484 SetProperty(TextField.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
489 /// FontStyle property.
491 public PropertyMap FontStyle
495 PropertyMap temp = new PropertyMap();
496 GetProperty(TextField.Property.FONT_STYLE).Get(temp);
501 SetProperty(TextField.Property.FONT_STYLE, new Tizen.NUI.PropertyValue(value));
506 /// PointSize property.
508 public float PointSize
513 GetProperty(TextField.Property.POINT_SIZE).Get(out temp);
518 SetProperty(TextField.Property.POINT_SIZE, new Tizen.NUI.PropertyValue(value));
523 /// MaxLength property.
530 GetProperty(TextField.Property.MAX_LENGTH).Get(out temp);
535 SetProperty(TextField.Property.MAX_LENGTH, new Tizen.NUI.PropertyValue(value));
540 /// ExceedPolicy property.
542 public int ExceedPolicy
547 GetProperty(TextField.Property.EXCEED_POLICY).Get(out temp);
552 SetProperty(TextField.Property.EXCEED_POLICY, new Tizen.NUI.PropertyValue(value));
557 /// HorizontalAlignment property.
559 public HorizontalAlignment HorizontalAlignment
564 if (GetProperty(TextField.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
566 NUILog.Error("HorizontalAlignment get error!");
572 return HorizontalAlignment.Begin;
574 return HorizontalAlignment.Center;
576 return HorizontalAlignment.End;
578 return HorizontalAlignment.Begin;
583 string valueToString = "";
586 case HorizontalAlignment.Begin:
588 valueToString = "BEGIN";
591 case HorizontalAlignment.Center:
593 valueToString = "CENTER";
596 case HorizontalAlignment.End:
598 valueToString = "END";
603 valueToString = "BEGIN";
607 SetProperty(TextField.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
612 /// VerticalAlignment property.
614 public VerticalAlignment VerticalAlignment
619 if (GetProperty(TextField.Property.VERTICAL_ALIGNMENT).Get(out temp) == false)
621 NUILog.Error("VerticalAlignment get error!");
627 return VerticalAlignment.Top;
629 return VerticalAlignment.Center;
631 return VerticalAlignment.Bottom;
633 return VerticalAlignment.Bottom;
638 string valueToString = "";
641 case VerticalAlignment.Top:
643 valueToString = "TOP";
646 case VerticalAlignment.Center:
648 valueToString = "CENTER";
651 case VerticalAlignment.Bottom:
653 valueToString = "BOTTOM";
658 valueToString = "BOTTOM";
662 SetProperty(TextField.Property.VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
667 /// TextColor property.
669 public Color TextColor
673 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
674 GetProperty(TextField.Property.TEXT_COLOR).Get(temp);
679 SetProperty(TextField.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
684 /// PlaceholderTextColor property.
686 public Vector4 PlaceholderTextColor
690 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
691 GetProperty(TextField.Property.PLACEHOLDER_TEXT_COLOR).Get(temp);
696 SetProperty(TextField.Property.PLACEHOLDER_TEXT_COLOR, new Tizen.NUI.PropertyValue(value));
701 /// ShadowOffset property.
703 public Vector2 ShadowOffset
707 Vector2 temp = new Vector2(0.0f, 0.0f);
708 GetProperty(TextField.Property.SHADOW_OFFSET).Get(temp);
713 SetProperty(TextField.Property.SHADOW_OFFSET, new Tizen.NUI.PropertyValue(value));
718 /// ShadowColor property.
720 public Vector4 ShadowColor
724 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
725 GetProperty(TextField.Property.SHADOW_COLOR).Get(temp);
730 SetProperty(TextField.Property.SHADOW_COLOR, new Tizen.NUI.PropertyValue(value));
735 /// PrimaryCursorColor property.
737 public Vector4 PrimaryCursorColor
741 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
742 GetProperty(TextField.Property.PRIMARY_CURSOR_COLOR).Get(temp);
747 SetProperty(TextField.Property.PRIMARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue(value));
752 /// SecondaryCursorColor property.
754 public Vector4 SecondaryCursorColor
758 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
759 GetProperty(TextField.Property.SECONDARY_CURSOR_COLOR).Get(temp);
764 SetProperty(TextField.Property.SECONDARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue(value));
769 /// EnableCursorBlink property.
771 public bool EnableCursorBlink
776 GetProperty(TextField.Property.ENABLE_CURSOR_BLINK).Get(out temp);
781 SetProperty(TextField.Property.ENABLE_CURSOR_BLINK, new Tizen.NUI.PropertyValue(value));
786 /// CursorBlinkInterval property.
788 public float CursorBlinkInterval
793 GetProperty(TextField.Property.CURSOR_BLINK_INTERVAL).Get(out temp);
798 SetProperty(TextField.Property.CURSOR_BLINK_INTERVAL, new Tizen.NUI.PropertyValue(value));
803 /// CursorBlinkDuration property.
805 public float CursorBlinkDuration
810 GetProperty(TextField.Property.CURSOR_BLINK_DURATION).Get(out temp);
815 SetProperty(TextField.Property.CURSOR_BLINK_DURATION, new Tizen.NUI.PropertyValue(value));
820 /// CursorWidth property.
822 public int CursorWidth
827 GetProperty(TextField.Property.CURSOR_WIDTH).Get(out temp);
832 SetProperty(TextField.Property.CURSOR_WIDTH, new Tizen.NUI.PropertyValue(value));
837 /// GrabHandleImage property.
839 public string GrabHandleImage
844 GetProperty(TextField.Property.GRAB_HANDLE_IMAGE).Get(out temp);
849 SetProperty(TextField.Property.GRAB_HANDLE_IMAGE, new Tizen.NUI.PropertyValue(value));
854 /// GrabHandlePressedImage property.
856 public string GrabHandlePressedImage
861 GetProperty(TextField.Property.GRAB_HANDLE_PRESSED_IMAGE).Get(out temp);
866 SetProperty(TextField.Property.GRAB_HANDLE_PRESSED_IMAGE, new Tizen.NUI.PropertyValue(value));
871 /// ScrollThreshold property.
873 public float ScrollThreshold
878 GetProperty(TextField.Property.SCROLL_THRESHOLD).Get(out temp);
883 SetProperty(TextField.Property.SCROLL_THRESHOLD, new Tizen.NUI.PropertyValue(value));
888 /// ScrollSpeed property.
890 public float ScrollSpeed
895 GetProperty(TextField.Property.SCROLL_SPEED).Get(out temp);
900 SetProperty(TextField.Property.SCROLL_SPEED, new Tizen.NUI.PropertyValue(value));
905 /// SelectionHandleImageLeft property.
907 public PropertyMap SelectionHandleImageLeft
911 PropertyMap temp = new PropertyMap();
912 GetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_LEFT).Get(temp);
917 SetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
922 /// SelectionHandleImageRight property.
924 public PropertyMap SelectionHandleImageRight
928 PropertyMap temp = new PropertyMap();
929 GetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_RIGHT).Get(temp);
934 SetProperty(TextField.Property.SELECTION_HANDLE_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
939 /// SelectionHandlePressedImageLeft property.
941 public PropertyMap SelectionHandlePressedImageLeft
945 PropertyMap temp = new PropertyMap();
946 GetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT).Get(temp);
951 SetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
956 /// SelectionHandlePressedImageRight property.
958 public PropertyMap SelectionHandlePressedImageRight
962 PropertyMap temp = new PropertyMap();
963 GetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT).Get(temp);
968 SetProperty(TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
973 /// SelectionHandleMarkerImageLeft property.
975 public PropertyMap SelectionHandleMarkerImageLeft
979 PropertyMap temp = new PropertyMap();
980 GetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT).Get(temp);
985 SetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT, new Tizen.NUI.PropertyValue(value));
990 /// SelectionHandleMarkerImageRight property.
992 public PropertyMap SelectionHandleMarkerImageRight
996 PropertyMap temp = new PropertyMap();
997 GetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT).Get(temp);
1002 SetProperty(TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT, new Tizen.NUI.PropertyValue(value));
1007 /// SelectionHighlightColor property.
1009 public Vector4 SelectionHighlightColor
1013 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1014 GetProperty(TextField.Property.SELECTION_HIGHLIGHT_COLOR).Get(temp);
1019 SetProperty(TextField.Property.SELECTION_HIGHLIGHT_COLOR, new Tizen.NUI.PropertyValue(value));
1024 /// DecorationBoundingBox property.
1026 public Rectangle DecorationBoundingBox
1030 Rectangle temp = new Rectangle(0, 0, 0, 0);
1031 GetProperty(TextField.Property.DECORATION_BOUNDING_BOX).Get(temp);
1036 SetProperty(TextField.Property.DECORATION_BOUNDING_BOX, new Tizen.NUI.PropertyValue(value));
1041 /// InputMethodSettings property.
1043 public PropertyMap InputMethodSettings
1047 PropertyMap temp = new PropertyMap();
1048 GetProperty(TextField.Property.INPUT_METHOD_SETTINGS).Get(temp);
1053 SetProperty(TextField.Property.INPUT_METHOD_SETTINGS, new Tizen.NUI.PropertyValue(value));
1058 /// InputColor property.
1060 public Vector4 InputColor
1064 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1065 GetProperty(TextField.Property.INPUT_COLOR).Get(temp);
1070 SetProperty(TextField.Property.INPUT_COLOR, new Tizen.NUI.PropertyValue(value));
1075 /// EnableMarkup property.
1077 public bool EnableMarkup
1082 GetProperty(TextField.Property.ENABLE_MARKUP).Get(out temp);
1087 SetProperty(TextField.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue(value));
1092 /// InputFontFamily property.
1094 public string InputFontFamily
1099 GetProperty(TextField.Property.INPUT_FONT_FAMILY).Get(out temp);
1104 SetProperty(TextField.Property.INPUT_FONT_FAMILY, new Tizen.NUI.PropertyValue(value));
1109 /// InputFontStyle property.
1111 public PropertyMap InputFontStyle
1115 PropertyMap temp = new PropertyMap();
1116 GetProperty(TextField.Property.INPUT_FONT_STYLE).Get(temp);
1121 SetProperty(TextField.Property.INPUT_FONT_STYLE, new Tizen.NUI.PropertyValue(value));
1126 /// InputPointSize property.
1128 public float InputPointSize
1133 GetProperty(TextField.Property.INPUT_POINT_SIZE).Get(out temp);
1138 SetProperty(TextField.Property.INPUT_POINT_SIZE, new Tizen.NUI.PropertyValue(value));
1143 /// Underline property.
1145 public PropertyMap Underline
1149 PropertyMap temp = new PropertyMap();
1150 GetProperty(TextField.Property.UNDERLINE).Get(temp);
1155 SetProperty(TextField.Property.UNDERLINE, new Tizen.NUI.PropertyValue(value));
1160 /// InputUnderline property.
1162 public string InputUnderline
1167 GetProperty(TextField.Property.INPUT_UNDERLINE).Get(out temp);
1172 SetProperty(TextField.Property.INPUT_UNDERLINE, new Tizen.NUI.PropertyValue(value));
1177 /// Shadow property.
1179 public PropertyMap Shadow
1183 PropertyMap temp = new PropertyMap();
1184 GetProperty(TextField.Property.SHADOW).Get(temp);
1189 SetProperty(TextField.Property.SHADOW, new Tizen.NUI.PropertyValue(value));
1194 /// InputShadow property.
1196 public string InputShadow
1201 GetProperty(TextField.Property.INPUT_SHADOW).Get(out temp);
1206 SetProperty(TextField.Property.INPUT_SHADOW, new Tizen.NUI.PropertyValue(value));
1211 /// Emboss property.
1213 public string Emboss
1218 GetProperty(TextField.Property.EMBOSS).Get(out temp);
1223 SetProperty(TextField.Property.EMBOSS, new Tizen.NUI.PropertyValue(value));
1228 /// InputEmboss property.
1230 public string InputEmboss
1235 GetProperty(TextField.Property.INPUT_EMBOSS).Get(out temp);
1240 SetProperty(TextField.Property.INPUT_EMBOSS, new Tizen.NUI.PropertyValue(value));
1245 /// Outline property.
1247 public string Outline
1252 GetProperty(TextField.Property.OUTLINE).Get(out temp);
1257 SetProperty(TextField.Property.OUTLINE, new Tizen.NUI.PropertyValue(value));
1262 /// InputOutline property.
1264 public string InputOutline
1269 GetProperty(TextField.Property.INPUT_OUTLINE).Get(out temp);
1274 SetProperty(TextField.Property.INPUT_OUTLINE, new Tizen.NUI.PropertyValue(value));
1279 /// HiddenInputSettings property.
1281 public Tizen.NUI.PropertyMap HiddenInputSettings
1285 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1286 GetProperty(TextField.Property.HIDDEN_INPUT_SETTINGS).Get(temp);
1291 SetProperty(TextField.Property.HIDDEN_INPUT_SETTINGS, new Tizen.NUI.PropertyValue(value));
1296 /// PixelSize property.
1298 public float PixelSize
1303 GetProperty(TextField.Property.PIXEL_SIZE).Get(out temp);
1308 SetProperty(TextField.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue(value));
1313 /// Enable selection property.
1315 public bool EnableSelection
1320 GetProperty(TextField.Property.ENABLE_SELECTION).Get(out temp);
1325 SetProperty(TextField.Property.ENABLE_SELECTION, new Tizen.NUI.PropertyValue(value));
1330 /// Placeholder property.
1331 /// Gets/Sets the placeholder : text, color, font family, font style, point size, and pixel size.
1334 /// The following example demonstrates how to set the placeholder property.
1336 /// PropertyMap propertyMap = new PropertyMap();
1337 /// propertyMap.Add("placeholderText", new PropertyValue("Setting Placeholder Text"));
1338 /// propertyMap.Add("placeholderTextFocused", new PropertyValue("Setting Placeholder Text Focused"));
1339 /// propertyMap.Add("placeholderColor", new PropertyValue(Color.Red));
1340 /// propertyMap.Add("placeholderFontFamily", new PropertyValue("Arial"));
1341 /// propertyMap.Add("placeholderPointSize", new PropertyValue(12.0f));
1343 /// PropertyMap fontStyleMap = new PropertyMap();
1344 /// fontStyleMap.Add("weight", new PropertyValue("bold"));
1345 /// fontStyleMap.Add("width", new PropertyValue("condensed"));
1346 /// fontStyleMap.Add("slant", new PropertyValue("italic"));
1347 /// propertyMap.Add("placeholderFontStyle", new PropertyValue(fontStyleMap));
1349 /// TextField field = new TextField();
1350 /// field.Placeholder = propertyMap;
1353 public Tizen.NUI.PropertyMap Placeholder
1357 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
1358 GetProperty(TextField.Property.PLACEHOLDER).Get(temp);
1363 SetProperty(TextField.Property.PLACEHOLDER, new Tizen.NUI.PropertyValue(value));