WPF: Populate a listbox on window load
How can it be done with c#?
开发者_如何学CI'm able to populate a listbox on a button click, but don't know how it can be done on application startup.
Thanks.
Put the same code in the constructor of the form.
Double click on the form (empty space).
This will generate a Window_Loaded(...) {}; event.
Put your code between the curly braces.
精彩评论