diff --git a/PacticeSolution/ContentProperty/ContentProperty.csproj b/PacticeSolution/ContentProperty/ContentProperty.csproj
index c874593..60127e0 100644
--- a/PacticeSolution/ContentProperty/ContentProperty.csproj
+++ b/PacticeSolution/ContentProperty/ContentProperty.csproj
@@ -25,4 +25,12 @@
+
+
+ True
+ True
+ Resource.resx
+
+
+
diff --git a/PacticeSolution/LabelTextBlockTextBoxSample/MainWindow.xaml b/PacticeSolution/LabelTextBlockTextBoxSample/MainWindow.xaml
index 739e722..a4228ad 100644
--- a/PacticeSolution/LabelTextBlockTextBoxSample/MainWindow.xaml
+++ b/PacticeSolution/LabelTextBlockTextBoxSample/MainWindow.xaml
@@ -38,10 +38,12 @@
-
-
-
-
+
+
+
+
+
+
diff --git a/PacticeSolution/ListBoxBindingSample/App.xaml b/PacticeSolution/ListBoxBindingSample/App.xaml
new file mode 100644
index 0000000..a0c8a27
--- /dev/null
+++ b/PacticeSolution/ListBoxBindingSample/App.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/PacticeSolution/ListBoxBindingSample/App.xaml.cs b/PacticeSolution/ListBoxBindingSample/App.xaml.cs
new file mode 100644
index 0000000..ca5ffdf
--- /dev/null
+++ b/PacticeSolution/ListBoxBindingSample/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace ListBoxBindingSample
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/PacticeSolution/ListBoxBindingSample/AssemblyInfo.cs b/PacticeSolution/ListBoxBindingSample/AssemblyInfo.cs
new file mode 100644
index 0000000..8b5504e
--- /dev/null
+++ b/PacticeSolution/ListBoxBindingSample/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/PacticeSolution/ListBoxBindingSample/ListBoxBindingSample.csproj b/PacticeSolution/ListBoxBindingSample/ListBoxBindingSample.csproj
new file mode 100644
index 0000000..4106cb0
--- /dev/null
+++ b/PacticeSolution/ListBoxBindingSample/ListBoxBindingSample.csproj
@@ -0,0 +1,10 @@
+
+
+
+ WinExe
+ net6.0-windows
+ enable
+ true
+
+
+
diff --git a/PacticeSolution/ListBoxBindingSample/MainWindow.xaml b/PacticeSolution/ListBoxBindingSample/MainWindow.xaml
new file mode 100644
index 0000000..a2789e6
--- /dev/null
+++ b/PacticeSolution/ListBoxBindingSample/MainWindow.xaml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/PacticeSolution/ListBoxBindingSample/MainWindow.xaml.cs b/PacticeSolution/ListBoxBindingSample/MainWindow.xaml.cs
new file mode 100644
index 0000000..f74ea01
--- /dev/null
+++ b/PacticeSolution/ListBoxBindingSample/MainWindow.xaml.cs
@@ -0,0 +1,96 @@
+using ListBoxBindingSample.Model;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace ListBoxBindingSample
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+
+ InitInstance();
+ }
+
+ private void InitInstance()
+ {
+ List students = new List();
+ students.Add(new Student() { Name = "Carl", Age = 23, Point = 100 });
+ students.Add(new Student() { Name = "Jackson", Age = 35, Point = 80 });
+ students.Add(new Student() { Name = "Philip", Age = 26, Point = 73 });
+ students.Add(new Student() { Name = "Sarah", Age = 43, Point = 95 });
+
+ lstMain.ItemsSource = students;
+ }
+
+ private void lstMain_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ if (lstMain.SelectedItem == null)
+ return;
+
+ tbxDisplay.Text = $"Selected student: {((Student)lstMain.SelectedItem).Name}";
+ }
+
+ private void btnSelected_Click(object sender, RoutedEventArgs e)
+ {
+ if (lstMain.SelectedItem == null)
+ {
+ MessageBox.Show("Please select a student.");
+ return;
+ }
+
+ tbxDisplay.Text = $"Selected student: {((Student)lstMain.SelectedItem).Name}";
+ }
+
+ private void btnPrevStudent_Click(object sender, RoutedEventArgs e)
+ {
+ if (lstMain.SelectedItem == null)
+ return;
+
+ int index = lstMain.SelectedIndex - 1;
+ if (index < 0)
+ index = lstMain.Items.Count - 1;
+
+ lstMain.SelectedIndex = index;
+ }
+
+ private void btnNextStudent_Click(object sender, RoutedEventArgs e)
+ {
+ if (lstMain.SelectedItem == null)
+ return;
+
+ int index = lstMain.SelectedIndex + 1;
+ if (index >= lstMain.Items.Count)
+ index = 0;
+
+ lstMain.SelectedIndex = index;
+ }
+
+ private void btnAll_Click(object sender, RoutedEventArgs e)
+ {
+ lstMain.SelectAll();
+
+ tbxDisplay.Clear();
+ foreach (Student item in lstMain.SelectedItems)
+ {
+ tbxDisplay.Text += $"Selected student: {item.Name}{Environment.NewLine}";
+ }
+ }
+ }
+}
diff --git a/PacticeSolution/ListBoxBindingSample/Model/Student.cs b/PacticeSolution/ListBoxBindingSample/Model/Student.cs
new file mode 100644
index 0000000..b17d17b
--- /dev/null
+++ b/PacticeSolution/ListBoxBindingSample/Model/Student.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ListBoxBindingSample.Model
+{
+ internal class Student
+ {
+ public string Name { get; set; }
+ public int Age { get; set; }
+ public int Point { get; set; }
+ }
+}
diff --git a/PacticeSolution/PacticeSolution.sln b/PacticeSolution/PacticeSolution.sln
index d100190..9e1536e 100644
--- a/PacticeSolution/PacticeSolution.sln
+++ b/PacticeSolution/PacticeSolution.sln
@@ -45,6 +45,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GridSharedSample", "GridSha
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LabelTextBlockTextBoxSample", "LabelTextBlockTextBoxSample\LabelTextBlockTextBoxSample.csproj", "{C1375ECE-FDD2-4C7B-B3F8-1A24F3CF051D}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ListBoxBindingSample", "ListBoxBindingSample\ListBoxBindingSample.csproj", "{71B7E9C4-C73B-4701-B702-A91AB5630580}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -135,6 +137,10 @@ Global
{C1375ECE-FDD2-4C7B-B3F8-1A24F3CF051D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C1375ECE-FDD2-4C7B-B3F8-1A24F3CF051D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C1375ECE-FDD2-4C7B-B3F8-1A24F3CF051D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {71B7E9C4-C73B-4701-B702-A91AB5630580}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {71B7E9C4-C73B-4701-B702-A91AB5630580}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {71B7E9C4-C73B-4701-B702-A91AB5630580}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {71B7E9C4-C73B-4701-B702-A91AB5630580}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE