Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi Friends,

In my wpf window left side one tree view and right side frame is there. if i chang the tree view item the frame loaded related pages. now the page is contain one exit button.

if i click exit button, that page should close and default page occupy in frame.

i was try some code but its not giving solution. help me.

private void btn_Exit_Click(object sender, RoutedEventArgs e)
       {
           frame1.Source = new System.Uri("non.xaml", UriKind.Relative);
       }

in this code was correctly work in window. but page it throw frame1 not in the current content error ,..

then i try
NavigationService.Navigate("non.xaml");
.

but it only open a new page.

how to code for this.?.
Posted
Updated 22-Feb-11 21:16pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900