Page 1 of 1

LoadXaml in Unity

Posted: 18 Feb 2018, 18:32
by antsonthetree
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!");
            }
        }

Re: LoadXaml in Unity

Posted: 18 Feb 2018, 18:53
by antsonthetree
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

Re: LoadXaml in Unity

Posted: 21 Feb 2018, 12:32
by jsantos
Thanks for the feedback Jake! Closing this.