Click here to Skip to main content
13,861,323 members

Silverlight / WPF

 
AnswerRe: Windows Phone App Development using C# 2010 Pin
Abhinav S27-Mar-13 19:02
memberAbhinav S27-Mar-13 19:02 
QuestionLooking for a windows phone 7.1 XNA programmer Pin
Member 955005526-Mar-13 0:09
memberMember 955005526-Mar-13 0:09 
AnswerRe: Looking for a windows phone 7.1 XNA programmer Pin
Richard MacCutchan26-Mar-13 1:09
protectorRichard MacCutchan26-Mar-13 1:09 
AnswerRe: Looking for a windows phone 7.1 XNA programmer Pin
Marco Bertschi26-Mar-13 2:15
protectorMarco Bertschi26-Mar-13 2:15 
QuestionCode-generated buttons in Stackpanel: how to handle events? Pin
Dirk.Bock22-Mar-13 13:24
memberDirk.Bock22-Mar-13 13:24 
AnswerRe: Code-generated buttons in Stackpanel: how to handle events? Pin
Mycroft Holmes22-Mar-13 15:14
memberMycroft Holmes22-Mar-13 15:14 
AnswerRe: Code-generated buttons in Stackpanel: how to handle events? Pin
Gerry Schmitz22-Mar-13 15:51
mveGerry Schmitz22-Mar-13 15:51 
QuestionMVVM Tasks and UI Updating Pin
cjb11022-Mar-13 2:44
membercjb11022-Mar-13 2:44 
I'm struggling to get my MVVM WPF app to work with a set of Tasks updating the UI.

I've got a Command that starts X number of tasks off, for each task I'd like the UI to update when started and when finished. I've also got a second Command to cancel the task, which I'd obviously like working (the code does but as the UI locks the button doesn't)

I've used a ListBox bound to an ObvservableCollection<string> for the results, as this seemed better than binding to a string.

At the moment I get the UI lockup until all tasks are finished. This is with or without a Task.WaitAll. The results are correct, the tasks don't always start/finish in the same order so they're obviously being generated and updating the collection asynchronously.

I've tried an AysncObservableCollection (as per this SO answer)

I've tried using the Dispatcher in my method that adds a item to the collection.
I've tried variations on the Binding parameters.

Can someone give me some hints Confused | :confused: Surely people have created a status log with async stuff in MVVM before??

Do I need to move the task creation to the Model?

I've seen mention of making sure the Collection is initiated on/by the View, not sure I understand that!
The View has a DataContext that's set to my ViewModel. Do they mean I've got to create the Collection in the code behind of the View? that doesn't seem right.

Oh this is .NET4.0 on XP, and I'm not using any MVVM frameworks (didn't think that was a good idea as I'm still learning)
AnswerRe: MVVM Tasks and UI Updating Pin
Matt T Heffron22-Mar-13 11:25
professionalMatt T Heffron22-Mar-13 11:25 
GeneralRe: MVVM Tasks and UI Updating Pin
cjb11024-Mar-13 23:37
membercjb11024-Mar-13 23:37 
GeneralRe: MVVM Tasks and UI Updating Pin
cjb11025-Mar-13 2:56
membercjb11025-Mar-13 2:56 
GeneralRe: MVVM Tasks and UI Updating Pin
cjb11025-Mar-13 5:45
membercjb11025-Mar-13 5:45 
AnswerRe: MVVM Tasks and UI Updating Pin
Abhinav S25-Mar-13 8:26
memberAbhinav S25-Mar-13 8:26 
GeneralRe: MVVM Tasks and UI Updating Pin
cjb11025-Mar-13 8:36
membercjb11025-Mar-13 8:36 
QuestionProblems on ListView Control in WPF Pin
bikah chanda mohanta21-Mar-13 3:56
memberbikah chanda mohanta21-Mar-13 3:56 
AnswerRe: Problems on ListView Control in WPF Pin
Kenneth Haugland22-Mar-13 3:03
professionalKenneth Haugland22-Mar-13 3:03 
QuestionRoute Event for Button border Pin
Member 878633518-Mar-13 21:50
memberMember 878633518-Mar-13 21:50 
QuestionWPF treeview with circular reference not updating the childTreeviewItem Pin
geetha naidu17-Mar-13 1:39
membergeetha naidu17-Mar-13 1:39 
QuestionStack panel Pin
columbos1492715-Mar-13 10:35
membercolumbos1492715-Mar-13 10:35 
AnswerRe: Stack panel Pin
Gerry Schmitz15-Mar-13 12:01
mveGerry Schmitz15-Mar-13 12:01 
AnswerRe: Stack panel Pin
Mycroft Holmes15-Mar-13 14:30
memberMycroft Holmes15-Mar-13 14:30 
QuestionHow to add multiple button into same datacell in DataGrid column Pin
Jayantha Bandara15-Mar-13 1:45
memberJayantha Bandara15-Mar-13 1:45 
AnswerRe: How to add multiple button into same datacell in DataGrid column Pin
Pete O'Hanlon15-Mar-13 2:14
protectorPete O'Hanlon15-Mar-13 2:14 
AnswerRe: How to add multiple button into same datacell in DataGrid column Pin
Jayantha Bandara15-Mar-13 2:41
memberJayantha Bandara15-Mar-13 2:41 
GeneralRe: How to add multiple button into same datacell in DataGrid column Pin
Mycroft Holmes15-Mar-13 14:26
memberMycroft Holmes15-Mar-13 14:26 

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.


Advertise | Privacy | Cookies | Terms of Service
Web02 | 2.8.190214.1 | Last Updated 14 Feb 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid