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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:00:24+00:00 2026-06-10T16:00:24+00:00

I have an IEnumerable which isgetting values from JSON in pagebehind: IEnumerable jsonData =

  • 0

I have an IEnumerable which isgetting values from JSON in pagebehind:

   IEnumerable jsonData = default(IEnumerable);
   jsonData = GetJsonValues(URL);

Now I have a collection which contains :

Title = “Some Title” and
Thumbnail = “URI as String”

Now I have my XAML Containing ListBox:

 <ListBox Width="480" Height="280" x:Name="listBoxJsonData" />

How do I bind jsonData with listBoxJsonData.

I dont want to use listBoxJsonData.ItemsSource = jsonData;

  • 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-10T16:00:26+00:00Added an answer on June 10, 2026 at 4:00 pm

    Create a property of it and use MVVM pattern to bind using DataContext.

    This way (Not tested) inside a new class say ViewModel.cs

    private IEnumerable jsonData;
    
    public IEnumerable GetJSonData
    {
        get
        {
            if (jsonData == null)
            {
                jsonData = GetJsonValues("http://www.viki.com/api/v2/channels.json");
            }
            return jsonData;
        }
    }
    

    and in XAML

    <ListBox Width="480" Height="280" x:Name="listBoxJsonData" 
             ItemSource="{Binding 
                          ElementName=Name_of_Window_where_this_listbox_is, 
                          Path=GetJSonData}" />
    

    and in window constructor

    this.DataContext = new ViewModel();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have IEnumerable which contains number Data inside it. Edit The IEnumerable is from
I have an IEnumerable collection, which is hierarchical in that one element contains several
I have an IEnumerable<KeyValuePair<string,string>> , from which I would like, ideally, an anonymous object
I have the following objects. An IEnumerable <Agency > Agencies, which then contains BusinessUnits
I have a IEnumerable collection of objects. The objects have a field LastedUpdated which
I have a collection of objects as Dim XXX As IEnumerable(Of MyObject) which has
So I have an IEnumerable<string> which can contain values that can be parsed as
I have following ViewModel (TripSearchView) which contains IEnumerable(of AffiliateComponentTypeView) property, I have to populate
I have an IEnumerable<Item> where Item has a property named widgets which contains xml
I have a List which contains some values. Example: List<object> testData = new List

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.