Skip to content

Commit

Permalink
[NUI] Add sample and description for window modal and always on top.
Browse files Browse the repository at this point in the history
Add sample for window modal and always on top property to Tizen.NUI.Samples.
In addition, the description is added to window modal.
  • Loading branch information
sparrow74 authored and jaehyun0cho committed Jul 2, 2024
1 parent ad4bf32 commit feedf8a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Tizen.NUI/src/public/Window/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2517,6 +2517,8 @@ public SafeHandle NativeHandle

/// <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
Expand Down
24 changes: 24 additions & 0 deletions test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/WindowTest1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -539,9 +539,33 @@ public void OnSubWindowKeyEvent(object sender, Window.KeyEventArgs e)
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:
Expand Down

0 comments on commit feedf8a

Please sign in to comment.