Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What else can we use instead of ChartControl to make Dispatcher.InvokeAsync(()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What else can we use instead of ChartControl to make Dispatcher.InvokeAsync(()

    Some things in GUI can be achieved by wrapping the code within: ChartControl.Dispatcher.InvokeAsync(()

    But there are times when ChartControl is null (for example, if indicator which is used without chart or etc..).

    what can be used in those situations , when ChartControl.Dispatcher is null?
    Can we use this
    Application.Current.Dispatcher.InvokeAsync(().. as a replacement?
    Last edited by ttodua; 02-13-2020, 02:39 PM.

    #2
    Hello TazoTodua, thanks for your post.

    At first glance, it looks like using the Application dispatcher would not work because you would need to access the dispatcher for the ChartControl Object. Please see this page for more details on the C# Dispatcher:



    Executes the specified delegate asynchronously on the thread the Dispatcher is associated with.
    Have you tried testing with Application.Current.Dispatcher.InvokeAsync?

    Kind regards.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    32 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    12 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    18 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    20 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X