c# - What is the equivalent of DataSource for a WPF ListBox? -


i'm trying set listbox txt file. read file , populate list, want display in listbox, have no datasource option available (only datacontext , datacontextchanged).

my listbox declared in xaml :

    <listbox name="scriptlist"           grid.row="0"         grid.column="1"         textblock.fontsize="12"         margin="2" /> 

any idea why ?

also, right way proceed (read file ->

i've used itemssource , works.


Comments