c# - Change UserControl on button click (navigation without reloading entire page?) -


I want to navigate between user controls by pressing the button (I do not want to reload the whole page)

I have teeth in which I have empty usercontrol

   & Lt; / Grid & gt;  

And I want to set this user current for an example such as

  Private Zero Button_Click_1 (Object Sender, RoutedEventArgs e) {MainConent.Equals (New MainControl ()); / Maincontrol one usercontrol}  

But unfortunately it does not work .... Is there any way to navigate without having to reload the whole page?

// Have you checked the purpose of similar ?

First remove the existing content of grid , then set up new content.

  Private Zero Button_Click_1 (Object Sender, RoutedEventArgs e) {content.Children.Clear (); material. hair. Add (New Main Control ()); }  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -