Click here to Skip to main content
15,888,816 members
Home / Discussions / WPF
   

WPF

 
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 
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 
Thank you for your help.

I have been researching this and developing some test code.

The thing is that what I am doing is creating a series of bitmaps based upon the state of a user control. The user control displays an image or video and draws some shapes such as lines and rectangles and ellipses. I want to capture the state of the user control several times a second using a visualbrush and use rendertargetbitmap to save to bitmap on the disk.

This is a length process. With lengthy processes, it is recommended to use a background worker. However, I need some way of sharing the visualbrush with the backgroundworker thread. When I search google, people are saying try to refactor the code to use background worker. I am not sure how to do this as I need the background worker to have access to the UI elements. I think I need to use a single-threaded apartment (STA) thread. However, background workers are not STA?

The alternative of creating a new window is possible and using the windows UI thread. However, it is not advised to do lengthy process on a UI thread. I would need to pump for windows messages (I am getting debug warning in visual studio).

So I am not sure what is the best way forward...I might be missing something obvious....

Many thanks....
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 
GeneralRe: Starter MVVM Framework Recommendation Pin
Geert van Horrik20-Jun-14 8:40
Geert van Horrik20-Jun-14 8:40 
GeneralRe: Starter MVVM Framework Recommendation Pin
_Maxxx_6-Jul-14 19:16
professional_Maxxx_6-Jul-14 19:16 
QuestionBind to static property which change in runtime Pin
Mc_Topaz16-Jun-14 23:23
Mc_Topaz16-Jun-14 23:23 
AnswerRe: Bind to static property which change in runtime Pin
Pete O'Hanlon16-Jun-14 23:55
mvePete O'Hanlon16-Jun-14 23:55 

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.