locked
Button within FlipView Click handler Frame->Navigate Exception

    Question

  • Hey there,

    I'm getting this odd exception: Within a standard LayoutAwarePage, I'm have a FlipView control that has a Button somewhere inside it. For the Click event, I have an event handler that uses Frame->Navigate() to navigate to a new page. Seems to work fine, until the handler is completed. After that I get an internal exception that I cannot debug. I'm not doing anything fancy either, just strictly navigating.



    Event handler:

    void MyPage::NewPageClick(Object^ sender, RoutedEventArgs^ e)
    {
    
    	TypeName pageType = { NewPage::typeid->FullName, TypeKind::Metadata };
    	Frame->Navigate(pageType);
    
    }


    Page XAML:

    <common:LayoutAwarePage x:Name="pageRoot" x:Class="TestApp.MyPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:TestApp" xmlns:common="using:TestApp.Common" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">

    <Grid>

    <FlipView> <FlipViewItem> <Grid> <Button Content="New Page" HorizontalAlignment="Left" VerticalAlignment="Top" Click="NewPageClick"/> </Grid> </FlipViewItem> <FlipViewItem> <Grid /> </FlipViewItem> <FlipView> </Grid> </common:LayoutAwarePage>



    Any ideas why this might be happening?

    Wednesday, March 14, 2012 7:47 PM

All replies