我有一個問題,在我的應用程序米使用或顯示圖像的GridView其保存在我的應用程序的本地文件夾,我想刪除通過選擇它們這些圖片,但問題是,當打開或使用任何東西(文件或圖像)時,這些圖像正在使用,並在窗口中顯示,因此它不應從驅動器中刪除。我想從硬盤上刪除圖像。 m在GridView中通過BitmapImage中的URI路徑使用或訪問這些圖像。這樣刪除存儲文件(圖片)C#地鐵應用
私人的ImageSource _image = NULL; this._image =新的BitmapImage(新URI(新URI( 「MS-應用程序數據:///本地/ RecentImages /」),this._imagePath));
而m試圖刪除 請告訴我如何停止或配置GridView和StorageFile之間的鏈接 或如何從存儲設備中刪除映像?
當您打開圖像時,在讀取圖像數據後,關閉圖像文件流。 – Code0987
如何關閉圖像流先生? – Sajid
這些圖像在我的GridView作爲最近的活動,這些都是我的主要 – Sajid