diff --git a/3-WPF命令.sln b/3-WPF命令.sln index 14ae26f..0b163bf 100644 --- a/3-WPF命令.sln +++ b/3-WPF命令.sln @@ -28,6 +28,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "5-WPF样式和行为-4关 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "5-WPF样式和行为-5多层样式", "5-WPF样式和行为-5多层样式\5-WPF样式和行为-5多层样式.csproj", "{343C9079-551B-4457-91E1-E927D758B423}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "5-WPF样式和行为-6通过类型自动应用样式", "5-WPF样式和行为-6通过类型自动应用样式\5-WPF样式和行为-6通过类型自动应用样式.csproj", "{5C42CCDB-5FF0-48FB-AF36-B6280850C74C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -90,5 +92,9 @@ Global {343C9079-551B-4457-91E1-E927D758B423}.Debug|Any CPU.Build.0 = Debug|Any CPU {343C9079-551B-4457-91E1-E927D758B423}.Release|Any CPU.ActiveCfg = Release|Any CPU {343C9079-551B-4457-91E1-E927D758B423}.Release|Any CPU.Build.0 = Release|Any CPU + {5C42CCDB-5FF0-48FB-AF36-B6280850C74C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5C42CCDB-5FF0-48FB-AF36-B6280850C74C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5C42CCDB-5FF0-48FB-AF36-B6280850C74C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5C42CCDB-5FF0-48FB-AF36-B6280850C74C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/5-WPF样式和行为-6通过类型自动应用样式/5-WPF样式和行为-6通过类型自动应用样式.csproj b/5-WPF样式和行为-6通过类型自动应用样式/5-WPF样式和行为-6通过类型自动应用样式.csproj new file mode 100644 index 0000000..0fb6219 --- /dev/null +++ b/5-WPF样式和行为-6通过类型自动应用样式/5-WPF样式和行为-6通过类型自动应用样式.csproj @@ -0,0 +1,18 @@ + + + + WinExe + net8.0-windows + _5_WPF样式和行为_6通过类型自动应用样式 + enable + enable + true + + + + + Always + + + + diff --git a/5-WPF样式和行为-6通过类型自动应用样式/App.xaml b/5-WPF样式和行为-6通过类型自动应用样式/App.xaml new file mode 100644 index 0000000..795d6df --- /dev/null +++ b/5-WPF样式和行为-6通过类型自动应用样式/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/5-WPF样式和行为-6通过类型自动应用样式/App.xaml.cs b/5-WPF样式和行为-6通过类型自动应用样式/App.xaml.cs new file mode 100644 index 0000000..3b3a527 --- /dev/null +++ b/5-WPF样式和行为-6通过类型自动应用样式/App.xaml.cs @@ -0,0 +1,12 @@ +using System.Configuration; +using System.Data; +using System.Windows; + +namespace _5_WPF样式和行为_6通过类型自动应用样式; + +/// +/// Interaction logic for App.xaml +/// +public partial class App : Application +{ +} \ No newline at end of file diff --git a/5-WPF样式和行为-6通过类型自动应用样式/AssemblyInfo.cs b/5-WPF样式和行为-6通过类型自动应用样式/AssemblyInfo.cs new file mode 100644 index 0000000..4a05c7d --- /dev/null +++ b/5-WPF样式和行为-6通过类型自动应用样式/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/5-WPF样式和行为-6通过类型自动应用样式/MainWindow.xaml b/5-WPF样式和行为-6通过类型自动应用样式/MainWindow.xaml new file mode 100644 index 0000000..d96b8a8 --- /dev/null +++ b/5-WPF样式和行为-6通过类型自动应用样式/MainWindow.xaml @@ -0,0 +1,32 @@ + + + + + + + + + + 自定义内容 + + + 更多默认的内容 + + + + \ No newline at end of file diff --git a/5-WPF样式和行为-6通过类型自动应用样式/MainWindow.xaml.cs b/5-WPF样式和行为-6通过类型自动应用样式/MainWindow.xaml.cs new file mode 100644 index 0000000..cd97529 --- /dev/null +++ b/5-WPF样式和行为-6通过类型自动应用样式/MainWindow.xaml.cs @@ -0,0 +1,23 @@ +using System.Text; +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 _5_WPF样式和行为_6通过类型自动应用样式; + +/// +/// Interaction logic for MainWindow.xaml +/// +public partial class MainWindow : Window +{ + public MainWindow() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/5-WPF样式和行为-6通过类型自动应用样式/public/003540AH4M72.jpg b/5-WPF样式和行为-6通过类型自动应用样式/public/003540AH4M72.jpg new file mode 100644 index 0000000..4aa96ac Binary files /dev/null and b/5-WPF样式和行为-6通过类型自动应用样式/public/003540AH4M72.jpg differ