2 * Copyright(c) 2019 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;
24 using Tizen.NUI.Binding;
26 namespace Tizen.NUI.BaseComponents
29 /// A control which provides a single line editable text field.
31 /// <since_tizen> 3 </since_tizen>
32 public class TextField : View
34 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
35 [EditorBrowsable(EditorBrowsableState.Never)]
36 public static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
38 var textField = (TextField)bindable;
41 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.TEXT, new Tizen.NUI.PropertyValue((string)newValue));
44 defaultValueCreator: (bindable) =>
46 var textField = (TextField)bindable;
48 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.TEXT).Get(out temp);
51 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
52 [EditorBrowsable(EditorBrowsableState.Never)]
53 public static readonly BindableProperty PlaceholderTextProperty = BindableProperty.Create(nameof(PlaceholderText), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
55 var textField = (TextField)bindable;
58 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER_TEXT, new Tizen.NUI.PropertyValue((string)newValue));
61 defaultValueCreator: (bindable) =>
63 var textField = (TextField)bindable;
65 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER_TEXT).Get(out temp);
68 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
69 [EditorBrowsable(EditorBrowsableState.Never)]
70 public static readonly BindableProperty PlaceholderTextFocusedProperty = BindableProperty.Create(nameof(PlaceholderTextFocused), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
72 var textField = (TextField)bindable;
75 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER_TEXT_FOCUSED, new Tizen.NUI.PropertyValue((string)newValue));
78 defaultValueCreator: (bindable) =>
80 var textField = (TextField)bindable;
82 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER_TEXT_FOCUSED).Get(out temp);
85 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
86 [EditorBrowsable(EditorBrowsableState.Never)]
87 public static readonly BindableProperty FontFamilyProperty = BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
89 var textField = (TextField)bindable;
92 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue((string)newValue));
95 defaultValueCreator: (bindable) =>
97 var textField = (TextField)bindable;
99 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.FONT_FAMILY).Get(out temp);
102 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
103 [EditorBrowsable(EditorBrowsableState.Never)]
104 public static readonly BindableProperty FontStyleProperty = BindableProperty.Create(nameof(FontStyle), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
106 var textField = (TextField)bindable;
107 if (newValue != null)
109 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.FONT_STYLE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
112 defaultValueCreator: (bindable) =>
114 var textField = (TextField)bindable;
115 PropertyMap temp = new PropertyMap();
116 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.FONT_STYLE).Get(temp);
119 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
120 [EditorBrowsable(EditorBrowsableState.Never)]
121 public static readonly BindableProperty PointSizeProperty = BindableProperty.Create(nameof(PointSize), typeof(float), typeof(TextField), default(float), propertyChanged: (bindable, oldValue, newValue) =>
123 var textField = (TextField)bindable;
124 if (newValue != null)
126 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.POINT_SIZE, new Tizen.NUI.PropertyValue((float)newValue));
129 defaultValueCreator: (bindable) =>
131 var textField = (TextField)bindable;
133 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.POINT_SIZE).Get(out temp);
136 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
137 [EditorBrowsable(EditorBrowsableState.Never)]
138 public static readonly BindableProperty MaxLengthProperty = BindableProperty.Create(nameof(MaxLength), typeof(int), typeof(TextField), default(int), propertyChanged: (bindable, oldValue, newValue) =>
140 var textField = (TextField)bindable;
141 if (newValue != null)
143 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.MAX_LENGTH, new Tizen.NUI.PropertyValue((int)newValue));
146 defaultValueCreator: (bindable) =>
148 var textField = (TextField)bindable;
150 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.MAX_LENGTH).Get(out temp);
153 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
154 [EditorBrowsable(EditorBrowsableState.Never)]
155 public static readonly BindableProperty ExceedPolicyProperty = BindableProperty.Create(nameof(ExceedPolicy), typeof(int), typeof(TextField), default(int), propertyChanged: (bindable, oldValue, newValue) =>
157 var textField = (TextField)bindable;
158 if (newValue != null)
160 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.EXCEED_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
163 defaultValueCreator: (bindable) =>
165 var textField = (TextField)bindable;
167 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.EXCEED_POLICY).Get(out temp);
170 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
171 [EditorBrowsable(EditorBrowsableState.Never)]
172 public static readonly BindableProperty HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment), typeof(TextField), HorizontalAlignment.Begin, propertyChanged: (bindable, oldValue, newValue) =>
174 var textField = (TextField)bindable;
175 if (newValue != null)
177 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue((int)newValue));
180 defaultValueCreator: (bindable) =>
182 var textField = (TextField)bindable;
184 if (Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
186 NUILog.Error("HorizontalAlignment get error!");
191 case "BEGIN": return HorizontalAlignment.Begin;
192 case "CENTER": return HorizontalAlignment.Center;
193 case "END": return HorizontalAlignment.End;
194 default: return HorizontalAlignment.Begin;
197 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
198 [EditorBrowsable(EditorBrowsableState.Never)]
199 public static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.Create(nameof(TextField.VerticalAlignment), typeof(VerticalAlignment), typeof(TextField), VerticalAlignment.Bottom, propertyChanged: (bindable, oldValue, newValue) =>
201 var textField = (TextField)bindable;
202 if (newValue != null)
204 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue((int)newValue));
207 defaultValueCreator: (bindable) =>
209 var textField = (TextField)bindable;
211 if (Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.VERTICAL_ALIGNMENT).Get(out temp) == false)
213 NUILog.Error("VerticalAlignment get error!");
218 case "TOP": return VerticalAlignment.Top;
219 case "CENTER": return VerticalAlignment.Center;
220 case "BOTTOM": return VerticalAlignment.Bottom;
221 default: return VerticalAlignment.Bottom;
224 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
225 [EditorBrowsable(EditorBrowsableState.Never)]
226 public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextField.TextColor), typeof(Color), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
228 var textField = (TextField)bindable;
229 if (newValue != null)
231 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue((Color)newValue));
234 defaultValueCreator: (bindable) =>
236 var textField = (TextField)bindable;
237 Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
238 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.TEXT_COLOR).Get(temp);
241 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
242 [EditorBrowsable(EditorBrowsableState.Never)]
243 public static readonly BindableProperty PlaceholderTextColorProperty = BindableProperty.Create(nameof(TextField.PlaceholderTextColor), typeof(Vector4), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
245 var textField = (TextField)bindable;
246 if (newValue != null)
248 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER_TEXT_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
251 defaultValueCreator: (bindable) =>
253 var textField = (TextField)bindable;
254 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
255 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER_TEXT_COLOR).Get(temp);
259 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
260 [EditorBrowsable(EditorBrowsableState.Never)]
261 public static readonly BindableProperty PrimaryCursorColorProperty = BindableProperty.Create(nameof(TextField.PrimaryCursorColor), typeof(Vector4), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
263 var textField = (TextField)bindable;
264 if (newValue != null)
266 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PRIMARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
269 defaultValueCreator: (bindable) =>
271 var textField = (TextField)bindable;
272 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
273 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.PRIMARY_CURSOR_COLOR).Get(temp);
276 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
277 [EditorBrowsable(EditorBrowsableState.Never)]
278 public static readonly BindableProperty SecondaryCursorColorProperty = BindableProperty.Create(nameof(TextField.SecondaryCursorColor), typeof(Vector4), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
280 var textField = (TextField)bindable;
281 if (newValue != null)
283 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SECONDARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
286 defaultValueCreator: (bindable) =>
288 var textField = (TextField)bindable;
289 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
290 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SECONDARY_CURSOR_COLOR).Get(temp);
293 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
294 [EditorBrowsable(EditorBrowsableState.Never)]
295 public static readonly BindableProperty EnableCursorBlinkProperty = BindableProperty.Create(nameof(TextField.EnableCursorBlink), typeof(bool), typeof(TextField), false, propertyChanged: (bindable, oldValue, newValue) =>
297 var textField = (TextField)bindable;
298 if (newValue != null)
300 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.ENABLE_CURSOR_BLINK, new Tizen.NUI.PropertyValue((bool)newValue));
303 defaultValueCreator: (bindable) =>
305 var textField = (TextField)bindable;
307 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.ENABLE_CURSOR_BLINK).Get(out temp);
310 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
311 [EditorBrowsable(EditorBrowsableState.Never)]
312 public static readonly BindableProperty CursorBlinkIntervalProperty = BindableProperty.Create(nameof(TextField.CursorBlinkInterval), typeof(float), typeof(TextField), default(float), propertyChanged: (bindable, oldValue, newValue) =>
314 var textField = (TextField)bindable;
315 if (newValue != null)
317 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.CURSOR_BLINK_INTERVAL, new Tizen.NUI.PropertyValue((float)newValue));
320 defaultValueCreator: (bindable) =>
322 var textField = (TextField)bindable;
324 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.CURSOR_BLINK_INTERVAL).Get(out temp);
327 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
328 [EditorBrowsable(EditorBrowsableState.Never)]
329 public static readonly BindableProperty CursorBlinkDurationProperty = BindableProperty.Create(nameof(TextField.CursorBlinkDuration), typeof(float), typeof(TextField), default(float), propertyChanged: (bindable, oldValue, newValue) =>
331 var textField = (TextField)bindable;
332 if (newValue != null)
334 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.CURSOR_BLINK_DURATION, new Tizen.NUI.PropertyValue((float)newValue));
337 defaultValueCreator: (bindable) =>
339 var textField = (TextField)bindable;
341 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.CURSOR_BLINK_DURATION).Get(out temp);
344 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
345 [EditorBrowsable(EditorBrowsableState.Never)]
346 public static readonly BindableProperty CursorWidthProperty = BindableProperty.Create(nameof(TextField.CursorWidth), typeof(int), typeof(TextField), default(int), propertyChanged: (bindable, oldValue, newValue) =>
348 var textField = (TextField)bindable;
349 if (newValue != null)
351 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.CURSOR_WIDTH, new Tizen.NUI.PropertyValue((int)newValue));
354 defaultValueCreator: (bindable) =>
356 var textField = (TextField)bindable;
358 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.CURSOR_WIDTH).Get(out temp);
361 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
362 [EditorBrowsable(EditorBrowsableState.Never)]
363 public static readonly BindableProperty GrabHandleImageProperty = BindableProperty.Create(nameof(TextField.GrabHandleImage), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
365 var textField = (TextField)bindable;
366 if (newValue != null)
368 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.GRAB_HANDLE_IMAGE, new Tizen.NUI.PropertyValue((string)newValue));
371 defaultValueCreator: (bindable) =>
373 var textField = (TextField)bindable;
375 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.GRAB_HANDLE_IMAGE).Get(out temp);
378 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
379 [EditorBrowsable(EditorBrowsableState.Never)]
380 public static readonly BindableProperty GrabHandlePressedImageProperty = BindableProperty.Create(nameof(TextField.GrabHandlePressedImage), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
382 var textField = (TextField)bindable;
383 if (newValue != null)
385 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.GRAB_HANDLE_PRESSED_IMAGE, new Tizen.NUI.PropertyValue((string)newValue));
388 defaultValueCreator: (bindable) =>
390 var textField = (TextField)bindable;
392 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.GRAB_HANDLE_PRESSED_IMAGE).Get(out temp);
395 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
396 [EditorBrowsable(EditorBrowsableState.Never)]
397 public static readonly BindableProperty ScrollThresholdProperty = BindableProperty.Create(nameof(TextField.ScrollThreshold), typeof(float), typeof(TextField), default(float), propertyChanged: (bindable, oldValue, newValue) =>
399 var textField = (TextField)bindable;
400 if (newValue != null)
402 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SCROLL_THRESHOLD, new Tizen.NUI.PropertyValue((float)newValue));
405 defaultValueCreator: (bindable) =>
407 var textField = (TextField)bindable;
409 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SCROLL_THRESHOLD).Get(out temp);
412 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
413 [EditorBrowsable(EditorBrowsableState.Never)]
414 public static readonly BindableProperty ScrollSpeedProperty = BindableProperty.Create(nameof(TextField.ScrollSpeed), typeof(float), typeof(TextField), default(float), propertyChanged: (bindable, oldValue, newValue) =>
416 var textField = (TextField)bindable;
417 if (newValue != null)
419 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SCROLL_SPEED, new Tizen.NUI.PropertyValue((float)newValue));
422 defaultValueCreator: (bindable) =>
424 var textField = (TextField)bindable;
426 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SCROLL_SPEED).Get(out temp);
429 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
430 [EditorBrowsable(EditorBrowsableState.Never)]
431 public static readonly BindableProperty SelectionHandleImageLeftProperty = BindableProperty.Create(nameof(TextField.SelectionHandleImageLeft), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
433 var textField = (TextField)bindable;
434 if (newValue != null)
436 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_IMAGE_LEFT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
439 defaultValueCreator: (bindable) =>
441 var textField = (TextField)bindable;
442 PropertyMap temp = new PropertyMap();
443 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_IMAGE_LEFT).Get(temp);
446 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
447 [EditorBrowsable(EditorBrowsableState.Never)]
448 public static readonly BindableProperty SelectionHandleImageRightProperty = BindableProperty.Create(nameof(TextField.SelectionHandleImageLeft), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
450 var textField = (TextField)bindable;
451 if (newValue != null)
453 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_IMAGE_RIGHT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
456 defaultValueCreator: (bindable) =>
458 var textField = (TextField)bindable;
459 PropertyMap temp = new PropertyMap();
460 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_IMAGE_RIGHT).Get(temp);
463 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
464 [EditorBrowsable(EditorBrowsableState.Never)]
465 public static readonly BindableProperty SelectionHandlePressedImageLeftProperty = BindableProperty.Create(nameof(TextField.SelectionHandlePressedImageLeft), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
467 var textField = (TextField)bindable;
468 if (newValue != null)
470 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
473 defaultValueCreator: (bindable) =>
475 var textField = (TextField)bindable;
476 PropertyMap temp = new PropertyMap();
477 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT).Get(temp);
480 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
481 [EditorBrowsable(EditorBrowsableState.Never)]
482 public static readonly BindableProperty SelectionHandlePressedImageRightProperty = BindableProperty.Create(nameof(TextField.SelectionHandlePressedImageRight), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
484 var textField = (TextField)bindable;
485 if (newValue != null)
487 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
490 defaultValueCreator: (bindable) =>
492 var textField = (TextField)bindable;
493 PropertyMap temp = new PropertyMap();
494 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT).Get(temp);
497 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
498 [EditorBrowsable(EditorBrowsableState.Never)]
499 public static readonly BindableProperty SelectionHandleMarkerImageLeftProperty = BindableProperty.Create(nameof(TextField.SelectionHandleMarkerImageLeft), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
501 var textField = (TextField)bindable;
502 if (newValue != null)
504 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
507 defaultValueCreator: (bindable) =>
509 var textField = (TextField)bindable;
510 PropertyMap temp = new PropertyMap();
511 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT).Get(temp);
514 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
515 [EditorBrowsable(EditorBrowsableState.Never)]
516 public static readonly BindableProperty SelectionHandleMarkerImageRightProperty = BindableProperty.Create(nameof(TextField.SelectionHandleMarkerImageRight), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
518 var textField = (TextField)bindable;
519 if (newValue != null)
521 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
524 defaultValueCreator: (bindable) =>
526 var textField = (TextField)bindable;
527 PropertyMap temp = new PropertyMap();
528 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT).Get(temp);
531 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
532 [EditorBrowsable(EditorBrowsableState.Never)]
533 public static readonly BindableProperty SelectionHighlightColorProperty = BindableProperty.Create(nameof(TextField.SelectionHighlightColor), typeof(Vector4), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
535 var textField = (TextField)bindable;
536 if (newValue != null)
538 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SELECTION_HIGHLIGHT_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
541 defaultValueCreator: (bindable) =>
543 var textField = (TextField)bindable;
544 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
545 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SELECTION_HIGHLIGHT_COLOR).Get(temp);
548 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
549 [EditorBrowsable(EditorBrowsableState.Never)]
550 public static readonly BindableProperty DecorationBoundingBoxProperty = BindableProperty.Create(nameof(TextField.DecorationBoundingBox), typeof(Rectangle), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
552 var textField = (TextField)bindable;
553 if (newValue != null)
555 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.DECORATION_BOUNDING_BOX, new Tizen.NUI.PropertyValue((Rectangle)newValue));
558 defaultValueCreator: (bindable) =>
560 var textField = (TextField)bindable;
561 Rectangle temp = new Rectangle(0, 0, 0, 0);
562 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.DECORATION_BOUNDING_BOX).Get(temp);
565 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
566 [EditorBrowsable(EditorBrowsableState.Never)]
567 public static readonly BindableProperty InputMethodSettingsProperty = BindableProperty.Create(nameof(TextField.InputMethodSettings), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
569 var textField = (TextField)bindable;
570 if (newValue != null)
572 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_METHOD_SETTINGS, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
575 defaultValueCreator: (bindable) =>
577 var textField = (TextField)bindable;
578 PropertyMap temp = new PropertyMap();
579 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_METHOD_SETTINGS).Get(temp);
582 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
583 [EditorBrowsable(EditorBrowsableState.Never)]
584 public static readonly BindableProperty InputColorProperty = BindableProperty.Create(nameof(TextField.InputColor), typeof(Vector4), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
586 var textField = (TextField)bindable;
587 if (newValue != null)
589 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
592 defaultValueCreator: (bindable) =>
594 var textField = (TextField)bindable;
595 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
596 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_COLOR).Get(temp);
599 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
600 [EditorBrowsable(EditorBrowsableState.Never)]
601 public static readonly BindableProperty EnableMarkupProperty = BindableProperty.Create(nameof(TextField.EnableMarkup), typeof(bool), typeof(TextField), false, propertyChanged: (bindable, oldValue, newValue) =>
603 var textField = (TextField)bindable;
604 if (newValue != null)
606 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue((bool)newValue));
609 defaultValueCreator: (bindable) =>
611 var textField = (TextField)bindable;
613 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.ENABLE_MARKUP).Get(out temp);
616 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
617 [EditorBrowsable(EditorBrowsableState.Never)]
618 public static readonly BindableProperty InputFontFamilyProperty = BindableProperty.Create(nameof(TextField.InputFontFamily), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
620 var textField = (TextField)bindable;
621 if (newValue != null)
623 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_FONT_FAMILY, new Tizen.NUI.PropertyValue((string)newValue));
626 defaultValueCreator: (bindable) =>
628 var textField = (TextField)bindable;
630 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_FONT_FAMILY).Get(out temp);
633 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
634 [EditorBrowsable(EditorBrowsableState.Never)]
635 public static readonly BindableProperty InputFontStyleProperty = BindableProperty.Create(nameof(TextField.InputFontStyle), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
637 var textField = (TextField)bindable;
638 if (newValue != null)
640 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_FONT_STYLE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
643 defaultValueCreator: (bindable) =>
645 var textField = (TextField)bindable;
646 PropertyMap temp = new PropertyMap();
647 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_FONT_STYLE).Get(temp);
650 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
651 [EditorBrowsable(EditorBrowsableState.Never)]
652 public static readonly BindableProperty InputPointSizeProperty = BindableProperty.Create(nameof(TextField.InputPointSize), typeof(float), typeof(TextField), default(float), propertyChanged: (bindable, oldValue, newValue) =>
654 var textField = (TextField)bindable;
655 if (newValue != null)
657 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_POINT_SIZE, new Tizen.NUI.PropertyValue((float)newValue));
660 defaultValueCreator: (bindable) =>
662 var textField = (TextField)bindable;
664 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_POINT_SIZE).Get(out temp);
667 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
668 [EditorBrowsable(EditorBrowsableState.Never)]
669 public static readonly BindableProperty UnderlineProperty = BindableProperty.Create(nameof(TextField.Underline), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
671 var textField = (TextField)bindable;
672 if (newValue != null)
674 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.UNDERLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
677 defaultValueCreator: (bindable) =>
679 var textField = (TextField)bindable;
680 PropertyMap temp = new PropertyMap();
681 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.UNDERLINE).Get(temp);
684 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
685 [EditorBrowsable(EditorBrowsableState.Never)]
686 public static readonly BindableProperty InputUnderlineProperty = BindableProperty.Create(nameof(TextField.InputUnderline), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
688 var textField = (TextField)bindable;
689 if (newValue != null)
691 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_UNDERLINE, new Tizen.NUI.PropertyValue((string)newValue));
694 defaultValueCreator: (bindable) =>
696 var textField = (TextField)bindable;
698 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_UNDERLINE).Get(out temp);
701 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
702 [EditorBrowsable(EditorBrowsableState.Never)]
703 public static readonly BindableProperty ShadowProperty = BindableProperty.Create(nameof(TextField.Shadow), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
705 var textField = (TextField)bindable;
706 if (newValue != null)
708 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.SHADOW, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
711 defaultValueCreator: (bindable) =>
713 var textField = (TextField)bindable;
714 PropertyMap temp = new PropertyMap();
715 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.SHADOW).Get(temp);
718 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
719 [EditorBrowsable(EditorBrowsableState.Never)]
720 public static readonly BindableProperty InputShadowProperty = BindableProperty.Create(nameof(TextField.InputShadow), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
722 var textField = (TextField)bindable;
723 if (newValue != null)
725 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_SHADOW, new Tizen.NUI.PropertyValue((string)newValue));
728 defaultValueCreator: (bindable) =>
730 var textField = (TextField)bindable;
732 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_SHADOW).Get(out temp);
735 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
736 [EditorBrowsable(EditorBrowsableState.Never)]
737 public static readonly BindableProperty EmbossProperty = BindableProperty.Create(nameof(TextField.Emboss), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
739 var textField = (TextField)bindable;
740 if (newValue != null)
742 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.EMBOSS, new Tizen.NUI.PropertyValue((string)newValue));
745 defaultValueCreator: (bindable) =>
747 var textField = (TextField)bindable;
749 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.EMBOSS).Get(out temp);
752 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
753 [EditorBrowsable(EditorBrowsableState.Never)]
754 public static readonly BindableProperty InputEmbossProperty = BindableProperty.Create(nameof(TextField.InputEmboss), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
756 var textField = (TextField)bindable;
757 if (newValue != null)
759 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_EMBOSS, new Tizen.NUI.PropertyValue((string)newValue));
762 defaultValueCreator: (bindable) =>
764 var textField = (TextField)bindable;
766 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_EMBOSS).Get(out temp);
769 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
770 [EditorBrowsable(EditorBrowsableState.Never)]
771 public static readonly BindableProperty OutlineProperty = BindableProperty.Create(nameof(TextField.Outline), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
773 var textField = (TextField)bindable;
774 if (newValue != null)
776 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.OUTLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
779 defaultValueCreator: (bindable) =>
781 var textField = (TextField)bindable;
782 PropertyMap temp = new PropertyMap();
783 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.OUTLINE).Get(temp);
786 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
787 [EditorBrowsable(EditorBrowsableState.Never)]
788 public static readonly BindableProperty InputOutlineProperty = BindableProperty.Create(nameof(TextField.InputOutline), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
790 var textField = (TextField)bindable;
791 if (newValue != null)
793 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.INPUT_OUTLINE, new Tizen.NUI.PropertyValue((string)newValue));
796 defaultValueCreator: (bindable) =>
798 var textField = (TextField)bindable;
800 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.INPUT_OUTLINE).Get(out temp);
803 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
804 [EditorBrowsable(EditorBrowsableState.Never)]
805 public static readonly BindableProperty HiddenInputSettingsProperty = BindableProperty.Create(nameof(TextField.HiddenInputSettings), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
807 var textField = (TextField)bindable;
808 if (newValue != null)
810 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.HIDDEN_INPUT_SETTINGS, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
813 defaultValueCreator: (bindable) =>
815 var textField = (TextField)bindable;
816 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
817 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.HIDDEN_INPUT_SETTINGS).Get(temp);
820 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
821 [EditorBrowsable(EditorBrowsableState.Never)]
822 public static readonly BindableProperty PixelSizeProperty = BindableProperty.Create(nameof(TextField.PixelSize), typeof(float), typeof(TextField), default(float), propertyChanged: (bindable, oldValue, newValue) =>
824 var textField = (TextField)bindable;
825 if (newValue != null)
827 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue((float)newValue));
830 defaultValueCreator: (bindable) =>
832 var textField = (TextField)bindable;
834 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.PIXEL_SIZE).Get(out temp);
837 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
838 [EditorBrowsable(EditorBrowsableState.Never)]
839 public static readonly BindableProperty EnableSelectionProperty = BindableProperty.Create(nameof(TextField.EnableSelection), typeof(bool), typeof(TextField), false, propertyChanged: (bindable, oldValue, newValue) =>
841 var textField = (TextField)bindable;
842 if (newValue != null)
844 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.ENABLE_SELECTION, new Tizen.NUI.PropertyValue((bool)newValue));
847 defaultValueCreator: (bindable) =>
849 var textField = (TextField)bindable;
851 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.ENABLE_SELECTION).Get(out temp);
854 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
855 [EditorBrowsable(EditorBrowsableState.Never)]
856 public static readonly BindableProperty PlaceholderProperty = BindableProperty.Create(nameof(TextField.Placeholder), typeof(PropertyMap), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
858 var textField = (TextField)bindable;
859 if (newValue != null)
861 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
864 defaultValueCreator: (bindable) =>
866 var textField = (TextField)bindable;
867 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
868 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER).Get(temp);
871 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
872 [EditorBrowsable(EditorBrowsableState.Never)]
873 public static readonly BindableProperty EllipsisProperty = BindableProperty.Create(nameof(TextField.Ellipsis), typeof(bool), typeof(TextField), false, propertyChanged: (bindable, oldValue, newValue) =>
875 var textField = (TextField)bindable;
876 if (newValue != null)
878 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.ELLIPSIS, new Tizen.NUI.PropertyValue((bool)newValue));
881 defaultValueCreator: (bindable) =>
883 var textField = (TextField)bindable;
885 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.ELLIPSIS).Get(out temp);
888 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
889 [EditorBrowsable(EditorBrowsableState.Never)]
890 public static readonly BindableProperty EnableShiftSelectionProperty = BindableProperty.Create(nameof(TextField.EnableShiftSelection), typeof(bool), typeof(TextField), false, propertyChanged: (bindable, oldValue, newValue) =>
892 var textField = (TextField)bindable;
893 if (newValue != null)
895 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.ENABLE_SHIFT_SELECTION, new Tizen.NUI.PropertyValue((bool)newValue));
898 defaultValueCreator: (bindable) =>
900 var textField = (TextField)bindable;
902 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.ENABLE_SHIFT_SELECTION).Get(out temp);
905 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
906 [EditorBrowsable(EditorBrowsableState.Never)]
907 public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(TextField.MatchSystemLanguageDirection), typeof(bool), typeof(TextField), false, propertyChanged: (bindable, oldValue, newValue) =>
909 var textField = (TextField)bindable;
910 if (newValue != null)
912 Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.MATCH_SYSTEM_LANGUAGE_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
915 defaultValueCreator: (bindable) =>
917 var textField = (TextField)bindable;
919 Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.MATCH_SYSTEM_LANGUAGE_DIRECTION).Get(out temp);
923 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
924 private string textFieldTextSid = null;
925 private string textFieldPlaceHolderTextSid = null;
926 private bool systemlangTextFlag = false;
927 private InputMethodContext inputMethodCotext = null;
928 private EventHandler<TextChangedEventArgs> _textFieldTextChangedEventHandler;
929 private TextChangedCallbackDelegate _textFieldTextChangedCallbackDelegate;
930 private EventHandler<MaxLengthReachedEventArgs> _textFieldMaxLengthReachedEventHandler;
931 private MaxLengthReachedCallbackDelegate _textFieldMaxLengthReachedCallbackDelegate;
934 /// Creates the TextField control.
936 /// <since_tizen> 3 </since_tizen>
937 public TextField() : this(NDalicPINVOKE.TextField_New(), true)
939 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
942 internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextField_SWIGUpcast(cPtr), cMemoryOwn)
944 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
947 internal TextField(TextField handle) : this(NDalicPINVOKE.new_TextField__SWIG_1(TextField.getCPtr(handle)), true)
949 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
952 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
953 private delegate void TextChangedCallbackDelegate(IntPtr textField);
955 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
956 private delegate void MaxLengthReachedCallbackDelegate(IntPtr textField);
959 /// The TextChanged event.
961 /// <since_tizen> 3 </since_tizen>
962 public event EventHandler<TextChangedEventArgs> TextChanged
966 if (_textFieldTextChangedEventHandler == null)
968 _textFieldTextChangedCallbackDelegate = (OnTextChanged);
969 TextChangedSignal().Connect(_textFieldTextChangedCallbackDelegate);
971 _textFieldTextChangedEventHandler += value;
975 _textFieldTextChangedEventHandler -= value;
976 if (_textFieldTextChangedEventHandler == null && TextChangedSignal().Empty() == false)
978 TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
984 /// The MaxLengthReached event.
986 /// <since_tizen> 3 </since_tizen>
987 public event EventHandler<MaxLengthReachedEventArgs> MaxLengthReached
991 if (_textFieldMaxLengthReachedEventHandler == null)
993 _textFieldMaxLengthReachedCallbackDelegate = (OnMaxLengthReached);
994 MaxLengthReachedSignal().Connect(_textFieldMaxLengthReachedCallbackDelegate);
996 _textFieldMaxLengthReachedEventHandler += value;
1000 if (_textFieldMaxLengthReachedEventHandler == null && MaxLengthReachedSignal().Empty() == false)
1002 this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
1004 _textFieldMaxLengthReachedEventHandler -= value;
1008 internal enum ExceedPolicyType
1010 ExceedPolicyOriginal,
1015 /// The TranslatableText property.<br />
1016 /// The text can set the SID value.<br />
1018 /// <exception cref='ArgumentNullException'>
1019 /// ResourceManager about multilingual is null.
1021 /// <since_tizen> 4 </since_tizen>
1022 public string TranslatableText
1026 return textFieldTextSid;
1030 if (NUIApplication.MultilingualResourceManager == null)
1032 throw new ArgumentNullException("ResourceManager about multilingual is null");
1034 textFieldTextSid = value;
1035 Text = SetTranslatable(textFieldTextSid);
1036 NotifyPropertyChanged();
1041 /// The TranslatablePlaceholderText property.<br />
1042 /// The text can set the SID value.<br />
1044 /// <exception cref='ArgumentNullException'>
1045 /// ResourceManager about multilingual is null.
1047 /// <since_tizen> 4 </since_tizen>
1048 public string TranslatablePlaceholderText
1052 return textFieldPlaceHolderTextSid;
1056 if (NUIApplication.MultilingualResourceManager == null)
1058 throw new ArgumentNullException("ResourceManager about multilingual is null");
1060 textFieldPlaceHolderTextSid = value;
1061 PlaceholderText = SetTranslatable(textFieldPlaceHolderTextSid);
1062 NotifyPropertyChanged();
1067 /// The Text property.
1069 /// <since_tizen> 3 </since_tizen>
1074 return (string)GetValue(TextProperty);
1078 SetValueAndForceSendChangeSignal(TextProperty, value);
1079 NotifyPropertyChanged();
1084 /// The PlaceholderText property.
1086 /// <since_tizen> 3 </since_tizen>
1087 public string PlaceholderText
1091 return (string)GetValue(PlaceholderTextProperty);
1095 SetValue(PlaceholderTextProperty, value);
1096 NotifyPropertyChanged();
1101 /// The PlaceholderTextFocused property.
1103 /// <since_tizen> 3 </since_tizen>
1104 public string PlaceholderTextFocused
1108 return (string)GetValue(PlaceholderTextFocusedProperty);
1112 SetValue(PlaceholderTextFocusedProperty, value);
1113 NotifyPropertyChanged();
1118 /// The FontFamily property.
1120 /// <since_tizen> 3 </since_tizen>
1121 public string FontFamily
1125 return (string)GetValue(FontFamilyProperty);
1129 SetValue(FontFamilyProperty, value);
1130 NotifyPropertyChanged();
1135 /// The FontStyle property.
1137 /// <since_tizen> 3 </since_tizen>
1138 public PropertyMap FontStyle
1142 return (PropertyMap)GetValue(FontStyleProperty);
1146 SetValue(FontStyleProperty, value);
1147 NotifyPropertyChanged();
1152 /// The PointSize property.
1154 /// <since_tizen> 3 </since_tizen>
1155 public float PointSize
1159 return (float)GetValue(PointSizeProperty);
1163 SetValue(PointSizeProperty, value);
1164 NotifyPropertyChanged();
1169 /// The MaxLength property.
1171 /// <since_tizen> 3 </since_tizen>
1172 public int MaxLength
1176 return (int)GetValue(MaxLengthProperty);
1180 SetValue(MaxLengthProperty, value);
1181 NotifyPropertyChanged();
1186 /// The ExceedPolicy property.
1188 /// <since_tizen> 3 </since_tizen>
1189 public int ExceedPolicy
1193 return (int)GetValue(ExceedPolicyProperty);
1197 SetValue(ExceedPolicyProperty, value);
1198 NotifyPropertyChanged();
1203 /// The HorizontalAlignment property.
1205 /// <since_tizen> 3 </since_tizen>
1206 public HorizontalAlignment HorizontalAlignment
1210 return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
1214 SetValue(HorizontalAlignmentProperty, value);
1215 NotifyPropertyChanged();
1220 /// The VerticalAlignment property.
1222 /// <since_tizen> 3 </since_tizen>
1223 public VerticalAlignment VerticalAlignment
1227 return (VerticalAlignment)GetValue(VerticalAlignmentProperty);
1231 SetValue(VerticalAlignmentProperty, value);
1232 NotifyPropertyChanged();
1233 NotifyPropertyChanged();
1238 /// The TextColor property.
1240 /// <since_tizen> 3 </since_tizen>
1241 public Color TextColor
1245 return (Color)GetValue(TextColorProperty);
1249 SetValue(TextColorProperty, value);
1250 NotifyPropertyChanged();
1255 /// The PlaceholderTextColor property.
1257 /// <since_tizen> 3 </since_tizen>
1258 public Vector4 PlaceholderTextColor
1262 return (Vector4)GetValue(PlaceholderTextColorProperty);
1266 SetValue(PlaceholderTextColorProperty, value);
1267 NotifyPropertyChanged();
1272 /// The ShadowOffset property.
1274 /// <since_tizen> 3 </since_tizen>
1275 [Obsolete("Please do not use! This will be deprecated! Please use Shadow property instead!")]
1276 [EditorBrowsable(EditorBrowsableState.Never)]
1277 public Vector2 ShadowOffset
1281 PropertyMap map = new PropertyMap();
1282 GetProperty(TextField.Property.SHADOW).Get(map);
1283 Vector2 shadowOffset = new Vector2();
1284 map.Find(TextField.Property.SHADOW, "offset")?.Get(shadowOffset);
1285 return shadowOffset;
1289 PropertyMap temp = new PropertyMap();
1290 temp.Insert("offset", new PropertyValue(value));
1291 SetValue(ShadowProperty, temp);
1292 NotifyPropertyChanged();
1297 /// The ShadowColor property.
1299 /// <since_tizen> 3 </since_tizen>
1300 [Obsolete("Please do not use! This will be deprecated! Please use Shadow property instead!")]
1301 [EditorBrowsable(EditorBrowsableState.Never)]
1302 public Vector4 ShadowColor
1306 PropertyMap map = new PropertyMap();
1307 GetProperty(TextField.Property.SHADOW).Get(map);
1308 Vector4 shadowColor = new Vector4();
1309 map.Find(TextField.Property.SHADOW, "color")?.Get(shadowColor);
1314 PropertyMap temp = new PropertyMap();
1315 temp.Insert("color", new PropertyValue(value));
1316 SetValue(ShadowProperty, temp);
1317 NotifyPropertyChanged();
1322 /// The PrimaryCursorColor property.
1324 /// <since_tizen> 3 </since_tizen>
1325 public Vector4 PrimaryCursorColor
1329 return (Vector4)GetValue(PrimaryCursorColorProperty);
1333 SetValue(PrimaryCursorColorProperty, value);
1334 NotifyPropertyChanged();
1339 /// The SecondaryCursorColor property.
1341 /// <since_tizen> 3 </since_tizen>
1342 public Vector4 SecondaryCursorColor
1346 return (Vector4)GetValue(SecondaryCursorColorProperty);
1350 SetValue(SecondaryCursorColorProperty, value);
1351 NotifyPropertyChanged();
1356 /// The EnableCursorBlink property.
1358 /// <since_tizen> 3 </since_tizen>
1359 public bool EnableCursorBlink
1363 return (bool)GetValue(EnableCursorBlinkProperty);
1367 SetValue(EnableCursorBlinkProperty, value);
1368 NotifyPropertyChanged();
1373 /// The CursorBlinkInterval property.
1375 /// <since_tizen> 3 </since_tizen>
1376 public float CursorBlinkInterval
1380 return (float)GetValue(CursorBlinkIntervalProperty);
1384 SetValue(CursorBlinkIntervalProperty, value);
1385 NotifyPropertyChanged();
1390 /// The CursorBlinkDuration property.
1392 /// <since_tizen> 3 </since_tizen>
1393 public float CursorBlinkDuration
1397 return (float)GetValue(CursorBlinkDurationProperty);
1401 SetValue(CursorBlinkDurationProperty, value);
1402 NotifyPropertyChanged();
1407 /// The CursorWidth property.
1409 /// <since_tizen> 3 </since_tizen>
1410 public int CursorWidth
1414 return (int)GetValue(CursorWidthProperty);
1418 SetValue(CursorWidthProperty, value);
1419 NotifyPropertyChanged();
1424 /// The GrabHandleImage property.
1426 /// <since_tizen> 3 </since_tizen>
1427 public string GrabHandleImage
1431 return (string)GetValue(GrabHandleImageProperty);
1435 SetValue(GrabHandleImageProperty, value);
1436 NotifyPropertyChanged();
1441 /// The GrabHandlePressedImage property.
1443 /// <since_tizen> 3 </since_tizen>
1444 public string GrabHandlePressedImage
1448 return (string)GetValue(GrabHandlePressedImageProperty);
1452 SetValue(GrabHandlePressedImageProperty, value);
1453 NotifyPropertyChanged();
1458 /// The ScrollThreshold property.
1460 /// <since_tizen> 3 </since_tizen>
1461 public float ScrollThreshold
1465 return (float)GetValue(ScrollThresholdProperty);
1469 SetValue(ScrollThresholdProperty, value);
1470 NotifyPropertyChanged();
1475 /// The ScrollSpeed property.
1477 /// <since_tizen> 3 </since_tizen>
1478 public float ScrollSpeed
1482 return (float)GetValue(ScrollSpeedProperty);
1486 SetValue(ScrollSpeedProperty, value);
1487 NotifyPropertyChanged();
1492 /// The SelectionHandleImageLeft property.
1494 /// <since_tizen> 3 </since_tizen>
1495 public PropertyMap SelectionHandleImageLeft
1499 return (PropertyMap)GetValue(SelectionHandleImageLeftProperty);
1503 SetValue(SelectionHandleImageLeftProperty, value);
1504 NotifyPropertyChanged();
1509 /// The SelectionHandleImageRight property.
1511 /// <since_tizen> 3 </since_tizen>
1512 public PropertyMap SelectionHandleImageRight
1516 return (PropertyMap)GetValue(SelectionHandleImageRightProperty);
1520 SetValue(SelectionHandleImageRightProperty, value);
1521 NotifyPropertyChanged();
1526 /// The SelectionHandlePressedImageLeft property.
1528 /// <since_tizen> 3 </since_tizen>
1529 public PropertyMap SelectionHandlePressedImageLeft
1533 return (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty);
1537 SetValue(SelectionHandlePressedImageLeftProperty, value);
1538 NotifyPropertyChanged();
1543 /// The SelectionHandlePressedImageRight property.
1545 /// <since_tizen> 3 </since_tizen>
1546 public PropertyMap SelectionHandlePressedImageRight
1550 return (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty);
1554 SetValue(SelectionHandlePressedImageRightProperty, value);
1555 NotifyPropertyChanged();
1560 /// The SelectionHandleMarkerImageLeft property.
1562 /// <since_tizen> 3 </since_tizen>
1563 public PropertyMap SelectionHandleMarkerImageLeft
1567 return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty);
1571 SetValue(SelectionHandleMarkerImageLeftProperty, value);
1572 NotifyPropertyChanged();
1577 /// The SelectionHandleMarkerImageRight property.
1579 /// <since_tizen> 3 </since_tizen>
1580 public PropertyMap SelectionHandleMarkerImageRight
1584 return (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty);
1588 SetValue(SelectionHandleMarkerImageRightProperty, value);
1589 NotifyPropertyChanged();
1594 /// The SelectionHighlightColor property.
1596 /// <since_tizen> 3 </since_tizen>
1597 public Vector4 SelectionHighlightColor
1601 return (Vector4)GetValue(SelectionHighlightColorProperty);
1605 SetValue(SelectionHighlightColorProperty, value);
1606 NotifyPropertyChanged();
1611 /// The DecorationBoundingBox property.
1613 /// <since_tizen> 3 </since_tizen>
1614 public Rectangle DecorationBoundingBox
1618 return (Rectangle)GetValue(DecorationBoundingBoxProperty);
1622 SetValue(DecorationBoundingBoxProperty, value);
1623 NotifyPropertyChanged();
1628 /// The InputMethodSettings property.
1630 /// <since_tizen> 3 </since_tizen>
1631 public PropertyMap InputMethodSettings
1635 return (PropertyMap)GetValue(InputMethodSettingsProperty);
1639 SetValue(InputMethodSettingsProperty, value);
1640 NotifyPropertyChanged();
1645 /// The InputColor property.
1647 /// <since_tizen> 3 </since_tizen>
1648 public Vector4 InputColor
1652 return (Vector4)GetValue(InputColorProperty);
1656 SetValue(InputColorProperty, value);
1657 NotifyPropertyChanged();
1662 /// The EnableMarkup property.
1664 /// <since_tizen> 3 </since_tizen>
1665 public bool EnableMarkup
1669 return (bool)GetValue(EnableMarkupProperty);
1673 SetValue(EnableMarkupProperty, value);
1674 NotifyPropertyChanged();
1679 /// The InputFontFamily property.
1681 /// <since_tizen> 3 </since_tizen>
1682 public string InputFontFamily
1686 return (string)GetValue(InputFontFamilyProperty);
1690 SetValue(InputFontFamilyProperty, value);
1691 NotifyPropertyChanged();
1696 /// The InputFontStyle property.
1698 /// <since_tizen> 3 </since_tizen>
1699 public PropertyMap InputFontStyle
1703 return (PropertyMap)GetValue(InputFontStyleProperty);
1707 SetValue(InputFontStyleProperty, value);
1708 NotifyPropertyChanged();
1713 /// The InputPointSize property.
1715 /// <since_tizen> 3 </since_tizen>
1716 public float InputPointSize
1720 return (float)GetValue(InputPointSizeProperty);
1724 SetValue(InputPointSizeProperty, value);
1725 NotifyPropertyChanged();
1730 /// The Underline property.
1732 /// <since_tizen> 3 </since_tizen>
1733 public PropertyMap Underline
1737 return (PropertyMap)GetValue(UnderlineProperty);
1741 SetValue(UnderlineProperty, value);
1742 NotifyPropertyChanged();
1747 /// The InputUnderline property.
1749 /// <since_tizen> 3 </since_tizen>
1750 public string InputUnderline
1754 return (string)GetValue(InputUnderlineProperty);
1758 SetValue(InputUnderlineProperty, value);
1759 NotifyPropertyChanged();
1764 /// The Shadow property.
1766 /// <since_tizen> 3 </since_tizen>
1767 public PropertyMap Shadow
1771 return (PropertyMap)GetValue(ShadowProperty);
1775 SetValue(ShadowProperty, value);
1776 NotifyPropertyChanged();
1781 /// The InputShadow property.
1783 /// <since_tizen> 3 </since_tizen>
1784 public string InputShadow
1788 return (string)GetValue(InputShadowProperty);
1792 SetValue(InputShadowProperty, value);
1793 NotifyPropertyChanged();
1798 /// The Emboss property.
1800 /// <since_tizen> 3 </since_tizen>
1801 public string Emboss
1805 return (string)GetValue(EmbossProperty);
1809 SetValue(EmbossProperty, value);
1810 NotifyPropertyChanged();
1815 /// The InputEmboss property.
1817 /// <since_tizen> 3 </since_tizen>
1818 public string InputEmboss
1822 return (string)GetValue(InputEmbossProperty);
1826 SetValue(InputEmbossProperty, value);
1827 NotifyPropertyChanged();
1832 /// The Outline property.
1834 /// <since_tizen> 3 </since_tizen>
1835 public PropertyMap Outline
1839 return (PropertyMap)GetValue(OutlineProperty);
1843 SetValue(OutlineProperty, value);
1844 NotifyPropertyChanged();
1849 /// The InputOutline property.
1851 /// <since_tizen> 3 </since_tizen>
1852 public string InputOutline
1856 return (string)GetValue(InputOutlineProperty);
1860 SetValue(InputOutlineProperty, value);
1861 NotifyPropertyChanged();
1866 /// The HiddenInputSettings property.
1868 /// <since_tizen> 3 </since_tizen>
1869 public Tizen.NUI.PropertyMap HiddenInputSettings
1873 return (PropertyMap)GetValue(HiddenInputSettingsProperty);
1877 SetValue(HiddenInputSettingsProperty, value);
1878 NotifyPropertyChanged();
1883 /// The PixelSize property.
1885 /// <since_tizen> 3 </since_tizen>
1886 public float PixelSize
1890 return (float)GetValue(PixelSizeProperty);
1894 SetValue(PixelSizeProperty, value);
1895 NotifyPropertyChanged();
1900 /// The Enable selection property.
1902 /// <since_tizen> 3 </since_tizen>
1903 public bool EnableSelection
1907 return (bool)GetValue(EnableSelectionProperty);
1911 SetValue(EnableSelectionProperty, value);
1912 NotifyPropertyChanged();
1917 /// The Placeholder property.
1918 /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
1921 /// The following example demonstrates how to set the Placeholder property.
1923 /// PropertyMap propertyMap = new PropertyMap();
1924 /// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
1925 /// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
1926 /// propertyMap.Add("color", new PropertyValue(Color.Red));
1927 /// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
1928 /// propertyMap.Add("pointSize", new PropertyValue(12.0f));
1930 /// PropertyMap fontStyleMap = new PropertyMap();
1931 /// fontStyleMap.Add("weight", new PropertyValue("bold"));
1932 /// fontStyleMap.Add("width", new PropertyValue("condensed"));
1933 /// fontStyleMap.Add("slant", new PropertyValue("italic"));
1934 /// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
1936 /// TextField field = new TextField();
1937 /// field.Placeholder = propertyMap;
1940 /// <since_tizen> 3 </since_tizen>
1941 public Tizen.NUI.PropertyMap Placeholder
1945 return (PropertyMap)GetValue(PlaceholderProperty);
1949 SetValue(PlaceholderProperty, value);
1950 NotifyPropertyChanged();
1955 /// The Ellipsis property.<br />
1956 /// Enable or disable the ellipsis.<br />
1957 /// Placeholder PropertyMap is used to add ellipsis to placeholder text.
1959 /// <since_tizen> 4 </since_tizen>
1960 public bool Ellipsis
1964 return (bool)GetValue(EllipsisProperty);
1968 SetValue(EllipsisProperty, value);
1969 NotifyPropertyChanged();
1974 /// Enables selection of the text using the Shift key.
1976 /// <since_tizen> 5 </since_tizen>
1977 /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1978 [EditorBrowsable(EditorBrowsableState.Never)]
1979 public bool EnableShiftSelection
1983 return (bool)GetValue(EnableShiftSelectionProperty);
1987 SetValue(EnableShiftSelectionProperty, value);
1988 NotifyPropertyChanged();
1994 /// The text alignment to match the direction of the system language.
1996 /// <since_tizen> 5 </since_tizen>
1997 /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
1998 [EditorBrowsable(EditorBrowsableState.Never)]
1999 public bool MatchSystemLanguageDirection
2003 return (bool)GetValue(MatchSystemLanguageDirectionProperty);
2007 SetValue(MatchSystemLanguageDirectionProperty, value);
2008 NotifyPropertyChanged();
2012 internal override bool IsCreateByXaml
2016 return base.IsCreateByXaml;
2020 base.IsCreateByXaml = value;
2024 this.TextChanged += (obj, e) =>
2026 this.Text = this.Text;
2033 /// Get the InputMethodContext instance.
2035 /// <returns>The InputMethodContext instance.</returns>
2036 /// <since_tizen> 5 </since_tizen>
2037 public InputMethodContext GetInputMethodContext()
2039 if (inputMethodCotext == null)
2041 /*Avoid raising InputMethodContext reference count.*/
2042 inputMethodCotext = new InputMethodContext(NDalicPINVOKE.TextField_GetInputMethodContext(swigCPtr), true);
2043 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2045 return inputMethodCotext;
2048 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj)
2050 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
2053 internal TextFieldSignal TextChangedSignal()
2055 TextFieldSignal ret = new TextFieldSignal(NDalicPINVOKE.TextField_TextChangedSignal(swigCPtr), false);
2056 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2060 internal TextFieldSignal MaxLengthReachedSignal()
2062 TextFieldSignal ret = new TextFieldSignal(NDalicPINVOKE.TextField_MaxLengthReachedSignal(swigCPtr), false);
2063 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2067 internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t InputStyleChangedSignal()
2069 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);
2070 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2077 /// <since_tizen> 3 </since_tizen>
2078 protected override void Dispose(DisposeTypes type)
2082 DisposeQueue.Instance.Add(this);
2086 if (type == DisposeTypes.Explicit)
2089 //Release your own managed resources here.
2090 //You should release all of your own disposable objects here.
2093 //Release your own unmanaged resources here.
2094 //You should not access any managed member here except static instance.
2095 //because the execution order of Finalizes is non-deterministic.
2098 if (_textFieldMaxLengthReachedCallbackDelegate != null)
2100 this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
2103 if (_textFieldTextChangedCallbackDelegate != null)
2105 TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
2109 if (swigCPtr.Handle != global::System.IntPtr.Zero)
2113 swigCMemOwn = false;
2114 // In order to speed up IME hide, temporarily add
2115 GetInputMethodContext()?.DestroyContext();
2116 NDalicPINVOKE.delete_TextField(swigCPtr);
2118 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2124 private void OnTextChanged(IntPtr textField)
2126 TextChangedEventArgs e = new TextChangedEventArgs();
2128 // Populate all members of "e" (TextChangedEventArgs) with real data
2129 e.TextField = Registry.GetManagedBaseHandleFromNativePtr(textField) as TextField;
2131 if (_textFieldTextChangedEventHandler != null)
2133 //here we send all data to user event handlers
2134 _textFieldTextChangedEventHandler(this, e);
2138 private void OnMaxLengthReached(IntPtr textField)
2140 MaxLengthReachedEventArgs e = new MaxLengthReachedEventArgs();
2142 // Populate all members of "e" (MaxLengthReachedEventArgs) with real data
2143 e.TextField = Registry.GetManagedBaseHandleFromNativePtr(textField) as TextField;
2145 if (_textFieldMaxLengthReachedEventHandler != null)
2147 //here we send all data to user event handlers
2148 _textFieldMaxLengthReachedEventHandler(this, e);
2152 private string SetTranslatable(string textFieldSid)
2154 string translatableText = null;
2155 translatableText = NUIApplication.MultilingualResourceManager?.GetString(textFieldSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
2156 if (translatableText != null)
2158 if (systemlangTextFlag == false)
2160 SystemSettings.LocaleLanguageChanged += new WeakEventHandler<LocaleLanguageChangedEventArgs>(SystemSettings_LocaleLanguageChanged).Handler;
2161 systemlangTextFlag = true;
2163 return translatableText;
2167 translatableText = "";
2168 return translatableText;
2172 private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
2174 if (textFieldTextSid != null)
2176 Text = NUIApplication.MultilingualResourceManager?.GetString(textFieldTextSid, new CultureInfo(e.Value.Replace("_", "-")));
2178 if (textFieldPlaceHolderTextSid != null)
2180 PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
2185 /// The TextChanged event arguments.
2187 /// <since_tizen> 3 </since_tizen>
2188 public class TextChangedEventArgs : EventArgs
2190 private TextField _textField;
2195 /// <since_tizen> 3 </since_tizen>
2196 public TextField TextField
2210 /// The MaxLengthReached event arguments.
2212 /// <since_tizen> 3 </since_tizen>
2213 public class MaxLengthReachedEventArgs : EventArgs
2215 private TextField _textField;
2220 /// <since_tizen> 3 </since_tizen>
2221 public TextField TextField
2234 internal new class Property
2236 internal static readonly int RENDERING_BACKEND = NDalicPINVOKE.TextField_Property_RENDERING_BACKEND_get();
2237 internal static readonly int TEXT = NDalicPINVOKE.TextField_Property_TEXT_get();
2238 internal static readonly int PLACEHOLDER_TEXT = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_get();
2239 internal static readonly int PLACEHOLDER_TEXT_FOCUSED = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_FOCUSED_get();
2240 internal static readonly int FONT_FAMILY = NDalicPINVOKE.TextField_Property_FONT_FAMILY_get();
2241 internal static readonly int FONT_STYLE = NDalicPINVOKE.TextField_Property_FONT_STYLE_get();
2242 internal static readonly int POINT_SIZE = NDalicPINVOKE.TextField_Property_POINT_SIZE_get();
2243 internal static readonly int MAX_LENGTH = NDalicPINVOKE.TextField_Property_MAX_LENGTH_get();
2244 internal static readonly int EXCEED_POLICY = NDalicPINVOKE.TextField_Property_EXCEED_POLICY_get();
2245 internal static readonly int HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TextField_Property_HORIZONTAL_ALIGNMENT_get();
2246 internal static readonly int VERTICAL_ALIGNMENT = NDalicPINVOKE.TextField_Property_VERTICAL_ALIGNMENT_get();
2247 internal static readonly int TEXT_COLOR = NDalicPINVOKE.TextField_Property_TEXT_COLOR_get();
2248 internal static readonly int PLACEHOLDER_TEXT_COLOR = NDalicPINVOKE.TextField_Property_PLACEHOLDER_TEXT_COLOR_get();
2249 internal static readonly int PRIMARY_CURSOR_COLOR = NDalicPINVOKE.TextField_Property_PRIMARY_CURSOR_COLOR_get();
2250 internal static readonly int SECONDARY_CURSOR_COLOR = NDalicPINVOKE.TextField_Property_SECONDARY_CURSOR_COLOR_get();
2251 internal static readonly int ENABLE_CURSOR_BLINK = NDalicPINVOKE.TextField_Property_ENABLE_CURSOR_BLINK_get();
2252 internal static readonly int CURSOR_BLINK_INTERVAL = NDalicPINVOKE.TextField_Property_CURSOR_BLINK_INTERVAL_get();
2253 internal static readonly int CURSOR_BLINK_DURATION = NDalicPINVOKE.TextField_Property_CURSOR_BLINK_DURATION_get();
2254 internal static readonly int CURSOR_WIDTH = NDalicPINVOKE.TextField_Property_CURSOR_WIDTH_get();
2255 internal static readonly int GRAB_HANDLE_IMAGE = NDalicPINVOKE.TextField_Property_GRAB_HANDLE_IMAGE_get();
2256 internal static readonly int GRAB_HANDLE_PRESSED_IMAGE = NDalicPINVOKE.TextField_Property_GRAB_HANDLE_PRESSED_IMAGE_get();
2257 internal static readonly int SCROLL_THRESHOLD = NDalicPINVOKE.TextField_Property_SCROLL_THRESHOLD_get();
2258 internal static readonly int SCROLL_SPEED = NDalicPINVOKE.TextField_Property_SCROLL_SPEED_get();
2259 internal static readonly int SELECTION_HANDLE_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_IMAGE_LEFT_get();
2260 internal static readonly int SELECTION_HANDLE_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_IMAGE_RIGHT_get();
2261 internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_LEFT_get();
2262 internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT_get();
2263 internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_LEFT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_LEFT_get();
2264 internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_RIGHT = NDalicPINVOKE.TextField_Property_SELECTION_HANDLE_MARKER_IMAGE_RIGHT_get();
2265 internal static readonly int SELECTION_HIGHLIGHT_COLOR = NDalicPINVOKE.TextField_Property_SELECTION_HIGHLIGHT_COLOR_get();
2266 internal static readonly int DECORATION_BOUNDING_BOX = NDalicPINVOKE.TextField_Property_DECORATION_BOUNDING_BOX_get();
2267 internal static readonly int INPUT_METHOD_SETTINGS = NDalicPINVOKE.TextField_Property_INPUT_METHOD_SETTINGS_get();
2268 internal static readonly int INPUT_COLOR = NDalicPINVOKE.TextField_Property_INPUT_COLOR_get();
2269 internal static readonly int ENABLE_MARKUP = NDalicPINVOKE.TextField_Property_ENABLE_MARKUP_get();
2270 internal static readonly int INPUT_FONT_FAMILY = NDalicPINVOKE.TextField_Property_INPUT_FONT_FAMILY_get();
2271 internal static readonly int INPUT_FONT_STYLE = NDalicPINVOKE.TextField_Property_INPUT_FONT_STYLE_get();
2272 internal static readonly int INPUT_POINT_SIZE = NDalicPINVOKE.TextField_Property_INPUT_POINT_SIZE_get();
2273 internal static readonly int UNDERLINE = NDalicPINVOKE.TextField_Property_UNDERLINE_get();
2274 internal static readonly int INPUT_UNDERLINE = NDalicPINVOKE.TextField_Property_INPUT_UNDERLINE_get();
2275 internal static readonly int SHADOW = NDalicPINVOKE.TextField_Property_SHADOW_get();
2276 internal static readonly int INPUT_SHADOW = NDalicPINVOKE.TextField_Property_INPUT_SHADOW_get();
2277 internal static readonly int EMBOSS = NDalicPINVOKE.TextField_Property_EMBOSS_get();
2278 internal static readonly int INPUT_EMBOSS = NDalicPINVOKE.TextField_Property_INPUT_EMBOSS_get();
2279 internal static readonly int OUTLINE = NDalicPINVOKE.TextField_Property_OUTLINE_get();
2280 internal static readonly int INPUT_OUTLINE = NDalicPINVOKE.TextField_Property_INPUT_OUTLINE_get();
2281 internal static readonly int HIDDEN_INPUT_SETTINGS = NDalicManualPINVOKE.TextField_Property_HIDDEN_INPUT_SETTINGS_get();
2282 internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextField_Property_PIXEL_SIZE_get();
2283 internal static readonly int ENABLE_SELECTION = NDalicManualPINVOKE.TextField_Property_ENABLE_SELECTION_get();
2284 internal static readonly int PLACEHOLDER = NDalicManualPINVOKE.TextField_Property_PLACEHOLDER_get();
2285 internal static readonly int ELLIPSIS = NDalicManualPINVOKE.TextField_Property_ELLIPSIS_get();
2286 internal static readonly int ENABLE_SHIFT_SELECTION = NDalicManualPINVOKE.TextField_Property_ENABLE_SHIFT_SELECTION_get();
2287 internal static readonly int MATCH_SYSTEM_LANGUAGE_DIRECTION = NDalicManualPINVOKE.TextField_Property_MATCH_SYSTEM_LANGUAGE_DIRECTION_get();
2290 internal class InputStyle
2296 FontFamily = 0x0002,