.NET Framework Developer Center > .NET Development Forums > Windows Presentation Foundation (WPF) > ? WPF Graphical UI & Threads - Please help - Urgent! :(
Ask a questionAsk a question
 

Answer? WPF Graphical UI & Threads - Please help - Urgent! :(

  • Tuesday, March 18, 2008 3:31 PMZoe Summers Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    Hi

     

    I have a wpf window that has a canvas and an image placed on the canvas.

     

    In the code for this window I am using events mouse down, mouse up, and mouse move.

     

    However, I also need to kick of a thread that every 1 seconds reports back to the ui thread with the current mouse position =  I need to test when the mouse hasn't moved for a short period of time.

     

    However, unlike in windows forms when I'd use the invoke.required on a text box or something with a delegate in order to post info back from the thread, in this case I know that wpf uses the dispatcher.invoke or .begininvoke, however I'm not UPDATING a UI Element - I'm trying to set booleans and pass in a mouse positions (as a point) back to the UI thread.

     

    So can anyone please explain (simply) how to do this?

     

    I've used the windows forms method for threads to update boxes and labels on the UI, but that 'approach' doesn't seem to be what I need to do in this case.

     

    Any help?

     

    Please - I need this figuring out today as I have a deadline to meet for my 3rd year project.

     

    Thanks

     

    Zoe

Answers

All Replies