From 2d19b4877829d0ae27eb6d93f63bd27a57db08a6 Mon Sep 17 00:00:00 2001 From: syneffort Date: Wed, 21 Jun 2023 18:13:43 +0900 Subject: [PATCH] mvvm command (need to fix) --- PacticeSolution/MVVMButtonControl/App.xaml | 9 +++ PacticeSolution/MVVMButtonControl/App.xaml.cs | 17 +++++ .../MVVMButtonControl/AssemblyInfo.cs | 10 +++ .../MVVMButtonControl.csproj | 10 +++ .../MVVMButtonControl/MainWindow.xaml | 32 ++++++++++ .../MVVMButtonControl/MainWindow.xaml.cs | 28 +++++++++ .../MVVMButtonControl/Model/Buttons.cs | 37 +++++++++++ .../MVVMButtonControl/Model/RelayCommand.cs | 37 +++++++++++ .../ViewModel/ModelViewMain.cs | 62 +++++++++++++++++++ PacticeSolution/PacticeSolution.sln | 6 ++ 10 files changed, 248 insertions(+) create mode 100644 PacticeSolution/MVVMButtonControl/App.xaml create mode 100644 PacticeSolution/MVVMButtonControl/App.xaml.cs create mode 100644 PacticeSolution/MVVMButtonControl/AssemblyInfo.cs create mode 100644 PacticeSolution/MVVMButtonControl/MVVMButtonControl.csproj create mode 100644 PacticeSolution/MVVMButtonControl/MainWindow.xaml create mode 100644 PacticeSolution/MVVMButtonControl/MainWindow.xaml.cs create mode 100644 PacticeSolution/MVVMButtonControl/Model/Buttons.cs create mode 100644 PacticeSolution/MVVMButtonControl/Model/RelayCommand.cs create mode 100644 PacticeSolution/MVVMButtonControl/ViewModel/ModelViewMain.cs 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 @@ + + + + + + + +