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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:09:04+00:00 2026-06-04T03:09:04+00:00

In the current client I am using (control rather), the way to receive/parse a

  • 0

In the current client I am using (control rather), the way to receive/parse a request is:

        var result = (IDictionary<string, object>)e.GetResultData();
        string id = result["id"].ToString();
        string name = result["name"].ToString();

        Dispatcher.BeginInvoke(() =>
        {

            id.ItemsSource = new List<String> { 
                id, 
                name};
        }

XAML looks like:

<ListBox Height="168" HorizontalAlignment="Left" Margin="204,21,0,0" Name="id" VerticalAlignment="Top" Width="239" >
   <ListBox.ItemTemplate>
     <DataTemplate>
       <StackPanel Orientation="Vertical" Margin="2">
          <TextBlock Text="{Binding}" />
       </StackPanel>
      </DataTemplate>
    </ListBox.ItemTemplate>
 </ListBox>

NEW UPDATE – FOR HELP (UNRESOLVED):
I am trying to use these strings so that I can put each item in a ListBox if more exist, opposed to just grabbing 1 item set (e.g. id, name, link).

   public class Datum
    {
        public string id { get; set; }
        public string name { get; set; }
        public string link { get; set; }
    }

Any help is beyond appreciated!

  • 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-04T03:09:06+00:00Added an answer on June 4, 2026 at 3:09 am

    You need to set the ItemsSource as something that implements IEnumerable.

    id.ItemsSource = new List<String> { id };
    

    You also need to adjust your binding to take in the DataContext since you are not passing in an object.

    <TextBlock Text="{Binding}" />
    

    If you want to expand outside of a simple String create a class that will wrap your contents and then bind to the given property.

    class Person
    {
         String id {get; set;}
         String name {get; set;}
    }
    
     <ListBox Height="168" HorizontalAlignment="Left" Margin="204,21,0,0" Name="id" VerticalAlignment="Top" Width="239" >
       <ListBox.ItemTemplate>
         <DataTemplate>
           <StackPanel Orientation="Horizontal" Margin="2">
              <TextBlock Text="{Binding id}" />
              <TextBlock Text="{Binding name}" />
           </StackPanel>
          </DataTemplate>
        </ListBox.ItemTemplate>
     </ListBox>
    

    Then in your code behind you can create an instance and assign as before.

    Person p = new Person();
    p.id = "id";
    p.name = "name";
    
    List<Person> people = new List<Person>();
    people.Add(p);
    
    id.ItemsSource = people;
    

    This is a simplistic example but should provide you with what you need.

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

Sidebar

Related Questions

Using the Source Control Explorer for TFS in Visual Studio, is there a way
My client request a flash header for his website. I'm using asp.net and a
For several applications I made for my current client I have shared user accounts.
My current project is broken down into 3 parts: Website, Desktop Client, and a
current code I've built function to do something over collection of jQuery elements: var
I am displaying calendar using calendar control. Each date is displayed as Link button.
A common scenario when using source control is to have a development branch along
In my asp .net form, I refresh a control using Ajax through the AjaxPro
I'd like to hear from people who are using distributed version control (aka distributed
I'm using a .NET 2.0 Client to communicate with an AXIS Web service. The

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.