System.Windows.Threading.Dispatcher.CheckAccess C# (CSharp) Method

CheckAccess() private method

private CheckAccess ( ) : bool
return bool
		public bool CheckAccess ()
		{
			return NativeMethods.surface_in_main_thread ();
		}

Usage Example

        /// <summary>
        /// Checks whether the current thread is the thread that the dispatcher is associated with.
        /// </summary>
        /// <returns>True if it is on the thread that the Dispatcher is associated with; otherwise false.</returns>
        private bool IsInDispatcherThread()
        {
#if NICENIS_UWP
            return(TheWindow.Current.Dispatcher.HasThreadAccess);
#else
            return(_dispatcher.CheckAccess());
#endif
        }
All Usage Examples Of System.Windows.Threading.Dispatcher::CheckAccess