如果有人从 启动我的 xbap http://myserver/folder/application.xbap,我想http://myserver/folder/从应用程序中获取部分 url。
我怎样才能做到这一点?
我试过了:
System.IO.Directory.GetCurrentDirectory()System.IO.Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName)Environment.CurrentDirectorySystem.Reflection.Assembly.GetExecutingAssembly().LocationAppDomain.CurrentDomain.BaseDirectorySystem.Windows.Application.Current.StartupUri.AbsolutePathSystem.Environment.GetCommandLineArgs()[0]System.Deployment.Application.ApplicationDeployment.CurrentDeployment.DataDirectory
它们都返回我的机器上 xbap 下载并运行的本地位置,或者执行程序集的位置,例如C:\Windows\SysWOW64
如何从应用程序本身访问用于启动 xbap 应用程序的 URL?