How can I show the busy indicator when loading map data.. what's wrong with this?

2 posts, 0 answers
  1. Jon
    Jon avatar
    539 posts
    Member since:
    Apr 2004

    Posted 30 Jun 2011 Link to this post

    Hi..
    Can you tell me what is wrong with this.. and how I can show the busy indicator when loading map data.. thanks

     

     

    private void LoadData()

     

    {

     

     

    this.radBusy.IsBusy = true;

     

     

     


    DataCRMDataContext
    dc = new DataCRMDataContext();

     

     

     


    var
    query = from i in dc.VACTIVEREPs

     

     

     

    where i.RepID > 0

     

     

     

    select i;

     

     

     

    List<CRM_GIS.VACTIVEREP> lstVActiveReps = query.ToList();

     

     

     

     

    foreach (VACTIVEREP Rep in lstVActiveReps)

     

    {

     

     

    var pushpin = new Pushpin();

     

    pushpin.Background = System.Windows.Media.

     

    Brushes.Red;

     

    pushpin.ToolTip = Rep.LastName +

     

    ", " + Rep.FirstName + " " + Rep.RepNo;

     

     

     

     

    MapLayer.SetLocation(pushpin, new Location(Convert.ToDouble(Rep.lat), Convert.ToDouble(Rep.lng)));

     

    pushpin.MouseDoubleClick +=

     

    new MouseButtonEventHandler(pushpin_MouseDoubleClick);

     

    pushpin.MouseDown +=

     

    new MouseButtonEventHandler(pushpin_MouseDown);

     

     

     

     

    this.informationLayer.Items.Add(pushpin);

     

    }

     

     

    this.radBusy.IsBusy = false;

     

    }

  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 06 Jul 2011 Link to this post

    Hi Jon,

    In order to make it work you will have to use the BackgroundWorker class as illustrated in this online demo.

    Hope this helps.

    Regards,
    Konstantina
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top