private void createPopupWindowContainsFlyout(string options) { settingsPopup = new Popup(); settingsPopup.Closed += OnPopupClosed; Window.Current.Activated += OnWindowActivated; settingsPopup.IsLightDismissEnabled = true; settingsPopup.Width = settingsWidth; settingsPopup.Height = windowBounds.Height; // Add the proper animation for the panel. settingsPopup.ChildTransitions = new TransitionCollection(); settingsPopup.ChildTransitions.Add(new PaneThemeTransition() { Edge = (SettingsPane.Edge == SettingsEdgeLocation.Right) ? EdgeTransitionLocation.Right : EdgeTransitionLocation.Left }); if (options == "Helps") { // Create a SettingsFlyout the same dimenssions as the Popup. SettingCommands.HelpSettingsFlyout mypane = new SettingCommands.HelpSettingsFlyout(); settingsWidth = Constants.ScreenWidth; mypane.Width = settingsWidth; mypane.Height = windowBounds.Height; // Place the SettingsFlyout inside our Popup window. settingsPopup.Child = mypane; } // Let's define the location of our Popup. settingsPopup.SetValue(Canvas.LeftProperty, SettingsPane.Edge == SettingsEdgeLocation.Right ? (windowBounds.Width - settingsWidth) : 0); settingsPopup.SetValue(Canvas.TopProperty, 0); settingsPopup.IsOpen = true; }
private void createPopupWindowContainsFlyout(string option) { createSettingsPopup(); addProperAnimationForPanel(); if (option == "About Us and Feedbak") { FeedbackSettingsFlyout mypane = new FeedbackSettingsFlyout(); settingsWidth = 400; mypane.Width = settingsWidth; mypane.Height = windowBounds.Height; settingsPopup.Child = mypane; } else if (option == "Languages") { LanguagesSettingFlyout mypane = new LanguagesSettingFlyout(); settingsWidth = 400; mypane.Width = settingsWidth; mypane.Height = windowBounds.Height; settingsPopup.Child = mypane; } else if (option == "Helps") { HelpSettingsFlyout mypane = new HelpSettingsFlyout(); settingsWidth = Utils.Constants.ScreenWidth; mypane.Width = settingsWidth; mypane.Height = windowBounds.Height; settingsPopup.Child = mypane; } defineLocationOfOurPopup(); }