Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ListView height inside of a StackPanel - problem...
Message
From
20/06/2008 00:02:48
 
 
To
19/06/2008 22:35:29
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Miscellaneous
Thread ID:
01325263
Message ID:
01325651
Views:
24
>Oh me... I haven't gotten that far yet. Just getting my data from VFP to SQL Server, to Linq-to-Sql to a WPF ListView has been a long, slow (but fun) journey.
>
>For now, I'm just pulling some queries back just to see something displayed. I may ask for some further info on your comment in a few months when I get a little further along.
>
>Thanks John
>
>
>>One hint on your data sources...
>>
>>If you want a listview or treeview to dynamically update itself use an ObservableCollection for the ItemSource. Unfortunately the collections returned by Linq aren't observable so you have to copy the data over to one. However, I was able to add them to my dbml classes and so far that is working great for me. Once you hook to observable the views pretty much take care of themselves.

NP there is a ton of things to learn, heck I still have a ton of things to learn. I didn't catch this one right off the bat that's why I mentioned it. It's pretty simple though.

public ObservableCollection dataItems { get ; set; }

You can just fill it with a foreach loop from your linq query.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform