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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:18:11+00:00 2026-06-17T04:18:11+00:00

I have a listbox tuningList containing elements of the List<Tuning> tunings : private void

  • 0

I have a listbox tuningList containing elements of the List<Tuning> tunings:

  private void LoadList() {
            foreach (Tuning tuning in tunings)
                tuningList.Items.Add(tuning);
        }

At certain point in the app I want to delete some elements in the tunings and update the listbox

 int selectionIndex = tuningList.SelectedIndex;
            if (selectionIndex >= 0) {
                pageTitle.Text = "Deleted tuning";
                tunings.RemoveAt(selectionIndex);
               // tuningList.Items.RemoveAt(selectionIndex);
                saveData(saver); //saves data to isolated storage 

            } 

but after that listbox does not update itself.

EDIT: I did not bind the listbox to the collection via XAML, I added the elements by the LoadList();

<ListBox x:Name="tuningList" Margin="8,0,8,152" Tap="tuningList_Tap"/>

EDIT2:

<ListBox x:Name="tuningList" Margin="8,0,8,152" ItemsSource=tunings.Items Tap="tuningList_Tap"/>

EDIT3:

<ListBox  x:Name="tuningList" Margin="8,0,8,152"  DataContext="{Binding RelativeSource={RelativeSource Self}}" ItemsSource="{Binding tunings}" Tap="tuningList_Tap"/>   
  • 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-17T04:18:13+00:00Added an answer on June 17, 2026 at 4:18 am

    My piece of advice in this case would be binding your ListBox control to an ObservableCollection<T>, which will automatically notify the view when an item is added or removed due to the fact that it implements INotifyCollectionChanged.

    You need to bind the collection to the ListBox. Instead of using LoadList set the ItemsSource in XAML. Otherwise nothing will happen.

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

Sidebar

Related Questions

I have a listBox, which obviously get filled up with list items through data
I have a listbox bound to a list of business objects. The items in
I have a listbox with list item values like B1, B2,...B7000...etc. Everytime when items
I have a ListBox with items that fill TextBox es. How do I identify
I have a listbox that I am populating using a foreach. (Long explanation of
I have a ListBox with a list of URLs. I have 2 threads taking
I have ListBox data bind to list of users (collection): usersListBox.DataSource = null; usersListBox.DataSource
I have a listbox which populated from using a datatable. I have a Add
I have one Listbox and a List of data I want to bind the
I have a listbox with runat=server Items are added to this listbox on 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.