Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
6
Reply
How to delete file opened by a Canvas
Lahiru Mahagamage
Jan 12 2018 4:00 AM
177
Reply
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);
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
6
)
Next Recommended Forum
Converting Celsius to Farenheit
Expert advice on app development