Sliverlight change the scene
2010-04-13 15:57
232 查看
I study the sliverlight change the scene method today.
I found the this easy job, because I think this isn't easy before.
So I show step to you :
1) modify the "app.xaml"
2) modify your page(scene)
for example: the mainPage.xaml
I found the this easy job, because I think this isn't easy before.
So I show step to you :
1) modify the "app.xaml"
private void Application_Startup(object sender, StartupEventArgs e) { Grid g = new Grid(); this.RootVisual = g; MainPage p = new MainPage(); g.Children.Add(p); }
2) modify your page(scene)
for example: the mainPage.xaml
private void myButton_Click(object sender, RoutedEventArgs e) { Grid root = Application.Current.RootVisual as Grid; if (root != null) { root.Children.RemoveAt(0); root.Children.Add(new Page1()); // change current page to page1 } }
相关文章推荐
- Android编译错误:You have tried to change the API from what has been previously approved.
- IDL change the ticks
- Change the default search topology in SharePoint Server 2013
- 1222 sending a re-INVITE to change the session
- Linux Change The I/O Scheduler For A Hard Disk
- In an iOS 5 Storyboard, how do you push a new scene to the original view controller from a Popover?
- Change the base unit of measure(更改度量单位)
- Could not change executable permissions on the application.
- The JRE could not be found ,Edit server and change teh JRE location!
- Change the grub boot sequence:
- Rockie's Android Porting Guide(5)——Change your location and add the screenlock
- How to Change the First Accounting Open Period
- sliverlight: The remote server returned an error: NotFound.
- change the root password
- 【ios真机调试错误汇总】Could not change executable permissions on the application.
- change the OWA redirection
- 【转载】How browsers work--Behind the scenes of modern web browsers (前端必读)
- EWB使用时出错-unable to write EWB program directory please change the permissions of this directory
- How do I change the default runlevel in Feodra 15?
- Android Studio, Change the package name of App