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);

Amit GuptaRank #190 · 12.8K reputationPosted Jan 13, 2018, 1:48 AM EST
Amit GuptaRank #190 · 12.8K reputationPosted Jan 12, 2018, 6:37 AM EST
Laxmidhar SahooRank #383 · 6.6K reputationPosted Jan 11, 2018, 11:30 PM EST
Lahiru Mahagamage35 reputationPosted Jan 12, 2018, 12:06 AM EST
Lahiru Mahagamage35 reputationPosted Jan 12, 2018, 6:56 PM EST
@Amit Gupta
Lahiru Mahagamage35 reputationPosted Jan 13, 2018, 7:03 AM EST