Click here to Skip to main content
15,885,216 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: WPF RichTextBox Document Bind using Binding property Pin
Richard Deeming24-Jun-14 0:43
mveRichard Deeming24-Jun-14 0:43 
QuestionDisplaying (Calling) 2 UserControl within a UserControl (WPF) Pin
LAPEC23-Jun-14 23:56
LAPEC23-Jun-14 23:56 
AnswerRe: Displaying (Calling) 2 UserControl within a UserControl (WPF) Pin
Matt T Heffron24-Jun-14 7:09
professionalMatt T Heffron24-Jun-14 7:09 
GeneralRe: Displaying (Calling) 2 UserControl within a UserControl (WPF) Pin
LAPEC24-Jun-14 7:32
LAPEC24-Jun-14 7:32 
QuestionAsync method using RenderTargetBitmap and BitmapEncoder Pin
FlurryKnox18-Jun-14 21:40
FlurryKnox18-Jun-14 21:40 
AnswerRe: Async method using RenderTargetBitmap and BitmapEncoder Pin
Gerry Schmitz19-Jun-14 13:39
mveGerry Schmitz19-Jun-14 13:39 
GeneralRe: Async method using RenderTargetBitmap and BitmapEncoder Pin
FlurryKnox20-Jun-14 6:34
FlurryKnox20-Jun-14 6:34 
GeneralRe: Async method using RenderTargetBitmap and BitmapEncoder Pin
Gerry Schmitz20-Jun-14 10:21
mveGerry Schmitz20-Jun-14 10:21 
If this is a "windows" application, the first / main thread is typically the "UI thread." (You cannot create more than one UI thread).

Besides the "completed" event, which runs on the UI thread, the BackgroundWorker also has a "progress changed" event handler that can be invoked from the "do work" handler via the "on progress changed method"; this "progress changed" handler runs on the UI thread so you can update the UI there.

When using "progress changed" you need to insure that:
- the UI thread is available for "progress changed" to run
- "progress changed" may need to be re-entrant depending on how often / frequently you call it from "do work".

And passing parameters to your threads may not always be practical; you can however "share" memory safely between threads (except UI controls): see "collections.concurrent" and "interlocked" for "non-blocking" possible solutions.

(It's not that something is wrong; some things are just easier than others; and there is usually more than one way).

In general, the BackgroundWorker is suggested if a thread needs to interact with the UI (i.e. via progress changed).
GeneralRe: Async method using RenderTargetBitmap and BitmapEncoder Pin
Pete O'Hanlon20-Jun-14 10:48
mvePete O'Hanlon20-Jun-14 10:48 
GeneralRe: Async method using RenderTargetBitmap and BitmapEncoder Pin
Gerry Schmitz20-Jun-14 11:10
mveGerry Schmitz20-Jun-14 11:10 
GeneralRe: Async method using RenderTargetBitmap and BitmapEncoder Pin
Pete O'Hanlon20-Jun-14 11:16
mvePete O'Hanlon20-Jun-14 11:16 
GeneralRe: Async method using RenderTargetBitmap and BitmapEncoder Pin
FlurryKnox21-Jun-14 19:35
FlurryKnox21-Jun-14 19:35 
GeneralRe: Async method using RenderTargetBitmap and BitmapEncoder Pin
Gerry Schmitz22-Jun-14 1:51
mveGerry Schmitz22-Jun-14 1:51 
QuestionStarter MVVM Framework Recommendation Pin
cjb11018-Jun-14 2:58
cjb11018-Jun-14 2:58 
AnswerRe: Starter MVVM Framework Recommendation Pin
Pete O'Hanlon18-Jun-14 3:24
mvePete O'Hanlon18-Jun-14 3:24 
GeneralRe: Starter MVVM Framework Recommendation Pin
cjb11018-Jun-14 3:48
cjb11018-Jun-14 3:48 
GeneralRe: Starter MVVM Framework Recommendation Pin
Pete O'Hanlon18-Jun-14 4:09
mvePete O'Hanlon18-Jun-14 4:09 
AnswerRe: Starter MVVM Framework Recommendation Pin
Vincent Beek18-Jun-14 3:30
Vincent Beek18-Jun-14 3:30 
GeneralRe: Starter MVVM Framework Recommendation Pin
cjb11018-Jun-14 3:50
cjb11018-Jun-14 3:50 
AnswerRe: Starter MVVM Framework Recommendation Pin
Mycroft Holmes18-Jun-14 12:53
professionalMycroft Holmes18-Jun-14 12:53 
GeneralRe: Starter MVVM Framework Recommendation Pin
cjb11018-Jun-14 20:40
cjb11018-Jun-14 20:40 
GeneralRe: Starter MVVM Framework Recommendation Pin
Mycroft Holmes18-Jun-14 22:11
professionalMycroft Holmes18-Jun-14 22:11 
AnswerRe: Starter MVVM Framework Recommendation Pin
Stein Borge18-Jun-14 18:23
Stein Borge18-Jun-14 18:23 
GeneralRe: Starter MVVM Framework Recommendation Pin
cjb11018-Jun-14 21:59
cjb11018-Jun-14 21:59 
GeneralRe: Starter MVVM Framework Recommendation Pin
Stein Borge19-Jun-14 1:58
Stein Borge19-Jun-14 1: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.