天天看點

WPF備忘錄六(資料綁定篇)

以下示例代碼通過ListBox來綁定一個實體類的資料,如下:

1、建立一個類Student.cs檔案

MainWindow.xaml

MainWindow.xaml.cs檔案内容: