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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:28:32+00:00 2026-06-07T19:28:32+00:00

I am trying to make an app in Visual Studio Express 2012 RC. I

  • 0

I am trying to make an app in Visual Studio Express 2012 RC. I downloaded some JSON data and deserialized it. But after binding the data to a list box, instead of showing the actual content, it is showing project-name.page-name+Datum in text blocks.

Here is the part of the XAML code:

<ListBox x:Name="listbox1" HorizontalAlignment="Left" Height="687" Margin="10,71,0,0" VerticalAlignment="Top" Width="1346" ItemsSource="{Binding data}">
    <TextBlock x:Name="textblock1" TextWrapping="Wrap" Height="50" Width="443" Text="{Binding name}" />
</ListBox>

Here is the part of xaml.cs code

public class RootObject
{
    public List<Datum> data { get; set; }

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

This is the code which I am using to de-serialize JSON data

stream loading = await load.GetStreamAsync(....);
DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(RootObject));
RootObject loaded = (RootObject) ser.ReadObject(loading);
listbox1.DataContext = loaded;

Can anyone tell me what’s wrong my the code? I am using the same thing in a Windows phone app and in that it is working fine except that I used webclient in it.

Please help.

  • 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-07T19:28:34+00:00Added an answer on June 7, 2026 at 7:28 pm

    You’ve added a UIElement to the ListBox’s Items collection. The proper way to get the item to display what you want would be to apply an ItemTemplate. You can do it inline or reference a resource.

    <ListBox ItemsSource="{Binding data}">
        <ListBox.ItemTemplate>
            <DataTemplate>
              <TextBlock Text="{Binding name}" />
            </DataTemplate>
        </ListBox.ItemTemplate
    </ListBox>
    

    It should work with that setup, though I have no tested it. If this worked, remember to mark it as the answer so others may learn from your inquiry.

    Side notes

    I’d also suggest scrubbing your sample code of any non-essential properties, for what it’s worth. And avoid hard-coded width/margin values — allow the application elements to size themselves proportionally.

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

Sidebar

Related Questions

I am trying to make some enhancements to a production web app. After quite
I am a newb to vb.net(visual studio 2008).i am trying to make an app
I am trying to make an app that parses data from Twitter using JSON
I am trying to make App Distribution from Facebook for android apps. But the
I am trying to make an app that will pass data between two servers
Im trying switch the Visual Studio asp.net mvc web app template to use MySql
Now to working with Visual Studio Solutions, but I am trying something very basic
I am trying to make an Outlook 2003 add-in using Visual Studio 2008 on
I'm trying to make an app that has three tabs, each with different but
I am trying to make my app work for all devices, but I am

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.