From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Task.Done event not raised in WPF

Hi everyone,

I just wanted to ask if you ever encountered this problem.
I have a relatively simple program which clocks out some data on buffered digital io lines of USB ni-6366.
Everything works good when the program runs as a console application (written in C#).

If I run the same code in C# WPF application, the task's 'Done' event never gets rised.
Calling task's 'WaitUntilDone' seems to correctly wait for the task to finish but the 'Done' event gets rised only in console app.

I solved this problem manually calling the stuff that would have been called in the event, but just wanted to know if you encountered this problem too and if maybe I'm not doing something properly.
(Btw, other callback events, like these associated with reading analog input channels get called properly in WPF, only the general task's 'Done' event is silent)
0 Kudos
Message 1 of 1
(4,973 Views)