Search code examples
c#visual-studio-2013windows-runtimewindows-phonewindows-phone-8.1

SlideView Crashes the Windows Phone 8.1 App


I am writing a Windows Phone 8.1 App (WINRT)

I added SlideView Library to it. Added three grids to slideview. It works fine and awsome. https://slideview.codeplex.com

Now the problem lies in navigation. I added a buton in slideview and Whenever I click on it to navigate to another page of app, it crashes.

<controls:SlideView>

    <Grid Background="Teal"
            Width="400">
                    <Button Click="Button_Click">Goto all questions test </Button>
</Grid>

    <Grid Background="Tomato" />

    <Grid Background="LightYellow" />

    <Grid Background="YellowGreen"
            Width="400"/>

</controls:SlideView>






 private void Button_Click(object sender, RoutedEventArgs e)
    {
        this.Frame.Navigate(typeof(MedicalUserQuestionAnswerFeedPage));
    }

I tried to debug every line but Visual studio is not catching the exception.


Solution

  • Try this:

    Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => frame.Navigate(typeof(YourPage)));
    

    I had the same problem and this fixed it. I haven't yet found the underlying cause, but I plan to investigate as this is pretty annoying