xtd 0.2.0
Loading...
Searching...
No Matches

◆ check_for_illegal_cross_thread_calls() [1/2]

static bool xtd::forms::control::check_for_illegal_cross_thread_calls ( )
staticnoexcept

Gets a value indicating whether to catch calls on the wrong thread that access a xtd::forms::contrtol::handle property when an application is being debugged.

Returns
true if calls on the wrong thread are caught; otherwise, false.
Remarks
When a thread other than the creating thread of a control tries to access one of that control's methods or properties, it often leads to unpredictable results. A common invalid thread activity is a call on the wrong thread that accesses the xtd::forms::control::handle property. Set xtd::forms::control::check_for_illegal_cross_thread_calls to true to find and diagnose this thread activity more easily while debugging.
Warning
Be careful, some OS don't support cross-thread UI operations!