private void client_GetCategoriesWithProductsCompleted(object sender, GetCategoriesWithProductsCompletedEventArgs e)
 {
     try
     {
         lstCategories.ItemsSource = e.Result;
     }
     catch (Exception err)
     {
         lblError.Text = "Failed to contact service.";
     }
 }
 private void client_GetCategoriesWithProductsCompleted(object sender, GetCategoriesWithProductsCompletedEventArgs e)
 {
     try
     {
         treeCategories.ItemsSource = e.Result;
         lblStatus.Text             = "Received results from web service.";
     }
     catch (Exception err)
     {
         lblStatus.Text = "An error occured: " + err.Message;
     }
 }