예제 #1
0
        public static void Initialize(this Window platformWindow)
        {
            var baseLayout = (ELayout?)platformWindow.GetType().GetProperty("BaseLayout")?.GetValue(platformWindow);

            if (baseLayout == null)
            {
                var conformant = new Conformant(platformWindow);
                conformant.Show();

                var layout = new ApplicationLayout(conformant);
                layout.Show();

                baseLayout = layout;
                conformant.SetContent(baseLayout);
            }
            platformWindow.SetBaseLayout(baseLayout);
            var modalStack = new ModalStack(baseLayout)
            {
                AlignmentX = -1,
                AlignmentY = -1,
                WeightX    = 1,
                WeightY    = 1,
            };

            modalStack.Show();
            baseLayout.SetContent(modalStack);
            platformWindow.SetModalStack(modalStack);

            platformWindow.Active();
            platformWindow.Show();
            platformWindow.AvailableRotations = DisplayRotation.Degree_0 | DisplayRotation.Degree_90 | DisplayRotation.Degree_180 | DisplayRotation.Degree_270;

            platformWindow.RotationChanged += (sender, e) =>
            {
                // TODO : should update later
            };

            platformWindow.BackButtonPressed += (s, e) => OnBackButtonPressed(platformWindow);
        }
예제 #2
0
 public static void SetModalStack(this Window window, ModalStack modalStack)
 {
     s_windowModalStack[window] = modalStack;
 }