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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:47:48+00:00 2026-06-11T22:47:48+00:00

I was developing an app in WinRT, I had requirement of passing property values,

  • 0

I was developing an app in WinRT, I had requirement of passing property values, which are set in one class, to another class, but I am not able to get them. My below code will explain you my problem. Please note I have tested this in simulator and added the capability for location in manifest. I have set location in simulator.

MainPage.xaml

<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
     <TextBlock x:Name="MyTextBlock"/>
</Grid>

MainPage.xaml.cs

protected override void OnNavigatedTo(NavigationEventArgs e)
{
    MyClass objMyClass = new MyClass();
    MyTextBlock.Text = objMyClass.Lat.ToString() + ", " + objMyClass.Long.ToString();
}

MyClass.cs

public class MyClass
{
    public double Lat { get; set; }
    public double Long { get; set; }

    public MyClass()
    {
        FindLatLong();
    }

    public async void FindLatLong()
    {
        Geolocator geolocator = new Geolocator();
        var pos = await geolocator.GetGeopositionAsync();
        Lat = pos.Coordinate.Latitude;
        Long = pos.Coordinate.Longitude;
    }
}

I am getting output “0,0”

  • 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-11T22:47:50+00:00Added an answer on June 11, 2026 at 10:47 pm

    Finally got my answer from MSDN forum.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was developing app which uses Facebook API authentication for user login. But sometimes
i'm developing some winRT apps and there i have the property RequestTheme which i
I'm developing a C# Window8 / WinRT app and I'm using SQLite-NET with the
Im developing an app for iPhone, in wich one of the functionalities is an
Im developing an App which is going to be used on Samsung Galaxy SII
I am developing facebook app in which i am fetching user's friend detail in
I am developing app which add contact info to android contact list .to How
i am developing app in Blackberry which have GPS Functionality. so first i want
im developing an app that retrieves a rss feed from a website but i
Im developing a app which has a user sign-up activity, there I need to

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.