Topic Author
Posts: 1
Joined: 09 Jun 2017, 11:37

How to display a popup widget in Unity3D

14 Apr 2019, 04:58

Like MessageBox...
User avatar
Site Admin
Posts: 2615
Joined: 22 Dec 2011, 19:20

Re: How to display a popup widget in Unity3D

18 Apr 2019, 16:16


If you mean a modal-like dialog the easiest the way to go is by covering the entire screen with a background that will prevent you from clicking the UI under the dialog.

You can have a UserControl for showing dialogs, something like this:
<UserControl x:Class="Game.Dialog"
  <Grid Background="#40000000"> <!-- this will cover the entire screen to prevent clicking the UI under the dialog -->
    <Border x:Name="Dialog" Background="{StaticResource DialogBgBrush}">...</Border>
And the root xaml can have a container on top of everything to show this kind of dialogs:
  <Grid x:Name="LayoutRoot">...</Grid>
  <Grid x:Name="DialogLayer">...</Grid>
Hope this helps.

Who is online

Users browsing this forum: Semrush [Bot] and 0 guests