diff --git a/WPF基础-11-动态布局/App.xaml b/WPF基础-11-动态布局/App.xaml new file mode 100644 index 0000000..898d22a --- /dev/null +++ b/WPF基础-11-动态布局/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/WPF基础-11-动态布局/App.xaml.cs b/WPF基础-11-动态布局/App.xaml.cs new file mode 100644 index 0000000..7eb470b --- /dev/null +++ b/WPF基础-11-动态布局/App.xaml.cs @@ -0,0 +1,12 @@ +using System.Configuration; +using System.Data; +using System.Windows; + +namespace WPF基础_11_动态布局; + +/// +/// Interaction logic for App.xaml +/// +public partial class App : Application +{ +} \ No newline at end of file diff --git a/WPF基础-11-动态布局/AssemblyInfo.cs b/WPF基础-11-动态布局/AssemblyInfo.cs new file mode 100644 index 0000000..4a05c7d --- /dev/null +++ b/WPF基础-11-动态布局/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基础-11-动态布局/MainWindow.xaml b/WPF基础-11-动态布局/MainWindow.xaml new file mode 100644 index 0000000..1961fc5 --- /dev/null +++ b/WPF基础-11-动态布局/MainWindow.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + 显示长文本 + + + 这是什么什么 + + + \ No newline at end of file diff --git a/WPF基础-11-动态布局/MainWindow.xaml.cs b/WPF基础-11-动态布局/MainWindow.xaml.cs new file mode 100644 index 0000000..74cb859 --- /dev/null +++ b/WPF基础-11-动态布局/MainWindow.xaml.cs @@ -0,0 +1,30 @@ +using System.Windows; + +namespace WPF基础_11_动态布局; + +/// +/// Interaction logic for MainWindow.xaml +/// +public partial class MainWindow : Window +{ + public MainWindow() + { + InitializeComponent(); + } + + private void ChLongText_OnChecked(object sender, RoutedEventArgs e) + { + CmdPre.Content = "非常长的上一页 非常长的上一页 非常长的上一页"; + CmdNext.Content = "非常长的下一页 非常长的下一页 非常长的下一页"; + ChLongText.Content = "显示长文本 显示长文本 显示长文本"; + CmdClose.Content = "非常长的关闭按钮 非常长的关闭按钮 非常长的关闭按钮"; + } + + private void ChLongText_OnUnchecked(object sender, RoutedEventArgs e) + { + CmdPre.Content = "上一页"; + CmdNext.Content = "下一页"; + ChLongText.Content = "显示长文本"; + CmdClose.Content = "关闭"; + } +} \ No newline at end of file diff --git a/WPF基础-11-动态布局/WPF基础-11-动态布局.csproj b/WPF基础-11-动态布局/WPF基础-11-动态布局.csproj new file mode 100644 index 0000000..59a64c7 --- /dev/null +++ b/WPF基础-11-动态布局/WPF基础-11-动态布局.csproj @@ -0,0 +1,24 @@ + + + + WinExe + net8.0-windows + WPF基础_11_动态布局 + enable + enable + true + + + + + Always + + + Always + + + Always + + + + diff --git a/WPF基础-11-动态布局/public/images/003540AH4M72.jpg b/WPF基础-11-动态布局/public/images/003540AH4M72.jpg new file mode 100644 index 0000000..4aa96ac Binary files /dev/null and b/WPF基础-11-动态布局/public/images/003540AH4M72.jpg differ diff --git a/WPF基础-11-动态布局/public/logo/1.ico b/WPF基础-11-动态布局/public/logo/1.ico new file mode 100644 index 0000000..d7bff7f Binary files /dev/null and b/WPF基础-11-动态布局/public/logo/1.ico differ diff --git a/WPF基础-11-动态布局/public/logo/1.png b/WPF基础-11-动态布局/public/logo/1.png new file mode 100644 index 0000000..5dedbe2 Binary files /dev/null and b/WPF基础-11-动态布局/public/logo/1.png differ diff --git a/WPF基础.sln b/WPF基础.sln index 2c35f3a..1b48142 100644 --- a/WPF基础.sln +++ b/WPF基础.sln @@ -50,6 +50,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF基础-9-InkCanvas1", "W EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF基础-10-布局示例", "WPF基础-10-布局示例\WPF基础-10-布局示例.csproj", "{4631C727-5394-44FC-84D7-DE1DE0622EF2}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF基础-11-动态布局", "WPF基础-11-动态布局\WPF基础-11-动态布局.csproj", "{376F75D0-937A-46A3-99E6-7260DD975D93}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -156,5 +158,9 @@ Global {4631C727-5394-44FC-84D7-DE1DE0622EF2}.Debug|Any CPU.Build.0 = Debug|Any CPU {4631C727-5394-44FC-84D7-DE1DE0622EF2}.Release|Any CPU.ActiveCfg = Release|Any CPU {4631C727-5394-44FC-84D7-DE1DE0622EF2}.Release|Any CPU.Build.0 = Release|Any CPU + {376F75D0-937A-46A3-99E6-7260DD975D93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {376F75D0-937A-46A3-99E6-7260DD975D93}.Debug|Any CPU.Build.0 = Debug|Any CPU + {376F75D0-937A-46A3-99E6-7260DD975D93}.Release|Any CPU.ActiveCfg = Release|Any CPU + {376F75D0-937A-46A3-99E6-7260DD975D93}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal