0
votes
1answer
24 views

I want to add a progressbar

<Window x:Class="ASTHENIA.Loading" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Loading" Height="300" ...
2
votes
2answers
57 views

asynchronous UI update from ViewModel in WPF

I am having a problem with getting data from db and showing in UI asynchronously. I am using MVVM light, when I click the button, action is triggered in ViewModel: private void SearchQuery(string ...
0
votes
2answers
133 views

when I raise event it is always null

In my mainViewModel I suscribe on event : var uc = new MyUserControl(); uc.ViewModel.ValueTypeChangedEvent += OnValueTypeChanged; Control05 = uc; StartMeasuring2(); My backgroundWorker is: ...
0
votes
0answers
15 views

IsRegistered method on UnityContainer when loading modules on different threads

Have a multithreaded WPF application. The loading of the modules is based on priority assigned to the modules. Only the high priority modules get loaded on the UI thread and the rest of the modules ...
0
votes
1answer
56 views

calling thread access error

I have 2 viewModels - one for main program and another for my user control. When I dynamically create user control, I start background thread : private void BackgroundWorkerDoWork(object sender, ...
1
vote
3answers
80 views

Any way to programmatically build UI elements off the UI thread?

I know I need to create and add elements to another element on the main UI thread in WPF and you can easily do this when on another thread using the Dispatcher. However I would like to build my ...
0
votes
2answers
54 views

Pause and Resume the execution in WPF

Is there any way to pause and resume the execution in WPF App [especially in ViewModel class]? I have tried with Auto and ManualResetEvent class. But it is not pausing at the point where I want to ...
-2
votes
1answer
22 views

How to “translate” this code to WPF

I move application from WindowsForms to WPF. I have the following code: if (InvokeRequired) { Invoke(new Action<Version, Version, XDocument>(ShowUpdateDialog), ...
2
votes
2answers
66 views

Update progress bar in main thread in MVVM

In my application I perform a long operation and I want to show a progress of the operation. In long operation I use 3rd-party dll. Unfortunately that dll doesn't support calls from non-main thread. ...
0
votes
1answer
22 views

Is the error/issue I am having caused by not using the Dispatcher?

I am using this wonderful framework for doing modal dialogs in WPF. Using this framework, I am trying to get a modal dialog to overlay another modal dialog when a user clicks a button from within the ...
0
votes
2answers
69 views

Dispatcher.Invoke() vs not creating any thread

In a WPF application, what is the difference between calling a method directly vs passing it to Dispatcher.Invoke()? Based on what I have read so far, both are executed in the same UI thread, aren't ...
1
vote
1answer
43 views

Block multiple UI threads for a dialog in WPF

In the moment, I have a problem with multiple UI threads in WPF. I have a third party component, which I need to use in a project. Unfortunately, every function of the component needs to be executed ...
0
votes
1answer
62 views

serialport continuous real time data c#

Hi I'm trying to program a simple C# WPF that displays time information on a virtual scoreboard in real time from a timing system. I'm fairly new to programming so in depth explanation would be ...
1
vote
2answers
511 views

Dispatch.Invoke( new Action…) with a parameter

Previously I had Dispatcher.Invoke(new Action(() => colorManager.Update())); to update display to WPF from another thread. Due to design, I had to alter the program, and I must pass ...
25
votes
3answers
20k views

How to use WPF Background Worker

I am a beginner with WPF, in my application I need to preform a series of Initialisation steps, these take 7-8 seconds to complete during which my UI becomes unresponsive. To resolve this I preform ...

1 2 3 4 5 63
15 30 50 per page