I'm trying to set a Listbox from a txt file. I read the file and populate a list, then I want to display it in the listbox, but I have no Datasource option available (only DataContext and DataContextChanged).
My Listbox is declared in XAML :
<ListBox Name="ScriptList"
Grid.Row="0"
Grid.Column="1"
TextBlock.FontSize="12"
Margin="2" />
Any idea why ?
Also, is it the right way to proceed (read file ->
i've used ItemsSource and it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With