diff --git a/WPF控件.sln b/WPF控件.sln index e5c156e..5f41ee6 100644 --- a/WPF控件.sln +++ b/WPF控件.sln @@ -44,6 +44,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF控件-16-ProgressBar", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF控件-17-日期控件", "WPF控件-17-日期控件\WPF控件-17-日期控件.csproj", "{2F1CFE81-5AFC-4E79-A1FA-AABD7B6471D6}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF绑定元素-1-示例", "WPF绑定元素-1-示例\WPF绑定元素-1-示例.csproj", "{4AC0C9A3-D0F3-458C-AB1F-A71027447202}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -138,5 +140,9 @@ Global {2F1CFE81-5AFC-4E79-A1FA-AABD7B6471D6}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F1CFE81-5AFC-4E79-A1FA-AABD7B6471D6}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F1CFE81-5AFC-4E79-A1FA-AABD7B6471D6}.Release|Any CPU.Build.0 = Release|Any CPU + {4AC0C9A3-D0F3-458C-AB1F-A71027447202}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4AC0C9A3-D0F3-458C-AB1F-A71027447202}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4AC0C9A3-D0F3-458C-AB1F-A71027447202}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4AC0C9A3-D0F3-458C-AB1F-A71027447202}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/WPF绑定元素-1-示例/App.xaml b/WPF绑定元素-1-示例/App.xaml new file mode 100644 index 0000000..5442451 --- /dev/null +++ b/WPF绑定元素-1-示例/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/WPF绑定元素-1-示例/App.xaml.cs b/WPF绑定元素-1-示例/App.xaml.cs new file mode 100644 index 0000000..50db8a6 --- /dev/null +++ b/WPF绑定元素-1-示例/App.xaml.cs @@ -0,0 +1,12 @@ +using System.Configuration; +using System.Data; +using System.Windows; + +namespace WPF元素绑定_1_示例; + +/// +/// Interaction logic for App.xaml +/// +public partial class App : Application +{ +} \ No newline at end of file diff --git a/WPF绑定元素-1-示例/AssemblyInfo.cs b/WPF绑定元素-1-示例/AssemblyInfo.cs new file mode 100644 index 0000000..4a05c7d --- /dev/null +++ b/WPF绑定元素-1-示例/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) +)] \ No newline at end of file diff --git a/WPF绑定元素-1-示例/MainWindow.xaml b/WPF绑定元素-1-示例/MainWindow.xaml new file mode 100644 index 0000000..f6584f0 --- /dev/null +++ b/WPF绑定元素-1-示例/MainWindow.xaml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WPF绑定元素-1-示例/MainWindow.xaml.cs b/WPF绑定元素-1-示例/MainWindow.xaml.cs new file mode 100644 index 0000000..8f87d04 --- /dev/null +++ b/WPF绑定元素-1-示例/MainWindow.xaml.cs @@ -0,0 +1,29 @@ +using System.Windows; + +namespace WPF元素绑定_1_示例; + +/// +/// Interaction logic for MainWindow.xaml +/// +public partial class MainWindow : Window +{ + public MainWindow() + { + InitializeComponent(); + } + + private void SetLarge_OnClick(object sender, RoutedEventArgs e) + { + SliderFontSize.Value = 100; + } + + private void SetNormal_OnClick(object sender, RoutedEventArgs e) + { + SliderFontSize.Value = 40; + } + + private void SetSmall_OnClick(object sender, RoutedEventArgs e) + { + SliderFontSize.Value = 10; + } +} \ No newline at end of file diff --git a/WPF绑定元素-1-示例/WPF绑定元素-1-示例.csproj b/WPF绑定元素-1-示例/WPF绑定元素-1-示例.csproj new file mode 100644 index 0000000..7cb79da --- /dev/null +++ b/WPF绑定元素-1-示例/WPF绑定元素-1-示例.csproj @@ -0,0 +1,12 @@ + + + + WinExe + net8.0-windows + WPF元素绑定_1_示例 + enable + enable + true + + +