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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:10:19+00:00 2026-06-03T06:10:19+00:00

When my view wants the value of LogoStation, it returns null because my program

  • 0

When my view wants the value of LogoStation, it returns null because my program has not yet executed LoadStation_Completed.

I want my program waits that LoadStation_Completed is executed before continuing.

Thx

public class Infos
{
    #region propriétés

    private DataServiceCollection<SyndicObject> _infosStation;
    public DataServiceCollection<SyndicObject> InfosStation
    {
        get
        {
            return _infosStation;
        }
        set
        {
            _infosStation = value;
        }
    }

    #endregion

    string nameStation;
    public event PropertyChangedEventHandler PropertyChanged;

    public void NotifyPropertyChanged(string propertyName)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this,
                new PropertyChangedEventArgs(propertyName));
        }
    }

    private ImageSource _logoStation;
    public ImageSource LogoStation
    {
        get
        {
            return _logoStation;
        }
        set
        {
            _logoStation = value;
            NotifyPropertyChanged("LogoStation");
        }
    }

    public Infos(string station)
    {
        nameStation = station;
        getInfos();
    }

    public void getInfos()
    {
        SyndicationContext service = new SyndicationContext(new Uri("http://test/817bee9d-faf4-4680-9d05-e41c2c90ae5a/"));

        IQueryable<SyndicObject> requete = (from objectSki in service.Objects
                                           where objectSki.NOMSTATION == nameStation
                                           select objectSki);

        Deployment.Current.Dispatcher.BeginInvoke(() =>
        {
            InfosStation = new DataServiceCollection<SyndicObject>();
            InfosStation.LoadCompleted += new EventHandler<LoadCompletedEventArgs>(InfoStation_LoadCompleted);   
            InfosStation.LoadAsync(requete);
        }
        );
    }

    void InfoStation_LoadCompleted(object sender, LoadCompletedEventArgs e)
    {
        LogoStation = new BitmapImage(new Uri(@"http://test/upload/" + InfosStation[0].LOGO, UriKind.Absolute));
    }
}
  • 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-03T06:10:20+00:00Added an answer on June 3, 2026 at 6:10 am

    By using the property setter you are using NotifyPropertyChanged (correctly) to tell the UI bound to LogoStation that it has been updated. This should mean that the UI will display nothing initially and then the image when the load has completed.

    Without seeing your view code what you have here looks correct – apart from the fact that your Infos class doesn’t inherit from INotifyPropertyChanged. This means that the event never gets sent.

    Update your class definition and you should be good to go.

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

Sidebar

Related Questions

I want to access the value of a view controller data member variables in
I want to select a value in a Grid view cell on aspx page.
How is this possibly not ethical? The client wants an online interface to view
In my view I want to add the text user enter in a textarea
On each cell of my table view I want to have a bar that
I have Auto completed text view,i want to filter the items present in the
I have a list of images in grid view.I want to display a gallery
I am using the jquery ui datepicker inline mode view I want to be
I am making an app in which on one of the view I want
I've created a Master-Detail Application with Xcode 4.3. In the Master View I want

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.