Ian-Gungee
Topic Author
Posts: 2
Joined: 07 Jul 2020, 16:21

[SOLVED] How to open a new "window" in a scene

27 Jul 2020, 22:32

Since NoesisGUI is a windowless API, one can't simply call window.Show(); How is similar functionality achieved with Noesis?

All I really want to be able to do is display a user control above another to allow menu navigation, like displaying a settings menu.
Does a NoesisView object need to be created? Then a reference to the XAML would need to be passed, rather than simply creating a 'new Window()'?

Excuse me if this has already been answered, but I was unable to find a solution with the searches that I made, and the functionality doesn't seem to be demonstrated in any of the samples (Though the QuestLog does fake it with animations...)
Last edited by Ian-Gungee on 28 Jul 2020, 16:12, edited 1 time in total.

Tags:
 
User avatar
sfernandez
Site Admin
Posts: 1935
Joined: 22 Dec 2011, 19:20

Re: How to open a new "window" in a scene

28 Jul 2020, 11:01

You can have a root xaml with a known container/panel where you can add new user controls.
<UserControl x:Class="MyApp.RootWindow"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <Menu VerticalAlignment="Top">...</Menu>
  ...
  <Grid x:Name="windowsPanel"/>
</UserControl>
this.windowsPanel.Children.Add(someUserControl);
You don't need to create a NoesisView for each user control unless you want an application that spawns operating system windows for each of these controls, but I don't think that is what you want.
 
Ian-Gungee
Topic Author
Posts: 2
Joined: 07 Jul 2020, 16:21

Re: How to open a new "window" in a scene

28 Jul 2020, 16:12

Haha naturally. Don't know why I didn't think of that.
Thanks for the quick response sfernandez!

Who is online

Users browsing this forum: No registered users and 3 guests