About 86 results
Open links in new tab
  1. C#: easiest way to populate a ListBox from a List

    Dec 1, 2010 · If I have a list of strings, eg: List<string> MyList = new List<string>(); MyList.Add("HELLO"); MyList.Add("WORLD"); Is there an easy way to populate a ListBox …

  2. How to add headers to a multicolumn listbox in an Excel userform …

    In your VBA, load ListBox row1 with the desired headers. In your VBA for the action yourListBoxName_Click, enter the following code: yourComboBoxName.Activate` …

  3. What is the proper way to load up a ListBox? - Stack Overflow

    Nov 20, 2008 · Then you can take a list consisting of your datatype and cram it into the ListBox via AddRange() as follows: ListBox l; List<MyDataType> myItems = new List<MyDataType>(); …

  4. Adding items in a Listbox with multiple columns

    Aug 7, 2011 · How can I add items in a list with 2 columns? It adds the items just in the first column if I use ListBox.AddItem. I want to add items in the 2nd column too. Thanks!

  5. c# - Right Click to select items in a ListBox - Stack Overflow

    private void AccountItemsT33_OnMouseRightButtonUp(object sender, MouseButtonEventArgs e) { // If have selected an item via left click, then do a right click, need to disable that initial …

  6. How to bind Dictionary to ListBox in WinForms - Stack Overflow

    Mar 31, 2020 · Whenever something changes in ListBox, an eventHandler method will add/remove same thing from Dictionary.

  7. c# - WPF Listbox binding - Stack Overflow

    Feb 21, 2012 · The Listbox populates properly with items from the ClinicList which is a list of all possible clinics. However, I cannot get the Clinics list from the physician object to bind so that …

  8. c# - WPF Listbox selectionchanged MVVM - Stack Overflow

    Sep 23, 2013 · <ListBox ItemsSource="{Binding SelectedItem.DuplicateSecurities, ElementName=dataGridOrders}" SelectedItem="{Binding SelectedItem.Security, …

  9. Binding ObservableCollection to WPF ListBox - Stack Overflow

    Mar 19, 2012 · Try to use the MvvM patern so in the View you can define the ListBox like this: <ListBox ItemsSource="{Binding Path=Log, UpdateSourceTrigger=PropertyChanged}"/> Then …

  10. c# - ListBox SelectedItems Binding - Stack Overflow

    I want to bind Listbox selectedItems to array. But .NET throws exception at runtime. d.SetBinding(ListBox.SelectedItemsProperty, new Binding { Source = SomeArray }); Where d …

Refresh