开发者

WPF: Populate a listbox on window load

开发者 https://www.devze.com 2023-01-02 11:57 出处:网络
How can it be done with c#?开发者_如何学C I\'m able to populate a listbox on a button click, but don\'t know how it can be done on application startup.

How can it be done with c#?

开发者_如何学C

I'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.

0

精彩评论

暂无评论...
验证码 换一张
取 消