Compartir a través de


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)

Syntax

'Declaration
<EditorBrowsableAttribute(EditorBrowsableState.Never)> _
Public Function CheckAccess As Boolean
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
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.

Remarks

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

Silverlight

Supported in: 5, 4, 3

Platforms

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