Alignment after a Frame.Navigate

Nov 23, 2012 at 8:19 PM

Hi,

I use your control in my windows store app and I love it. The only issue I have is that after I call Frame.Navigate to go to a new page the fly out will now display on the left side of the screen. I can't figure out why. Any help would be most appreciated...

Simon

Dec 13, 2012 at 7:13 PM

I seem to have the same problem with the Flyout. My findind is that if I disable the binding IsOpen={Binding FlyoutOpen} that behaviour is gone. The only problem left is that the Child window keeps displaying wrong after a navigate. So any help from the maker would be appreciated.

grt Mark

Dec 13, 2012 at 7:29 PM
Edited Dec 13, 2012 at 7:30 PM

And the last issue was resolved by using the CharmFrame in stead of puting the FlyOut directly on the page. Use the following code to your App.Xaml.cs

        protected override async void OnLaunched(LaunchActivatedEventArgs args)
        {
            Frame rootFrame = Window.Current.Content as Frame;

            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            
            if (rootFrame == null)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                //rootFrame = new Frame();
                rootFrame = new CharmFrame { CharmContent = new SettingsMainUserControl() };
                
                //Associate the frame with a SuspensionManager key                                
                SuspensionManager.RegisterFrame(rootFrame, "AppFrame");