ScriptObject.CheckAccess Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Determines whether the current thread is the browser's UI thread.

Namespace:  System.Windows.Browser
Assembly:  System.Windows.Browser (in System.Windows.Browser.dll)


<EditorBrowsableAttribute(EditorBrowsableState.Never)> _
Public Function CheckAccess As Boolean
public bool CheckAccess()

Return Value

Type: System.Boolean
true if the current thread is the browser's UI thread; false if it is a background thread.


If the current thread is not the browser's UI thread, but is instead a background thread, only the Dispatcher property and the CheckAccess method of the ScriptObject can be safely accessed.

Version Information


Supported in: 5, 4, 3


For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.