Click here to Skip to main content
15,911,707 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: MVVM: Best Practices and Design Patterns Pin
Abhinav S18-Feb-11 6:20
Abhinav S18-Feb-11 6:20 
AnswerRe: MVVM: Best Practices and Design Patterns Pin
SledgeHammer0118-Feb-11 6:56
SledgeHammer0118-Feb-11 6:56 
AnswerRe: MVVM: Best Practices and Design Patterns Pin
BubingaMan22-Feb-11 4:35
BubingaMan22-Feb-11 4:35 
QuestionOpen WPF Application from within Excel Add-In Pin
muelito18-Feb-11 3:18
muelito18-Feb-11 3:18 
Question2 different styles - 2 different objects - both affected the same way??? Pin
bigwillyca17-Feb-11 6:35
bigwillyca17-Feb-11 6:35 
AnswerRe: 2 different styles - 2 different objects - both affected the same way??? Pin
dasblinkenlight18-Feb-11 3:06
dasblinkenlight18-Feb-11 3:06 
GeneralRe: 2 different styles - 2 different objects - both affected the same way??? Pin
bigwillyca18-Feb-11 5:02
bigwillyca18-Feb-11 5:02 
QuestionHow to sort the items under some node in Silverlight tree view? Pin
Tesic Goran17-Feb-11 3:20
professionalTesic Goran17-Feb-11 3:20 
AnswerRe: How to sort the items under some node in Silverlight tree view? Pin
SledgeHammer0117-Feb-11 7:14
SledgeHammer0117-Feb-11 7:14 
GeneralRe: How to sort the items under some node in Silverlight tree view? Pin
Tesic Goran17-Feb-11 19:35
professionalTesic Goran17-Feb-11 19:35 
Answersymbols not loaded Pin
cmichaelgraham17-Feb-11 3:04
cmichaelgraham17-Feb-11 3:04 
GeneralRe: symbols not loaded Pin
SledgeHammer0117-Feb-11 7:12
SledgeHammer0117-Feb-11 7:12 
GeneralRe: symbols not loaded Pin
Abhinav S17-Feb-11 17:49
Abhinav S17-Feb-11 17:49 
QuestionHow to restyle tab control in WPF Pin
Tridip Bhattacharjee16-Feb-11 23:09
professionalTridip Bhattacharjee16-Feb-11 23:09 
AnswerRe: How to restyle tab control in WPF Pin
SledgeHammer0117-Feb-11 7:10
SledgeHammer0117-Feb-11 7:10 
QuestionOpen a new Window from a Page in silverlight 4.0 Pin
Member-495917616-Feb-11 22:54
Member-495917616-Feb-11 22:54 
AnswerRe: Open a new Window from a Page in silverlight 4.0 Pin
#realJSOP17-Feb-11 7:11
professional#realJSOP17-Feb-11 7:11 
Questionbackground worker Pin
arkiboys14-Feb-11 3:48
arkiboys14-Feb-11 3:48 
AnswerRe: background worker Pin
Pete O'Hanlon14-Feb-11 10:08
mvePete O'Hanlon14-Feb-11 10:08 
GeneralRe: background worker Pin
arkiboys15-Feb-11 2:40
arkiboys15-Feb-11 2:40 
GeneralRe: background worker PinPopular
Ian Shlasko15-Feb-11 3:16
Ian Shlasko15-Feb-11 3:16 
The problem is you're calling an asynchronous operation in order to call an asynchronous operation... Allow me to illustrate...

Form: "Ok, I want you to check this thing every ten seconds, and just write the results on this chalkboard over here..."
Timer: "No problem!"

backgroundWorker.DoWork += backgroundWorker_DoWork;

* Timer goes back to his office...
Timer: "Alright, you there... When I ring this bell, I want you to go perform your task, and let me know how it goes."
BackgroundWorker: "You got it, boss!"
Timer: "Ready..... *ding*!"

private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)

* BackgroundWorker runs to his office...
BackgroundWorker: "Hey, I need you to check this service for me."
Client: "Um, ok, but it's going to take a while..."
BackgroundWorker: "Yeah, I don't care... Just go do it, ok?"
Client: "If you say so..."
* Client goes off to check on the service

// Return the result.
e.Result = ??;

* BackgroundWorker goes back to Timer
BackgroundWorker: "Ok, all taken care of."
Timer: "Really? Already? I thought that would take a while."
BackgroundWorker: "Well, you know me."
Timer: "Right... So... uh... Did it all work out ok?"
BackgroundWorker: "Uh... yeah... sure... I mean, yeah, everything's great."
Timer: "Ok, good."
void client_GetDataCompleted(object sender, WinService.GetDataCompletedEventArgs e)

* Timer makes a note on Form's chalkboard

...Meanwhile...

* Client works on the job... Tick tock tick tock...
Client: "Ok, that took longer than I expected... Hey, BackgroundWorker, I have the results you wan-- Oh... You went home for the day... Uh... Anyone care? I'm done now... I mean, there were some problems, but... Anybody? Anybody at all? Oh well... Guess they didn't really want this Exception..."



(Sorry, I'm in an odd mood this morning...)
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)

GeneralRe: background worker Pin
musefan15-Feb-11 3:44
musefan15-Feb-11 3:44 
GeneralRe: background worker Pin
Ian Shlasko15-Feb-11 4:19
Ian Shlasko15-Feb-11 4:19 
GeneralRe: background worker Pin
musefan15-Feb-11 4:54
musefan15-Feb-11 4:54 
GeneralRe: background worker Pin
Ian Shlasko15-Feb-11 4:58
Ian Shlasko15-Feb-11 4:58 

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.