Questions tagged [dispatcher]

In WPF and Silverlight, Dispatcher is an object that is used to execute work on a specific thread. In another meaning, dispatcher defines an object that receives requests from the client and sends them to any resource (such as a servlet, HTML file, or JSP file) on the server.

In and , Dispatcher is an object that is used to execute work on a specific .

In another meaning, a dispatcher object can forward a client's request to a resource or include the resource itself in the response back to the client. A resource can be another servlet, or an HTML file, or a JSP file, etc.

1296 questions
-2
votes
1 answer

Operation is not supported on this platform - Exmple

This is from a Microsoft WPF example. The source can be found on git as UsingDispatcher. It is included in a zip file that has a lot of examples. It is sort of written up here. I have seen it in other places on MSDN (e.g. Threading Model). I added…
MichaelInMA
  • 151
  • 1
  • 11
-2
votes
1 answer

The calling thread cannot access this object - NOT AN UI OBJECT

EDIT I removed my code as it was incomplete and confusing, but added a minimal reproducible exemple. All the text below has been slightly rewritten to clarify my question, adding information from the comment, but without adding anything I didn't…
geriwald
  • 190
  • 1
  • 4
  • 17
-2
votes
1 answer

I didn't success to call a servlet inside another servlet

I have servlet A where there is this code : protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { RequestDispatcher rd = request.getRequestDispatcher("gestion-avis"); …
jozinho22
  • 459
  • 2
  • 7
  • 24
-2
votes
1 answer

Delegate is never executed while invoked via Dispatcher.BeginInvoke with ContextIdle priority

I work on a WPF application. I have the following code: But I never get to the breakpoint that is put at the beginning of ExpandFreeDraw method: When I invoke the BeginInvoke method, I'm already on the UI thread: The ExpandFreeDraw method should…
Cod Fish
  • 917
  • 1
  • 8
  • 37
-2
votes
1 answer

What is the recommended way to raise property change for a desktop application using .Net Core in an MT environment

For the last 10 years, I was using WPF with the "Dispatcher" in order to ensure UI thread will receive notifications. I was using code like this in a base "Model" class: [NotifyPropertyChangedInvocator] public void…
Eric Ouellet
  • 10,996
  • 11
  • 84
  • 119
-2
votes
1 answer

WPF Dispatcher Invoking with a Progress Bar

I've been trying to learn how to use Dispatches in Windows Presentation Foundation for like 4 hours now and there's a problem I can't seem to solve at all no matter how much Googling I do. I've got this simple program to work out the percentage of…
vK 3 1 RON
  • 113
  • 8
-2
votes
2 answers

why wpf Dispatcher.BeginInvoke slow?

sometime is ok but sometime is very slow. why? void function(PassVehicleInfo vehicle) { //a System.Windows.Application.Current.Dispatcher.BeginInvoke(new Action(() => {//b //do something })); } run from a to b sometimes cost…
AlgerDu
  • 21
  • 4
-2
votes
1 answer

Backgroundworker for wpf C#

I need to execute two methods simultaneously, only after completion of this next thing should continue, the problem i have a UI which throws me error if use task (Its a WPF appliation). Task Data= Task.Factory.StartNew(() => Readdetails()); Task…
Usha
  • 1
-2
votes
1 answer

Adding text to a TextBlock, one character at a time

I'm posting this so that the code is available to whomever finds it helpful. Slightly reduced code based on Noctis's suggestion. StringBuilder DescriptionText = new StringBuilder(); async void RunDescription(StringBuilder description) { …
Cusha
  • 1
  • 3
-2
votes
1 answer

How to convert 'Run on UI' Aspect from WPF to Windows Forms?

I was trying to implement an aspect following a WPF example, but I can't figure out how to make it work for WinForms. class RunOnUIThreadAttribute : IMethodInterceptionAspect { public override void OnInvoke(MethodInterceptionArgs args) { …
user1012732
  • 181
  • 2
  • 14
-2
votes
1 answer

Looking for explaination System.NotSupportedException

So first some code, question in the end. I've got some objects called machines, they have two properties public Logs MachineLogs { get { return _logs; } set { _logs = value; NotifyPropertyChanged…
yoger
  • 282
  • 3
  • 15
-2
votes
1 answer

C# InvalidOperationException with backgroundWorker

I have this line in my backgroundWorker thread: Dispatcher.CurrentDispatcher.BeginInvoke((Action)(() => this.Network.Nodes.Add(node))).Wait(); I'm getting an exception InvalidOperationException from it.
Yogevnn
  • 1,430
  • 2
  • 18
  • 37
-2
votes
1 answer

Configure dispatcher Servlet to connect to other host

I have an upload program which uploads file and saves it to the specified host on which this application is deployed. I want to save this files to other host. Can someone guide me what changes I must do to my dispatcher servlet for the same or any…
Angel491
  • 17
  • 7
-3
votes
1 answer

WPF - Update GUI in different, static class without delay

I googled now for a lot of days including stackoverflow itself, but I still can't find any working solution for my purposes. I'm Beginner with WPF and just want to update control contents during runtime in real time and not after the function is…
Dave
  • 19
  • 4
-3
votes
3 answers

How to update label control of the parent UI window from child window in sequential manner in wpf?

I have tried to find out the answer but no real answer found. Can anyone answer following? I am trying to update status in the parent window by calling Dispatcher Method, but I see it does not update the status in sequential manner. I see the status…
biplabks
  • 5
  • 1
  • 4
1 2 3
86
87