Click here to Skip to main content
15,916,683 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Data binding from a List to a Grid Pin
fjparisIII25-Jun-09 8:22
fjparisIII25-Jun-09 8:22 
GeneralRe: Data binding from a List to a Grid Pin
fjparisIII25-Jun-09 5:41
fjparisIII25-Jun-09 5:41 
GeneralRe: Data binding from a List to a Grid Pin
ABitSmart25-Jun-09 5:45
ABitSmart25-Jun-09 5:45 
GeneralRe: Data binding from a List to a Grid Pin
fjparisIII25-Jun-09 8:26
fjparisIII25-Jun-09 8:26 
AnswerRe: Data binding from a List to a Grid Pin
mittalamit24-Jun-09 20:18
mittalamit24-Jun-09 20:18 
GeneralRe: Data binding from a List to a Grid (unfortunately, it did not work) [modified] Pin
fjparisIII25-Jun-09 4:56
fjparisIII25-Jun-09 4:56 
AnswerRe: Data binding from a List to a Grid Pin
Mark Salsbery25-Jun-09 6:58
Mark Salsbery25-Jun-09 6:58 
GeneralRe: Data binding from a List to a Grid Pin
fjparisIII25-Jun-09 7:31
fjparisIII25-Jun-09 7:31 
Evidently while you were writing your post, you must have been sending good vibrations to me because I caught onto some of the things you write about in this answer and was in the middle of implementing them when your post arrived. This is exactly the kind of information I was soliciting. Of course you're just supplying information, not implementation solutions. It's up to me to figure out what those solutions in my code are, based on your new information.

First of all, I didn't know about INotifyCollectionChanged but conceptually I knew something like that must exist; I just didn't know the name of the class. It's still not clear to me what is meant by "collection changed," but I can look that up.

You mentioned "if you meant..." several times. I meant all of those possibilities. What is in image metadata can change from one image to the next, so sometimes I just need to change a value, but other times I need to remove the row in the ListView altogether, and at other times I need to add a row that hasn't appeared yet. I need to straighten all this out.

What I was doing before was creating an entirely new List each time the photographer selected a new image, and so none of the OnPropertyChanged events were taking place. Likewise, I was creating a new instance of PhotoMetadata for each metadata tag I needed for the new image: again, no notification was taking place.

So far I have improved behavior, but still lots of bugs. Each time I go to a new image, I get an entirely new set of rows duplicating what is already there. I've had this bug show up a hundred times in the last twenty years and it's because I don't clear the ListView each time I have a new set of data. That's entirely different from clearing the data source.

In any case, you've given me some great information and plenty of things to sink my teeth into. Before about an hour ago (when you probably started writing your post) I was gnashing my teeth in thin air!

I'll work all these ideas through in my code and post back when I have further questions, or even have a success story to report -- hopefully the latter. Next time if I have questions, they will probably be more pointed than my previous ones.
GeneralRe: Data binding from a List to a Grid Pin
Mark Salsbery25-Jun-09 7:48
Mark Salsbery25-Jun-09 7:48 
GeneralRe: Data binding from a List to a Grid Pin
fjparisIII25-Jun-09 8:30
fjparisIII25-Jun-09 8:30 
GeneralRe: Data binding from a List to a Grid Pin
fjparisIII25-Jun-09 7:39
fjparisIII25-Jun-09 7:39 
GeneralRe: Data binding from a List to a Grid Pin
Pete O'Hanlon25-Jun-09 9:07
mvePete O'Hanlon25-Jun-09 9:07 
GeneralRe: Data binding from a List to a Grid Pin
fjparisIII25-Jun-09 9:29
fjparisIII25-Jun-09 9:29 
AnswerRe: Data binding from a List to a Grid Pin
Mark Salsbery25-Jun-09 7:23
Mark Salsbery25-Jun-09 7:23 
GeneralRe: Data binding from a List to a Grid Pin
fjparisIII25-Jun-09 7:40
fjparisIII25-Jun-09 7:40 
GeneralRe: Data binding from a List to a Grid Pin
Mark Salsbery25-Jun-09 7:46
Mark Salsbery25-Jun-09 7:46 
GeneralRe: Data binding from a List to a Grid Pin
fjparisIII25-Jun-09 8:33
fjparisIII25-Jun-09 8:33 
AnswerRe: Data binding from a List to a Grid (Everything works now) [modified] Pin
fjparisIII25-Jun-09 12:19
fjparisIII25-Jun-09 12:19 
QuestionWPF Slider project Pin
fgimenez24-Jun-09 8:14
fgimenez24-Jun-09 8:14 
AnswerRe: WPF Slider project Pin
Christian Graus24-Jun-09 15:26
protectorChristian Graus24-Jun-09 15:26 
GeneralRe: WPF Slider project Pin
fgimenez29-Jun-09 2:49
fgimenez29-Jun-09 2:49 
QuestionSilverlight2Chat Pin
deep7624-Jun-09 4:59
deep7624-Jun-09 4:59 
AnswerRe: Silverlight2Chat Pin
Mark Salsbery24-Jun-09 7:35
Mark Salsbery24-Jun-09 7:35 
GeneralRe: Silverlight2Chat Pin
deep7624-Jun-09 7:41
deep7624-Jun-09 7:41 
GeneralRe: Silverlight2Chat Pin
Mark Salsbery24-Jun-09 7:49
Mark Salsbery24-Jun-09 7:49 

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.