[NUI] Add sample and description for window modal and always on top.
authorWonsik Jung <sidein@samsung.com>
Mon, 1 Jul 2024 01:57:38 +0000 (10:57 +0900)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Tue, 2 Jul 2024 07:29:58 +0000 (16:29 +0900)
Add sample for window modal and always on top property to Tizen.NUI.Samples.
In addition, the description is added to window modal.

src/Tizen.NUI/src/public/Window/Window.cs
test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/WindowTest1.cs

index 7da18bc..c297b3d 100755 (executable)
@@ -2517,6 +2517,8 @@ namespace Tizen.NUI
 
         /// <summary>
         /// Gets or sets a value indicating whether the window is modal or not.
+        /// The modal property of a window requires that it be set to a parent window. 
+        /// The window modal function operates on the specified parent window.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool IsModal
index 6325880..bc61186 100644 (file)
@@ -539,9 +539,33 @@ namespace Tizen.NUI.Samples
             break;
 
           case KEY_NUM_6:
+            log.Fatal(tag, $"Modal window Test");
+            if(mainWin.IsModal)
+            {
+                log.Fatal(tag, $"current modal is true and change to false");
+                subWindow.Unparent();
+                subWindow.IsModal = false;
+            }
+            else
+            {
+                log.Fatal(tag, $"current modal is false and change to true");
+                subWindow.SetParent(mainWin);
+                subWindow.IsModal = true;
+            }
             break;
 
           case KEY_NUM_7:
+            log.Fatal(tag, $"Always On Top Window Test");
+            if(mainWin.IsAlwaysOnTop)
+            {
+                log.Fatal(tag, $"current AlwaysOnTop is true and change to false");
+                subWindow.IsAlwaysOnTop = false;
+            }
+            else
+            {
+                log.Fatal(tag, $"current AlwaysOnTop is false and change to true");
+                subWindow.IsAlwaysOnTop = true;
+            }
             break;
 
           case KEY_NUM_8: