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

WPF

 
AnswerRe: Looking for a windows phone 7.1 XNA programmer Pin
Marco Bertschi26-Mar-13 1:15
protectorMarco Bertschi26-Mar-13 1:15 
QuestionCode-generated buttons in Stackpanel: how to handle events? Pin
Dirk.Bock22-Mar-13 12:24
Dirk.Bock22-Mar-13 12:24 
AnswerRe: Code-generated buttons in Stackpanel: how to handle events? Pin
Mycroft Holmes22-Mar-13 14:14
professionalMycroft Holmes22-Mar-13 14:14 
AnswerRe: Code-generated buttons in Stackpanel: how to handle events? Pin
Gerry Schmitz22-Mar-13 14:51
mveGerry Schmitz22-Mar-13 14:51 
QuestionMVVM Tasks and UI Updating Pin
cjb11022-Mar-13 1:44
cjb11022-Mar-13 1:44 
AnswerRe: MVVM Tasks and UI Updating Pin
Matt T Heffron22-Mar-13 10:25
professionalMatt T Heffron22-Mar-13 10:25 
GeneralRe: MVVM Tasks and UI Updating Pin
cjb11024-Mar-13 22:37
cjb11024-Mar-13 22:37 
GeneralRe: MVVM Tasks and UI Updating Pin
cjb11025-Mar-13 1:56
cjb11025-Mar-13 1:56 
Solved it I think.

I mentioned that I was trying the AsyncObservableCollection, apparently if I use that then I don't want to pass TaskScheduler.FromCurrentSynchronizationContext() to the task. I don't understand why (I guess a conflict somewhere)...but not sure if I need to understand either Smile | :)

So my ObservableCollection is now defined as:
C#
private ObservableCollection<string> _results = new AsyncObservableCollection<string>();
public ObservableCollection<string> Results
{
    get { return _results; }
    set
    {
        _results = value;

        RaisePropertyChanged("Results");
    }
}

And my tasks updated the ListBox as and when they start/finish.

So I've just got to check if cancellation works, and see if I can still use WaitAll. Ideally I'd like a message when the tasks have all been started and finished (more a WhenAll (if that even exists)), at the moment I get that in the middle. But if I use WaitAll then I don't get the async updating.

Note for any others if your using .NET 4.5 then I don't think any of this is an issue as they changed the ObversableCollection.
GeneralRe: MVVM Tasks and UI Updating Pin
cjb11025-Mar-13 4:45
cjb11025-Mar-13 4:45 
AnswerRe: MVVM Tasks and UI Updating Pin
Abhinav S25-Mar-13 7:26
Abhinav S25-Mar-13 7:26 
GeneralRe: MVVM Tasks and UI Updating Pin
cjb11025-Mar-13 7:36
cjb11025-Mar-13 7:36 
QuestionProblems on ListView Control in WPF Pin
bikah chanda mohanta21-Mar-13 2:56
bikah chanda mohanta21-Mar-13 2:56 
AnswerRe: Problems on ListView Control in WPF Pin
Kenneth Haugland22-Mar-13 2:03
mvaKenneth Haugland22-Mar-13 2:03 
QuestionRoute Event for Button border Pin
Member 878633518-Mar-13 20:50
Member 878633518-Mar-13 20:50 
QuestionWPF treeview with circular reference not updating the childTreeviewItem Pin
geetha naidu17-Mar-13 0:39
geetha naidu17-Mar-13 0:39 
QuestionStack panel Pin
columbos1492715-Mar-13 9:35
columbos1492715-Mar-13 9:35 
AnswerRe: Stack panel Pin
Gerry Schmitz15-Mar-13 11:01
mveGerry Schmitz15-Mar-13 11:01 
AnswerRe: Stack panel Pin
Mycroft Holmes15-Mar-13 13:30
professionalMycroft Holmes15-Mar-13 13:30 
QuestionHow to add multiple button into same datacell in DataGrid column Pin
Jayantha Bandara15-Mar-13 0:45
Jayantha Bandara15-Mar-13 0:45 
AnswerRe: How to add multiple button into same datacell in DataGrid column Pin
Pete O'Hanlon15-Mar-13 1:14
mvePete O'Hanlon15-Mar-13 1:14 
AnswerRe: How to add multiple button into same datacell in DataGrid column Pin
Jayantha Bandara15-Mar-13 1:41
Jayantha Bandara15-Mar-13 1:41 
GeneralRe: How to add multiple button into same datacell in DataGrid column Pin
Mycroft Holmes15-Mar-13 13:26
professionalMycroft Holmes15-Mar-13 13:26 
QuestionLoading XAML at runtime Pin
Jayme6514-Mar-13 8:11
Jayme6514-Mar-13 8:11 
AnswerRe: Loading XAML at runtime Pin
marimuthu2620-Mar-13 3:54
marimuthu2620-Mar-13 3:54 
QuestionWPF First Start Performance Pin
savbace14-Mar-13 2:16
savbace14-Mar-13 2:16 

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.