From 0132203f2498423749ef53b52d75df4055707eff Mon Sep 17 00:00:00 2001 From: syneffort Date: Thu, 29 Jun 2023 10:18:17 +0900 Subject: [PATCH] grid(panel) shared size --- PacticeSolution/BindingSample/App.xaml | 9 +++ PacticeSolution/BindingSample/App.xaml.cs | 17 +++++ PacticeSolution/BindingSample/AssemblyInfo.cs | 10 +++ .../BindingSample/BindingSample.csproj | 10 +++ PacticeSolution/BindingSample/MainWindow.xaml | 46 +++++++++++ .../BindingSample/MainWindow.xaml.cs | 28 +++++++ .../BindingSample/Model/Customer.cs | 55 ++++++++++++++ .../BindingSample/Model/Customers.cs | 14 ++++ PacticeSolution/GridSharedSample/App.xaml | 9 +++ PacticeSolution/GridSharedSample/App.xaml.cs | 17 +++++ .../GridSharedSample/AssemblyInfo.cs | 10 +++ .../GridSharedSample/GridSharedSample.csproj | 10 +++ .../GridSharedSample/MainWindow.xaml | 76 +++++++++++++++++++ .../GridSharedSample/MainWindow.xaml.cs | 28 +++++++ PacticeSolution/PacticeSolution.sln | 26 +++++-- 15 files changed, 358 insertions(+), 7 deletions(-) create mode 100644 PacticeSolution/BindingSample/App.xaml create mode 100644 PacticeSolution/BindingSample/App.xaml.cs create mode 100644 PacticeSolution/BindingSample/AssemblyInfo.cs create mode 100644 PacticeSolution/BindingSample/BindingSample.csproj create mode 100644 PacticeSolution/BindingSample/MainWindow.xaml create mode 100644 PacticeSolution/BindingSample/MainWindow.xaml.cs create mode 100644 PacticeSolution/BindingSample/Model/Customer.cs create mode 100644 PacticeSolution/BindingSample/Model/Customers.cs create mode 100644 PacticeSolution/GridSharedSample/App.xaml create mode 100644 PacticeSolution/GridSharedSample/App.xaml.cs create mode 100644 PacticeSolution/GridSharedSample/AssemblyInfo.cs create mode 100644 PacticeSolution/GridSharedSample/GridSharedSample.csproj create mode 100644 PacticeSolution/GridSharedSample/MainWindow.xaml create mode 100644 PacticeSolution/GridSharedSample/MainWindow.xaml.cs diff --git a/PacticeSolution/BindingSample/App.xaml b/PacticeSolution/BindingSample/App.xaml new file mode 100644 index 0000000..ad1f337 --- /dev/null +++ b/PacticeSolution/BindingSample/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/PacticeSolution/BindingSample/App.xaml.cs b/PacticeSolution/BindingSample/App.xaml.cs new file mode 100644 index 0000000..7db91a7 --- /dev/null +++ b/PacticeSolution/BindingSample/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 BindingSample +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/PacticeSolution/BindingSample/AssemblyInfo.cs b/PacticeSolution/BindingSample/AssemblyInfo.cs new file mode 100644 index 0000000..8b5504e --- /dev/null +++ b/PacticeSolution/BindingSample/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/BindingSample/BindingSample.csproj b/PacticeSolution/BindingSample/BindingSample.csproj new file mode 100644 index 0000000..4106cb0 --- /dev/null +++ b/PacticeSolution/BindingSample/BindingSample.csproj @@ -0,0 +1,10 @@ + + + + WinExe + net6.0-windows + enable + true + + + diff --git a/PacticeSolution/BindingSample/MainWindow.xaml b/PacticeSolution/BindingSample/MainWindow.xaml new file mode 100644 index 0000000..b04c1bd --- /dev/null +++ b/PacticeSolution/BindingSample/MainWindow.xaml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PacticeSolution/BindingSample/MainWindow.xaml.cs b/PacticeSolution/BindingSample/MainWindow.xaml.cs new file mode 100644 index 0000000..40d8721 --- /dev/null +++ b/PacticeSolution/BindingSample/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 BindingSample +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/PacticeSolution/BindingSample/Model/Customer.cs b/PacticeSolution/BindingSample/Model/Customer.cs new file mode 100644 index 0000000..0044561 --- /dev/null +++ b/PacticeSolution/BindingSample/Model/Customer.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BindingSample.Model +{ + internal class Customer : INotifyPropertyChanged + { + private string _name; + private string _tel; + + public event PropertyChangedEventHandler? PropertyChanged; + + + public Customer() : this("Name", "Tel") + { + + } + + public Customer(string name, string tel) + { + _name = name; + _tel = tel; + } + + public string Name + { + get { return _name; } + set + { + _name = value; + OnPropertyChanged(nameof(Name)); + } + } + + public string Tel + { + get { return _tel; } + set + { + _tel = value; + OnPropertyChanged(nameof(Tel)); + } + } + + private void OnPropertyChanged(string propertyName) + { + if (this.PropertyChanged != null) + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } +} diff --git a/PacticeSolution/BindingSample/Model/Customers.cs b/PacticeSolution/BindingSample/Model/Customers.cs new file mode 100644 index 0000000..a234676 --- /dev/null +++ b/PacticeSolution/BindingSample/Model/Customers.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BindingSample.Model +{ + internal class Customers : ObservableCollection + { + + } +} diff --git a/PacticeSolution/GridSharedSample/App.xaml b/PacticeSolution/GridSharedSample/App.xaml new file mode 100644 index 0000000..bffd7e1 --- /dev/null +++ b/PacticeSolution/GridSharedSample/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/PacticeSolution/GridSharedSample/App.xaml.cs b/PacticeSolution/GridSharedSample/App.xaml.cs new file mode 100644 index 0000000..a76d6c7 --- /dev/null +++ b/PacticeSolution/GridSharedSample/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 GridSharedSample +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/PacticeSolution/GridSharedSample/AssemblyInfo.cs b/PacticeSolution/GridSharedSample/AssemblyInfo.cs new file mode 100644 index 0000000..8b5504e --- /dev/null +++ b/PacticeSolution/GridSharedSample/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/GridSharedSample/GridSharedSample.csproj b/PacticeSolution/GridSharedSample/GridSharedSample.csproj new file mode 100644 index 0000000..4106cb0 --- /dev/null +++ b/PacticeSolution/GridSharedSample/GridSharedSample.csproj @@ -0,0 +1,10 @@ + + + + WinExe + net6.0-windows + enable + true + + + diff --git a/PacticeSolution/GridSharedSample/MainWindow.xaml b/PacticeSolution/GridSharedSample/MainWindow.xaml new file mode 100644 index 0000000..503d279 --- /dev/null +++ b/PacticeSolution/GridSharedSample/MainWindow.xaml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PacticeSolution/GridSharedSample/MainWindow.xaml.cs b/PacticeSolution/GridSharedSample/MainWindow.xaml.cs new file mode 100644 index 0000000..b91c066 --- /dev/null +++ b/PacticeSolution/GridSharedSample/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 GridSharedSample +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/PacticeSolution/PacticeSolution.sln b/PacticeSolution/PacticeSolution.sln index 315f6d3..cbfeda8 100644 --- a/PacticeSolution/PacticeSolution.sln +++ b/PacticeSolution/PacticeSolution.sln @@ -25,19 +25,23 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVMButtonControl", "MVVMBu EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataGridEventTriggerSample", "DataGridEventTriggerSample\DataGridEventTriggerSample.csproj", "{48CCBA2F-A583-4DAF-9F64-B9642CDB49FF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVMDataGridBinding", "MVVMDataGridBinding\MVVMDataGridBinding.csproj", "{22B968EB-0566-474B-8B1C-105E24727638}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVMDataGridBinding", "MVVMDataGridBinding\MVVMDataGridBinding.csproj", "{22B968EB-0566-474B-8B1C-105E24727638}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageLoader", "ImageLoader\ImageLoader.csproj", "{F65ED213-2F48-4370-B327-FC1F4AFF1E66}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageLoader", "ImageLoader\ImageLoader.csproj", "{F65ED213-2F48-4370-B327-FC1F4AFF1E66}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlUISample", "XamlUISample\XamlUISample.csproj", "{CBB0126E-291E-47F0-82D4-B7D78439BC4C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XamlUISample", "XamlUISample\XamlUISample.csproj", "{CBB0126E-291E-47F0-82D4-B7D78439BC4C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DependencyPropertySample", "DependencyProperty\DependencyPropertySample.csproj", "{7DED7470-62BB-4042-B161-98F9605046B2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DependencyPropertySample", "DependencyProperty\DependencyPropertySample.csproj", "{7DED7470-62BB-4042-B161-98F9605046B2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVVMComboBoxSample", "MVVMComboBoxSample\MVVMComboBoxSample.csproj", "{86DDE4C6-1359-4EB7-BEE6-13EC137F081D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVVMComboBoxSample", "MVVMComboBoxSample\MVVMComboBoxSample.csproj", "{86DDE4C6-1359-4EB7-BEE6-13EC137F081D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ControlTemplateSample", "ControlTemplateSample\ControlTemplateSample.csproj", "{F96483CE-6056-4DC5-8802-CE663BACB4B4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControlTemplateSample", "ControlTemplateSample\ControlTemplateSample.csproj", "{F96483CE-6056-4DC5-8802-CE663BACB4B4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ContentProperty", "ContentProperty\ContentProperty.csproj", "{26DCE4C7-777A-42D4-8475-CAF9A0DC6781}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ContentProperty", "ContentProperty\ContentProperty.csproj", "{26DCE4C7-777A-42D4-8475-CAF9A0DC6781}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BindingSample", "BindingSample\BindingSample.csproj", "{E7E2D1BF-97F5-4C77-8F96-D2882805EFF5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GridSharedSample", "GridSharedSample\GridSharedSample.csproj", "{32927DD0-81D5-48C7-BA39-3446651DF897}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -117,6 +121,14 @@ Global {26DCE4C7-777A-42D4-8475-CAF9A0DC6781}.Debug|Any CPU.Build.0 = Debug|Any CPU {26DCE4C7-777A-42D4-8475-CAF9A0DC6781}.Release|Any CPU.ActiveCfg = Release|Any CPU {26DCE4C7-777A-42D4-8475-CAF9A0DC6781}.Release|Any CPU.Build.0 = Release|Any CPU + {E7E2D1BF-97F5-4C77-8F96-D2882805EFF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7E2D1BF-97F5-4C77-8F96-D2882805EFF5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7E2D1BF-97F5-4C77-8F96-D2882805EFF5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7E2D1BF-97F5-4C77-8F96-D2882805EFF5}.Release|Any CPU.Build.0 = Release|Any CPU + {32927DD0-81D5-48C7-BA39-3446651DF897}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32927DD0-81D5-48C7-BA39-3446651DF897}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32927DD0-81D5-48C7-BA39-3446651DF897}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32927DD0-81D5-48C7-BA39-3446651DF897}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE