wpf 后退父目录

string rootPath = "";
string BaseDirectoryPath = AppDomain.CurrentDomain.BaseDirectory;
rootPath = BaseDirectoryPath.Substring(0, BaseDirectoryPath.LastIndexOf("\\"));
rootPath = rootPath.Substring(0, rootPath.LastIndexOf("\\"));
rootPath = rootPath.Substring(0, rootPath.LastIndexOf("\\"));
string path = rootPath + @"..\Resource\Echarts\echart.html";

or this method string url = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Resource\Echarts\echart.html"; Web.Navigate(url);

  

posted @ 2019-07-25 22:23  dafengchui  阅读(192)  评论(0)    收藏  举报