antsonthetree
Topic Author
Posts: 44
Joined: 09 Jan 2018, 15:56

LoadXaml in Unity

18 Feb 2018, 18:32

Hello,

I am trying to load a "confirmation window" xaml in the onClick code behind of a button. I have added the ConfirmWindow to the Preloaded Xamls section of the Noesis settings page, and the LoadXaml call does indeed return an object. However nothing is getting displayed on the screen. What am I missing? Do I need to make another call to have the ConfirmWindow appear on screen?
       private void btnExit_Click(object sender, RoutedEventArgs e)
        {
            string path = "Assets/NoesisGUI/Samples/HelloWorld/ConfirmWindow.xaml";
            ConfirmWindow cw = (ConfirmWindow)Noesis.GUI.LoadXaml(path);
            if (cw != null)
            {
                Debug.Log("all good here but nothing shows on screen!");
            }
        }
 
antsonthetree
Topic Author
Posts: 44
Joined: 09 Jan 2018, 15:56

Re: LoadXaml in Unity

18 Feb 2018, 18:53

UPDATE: I got it. I was thinking Noesis instead of thinking Xaml. I just needed to add it to a container on the main window. All good now.

Jake
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: LoadXaml in Unity

21 Feb 2018, 12:32

Thanks for the feedback Jake! Closing this.

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 91 guests