Fill WPF listbox with string array

Posted by Archie on Stack Overflow See other posts from Stack Overflow or by Archie
Published on 2010-04-29T11:52:23Z Indexed on 2010/04/29 11:57 UTC
Read the original article Hit count: 381

Filed under:
|
|

Instead of adding each item one by one to the ListBox destinationList from the string array m_List like this:

foreach (object name in m_List)
{
    destinationList.Items.Add((string)name);
}

Is there any better way I can do it?

I don't want to bind the data to the destinationList since I want to delete some entries from the ListBox later on.

© Stack Overflow or respective owner

Related posts about wpf

Related posts about listbox