hello guys,
I'm opening a .bmp image created on a folder on a InkCanvas to draw on like below. And when i'm closing it i want the TempFile to be deleted. but when i try to delete it says the file is used by another process. is there anyway to do this? I'm using WPF C#. Please help me out.
Thanks you! :)
- img = new BitmapImage(new Uri(TempFile, UriKind.Relative));
-
- myImageBrush = new ImageBrush(img);
- myCanvas = new Canvas();
- myCanvas.Width = img.Width;
- myCanvas.Height = img.Height;
- myCanvas.Background = myImageBrush;
-
- cw.ImgPO.Height = img.Height;
- cw.ImgPO.Children.Add(myCanvas);