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 8918853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:51:19+00:00 2026-06-15T05:51:19+00:00

I have following two methods. When user clicks on start button from ui, the

  • 0

I have following two methods. When user clicks on start button from ui, the step geoLocator_PositionChanged in geoLocator_PositionChanged method is fired and calls the other method geoLocator_PositionChanged.But when it comes to try block while executing the first statement it throws the following error:

“The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))”

private async void btnStartStop_Click_1(object sender, RoutedEventArgs e)

    {
      geoLocator.PositionChanged += geoLocator_PositionChanged; 
     }

async void geoLocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args)

    {

        MessageDialog msgdlg = null;
        bool bDisplayDialog = false;
        try
        {
            lblAltValue.Text = args.Position.Coordinate.Altitude.ToString();  
    }
    catch
    {
    }
    }

Any help how can I fix this issue ?

  • 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-15T05:51:20+00:00Added an answer on June 15, 2026 at 5:51 am

    You try to access the UI-Thread from another one.

    Try something like ths

    Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync
    (Windows.UI.Core.CoreDispatcherPriority.Normal, () => 
    {
        //HERE GOES THE UI ACCESS LIKE this.textbox.text = "MY AWESOME TEXT"; 
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following two methods for getting data from my database: - (void)
NBuilder has two of the following fluent methods .Has(..) .Have(..) eg. return Builder<User>.CreateListOfSize(100) .WhereTheFirst(1)
I have the following two methods that (as you can see) are similar in
I have the following two queries. SELECT account_name,SUM(amount) AS AMOUNT1 FROM entries LEFT JOIN
I have following two methods in my backing bean - public String validateUser() {
I have two links say for eg. English and Spanish. When user clicks on
I have written two methods that take and return a string. One converts from
I have the following method, which basically tries to get the user profile picture
I have a problem in understanding the following methods...I have two works to done.
I have following two arrays. I want the difference between these two arrays. That

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.