Multiple Windows with UNO platform

145 Views Asked by At

I am trying to create application with multiple windows using UNO platform. Does UNO support multiple windows? If so, can someone please point me to webpage showing how to do that?

1

There are 1 best solutions below

0
Dwight Schrute On

Okay, I know it is late but it is something. I have something running on Windows OS.

#if NET6_0_OR_GREATER && WINDOWS && !HAS_UNO
            newWindow = new Window();
#else
            newWindow = Microsoft.UI.Xaml.Window.Current;
#endif
            //var rootFrame = newWindow.Content as Frame;
            if (newWindow.Content is not Frame rootFrame)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();

                // Place the frame in the current Window
                newWindow.Content = rootFrame;

                rootFrame.NavigationFailed += OnNavigationFailed;
            }

            if (rootFrame.Content == null)
            {
                // When the navigation stack isn't restored navigate to the first page,
                // configuring the new page by passing required information as a navigation
                // parameter
                rootFrame.Navigate(typeof(MeasurementPage));
            }

            // Ensure the current window is active
            newWindow.Activate();
        }

I am still not sure about Linux though.