-
sfernandez
Site Admin
- Posts: 2991
- Joined:
Re: How to display a popup widget in Unity3D
Hi,
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:
And the root xaml can have a container on top of everything to show this kind of dialogs:
Hope this helps.
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:
Code: Select all
<UserControl x:Class="Game.Dialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<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>
</Grid>
</UserControl>
Code: Select all
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid x:Name="LayoutRoot">...</Grid>
...
<Grid x:Name="DialogLayer">...</Grid>
</UserControl>
Who is online
Users browsing this forum: DHSven, Google [Bot] and 37 guests