diff --git a/PacticeSolution/MVVMButtonControl/App.xaml b/PacticeSolution/MVVMButtonControl/App.xaml
new file mode 100644
index 0000000..358cea2
--- /dev/null
+++ b/PacticeSolution/MVVMButtonControl/App.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/PacticeSolution/MVVMButtonControl/App.xaml.cs b/PacticeSolution/MVVMButtonControl/App.xaml.cs
new file mode 100644
index 0000000..1c5016d
--- /dev/null
+++ b/PacticeSolution/MVVMButtonControl/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 MVVMButtonControl
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/PacticeSolution/MVVMButtonControl/AssemblyInfo.cs b/PacticeSolution/MVVMButtonControl/AssemblyInfo.cs
new file mode 100644
index 0000000..8b5504e
--- /dev/null
+++ b/PacticeSolution/MVVMButtonControl/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/MVVMButtonControl/MVVMButtonControl.csproj b/PacticeSolution/MVVMButtonControl/MVVMButtonControl.csproj
new file mode 100644
index 0000000..4106cb0
--- /dev/null
+++ b/PacticeSolution/MVVMButtonControl/MVVMButtonControl.csproj
@@ -0,0 +1,10 @@
+
+
+
+ WinExe
+ net6.0-windows
+ enable
+ true
+
+
+
diff --git a/PacticeSolution/MVVMButtonControl/MainWindow.xaml b/PacticeSolution/MVVMButtonControl/MainWindow.xaml
new file mode 100644
index 0000000..29fe560
--- /dev/null
+++ b/PacticeSolution/MVVMButtonControl/MainWindow.xaml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/PacticeSolution/MVVMButtonControl/MainWindow.xaml.cs b/PacticeSolution/MVVMButtonControl/MainWindow.xaml.cs
new file mode 100644
index 0000000..bb06075
--- /dev/null
+++ b/PacticeSolution/MVVMButtonControl/MainWindow.xaml.cs
@@ -0,0 +1,28 @@
+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 MVVMButtonControl
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/PacticeSolution/MVVMButtonControl/Model/Buttons.cs b/PacticeSolution/MVVMButtonControl/Model/Buttons.cs
new file mode 100644
index 0000000..3862f06
--- /dev/null
+++ b/PacticeSolution/MVVMButtonControl/Model/Buttons.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+
+namespace MVVMButtonControl.Model
+{
+ internal class Buttons : INotifyPropertyChanged
+ {
+ private Brush _selectedColor = Brushes.Transparent;
+
+ public string Name { get; set; }
+
+ public Brush SelectedColor
+ {
+ get { return _selectedColor; }
+ set
+ {
+ if (_selectedColor != value)
+ _selectedColor = value;
+
+ OnPropertyChanged("SelectedColor");
+ }
+ }
+
+ public event PropertyChangedEventHandler? PropertyChanged;
+
+
+ protected void OnPropertyChanged(string propertyName)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+}
diff --git a/PacticeSolution/MVVMButtonControl/Model/RelayCommand.cs b/PacticeSolution/MVVMButtonControl/Model/RelayCommand.cs
new file mode 100644
index 0000000..c780a3a
--- /dev/null
+++ b/PacticeSolution/MVVMButtonControl/Model/RelayCommand.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Input;
+
+namespace MVVMButtonControl.Model
+{
+ internal class RelayCommand : ICommand
+ {
+ private Action _execute;
+ private Predicate _canExecute;
+
+ public event EventHandler? CanExecuteChanged
+ {
+ add { CommandManager.RequerySuggested += value; }
+ remove { CommandManager.RequerySuggested -= value; }
+ }
+
+ public RelayCommand(Action execute, Predicate canExecute = null)
+ {
+ _execute = execute;
+ _canExecute = canExecute;
+ }
+
+ public bool CanExecute(object? parameter)
+ {
+ return _canExecute?.Invoke((T)parameter) ?? true;
+ }
+
+ public void Execute(object? parameter)
+ {
+ _execute((T)parameter);
+ }
+ }
+}
diff --git a/PacticeSolution/MVVMButtonControl/ViewModel/ModelViewMain.cs b/PacticeSolution/MVVMButtonControl/ViewModel/ModelViewMain.cs
new file mode 100644
index 0000000..06b51f3
--- /dev/null
+++ b/PacticeSolution/MVVMButtonControl/ViewModel/ModelViewMain.cs
@@ -0,0 +1,62 @@
+using MVVMButtonControl.Model;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+
+namespace MVVMButtonControl.ViewModel
+{
+ internal class ModelViewMain
+ {
+ public ObservableCollection _buttonCollections;
+
+ public ICommand TestCommand { get; private set; }
+
+ public ICommand SubButtonCommand { get; private set; }
+
+
+ public ModelViewMain()
+ {
+ _buttonCollections = new ObservableCollection();
+ this.TestCommand = new RelayCommand