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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:00:29+00:00 2026-05-24T07:00:29+00:00

I have a Movie class with a Dim _characters = New ObservableCollection(of String) Characters

  • 0

I have a Movie class with a Dim _characters = New ObservableCollection(of String)
Characters is the associated property to get and set

How can i get characters to show up in the listBox using Binding?
So far i have the following, this isn’t working as i don’t know what to put instead of ToString.

<ListBox Name="cList" ItemsSource="{Binding Characters}">

 <ItemsControl >
   <ItemsControl.ItemTemplate >
    <DataTemplate >
     <TextBox Text="{Binding ToString}"/>  
    </DataTemplate> 
   </ItemsControl.ItemTemplate> 
 </ItemsControl>

 </ListBox> 

I want them to be editable, hence a textbox.

i tried to bind Characters to TextBox directly, even that didn’t work.

Edit :
in the code i have parentGrid1.DataContext = me.movies where
parent grid holds movies.

  • 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-05-24T07:00:29+00:00Added an answer on May 24, 2026 at 7:00 am

    You cannot perform two-way binding to ObservableCollection<string>. In order to make the strings editable you have to create a class with a string get/set property as the following class Foo:

    public class Foo
    {
        string _text;
    
        public Foo(string text)
        {
            _text = text;
        }
        public string Text 
        {
            get { return _text; }
            set { _text = value; }
        }
    }
    

    Your Characters should then be of type ObservableCollection<Foo> and your XAML should be changed so that the textboxes are binding to Foo.Text:

    <ListBox ItemsSource="{Binding Characters}" >
        <ListBox.ItemTemplate >
            <DataTemplate >
                <TextBox Text="{Binding Text}"/>
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following class: public class Movie { string Name get; set; string
I have a class called Movie with the following private data members: private: string
I have something like this: class Movie { public string Title; public List<string> Genres
Let's assume I have the following domain: public class Movie { public string Id
I have a couple classes that can each have comments: class Movie < ActiveRecord::Base
I have a class Movie in it i have a start Date, a duration
I have a movie with a document class (Main.as) wich load 2 SWF: private
I have a view model like this: public class EditVM { public Media.Domain.Entities.Movie Movie
I have two entities that are something like that: public class Movie { public
I have a JAR file Movie Library.jar, its contents are depicted below: The class

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.