c# - Display another layout on button click -
i have layout mainpage.xaml in have images , button. on click of button want layout top.xaml displayed such mainpage.xaml becomes invisible. new windows phone 7? can out?
this depends on looking do. can either navigate mainpage.xaml top.xaml using
navigationservice.navigate(new uri("top.xaml", urikind.relative));
if want switch between layouts (i.e. not navigate whole new page) can implement both layouts in 1 xaml page , switch between them using visualstatemanager. create 1 state called "main" , other called "top" switch 1 other follows:
visualstatemanager.gotostate(this, "top", true);
it depends on how want layout code , how expect button work. using states means have handle button yourself.
Comments
Post a Comment