Click here to Skip to main content
15,896,153 members
Home / Discussions / WPF
   

WPF

 
QuestionHow to: Treelist in a listview in WPF with Gridview? Pin
syed tameem13-Jan-09 4:05
syed tameem13-Jan-09 4:05 
QuestionRe: How to: Treelist in a listview in WPF with Gridview? Pin
Mark Salsbery13-Jan-09 8:06
Mark Salsbery13-Jan-09 8:06 
Questionhow to make some items in xaml not localizable ? Pin
Feras Mazen Taleb12-Jan-09 18:08
Feras Mazen Taleb12-Jan-09 18:08 
AnswerRe: how to make some items in xaml not localizable ? Pin
Pete O'Hanlon13-Jan-09 0:13
mvePete O'Hanlon13-Jan-09 0:13 
QuestionDesign Time ScrollViewer [modified] Pin
Vinod C S11-Jan-09 0:30
Vinod C S11-Jan-09 0:30 
QuestionWPF manual Tooltip or Popup takes over mouse capture Pin
ronl10-Jan-09 6:51
ronl10-Jan-09 6:51 
AnswerRe: WPF manual Tooltip or Popup takes over mouse capture Pin
ronl10-Jan-09 11:52
ronl10-Jan-09 11:52 
QuestionImage Control problem Pin
Allonii10-Jan-09 4:58
Allonii10-Jan-09 4:58 
Im trying to write a image from a database to the hard drive and then read it back to the Image Control.

Im getting the error: The process could not access .........\temp.jpg because it is being used by another process

I have a the same app in Winforms and there its simple just put Picturebox.Image.Dispose before you attempt to write over the old file. But in WPF it won't work. I have spent hours trying to figure this out, tried to dispose a lot of resources and Google. But could not find anything.


I don't want to read the picture to the memory because it uses a lot of it.


If someone could help me it would be appreciated, Thanks

my code is



if (imageStorage.Source != null)
{
imageStorage.Source = null;
}

FileStream FS1 = new FileStream("temp.jpg", FileMode.Create);
byte[] buff = (byte[])dRow[1];
FS1.Write(buff, 0, buff.Length);
FS1.Close();
FS1.Dispose();

BitmapImage image = new BitmapImage();
image.BeginInit();
image.UriSource = new Uri(Directory.GetCurrentDirectory() + "\\temp.jpg");

image.DecodePixelWidth = 200;
image.EndInit();

imageimageStorage.Source = image;
AnswerRe: Image Control problem Pin
User 27100910-Jan-09 15:09
User 27100910-Jan-09 15:09 
GeneralRe: Image Control problem [modified] Pin
Allonii10-Jan-09 15:19
Allonii10-Jan-09 15:19 
GeneralRe: Image Control problem Pin
User 27100910-Jan-09 15:25
User 27100910-Jan-09 15:25 
GeneralRe: Image Control problem Pin
Allonii10-Jan-09 15:31
Allonii10-Jan-09 15:31 
GeneralRe: Image Control problem Pin
Snufflufugus10-Jan-09 15:54
Snufflufugus10-Jan-09 15:54 
GeneralRe: Image Control problem Pin
Allonii10-Jan-09 23:07
Allonii10-Jan-09 23:07 
GeneralRe: Image Control problem Pin
Gideon Engelberth12-Jan-09 3:35
Gideon Engelberth12-Jan-09 3:35 
GeneralRe: Image Control problem Pin
Allonii12-Jan-09 23:32
Allonii12-Jan-09 23:32 
QuestionHow to pass parameters to WPF ? Pin
Yanshof10-Jan-09 4:10
Yanshof10-Jan-09 4:10 
AnswerRe: How to pass parameters to WPF ? Pin
Mohammad Dayyan10-Jan-09 11:58
Mohammad Dayyan10-Jan-09 11:58 
AnswerRe: How to pass parameters to WPF ? Pin
Mark Salsbery12-Jan-09 8:37
Mark Salsbery12-Jan-09 8:37 
GeneralRe: How to pass parameters to WPF ? Pin
Pete O'Hanlon12-Jan-09 9:31
mvePete O'Hanlon12-Jan-09 9:31 
GeneralRe: How to pass parameters to WPF ? Pin
Mark Salsbery12-Jan-09 10:30
Mark Salsbery12-Jan-09 10:30 
AnswerRe: How to pass parameters to WPF ? Pin
schiebel-t2-Feb-09 8:20
schiebel-t2-Feb-09 8:20 
QuestionCan I use a silverlight control inside my asp.net 2.0 web application? Pin
Nada Adel10-Jan-09 3:33
Nada Adel10-Jan-09 3:33 
AnswerRe: Can I use a silverlight control inside my asp.net 2.0 web application? Pin
Mark Salsbery15-Jan-09 9:15
Mark Salsbery15-Jan-09 9:15 
QuestionIssue with binding and ValidationRules Pin
Rohde9-Jan-09 23:24
Rohde9-Jan-09 23:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.