Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8387853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:19:42+00:00 2026-06-09T18:19:42+00:00

In .NET you have System.Threading.Thread.IsBackground . Is there some equivalent of this in WinRT/Metro?

  • 0

In .NET you have System.Threading.Thread.IsBackground.

Is there some equivalent of this in WinRT/Metro?

I have a method which changed UI properties, and I want to determine whether or not I need to dispatch the execution to the UI thread runtime.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:19:44+00:00Added an answer on June 9, 2026 at 6:19 pm

    Well, if you use MVVM Light Toolkit in your app, you can use CheckBeginInvokeOnUI(Action action) method of GalaSoft.MvvmLight.Threading.DispatcherHelper class which handles this situation automatically.

    GalaSoft.MvvmLight.Threading.DispatcherHelper.CheckBeginInvokeOnUI(() =>
    {
        Gui.Property = SomeNewValue;
    });
    

    Edit:

    The following code is based on DispatcherHelper class of MVVM Light Toolkit – link

    But if you don’t want to use MVVM Light (which is pretty cool thing by the way), you can try something like this (sorry, can’t check if this works, don’t have Windows 8):

    var dispatcher = Window.Current.Dispatcher;
    
    if (dispatcher.HasThreadAccess)
        UIUpdateMethod();
    else dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => UIUpdateMethod(););
    

    It would be nicer to put this logic in separate class like this:

    using System;
    using Windows.UI.Core;
    using Windows.UI.Xaml;
    
    namespace MyProject.Threading
    {
        public static class DispatcherHelper
        {
            public static CoreDispatcher UIDispatcher { get; private set; }
    
            public static void CheckBeginInvokeOnUI(Action action)
            {
                if (UIDispatcher.HasThreadAccess)
                    action();
                else UIDispatcher.RunAsync(CoreDispatcherPriority.Normal,
                                           () => action());
            }
    
            static DispatcherHelper()
            {
                if (UIDispatcher != null)
                    return;
                else UIDispatcher = Window.Current.Dispatcher;
            }
        }
    }
    

    Then you can use it like:

    DispatherHelper.CheckBeginInvokeOnUI(() => UIUpdateMethod());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I create some managed threads inside an asp.net application ( System.Threading.Thread ). Each thread
I have a .NET application that contains a checkbox (System.Windows.Forms.Checkbox). This component (WindowsForms10.BUTTON.app.0.378734a1) is
I have following requirement, I have C#/.Net console application, which refers to 'System.Data.Sqlite.dll' 'System.Data.Sqlite.dll'
I have an ASP.NET MVC website where I've established a system of Permissions. There
I have a wierd problem with threading in an ASP.NET application. For some reason,
I got a System.Threading.Timer which I change to lower priority ( Thread.CurrentThread.Priority = XXXX
Why does .Net not have the System.Float type like System.String , System.Double etc.?
I have a .NET Windows Service (.NET 3.5) with a timer ( System.Timers.Timer ).
Im looking to have a login system on my asp.net mvc website and at
I have a tdd system , where I use Gallio 3.1 with TestDriven.Net .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.