[NUI] Add MaxLength property and signal to TextEditor (#1901)
[platform/core/csapi/tizenfx.git] / test / NUITestSample / NUITestSample / examples / text-test.cs
index 40fcb22..a4d48c2 100755 (executable)
@@ -152,6 +152,7 @@ namespace TextTest
             editor.EnableSelection = true;
             editor.Focusable = true;
             editor.Placeholder = propertyMap;
+            editor.MaxLength = 10;
             window.Add(editor);
             editor.TextChanged += (obj, e) => {
                 Tizen.Log.Debug("NUI", "editor line count: " + e.TextEditor.LineCount);
@@ -160,6 +161,9 @@ namespace TextTest
             editor.ScrollStateChanged += (obj, e)=> {
                 Tizen.Log.Debug("NUI", "editor scroll state:" + e.ScrollState);
             };
+            editor.MaxLengthReached += (obj, e)=> {
+                Tizen.Log.Debug("NUI", "editor max length: "+ e.TextEditor.MaxLength);
+            };
 
             Tizen.Log.Debug("NUI",  "editor id: " + editor.ID);