METHOD

DispatcherObject.CheckAccess

Tests whether the calling thread may access the WPF dispatcher object. It neither posts work nor guarantees that a queued action remains valid when executed. Requires Windows WPF.

Formal Syntax & Structure

csharp syntaxcsharp
control.CheckAccess()

Working Example

Example Snippetcsharp
using System;using System.ComponentModel;using System.Collections.ObjectModel;using System.Windows.Input;using System.Windows;// Partial WPF snippet with a live window.if(window.CheckAccess()) window.Title="Ready";
C# & .NET Reference