在Visual Studio中我有一個文件,我希望在其中一個類中可以訪問該文件。這個項目將進入源代碼控制,所以我想使用一個相對路徑指向它在項目中的位置。我已經試過它總是返回DirectoryNotFoundException如下: filePPT = new PowerPointFile("~/IO/ExportTools/Template.pptx");
而且 filePPT = new P
我在VS2013中編寫這個WPF應用程序,我很難弄清楚如何將我的絕對路徑轉換爲相對路徑。 該應用程序涉及到某些操作發生時更改網格背景。我現在去了解這樣的: ImageBrush b1 = new ImageBrush();
b1.ImageSource = new BitmapImage(new Uri(@"C:\Users\spectre\Documents\Visual Studio 201