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

  • Home
  • SEARCH
  • 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 8720287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:00:23+00:00 2026-06-13T07:00:23+00:00

I recently started working window phone 7. I created a delegate and tried to

  • 0

I recently started working window phone 7. I created a delegate and tried to call it asynchronously.
The code was something like this:

public class1
{
     public delegate void fireAlwaysDelegate();
     fireAlwaysDelegate fad;
     public class1()
     {
       initializeComponents();
       fad=new fireAlwaysDelegate(fireAlways)
     }

     fireAlways()
     {
       //some code
     }

     PhoneApplicationPage_loaded()
     {
        //some code
        fda.beginInvoke(null,null);
     }
}

But, when I executed this code, it threw an exception saying .net compact framework does not support invoking delegates asynchronously.
As per my understanding of WP7 framework it uses async calls for almost everything, so i am not able to understand why this is not permitted.

Any work around for this thing.

I wanted to execute some code once the PhoneApplicationPage_loaded is complete and UI is Launched, i thought of calling an async delegate from PhoneApplicationPage_loaded.

Also i will like to understand why async call to delegates is not permitted.

  • 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-13T07:00:24+00:00Added an answer on June 13, 2026 at 7:00 am

    You can use BackgroundWorker instead.

    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        private BackgroundWorker bw = new BackgroundWorker();
    
        public MainPage()
        {
            InitializeComponent();
            bw.DoWork += new DoWorkEventHandler(bw_DoWork);
        }
    
        private void bw_DoWork(object sender, DoWorkEventArgs e)
        {
            FireAlways();
        }
    
      public void FireAlways()
      {
        //some code
      }
    
     private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
     {
         if (bw.IsBusy != true)
         {
             bw.RunWorkerAsync();
         }
     }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently started working with a client that had an index.html file with this
This is a very elementary I realize, I have recently started working with asp.net
I've recently started working with RoR for some projects and I quite like the
This is the first time I'm using this website, I have recently started working
Have recently started working with Sitecore 6.2. Is there a way to preserve code
I recently started working with MVC or MVC2 to be more exact. I found
I've recently started working with an application written using Adobe Flex 3. We're using
I`m an Android developer, and recently started working on JAVA PC project for client.
I started working on CodeIgniter recently and I'm having some issues with the .htaccess
I recently started using rspec and factory_girl and I'm working on a basic control

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.