Silverlight中如何获取当前xap文件的地址以及部署了当前xap的页面地址

当前xap文件: 
    App.Current.Host.Source.AbsoluteUri

完整的部署页面地址:

    System.Windows.Browser.HtmlPage.Document.DocumentUri.ToString()

另外,在Navigation template里用到的当前内容页的地址:

  NavigationService.CurrentSource.ToString()

 

很简单,但是觉得有必要记住这几个类的用处。

posted @ 2011-04-27 11:29  万力王  阅读(560)  评论(0编辑  收藏  举报