As the error message says, List1
(a TextBox
) doesn't have an ItemsSource
property. It has a Text
property.
But that's not the only problem. Because your wordList
object is an IList. So you'll need to turn that into a plain string.
One solution would be to do this:
List1.Text = string.Join(Environment.NewLine, wordlist);
which would concatenate all of the lines together with line breaks in between.
Also make sure that your TextBox is configured properly with AcceptsReturn
set to true so that it will display the line breaks.