Language

UIApplication.EnsureUIThread Method

Definition

Checks that the current call is made on the UI thread.

public static void EnsureUIThread();
static member EnsureUIThread : unit -> unit

Exceptions

Thread checks are enabled and the current thread is not the UI thread.

Remarks

This method does nothing when CheckForIllegalCrossThreadCalls is false. Thread checks are enabled by default in debug builds and disabled by default in release builds.

Applies to