public void Load() { SetUpdateButtonsEnabled(false); UIHelper.SetText(m_statusTextBlock, "Loading details, please wait..."); m_riaContext.Customers.Clear(); var query = m_riaContext.GetCustomerQuery(); // Make sure the timezons are loaded first. if (Page.TimeZones == null) { m_riaContext.GetTimeZones(Page.GetTimeZonesCompleted, new Action(() => { m_timezoneListBox.ItemsSource = Page.TimeZones; m_riaContext.Load(query, LoadBehavior.RefreshCurrent, GetCustomerCompleted, null); })); } else { m_timezoneListBox.ItemsSource = Page.TimeZones; m_riaContext.Load(query, LoadBehavior.RefreshCurrent, GetCustomerCompleted, null); } }