From 3bf5173022f0e477416522b16f6dc38785ce9dd0 Mon Sep 17 00:00:00 2001 From: Dorian Zhuang Date: Sat, 2 May 2026 16:46:43 +0800 Subject: [PATCH 01/15] feat: Add Chinese documentation for various UI components - Created documentation for Button component in Chinese. - Created documentation for CheckBox component in Chinese. - Created documentation for ComboBox component in Chinese. - Created documentation for DropDownButton component in Chinese. - Created documentation for HyperlinkButton component in Chinese. - Created documentation for ToggleSwitch component in Chinese. - Added Chinese documentation for Window component, detailing its creation, styling, and usage. - Updated English documentation for Window component to correct capitalization and phrasing. --- .../02.# onboarding/index.zh-CN.mdx | 220 ++++++++++++++++++ .../01. basic-input/# button/index.zh-CN.mdx | 137 +++++++++++ .../# check-box/index.zh-CN.mdx | 136 +++++++++++ .../# combo-box/index.zh-CN.mdx | 116 +++++++++ .../# dropdown-button/index.zh-CN.mdx | 123 ++++++++++ .../# hyperlink-button/index.zh-CN.mdx | 97 ++++++++ .../# toggle-switch/index.zh-CN.mdx | 119 ++++++++++ .../04. dialogs/# window/index.en-US.mdx | 4 +- .../04. dialogs/# window/index.zh-CN.mdx | 198 ++++++++++++++++ 9 files changed, 1148 insertions(+), 2 deletions(-) create mode 100644 data/docs/ui-wpf-modern/02.# onboarding/index.zh-CN.mdx create mode 100644 data/docs/ui-wpf-modern/03. components/01. basic-input/# button/index.zh-CN.mdx create mode 100644 data/docs/ui-wpf-modern/03. components/01. basic-input/# check-box/index.zh-CN.mdx create mode 100644 data/docs/ui-wpf-modern/03. components/01. basic-input/# combo-box/index.zh-CN.mdx create mode 100644 data/docs/ui-wpf-modern/03. components/01. basic-input/# dropdown-button/index.zh-CN.mdx create mode 100644 data/docs/ui-wpf-modern/03. components/01. basic-input/# hyperlink-button/index.zh-CN.mdx create mode 100644 data/docs/ui-wpf-modern/03. components/01. basic-input/# toggle-switch/index.zh-CN.mdx create mode 100644 data/docs/ui-wpf-modern/03. components/04. dialogs/# window/index.zh-CN.mdx diff --git a/data/docs/ui-wpf-modern/02.# onboarding/index.zh-CN.mdx b/data/docs/ui-wpf-modern/02.# onboarding/index.zh-CN.mdx new file mode 100644 index 0000000..e4aa2d8 --- /dev/null +++ b/data/docs/ui-wpf-modern/02.# onboarding/index.zh-CN.mdx @@ -0,0 +1,220 @@ +# 快速开始 + +在本指南中,我们将引导您完成将 iNKORE.UI.WPF.Modern 库集成到应用程序中的过程,让您为 WPF 项目带来现代化和视觉上引人入胜的用户界面。凭借对 Fluent Design 元素的支持和灵活的自定义选项,iNKORE.UI.WPF.Modern 可以将您的应用程序转变为一个视觉上令人惊艳的体验。 + + +## 第 1 步:调整配置 + +在安装软件包之前,我们建议您对项目设置进行一些调整。在解决方案视图中右键单击项目,然后单击**属性**。 + +![右键单击项目](right-click-the-project.png) + +### 对于 .NET Framework 项目 + +如果您的 csproj 风格是旧式的,您应该看到这个界面: + +![项目属性 (旧式) ](legacy-csproj-props.png) + +:::info 提醒 + +我们强烈建议您将 csproj 文件转换为[SDK 风格](https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview),它提供更多功能和更好的体验。有关更多信息,请查看 Microsoft 的文档。 + +::: + +如果您的项目已经升级到 SDK 风格,您应该能够看到这样的界面: + +![项目属性 (SDK 风格) ](sdk-csproj-props.png) + +无论您的 csproj 文件是什么风格,请确保目标框架是 .NET Framework 4.6.2 或更高版本。 + +如果您使用的是较旧的框架版本,库可能无法正确加载。 + +### 对于 .NET Core (也包括 6.0 及更高版本) 项目 + +首先,请确保框架是 .NET 6.0 或更高版本。 + +![创建 .NET 6.0 应用](creating-dotnet-6-project.png) + +![在项目属性中设置目标框架](dotnet-6-project-props-framework.png) + +:::danger 注意! + +我们刚刚删除了对 .NET Core 3.1 和 .NET 5.0 的支持,这意味着这些框架与此库的最新版本不兼容。 + +如果您必须坚持使用这些旧版本,您仍然可以下载完整源代码并自己编译具有旧版本支持的二进制文件。但是,由于对较新 API 的一些引用,此编译可能会失败。 + +::: + +然后让我们关注**目标 OS 版本**选项。我们建议您将其设置为 `10.0.18362.0` 或更高版本以启用主题同步功能。 + +![目标 OS 版本](target-os-version.png) + +:::warning + +如果目标版本设置为 10.0,您可能会在输出目录中看到这些文件: + +![Windows RT 依赖文件](the-rt-files.png) + +这是由 .NET SDK 引起的,与我们的任何库都无关。 + +如果您在意这一点,那么将其设置为 7.0,虽然这会使这两个文件消失,但您的应用将无法跟随系统主题。 + +::: + + +:::tip + +虽然**目标 OS 版本**设置为 10.0,但您可以将**支持的 OS 版本**设置为任何您想要的版本。为了在 .NET 支持的任何 Windows 版本上运行您的应用,最好的选择是将其设置为 `7.0`。 + +![支持的 OS 版本](supported-os-version.png) + +::: + +## 第 2 步:安装软件包 + +再次右键单击您的项目,然后单击**管理 NuGet 程序包**菜单。 + +![右键单击项目](right-click-the-project.png) + +然后单击**浏览**,在搜索框中输入 `inkore`。我们所有的公开库都会出现在这里。然后选择 `iNKORE.UI.WPF.Modern` 并单击**安装**,再选择 `iNKORE.UI.WPF` 并再次单击安装。 + +![浏览 NuGet 程序包](browse-nuget-package.png) + +然后您应该看到此程序包已添加到您的依赖项列表中: + +![依赖项列表中的程序包](package-in-the-deps.png) + +:::info + +搜索时会出现一些其他库。您可以在我们的 [Github 主页](https://github.com/iNKORE-NET)及其存储库中了解更多信息。 + +::: + +:::warning 为什么是 **iNKORE.UI.WPF**? + +通常,我们使用 `iNKORE.UI.WPF` 作为所有 WPF 库的基础库。它包含在所有 WPF 库之间共享的一些常见实用程序和控件。 + +如果您在运行时看到此异常,请手动安装 `iNKORE.UI.WPF`: + +> **System.Windows.Markup.XamlParseException**: 'Initialization of 'iNKORE.UI.WPF.Modern.ThemeResources' threw an exception.' + +> [InnerException] +> FileNotFoundException: Could not load file or assembly 'iNKORE.UI.WPF, Version=######, Culture=neutral, PublicKeyToken=######'. The system cannot find the file specified. + + +当您安装 iNKORE.UI.WPF.Modern 时,iNKORE.UI.WPF 应该会自动安装。但是,由于某些原因 (可能是 NuGet 内部错误或配置错误) ,它可能不会被安装。 + +如果您找到了一种方法来确保 `iNKORE.UI.WPF` 自动安装,请告诉我们。 + +::: + +## 第 3 步:添加主题资源 + +打开根目录中的 `App.xaml` 文件,并添加命名空间声明: + +```ini +xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" +``` + +然后,在 `Application.Resources` 中,创建一个新的 `ResourceDictionary` 并添加属性 `ResourceDictionary.MergedDictionaries`。 + +在 `MergedDictionaries` 中,添加新的 `ui:ThemeResources` 和 `ui:XamlControlsResources` 实例。 + +最后,您的 `App.xaml` 文件应该如下所示: + +```xml title="App.xaml" + + + + +# highlight-start + + +# highlight-end + + + + + + + +``` + +此时,现代主题已成功添加到项目中。所有控件现在应该都具有现代风格。 + + +## 第 4 步:将样式应用到 MainWindow + +让我们将现代样式应用到主窗口。转到 `MainWindow.xaml`,首先添加命名空间声明: + +```ini +xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" +``` + +然后通过应用此附加属性让窗口使用现代样式: + +```ini +ui:WindowHelper.UseModernWindowStyle="True" +``` + +:::info + +与其他控件不同,由于安全和兼容性原因,窗口无法在不手动设置其样式的情况下全局设置样式。 + +::: + +现在,如果您运行该应用,您可以看到窗口具有现代风格的框架。您还可以使用 `ui:WindowHelper.SystemBackdropType` 属性向窗口添加背景: + +```ini +ui:WindowHelper.SystemBackdropType="Mica" +``` + +现在您的 `MainWindow.xaml` 应该如下所示: + +```xml title="MainWindow.xaml" + + + + + + + + +``` + +![仅带图标的按钮](button-with-icon-only.png) + +有关 *ui:FontIcon* 的更多信息,请[点击这里](%BASE_NAME%/components/media/font-icon) + +### 带图标和文本的按钮 + +如果你想同时显示图标和文本,最好的方式是使用 ui:IconAndText 组件。它将图标和文本组合在一起: + +```xml + +``` + +![带图标和文本的按钮](a-button-with-icon-and-text.png) + +有关 IconAndText 的更多信息,请[点击这里](%BASE_NAME%/components/media/icon-and-text) + +如果你不想使用 FontIcon,或者你想完全自定义子组件(不推荐这样做,因为这可能会增加复杂性并使维护更困难),可以尝试以下代码: + +```xml + +``` + +### 强调按钮 + +强调按钮属于高强调级别,通过使用层级和填充进行区分。它们包含对你的应用程序最重要的操作。 + +要将按钮应用为强调样式,需要将 Style 属性设置为 `{StaticResource {x:Static ui:ThemeKeys.AccentButtonStyleKey}}`。 + +```xml + ``` -![仅带图标的按钮](button-with-icon-only.png) +![仅带图标的 Button](button-with-icon-only.png) 有关 *ui:FontIcon* 的更多信息,请[点击这里](%BASE_NAME%/components/media/font-icon) -### 带图标和文本的按钮 +### 带图标和文本的 Button 如果你想同时显示图标和文本,最好的方式是使用 ui:IconAndText 组件。它将图标和文本组合在一起: @@ -65,7 +65,7 @@ private void Button_Click(object sender, RoutedEventArgs e) 有关 IconAndText 的更多信息,请[点击这里](%BASE_NAME%/components/media/icon-and-text) -如果你不想使用 FontIcon,或者你想完全自定义子组件(不推荐这样做,因为这可能会增加复杂性并使维护更困难),可以尝试以下代码: +如果你不想使用 FontIcon,或者你想完全自定义子组件 (不推荐这样做,因为这可能会增加复杂性并使维护更困难) ,可以尝试以下代码: ```xml ``` -### 强调按钮 +### 强调按钮 (Accent Button) 强调按钮属于高强调级别,通过使用层级和填充进行区分。它们包含对你的应用程序最重要的操作。 -要为按钮应用强调样式,需要将 Style 属性设置为 `{StaticResource {x:Static ui:ThemeKeys.AccentButtonStyleKey}}`。 +要为 Button 应用强调样式,需要将 Style 属性设置为 `{StaticResource {x:Static ui:ThemeKeys.AccentButtonStyleKey}}`。 ```xml +``` + +这样当鼠标移动到按钮上时,背景颜色就会变为绿色。以此方法,你可以重写任意未被硬编码的资源 (颜色、画刷、厚度、Double、动画等) 。 + +![](make-hover-green.gif) + +:::info 小许缺憾 + +在 Visual Studio 中,`x:Static` 用于 `x:Key` 时 IntelliSense 有时体验不佳,但这只是编辑器的问题,运行时代码仍然有效。 + +::: + +### 重写多个资源 + +你可以在某个容器上一次性重写多项资源,从而影响该容器及其子元素。例如,可以让所有按钮在悬停时变绿、按下时变蓝: + +```xml + +# highlight-start + + + + + +# highlight-end + + +``` + +![Red button](red-button.png) + +## 另请参阅 + +### 相关文章 + +- [Theming / Theme Resources](%BASE_NAME%/features/theming/theme-resources) + +- [Definitions / StaticResourceExtension Class](%BASE_NAME%/definitions/markup/static-resource-extension) + +### Microsoft Learn + +- [ResourceDictionary Class (WPF)](https://learn.microsoft.com/en-us/dotnet/api/system.windows.resourcedictionary) + +- [Application Resource, Content, and Data Files - WPF](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/app-development/wpf-application-resource-content-and-data-files) + +- [Merged resource dictionaries (WPF .NET)](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/systems/xaml-resources-merged-dictionaries) \ No newline at end of file From 75da1d14e8c1101586fbcbdd8736072609cbc5b9 Mon Sep 17 00:00:00 2001 From: Dorian Zhuang Date: Sat, 2 May 2026 23:22:51 +0800 Subject: [PATCH 11/15] chore: Update Chinese documentation - Updated links and descriptions in the Window, FontIcon, Frame, NavigationView, TabControl, and theming sections to use simplified Chinese. - Added new sections for WindowHelper, ToggleSwitch, BackdropType, and WindowCornerStyle with detailed descriptions and examples. - Improved consistency in terminology and formatting across various documentation files. - Added new JSON category files for theming and overrides sections to enhance navigation. Co-authored-by: Copilot --- .../02.# onboarding/index.zh-CN.mdx | 2 +- .../01. basic-input/# button/index.zh-CN.mdx | 12 +- .../# check-box/index.zh-CN.mdx | 12 +- .../# combo-box/index.zh-CN.mdx | 14 +- .../# dropdown-button/index.zh-CN.mdx | 4 +- .../# hyperlink-button/index.zh-CN.mdx | 8 +- .../# toggle-switch/index.zh-CN.mdx | 4 +- .../04. dialogs/# window/index.zh-CN.mdx | 8 +- .../06. media/# font-icon/index.zh-CN.mdx | 14 +- .../08. navigation/# frame/index.zh-CN.mdx | 14 +- .../# navigation-view/index.zh-CN.mdx | 12 +- .../# tab-control/index.zh-CN.mdx | 14 +- .../01.# theme-schemes/index.zh-CN.mdx | 12 +- .../02.# accent-color/index.zh-CN.mdx | 11 +- .../04.# elevations/index.zh-CN.mdx | 6 +- .../01. theming/category.zh-CN.json | 8 + .../01.# override-resources/index.zh-CN.mdx | 10 +- .../02. overrides/category.zh-CN.json | 8 + .../# window-helper/index.zh-CN.mdx | 165 ++++++++++++++++++ .../01.# toggle-switch/index.zh-CN.mdx | 113 ++++++++++++ .../# backdrop-type/index.zh-CN.mdx | 134 ++++++++++++++ .../# window-corner-style/index.zh-CN.mdx | 81 +++++++++ 22 files changed, 588 insertions(+), 78 deletions(-) create mode 100644 data/docs/ui-wpf-modern/04. features/01. theming/category.zh-CN.json create mode 100644 data/docs/ui-wpf-modern/04. features/02. overrides/category.zh-CN.json create mode 100644 data/docs/ui-wpf-modern/05. definitions/00. controls/00. helpers/# window-helper/index.zh-CN.mdx create mode 100644 data/docs/ui-wpf-modern/05. definitions/00. controls/01.# toggle-switch/index.zh-CN.mdx create mode 100644 data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# backdrop-type/index.zh-CN.mdx create mode 100644 data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# window-corner-style/index.zh-CN.mdx diff --git a/data/docs/ui-wpf-modern/02.# onboarding/index.zh-CN.mdx b/data/docs/ui-wpf-modern/02.# onboarding/index.zh-CN.mdx index 51c1b40..ce1b048 100644 --- a/data/docs/ui-wpf-modern/02.# onboarding/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/02.# onboarding/index.zh-CN.mdx @@ -17,7 +17,7 @@ :::info 提醒 -我们强烈建议您将 csproj 文件转换为[SDK 风格](https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview),它提供更多功能和更好的体验。有关更多信息,请查看 Microsoft 的文档。 +我们强烈建议您将 csproj 文件转换为[SDK 风格](https://learn.microsoft.com/zh-cn/dotnet/core/project-sdk/overview),它提供更多功能和更好的体验。有关更多信息,请查看 Microsoft 的文档。 ::: diff --git a/data/docs/ui-wpf-modern/03. components/01. basic-input/# button/index.zh-CN.mdx b/data/docs/ui-wpf-modern/03. components/01. basic-input/# button/index.zh-CN.mdx index f53cd26..a40dea9 100644 --- a/data/docs/ui-wpf-modern/03. components/01. basic-input/# button/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/03. components/01. basic-input/# button/index.zh-CN.mdx @@ -6,7 +6,7 @@ description: "一种响应用户输入并引发 Click 事件的控件。" Button 允许用户通过一次点击来执行操作并做出选择。它会响应来自鼠标、键盘、触控笔或其他输入设备的输入,并引发 Click 事件。 -- **类**: [System.Windows.Controls](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls)[.Button](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.button) +- **类**: [System.Windows.Controls](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls)[.Button](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.button) Button 的主要用途是在用户单击它时触发某些操作。实现这一点有两种方式: @@ -102,7 +102,7 @@ Button 通常只包含简单的字符串内容,但你可以使用任何对象 Button 控件默认带有层级边框效果。你可以使用 `ui:ElevationBorder` 来自定义其层级效果。 -更多信息请参见 [Theming / Elevations](%BASE_NAME%/features/theming/elevations)。 +更多信息请参见 [主题 / 层级](%BASE_NAME%/features/theming/elevations)。 ### 样式 @@ -128,10 +128,10 @@ Button 控件有两个内置样式: ### Microsoft Learn -- [Button Class (WPF)](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.button) +- [Button Class (WPF)](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.button) -- [Button Class (WinRT)](https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.button) +- [Button Class (WinRT)](https://learn.microsoft.com/zh-cn/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.button) -- [Button - WPF](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/button) +- [Button - WPF](https://learn.microsoft.com/zh-cn/dotnet/desktop/wpf/controls/button) -- [Buttons - Windows apps](https://learn.microsoft.com/en-us/windows/apps/design/controls/buttons) +- [Buttons - Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/controls/buttons) diff --git a/data/docs/ui-wpf-modern/03. components/01. basic-input/# check-box/index.zh-CN.mdx b/data/docs/ui-wpf-modern/03. components/01. basic-input/# check-box/index.zh-CN.mdx index 8a9a7b2..5230da5 100644 --- a/data/docs/ui-wpf-modern/03. components/01. basic-input/# check-box/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/03. components/01. basic-input/# check-box/index.zh-CN.mdx @@ -6,7 +6,7 @@ description: "用户可以选中或清除的控件。" 您可以在应用程序的用户界面 (UI) 中使用 CheckBox 来表示用户可以选中或清除的选项。您可以使用单个 CheckBox,也可以将两个或多个 CheckBox 分组使用。 -- **类**: [System.Windows.Controls](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls)[.CheckBox](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.checkbox) +- **类**: [System.Windows.Controls](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls)[.CheckBox](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.checkbox) ## 示例 @@ -66,7 +66,7 @@ Indeterminate: CheckBox 控件继承自 [ToggleButton](%BASE_NAME%/components/basic-input/toggle-button),并且可以具有三种状态:已选中 (selected) 、未选中 (cleared) 和不确定。 -CheckBox 是一个 ContentControl,这意味着它可以包含任意类型的单个对象 (例如字符串、图像或面板) 。有关详细信息,请参阅 [ContentControl](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.contentcontrol) 类。 +CheckBox 是一个 ContentControl,这意味着它可以包含任意类型的单个对象 (例如字符串、图像或面板) 。有关详细信息,请参阅 [ContentControl](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.contentcontrol) 类。 ### 这是正确的控件吗? @@ -126,11 +126,11 @@ CheckBox 控件有一个内置样式: ### Microsoft Learn -- [CheckBox Class (WPF)](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.checkbox) +- [CheckBox Class (WPF)](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.checkbox) -- [CheckBox Class (WinRT)](https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.checkbox) +- [CheckBox Class (WinRT)](https://learn.microsoft.com/zh-cn/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.checkbox) -- [CheckBox - WPF](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/checkbox) +- [CheckBox - WPF](https://learn.microsoft.com/zh-cn/dotnet/desktop/wpf/controls/checkbox) -- [CheckBox - Windows apps](https://learn.microsoft.com/en-us/windows/apps/design/controls/checkbox) +- [CheckBox - Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/controls/checkbox) diff --git a/data/docs/ui-wpf-modern/03. components/01. basic-input/# combo-box/index.zh-CN.mdx b/data/docs/ui-wpf-modern/03. components/01. basic-input/# combo-box/index.zh-CN.mdx index 81fcc07..9a76cbd 100644 --- a/data/docs/ui-wpf-modern/03. components/01. basic-input/# combo-box/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/03. components/01. basic-input/# combo-box/index.zh-CN.mdx @@ -6,7 +6,7 @@ description: "一个用户可以从中选择项目的下拉列表。" 使用组合框 (也称为下拉列表) 呈现用户可以选择的项目列表。组合框以紧凑状态开始,然后展开以显示可选项目的列表。列表框类似于组合框,但不可折叠/没有紧凑状态。您可以在本文末尾了解有关列表框的更多信息。 -- **类**: [System.Windows.Controls](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls)[.ComboBox](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.combobox); +- **类**: [System.Windows.Controls](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls)[.ComboBox](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.combobox); ## 示例 @@ -70,7 +70,7 @@ class VacationSpots : ObservableCollection ## ItemsControl -ComboBox 允许用户从其中选择一个项目,或者可以选择在控件的文本框中输入新文本。ComboBox 是一个 ItemsControl,这意味着它可以包含任何类型的对象集合 (例如字符串、图像或面板) 。有关更多信息,请参阅 [ItemsControl](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.itemscontrol) 类。 +ComboBox 允许用户从其中选择一个项目,或者可以选择在控件的文本框中输入新文本。ComboBox 是一个 ItemsControl,这意味着它可以包含任何类型的对象集合 (例如字符串、图像或面板) 。有关更多信息,请参阅 [ItemsControl](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.itemscontrol) 类。 ### 扩展属性 @@ -82,7 +82,7 @@ ComboBox 允许用户从其中选择一个项目,或者可以选择在控件 ComboBox 控件默认带有层级边框效果。您可以使用 `ui:ElevationBorder` 来自定义其层级效果。 -更多信息请参见 [Theming / Elevations](%BASE_NAME%/features/theming/elevations)。 +更多信息请参见 [主题 / 层级](%BASE_NAME%/features/theming/elevations)。 ### 样式 @@ -106,11 +106,11 @@ ComboBox 控件默认带有层级边框效果。您可以使用 `ui:ElevationBor ### Microsoft Learn -- [ComboBox Class (WPF)](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.combobox) +- [ComboBox Class (WPF)](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.combobox) -- [ComboBox Class (WinRT)](https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.combobox) +- [ComboBox Class (WinRT)](https://learn.microsoft.com/zh-cn/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.combobox) -- [ComboBox - WPF](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/combobox) +- [ComboBox - WPF](https://learn.microsoft.com/zh-cn/dotnet/desktop/wpf/controls/combobox) -- [Combo box and list box - Windows apps](https://learn.microsoft.com/en-us/windows/apps/design/controls/combo-box) +- [Combo box and list box - Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/controls/combo-box) diff --git a/data/docs/ui-wpf-modern/03. components/01. basic-input/# dropdown-button/index.zh-CN.mdx b/data/docs/ui-wpf-modern/03. components/01. basic-input/# dropdown-button/index.zh-CN.mdx index b4e28cb..a08b14a 100644 --- a/data/docs/ui-wpf-modern/03. components/01. basic-input/# dropdown-button/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/03. components/01. basic-input/# dropdown-button/index.zh-CN.mdx @@ -118,6 +118,6 @@ DropDownButton 控件有一个内置样式。由于这是来自 `iNKORE.UI.WPF.M ### Microsoft Learn -- [DropDownButton class (WinRT)](https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.dropdownbutton) +- [DropDownButton class (WinRT)](https://learn.microsoft.com/zh-cn/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.dropdownbutton) -- [Buttons # Drop down button - Windows apps](https://learn.microsoft.com/en-us/windows/apps/design/controls/buttons#example---drop-down-button) +- [Buttons # Drop down button - Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/controls/buttons#example---drop-down-button) diff --git a/data/docs/ui-wpf-modern/03. components/01. basic-input/# hyperlink-button/index.zh-CN.mdx b/data/docs/ui-wpf-modern/03. components/01. basic-input/# hyperlink-button/index.zh-CN.mdx index aa0b247..05e463e 100644 --- a/data/docs/ui-wpf-modern/03. components/01. basic-input/# hyperlink-button/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/03. components/01. basic-input/# hyperlink-button/index.zh-CN.mdx @@ -54,7 +54,7 @@ private void HyperlinkButton_Click(object sender, RoutedEventArgs e) 根据您的需要选择合适的超链接类型: -- 使用文本控件内的内联 [Hyperlink](https://learn.microsoft.com/en-us/dotnet/api/system.windows.documents.hyperlink) 文本元素。Hyperlink 元素与其他文本元素一起流动,您可以在任何 InlineCollection 中使用它。如果您需要自动文本换行且不一定需要大的点击目标,请使用文本超链接。超链接文本可能很小且难以定位,特别是对于触摸。 +- 使用文本控件内的内联 [Hyperlink](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.documents.hyperlink) 文本元素。Hyperlink 元素与其他文本元素一起流动,您可以在任何 InlineCollection 中使用它。如果您需要自动文本换行且不一定需要大的点击目标,请使用文本超链接。超链接文本可能很小且难以定位,特别是对于触摸。 - 对于独立超链接,使用 HyperlinkButton。HyperlinkButton 是一个专业化的 Button 控件,您可以在任何使用 Button 的地方使用它。 @@ -89,9 +89,9 @@ HyperlinkButton 控件有一个内置样式。由于这是来自 `iNKORE.UI.WPF. ### Microsoft Learn -- [HyperlinkButton class (WinRT)](https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.hyperlinkbutton) +- [HyperlinkButton class (WinRT)](https://learn.microsoft.com/zh-cn/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.hyperlinkbutton) -- [Hyperlink class (WPF)](https://learn.microsoft.com/en-us/dotnet/api/system.windows.documents.hyperlink) +- [Hyperlink class (WPF)](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.documents.hyperlink) -- [Hyperlinks - Windows apps](https://learn.microsoft.com/en-us/windows/apps/design/controls/hyperlinks#create-a-hyperlinkbutton) +- [Hyperlinks - Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/controls/hyperlinks#create-a-hyperlinkbutton) diff --git a/data/docs/ui-wpf-modern/03. components/01. basic-input/# toggle-switch/index.zh-CN.mdx b/data/docs/ui-wpf-modern/03. components/01. basic-input/# toggle-switch/index.zh-CN.mdx index d5db416..a6b1755 100644 --- a/data/docs/ui-wpf-modern/03. components/01. basic-input/# toggle-switch/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/03. components/01. basic-input/# toggle-switch/index.zh-CN.mdx @@ -110,6 +110,6 @@ private void ToggleSwitch_MainLight_Toggled(object sender, RoutedEventArgs e) ### Microsoft Learn -- [Guidelines for toggle switch](https://learn.microsoft.com/en-us/windows/apps/design/controls/toggles) +- [Guidelines for toggle switch](https://learn.microsoft.com/zh-cn/windows/apps/design/controls/toggles) -- [ToggleSwitch Class (WinRT)](https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.toggleswitch) \ No newline at end of file +- [ToggleSwitch Class (WinRT)](https://learn.microsoft.com/zh-cn/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.toggleswitch) \ No newline at end of file diff --git a/data/docs/ui-wpf-modern/03. components/04. dialogs/# window/index.zh-CN.mdx b/data/docs/ui-wpf-modern/03. components/04. dialogs/# window/index.zh-CN.mdx index 30c46a3..baeb760 100644 --- a/data/docs/ui-wpf-modern/03. components/04. dialogs/# window/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/03. components/04. dialogs/# window/index.zh-CN.mdx @@ -6,9 +6,9 @@ description: "提供了创建、配置、显示并管理窗口和对话框的生 Window 类代表 Windows 应用程序中的一个窗口。它提供了一套丰富的功能来管理和与窗口互动,例如处理其内容、外观和行为。本文档涵盖了 Window 类的基本方面,及其属性、方法和事件。 -- **类**: [System.Windows](https://learn.microsoft.com/en-us/dotnet/api/system.windows)[.Window](https://learn.microsoft.com/en-us/dotnet/api/system.windows.window) +- **类**: [System.Windows](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows)[.Window](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.window) -- **继承**: [Object](https://learn.microsoft.com/en-us/dotnet/api/system.object) → (...) → [Control](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.control) → [ContentControl](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.contentcontrol) → [Window](https://learn.microsoft.com/en-us/dotnet/api/system.windows.window) +- **继承**: [Object](https://learn.microsoft.com/zh-cn/dotnet/api/system.object) → (...) → [Control](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.control) → [ContentControl](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.contentcontrol) → [Window](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.window) ## 示例 @@ -74,7 +74,7 @@ ui:TitleBar.IsBackButtonVisible="True" ui:TitleBar.IsBackEnabled="True" ``` -然后当您运行时,您可能会看到标题栏中有一个返回按钮。接下来,您可以使用 **ui:TitleBar.BackButtonCommand** 处理返回按钮的点击事件。有关命令的更多信息,请 [点击此处](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/advanced/commanding-overview)。 +然后当您运行时,您可能会看到标题栏中有一个返回按钮。接下来,您可以使用 **ui:TitleBar.BackButtonCommand** 处理返回按钮的点击事件。有关命令的更多信息,请 [点击此处](https://learn.microsoft.com/zh-cn/dotnet/desktop/wpf/advanced/commanding-overview)。 完整的代码应该像这样: @@ -193,4 +193,4 @@ ui:WindowHelper.FixMaximizedWindow="False" ### Microsoft Learn -- [Window Class (WPF)](https://learn.microsoft.com/en-us/dotnet/api/system.windows.window) +- [Window Class (WPF)](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.window) diff --git a/data/docs/ui-wpf-modern/03. components/06. media/# font-icon/index.zh-CN.mdx b/data/docs/ui-wpf-modern/03. components/06. media/# font-icon/index.zh-CN.mdx index 796b6c8..f236ebf 100644 --- a/data/docs/ui-wpf-modern/03. components/06. media/# font-icon/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/03. components/06. media/# font-icon/index.zh-CN.mdx @@ -8,7 +8,7 @@ FontIcon 是一个用于显示指定字体中图标字形的控件。它是 Imag - **类**: [iNKORE.UI.WPF.Modern.Controls](..)[.FontIcon](.) -- **继承**: [Object](https://learn.microsoft.com/en-us/dotnet/api/system.object) → (...) → [FrameworkElement](https://learn.microsoft.com/en-us/dotnet/api/system.windows.frameworkelement) → [IconElement](.) → [FontIcon](.) +- **继承**: [Object](https://learn.microsoft.com/zh-cn/dotnet/api/system.object) → (...) → [FrameworkElement](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.frameworkelement) → [IconElement](.) → [FontIcon](.) ## 示例 @@ -24,7 +24,7 @@ FontIcon 是一个用于显示指定字体中图标字形的控件。它是 Imag 在 `iNKORE.UI.WPF.Modern.Common.IconKeys` 命名空间下,提供了几个由 Microsoft 制作且符合 Fluent Design 规范的图标集: -- `SegoeFluentIcons`:来自 Microsoft 的 [Segoe Fluent Icons Family](https://learn.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font); +- `SegoeFluentIcons`:来自 Microsoft 的 [Segoe Fluent Icons Family](https://learn.microsoft.com/zh-cn/windows/apps/design/style/segoe-fluent-icons-font); - `FluentSystemIcons`:来自 Microsoft 的 [Fluent System Icons Family](https://github.com/microsoft/fluentui-system-icons)。 @@ -185,12 +185,12 @@ FontIcon 是一个用于显示指定字体中图标字形的控件。它是 Imag ### Microsoft Learn -- [Segoe Fluent Icons - Windows apps](https://learn.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font) +- [Segoe Fluent Icons - Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/style/segoe-fluent-icons-font) -- [Segoe MDL2 Assets icons - Windows apps](https://learn.microsoft.com/en-us/windows/apps/design/style/segoe-ui-symbol-font) +- [Segoe MDL2 Assets icons - Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/style/segoe-ui-symbol-font) -- [Design toolkits and samples for Windows apps](https://learn.microsoft.com/en-us/windows/apps/design/downloads#fonts) +- [Design toolkits and samples for Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/downloads#fonts) -- [Iconography in Windows 11](https://learn.microsoft.com/en-us/windows/apps/design/signature-experiences/iconography) +- [Iconography in Windows 11](https://learn.microsoft.com/zh-cn/windows/apps/design/signature-experiences/iconography) -- [FontIcon Class (WinRT)](https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.fonticon) +- [FontIcon Class (WinRT)](https://learn.microsoft.com/zh-cn/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.fonticon) diff --git a/data/docs/ui-wpf-modern/03. components/08. navigation/# frame/index.zh-CN.mdx b/data/docs/ui-wpf-modern/03. components/08. navigation/# frame/index.zh-CN.mdx index 7235c39..b49b738 100644 --- a/data/docs/ui-wpf-modern/03. components/08. navigation/# frame/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/03. components/08. navigation/# frame/index.zh-CN.mdx @@ -10,7 +10,7 @@ WPF 的 Frame 控件支持在内容之间进行导航。Frame 可以由 Window - **类**: [iNKORE.UI.WPF.Modern.Controls](..)[.Frame](.) -- **继承**: [Object](https://learn.microsoft.com/en-us/dotnet/api/system.object) → (...) → [Control](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.control) → [ContentControl](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.contentcontrol) → [Frame](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.frame) → [Frame](.) +- **继承**: [Object](https://learn.microsoft.com/zh-cn/dotnet/api/system.object) → (...) → [Control](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.control) → [ContentControl](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.contentcontrol) → [Frame](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.frame) → [Frame](.) ## 示例 @@ -324,7 +324,7 @@ public bool Navigate(object content, object extraData, NavigationTransitionInfo public bool Navigate(Uri source, object extraData, NavigationTransitionInfo infoOverride); ``` -原始 **Frame.Navigate** 方法还提供了更多重载,详情请 [点击这里](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.frame.navigate)。 +原始 **Frame.Navigate** 方法还提供了更多重载,详情请 [点击这里](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.frame.navigate)。 ### GoBack @@ -433,12 +433,12 @@ myFrame.Navigate(Page2, null, new SuppressNavigationTransitionInfo()); ### Microsoft Learn -- [Navigation Overview - WPF](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/app-development/navigation-overview) +- [Navigation Overview - WPF](https://learn.microsoft.com/zh-cn/dotnet/desktop/wpf/app-development/navigation-overview) -- [Frame - WPF](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/frame) +- [Frame - WPF](https://learn.microsoft.com/zh-cn/dotnet/desktop/wpf/controls/frame) -- [Page transitions - Windows Apps](https://learn.microsoft.com/en-us/windows/apps/design/motion/page-transitions) +- [Page transitions - Windows Apps](https://learn.microsoft.com/zh-cn/windows/apps/design/motion/page-transitions) -- [Frame Class (WPF)](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.frame) +- [Frame Class (WPF)](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.frame) -- [Frame Class (WinRT)](https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.frame) +- [Frame Class (WinRT)](https://learn.microsoft.com/zh-cn/uwp/api/windows.ui.xaml.controls.frame) diff --git a/data/docs/ui-wpf-modern/03. components/08. navigation/# navigation-view/index.zh-CN.mdx b/data/docs/ui-wpf-modern/03. components/08. navigation/# navigation-view/index.zh-CN.mdx index 6dbe6c4..72be83a 100644 --- a/data/docs/ui-wpf-modern/03. components/08. navigation/# navigation-view/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/03. components/08. navigation/# navigation-view/index.zh-CN.mdx @@ -8,7 +8,7 @@ NavigationView 控件通过可折叠导航菜单为应用程序的顶级区域 - **类**: [iNKORE.UI.WPF.Modern.Controls](..)[.NavigationView](.) -- **继承**: [Object](https://learn.microsoft.com/en-us/dotnet/api/system.object) → (...) → [Control](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.control) → [ContentControl](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.contentcontrol) → [NavigationView](https://learn.microsoft.com/en-us/windows/apps/design/controls/navigationview) +- **继承**: [Object](https://learn.microsoft.com/zh-cn/dotnet/api/system.object) → (...) → [Control](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.control) → [ContentControl](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.contentcontrol) → [NavigationView](https://learn.microsoft.com/zh-cn/windows/apps/design/controls/navigationview) ## 示例 @@ -174,7 +174,7 @@ NavigationView 控件通过可折叠导航菜单为应用程序的顶级区域 ![](clear-background.jpg) -上面的代码使用了资源重写功能。有关更多信息,您可以查看 [Overrides / Override Resources](%BASE_NAME%/features/overrides/override-resources)。 +上面的代码使用了资源重写功能。有关更多信息,您可以查看 [重写 / 重写资源](%BASE_NAME%/features/overrides/override-resources)。 ### 在页面之间导航 @@ -258,7 +258,7 @@ NavigationView 是一种自适应导航控件,适用于: ### 详细信息与指南 -[此页面](https://learn.microsoft.com/en-us/windows/apps/design/controls/navigationview)提供了更详细且有用的信息。如果您想更好地使用 NavigationView,强烈建议阅读它。 +[此页面](https://learn.microsoft.com/zh-cn/windows/apps/design/controls/navigationview)提供了更详细且有用的信息。如果您想更好地使用 NavigationView,强烈建议阅读它。 ## 另请参阅 @@ -273,8 +273,8 @@ NavigationView 是一种自适应导航控件,适用于: ### Microsoft Learn -- [NavigationView - Windows apps](https://learn.microsoft.com/en-us/windows/apps/design/controls/navigationview) +- [NavigationView - Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/controls/navigationview) -- [NavigationView Class (WinRT)](https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.navigationview) +- [NavigationView Class (WinRT)](https://learn.microsoft.com/zh-cn/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.navigationview) -- [Navigation basics - Windows apps](https://learn.microsoft.com/en-us/windows/apps/design/basics/navigation-basics) +- [Navigation basics - Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/basics/navigation-basics) diff --git a/data/docs/ui-wpf-modern/03. components/08. navigation/# tab-control/index.zh-CN.mdx b/data/docs/ui-wpf-modern/03. components/08. navigation/# tab-control/index.zh-CN.mdx index 68f88e5..ea84df2 100644 --- a/data/docs/ui-wpf-modern/03. components/08. navigation/# tab-control/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/03. components/08. navigation/# tab-control/index.zh-CN.mdx @@ -6,9 +6,9 @@ description: "一个通过选择相应选项卡来访问离散页面并显示内 选项卡 (Tabs) 用于组织相关内容组,并允许在同一层级的内容页面之间进行导航。 -- **Class**: [System.Windows.Controls](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls)[.TabControl](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.tabcontrol) +- **Class**: [System.Windows.Controls](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls)[.TabControl](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.tabcontrol) -- **Inheritance**: [Object](https://learn.microsoft.com/en-us/dotnet/api/system.object) → (...) → [Control](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.control) → [ItemsControl](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.itemscontrol) → [Selector](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.primitives.selector) → [TabControl](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.tabcontrol) +- **Inheritance**: [Object](https://learn.microsoft.com/zh-cn/dotnet/api/system.object) → (...) → [Control](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.control) → [ItemsControl](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.itemscontrol) → [Selector](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.primitives.selector) → [TabControl](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.tabcontrol) ## 示例 @@ -258,12 +258,12 @@ Pivot 样式支持在一组内容节之间通过触控滑动进行切换。要 ### Microsoft Learn -- [TabControl Class (WPF)](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.tabcontrol) +- [TabControl Class (WPF)](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.tabcontrol) -- [TabControl - WPF](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/tabcontrol) +- [TabControl - WPF](https://learn.microsoft.com/zh-cn/dotnet/desktop/wpf/controls/tabcontrol) -- [Tab View - Windows apps](https://learn.microsoft.com/en-us/windows/apps/design/controls/tab-view) +- [Tab View - Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/controls/tab-view) -- [Pivot - Windows apps](https://learn.microsoft.com/en-us/windows/apps/design/controls/pivot) +- [Pivot - Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/controls/pivot) -- [Selector bar - Windows apps](https://learn.microsoft.com/en-us/windows/apps/design/controls/selector-bar) +- [Selector bar - Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/controls/selector-bar) diff --git a/data/docs/ui-wpf-modern/04. features/01. theming/01.# theme-schemes/index.zh-CN.mdx b/data/docs/ui-wpf-modern/04. features/01. theming/01.# theme-schemes/index.zh-CN.mdx index f4b2397..5d9f1f3 100644 --- a/data/docs/ui-wpf-modern/04. features/01. theming/01.# theme-schemes/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/04. features/01. theming/01.# theme-schemes/index.zh-CN.mdx @@ -1,6 +1,6 @@ --- description: "Windows apps can use a light or dark application theme. The theme affects the colors of the app's background, text, icons, and common controls." -title: "Theme Schemes" +title: "主题方案" --- @@ -10,7 +10,7 @@ Windows 应用可以使用浅色或深色的应用主题。主题会影响应用 :::note -本文讨论的是主题方案 (浅色/深色) 。如果你想了解强调色 (又称主色) ,请参见 [Theming / Accent Color](./accent-color)。 +本文讨论的是主题方案 (浅色/深色) 。如果你想了解强调色 (又称主色) ,请参见 [主题 / 强调色](./accent-color)。 ::: @@ -155,13 +155,13 @@ ui:ThemeManager.RequestedTheme="Default" ### 相关文章 -- [Theming / Accent color](./accent-color) +- [主题 / 强调色](./accent-color) ### Microsoft Learn -- [Color in Windows apps](https://learn.microsoft.com/en-us/windows/apps/design/style/color) +- [Color in Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/style/color) -- [Color in Windows 11](https://learn.microsoft.com/en-us/windows/apps/design/signature-experiences/color) +- [Color in Windows 11](https://learn.microsoft.com/zh-cn/windows/apps/design/signature-experiences/color) -- [Layering and elevation in Windows 11](https://learn.microsoft.com/en-us/windows/apps/design/signature-experiences/layering) +- [Layering and elevation in Windows 11](https://learn.microsoft.com/zh-cn/windows/apps/design/signature-experiences/layering) diff --git a/data/docs/ui-wpf-modern/04. features/01. theming/02.# accent-color/index.zh-CN.mdx b/data/docs/ui-wpf-modern/04. features/01. theming/02.# accent-color/index.zh-CN.mdx index c9bc661..ee1f07f 100644 --- a/data/docs/ui-wpf-modern/04. features/01. theming/02.# accent-color/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/04. features/01. theming/02.# accent-color/index.zh-CN.mdx @@ -1,5 +1,6 @@ --- description: "Windows apps can use a light or dark application theme. The theme affects the colors of the app's background, text, icons, and common controls." +title: "强调色" --- @@ -7,7 +8,7 @@ description: "Windows apps can use a light or dark application theme. The theme :::note -本文讨论的是强调色 (又称主色) 。若需了解主题方案 (浅色/深色) ,请参见 [Theming / Theme schemes](./theme-schemes)。 +本文讨论的是强调色 (又称主色) 。若需了解主题方案 (浅色/深色) ,请参见 [主题 / 主题方案](./theme-schemes)。 ::: @@ -103,13 +104,13 @@ Windows Shell 中的强调色算法会生成该强调色的一组浅色与深色 ### 相关文章 -- [Theming / Theme scheme](./theme-schemes) +- [主题 / 主题方案](./theme-schemes) ### Microsoft Learn -- [Color in Windows apps](https://learn.microsoft.com/en-us/windows/apps/design/style/color) +- [Color in Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/style/color) -- [Color in Windows 11](https://learn.microsoft.com/en-us/windows/apps/design/signature-experiences/color) +- [Color in Windows 11](https://learn.microsoft.com/zh-cn/windows/apps/design/signature-experiences/color) -- [Layering and elevation in Windows 11](https://learn.microsoft.com/en-us/windows/apps/design/signature-experiences/layering) +- [Layering and elevation in Windows 11](https://learn.microsoft.com/zh-cn/windows/apps/design/signature-experiences/layering) diff --git a/data/docs/ui-wpf-modern/04. features/01. theming/04.# elevations/index.zh-CN.mdx b/data/docs/ui-wpf-modern/04. features/01. theming/04.# elevations/index.zh-CN.mdx index 908acc8..af35986 100644 --- a/data/docs/ui-wpf-modern/04. features/01. theming/04.# elevations/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/04. features/01. theming/04.# elevations/index.zh-CN.mdx @@ -1,10 +1,10 @@ -# 层级 (Elevation) +# 层级 层级表示表面与另一表面在桌面上位置关系的深度分量。当两个或多个对象占据屏幕上的同一位置时,只有层级最高的对象会在该位置被渲染。 在控件和表面上使用阴影与轮廓 (边缘) 可以微妙地传达对象的层级,并在交互过程中帮助引导焦点。Windows 11 使用阴影与轮廓来表达层级感以及相关的数值与效果。 -## 轮廓层级 (Contour elevation) +## 轮廓层级 以 `Button` 控件为例,其边框底部带有高亮以产生深度感。下面是带有层级与不带层级的 `Button` 对比: @@ -56,4 +56,4 @@ ### Microsoft Learn -- [Layering and elevation in Windows 11](https://learn.microsoft.com/en-us/windows/apps/design/signature-experiences/layering) \ No newline at end of file +- [Layering and elevation in Windows 11](https://learn.microsoft.com/zh-cn/windows/apps/design/signature-experiences/layering) \ No newline at end of file diff --git a/data/docs/ui-wpf-modern/04. features/01. theming/category.zh-CN.json b/data/docs/ui-wpf-modern/04. features/01. theming/category.zh-CN.json new file mode 100644 index 0000000..9e9ba06 --- /dev/null +++ b/data/docs/ui-wpf-modern/04. features/01. theming/category.zh-CN.json @@ -0,0 +1,8 @@ +{ + "label": "主题", + "link": + { + "type": "generated-index", + "description": "主题指定了组件的颜色、表面的深浅、阴影的程度、墨迹元素的适当不透明度等。" + } +} diff --git a/data/docs/ui-wpf-modern/04. features/02. overrides/01.# override-resources/index.zh-CN.mdx b/data/docs/ui-wpf-modern/04. features/02. overrides/01.# override-resources/index.zh-CN.mdx index 8c946c2..6cbff24 100644 --- a/data/docs/ui-wpf-modern/04. features/02. overrides/01.# override-resources/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/04. features/02. overrides/01.# override-resources/index.zh-CN.mdx @@ -235,14 +235,14 @@ ### 相关文章 -- [Theming / Theme Resources](%BASE_NAME%/features/theming/theme-resources) +- [主题 / 主题资源](%BASE_NAME%/features/theming/theme-resources) -- [Definitions / StaticResourceExtension Class](%BASE_NAME%/definitions/markup/static-resource-extension) +- [定义 / StaticResourceExtension Class](%BASE_NAME%/definitions/markup/static-resource-extension) ### Microsoft Learn -- [ResourceDictionary Class (WPF)](https://learn.microsoft.com/en-us/dotnet/api/system.windows.resourcedictionary) +- [ResourceDictionary Class (WPF)](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.resourcedictionary) -- [Application Resource, Content, and Data Files - WPF](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/app-development/wpf-application-resource-content-and-data-files) +- [Application Resource, Content, and Data Files - WPF](https://learn.microsoft.com/zh-cn/dotnet/desktop/wpf/app-development/wpf-application-resource-content-and-data-files) -- [Merged resource dictionaries (WPF .NET)](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/systems/xaml-resources-merged-dictionaries) \ No newline at end of file +- [Merged resource dictionaries (WPF .NET)](https://learn.microsoft.com/zh-cn/dotnet/desktop/wpf/systems/xaml-resources-merged-dictionaries) \ No newline at end of file diff --git a/data/docs/ui-wpf-modern/04. features/02. overrides/category.zh-CN.json b/data/docs/ui-wpf-modern/04. features/02. overrides/category.zh-CN.json new file mode 100644 index 0000000..2c0c98f --- /dev/null +++ b/data/docs/ui-wpf-modern/04. features/02. overrides/category.zh-CN.json @@ -0,0 +1,8 @@ +{ + "label": "重写", + "link": + { + "type": "generated-index", + "description": "重写功能使您能够高度自定义组件的外观。" + } +} diff --git a/data/docs/ui-wpf-modern/05. definitions/00. controls/00. helpers/# window-helper/index.zh-CN.mdx b/data/docs/ui-wpf-modern/05. definitions/00. controls/00. helpers/# window-helper/index.zh-CN.mdx new file mode 100644 index 0000000..6f3c238 --- /dev/null +++ b/data/docs/ui-wpf-modern/05. definitions/00. controls/00. helpers/# window-helper/index.zh-CN.mdx @@ -0,0 +1,165 @@ +--- +description: 提供窗口组件的附加属性和样式管理。 +--- + + +# WindowHelper 类 + +提供用于窗口组件的附加属性与样式管理。 + +## 定义 + +- 命名空间: [iNKORE.UI.WPF.Modern.Controls.Helpers](.) +- 程序集: iNKORE.UI.WPF.Modern.dll + +```csharp +public static class WindowHelper {...} +``` + +静态类,无继承关系。 + +## 依赖属性 + +### UseModernWindowStyle + +获取或设置是否对窗口应用现代窗口样式。现代窗口样式为窗口提供现代外观与交互体验。 + +仅当将此值设为 `true` 时,下列属性才会生效。 + +- 属性:附加属性 +- 类型:`bool` +- 默认值:`false` + +### SystemBackdropType + +获取或设置窗口材质类型。可从 [BackdropType 枚举](%BASE_NAME%/definitions/helpers/styles/backdrop-type) 中选择。 + +:::warning 系统兼容性 + +上文列出了 Acrylic 背景的可用性。Mica 与 Tabbed 背景仅在 Windows 11 可用;在较旧的 Windows 版本上,这些窗口材质将不会生效。 + +选项 **Acrylic** 会根据系统版本自动选择合适的 API:在 Windows 11 上使用 Acrylic11,在 Windows 10 上使用 Acrylic10,但这可能会引发一些不期望的行为。 + +::: + +- 属性:附加属性 +- 类型:[BackdropType](%BASE_NAME%/definitions/helpers/styles/backdrop-type) +- 默认值:`BackdropType.None` + +### Acrylic10Color + +获取或设置 Acrylic10 背景的颜色。仅在 **SystemBackdropType** 为 `Acrylic10` 或在 Windows 10 上以 `Acrylic` 运行时生效。你可以通过设置 **Color** 值来自定义 Acrylic10 背景颜色。 + +:::warning 使用 Color 值而非 Brush + +该属性仅接受 **Color** 值,若传入 **Brush** 值将抛出异常。如需从 **Brush** 转为 **Color**,可使用 **iNKORE.UI.WPF.Converters.ColorToBrushConverter** (需逆向转换) 。 + +::: + +- 属性:附加属性 +- 类型:`Color` +- 默认值:`Color.FromArgb(0x99, 0x00, 0x00, 0x00)` + +### ApplyBackground + +决定是否将 `Background` 属性应用于窗口。若将此属性设为 `False`,窗口将忽略 `Background` 并不渲染背景。通常我们会根据所用的窗口材质自动设置此属性,你也可手动控制,但该操作并不常见。 + +- 属性:附加属性 +- 类型:`bool` +- 默认值:`true` (当 **SystemBackdropType** 为 `None` 时为 `True`,否则为 `False`) + +### ApplyNoise + +决定是否为窗口启用噪点效果。噪点是一种细微的纹理效果,可让窗口看起来更自然、不那么平面。默认值为 `False`,因为在使用 acrylic 背景时系统会覆盖噪点效果,故通常无需重复渲染。 + +你也可以手动将其设为 `True` 以启用额外噪点效果。 + +- 属性:附加属性 +- 类型:`bool` +- 默认值:`false` + +### CornerStyle + +通过此属性设置窗口的圆角样式。可从 [WindowCornerStyle 枚举](../../definitions/helpers/styles/window-corner-style) 中选择。 + +:::warning 系统兼容性 + +圆角样式仅在 Windows 11 可用;在较旧系统上该设置不会生效。 + +::: + +- 属性:附加属性 +- 类型:[WindowCornerStyle](../../helpers/styles/window-corner-style) +- 默认值:`WindowCornerStyle.None` + +### FixMaximizedWindow + +决定是否对窗口应用额外的最大化修复器 (maximize fixer) 。该修复器用于修正默认窗口样式导致的最大化尺寸错误问题。 + +该修复有时可能触发一些异常;通常这些异常是无害的,不会影响窗口的正常使用。 + +更多信息见 [Window / Maximize fixer](%BASE_NAME%/components/dialogs/window#maximize-fixer)。 + +- 属性:附加属性 +- 类型:`bool` +- 默认值:`true` + +### ShouldDisplayManualBorder + +决定是否显示手动绘制的边框。手动边框由窗口绘制,遵循窗口的 `BorderBrush` 与 `BorderThickness`,从而允许自定义窗口边框样式。 + +该属性为只读,由系统版本决定:在 Windows 11 及更高版本,DWM 会自动绘制边框;在 Windows 10 或更低版本,将显示手动边框。 + +- 属性:附加属性 | 只读 +- 类型:`bool` +- 默认值:`false` (在 Windows 10 或更低版本为 `True`,否则为 `False`) + +### ~~UseAeroBackdrop~~ + +已废弃,请使用 **SystemBackdropType**。 + +### ~~UseAcrylicBackdrop~~ + +已废弃,请使用 **SystemBackdropType**。 + +## 字段 + +### (依赖属性) + +上述依赖属性各自对应一个 `DependencyProperty` 字段。 + +## 方法 + +### (依赖属性) + +对可写的附加依赖属性,类提供对应的 `Get` 与 `Set` 方法;对只读附加依赖属性,仅提供 `Get` 方法。 + +### UpdateWindowChrome + +当需要更新 `WindowChrome` 时,该方法会被自动调用;你也可以手动调用以在异常情况发生后触发更新。 + +```csharp +public static WindowChrome UpdateWindowChrome(this Window window); +``` + +## 备注 + +### 组件 + +该类用于自定义 [Window](%BASE_NAME%/components/dialogs/window) 组件。 + +## 另请参阅 + +### 相关文章 + +- [组件 / Window](%BASE_NAME%/components/dialogs/window) + +### Microsoft Learn + +- [Window Class (WPF)](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.window?view=windowsdesktop-8.0#properties) + +- [Materials in Windows 11](https://learn.microsoft.com/zh-cn/windows/apps/design/signature-experiences/materials) + +### 源代码 + +- [GitHub | WindowHelper.cs](https://github.com/iNKORE-NET/UI.WPF.Modern/blob/main/source/iNKORE.UI.WPF.Modern/Controls/Helpers/WindowHelper.cs) \ No newline at end of file diff --git a/data/docs/ui-wpf-modern/05. definitions/00. controls/01.# toggle-switch/index.zh-CN.mdx b/data/docs/ui-wpf-modern/05. definitions/00. controls/01.# toggle-switch/index.zh-CN.mdx new file mode 100644 index 0000000..8f1e635 --- /dev/null +++ b/data/docs/ui-wpf-modern/05. definitions/00. controls/01.# toggle-switch/index.zh-CN.mdx @@ -0,0 +1,113 @@ +# ToggleSwitch 类 + +表示一个可在两种状态之间切换的开关控件。 + +更多信息、设计指引与代码示例,请参阅 [Toggle switches](%BASE_NAME%/components/basic-input/toggle-switch)。 + +## 定义 + +- 命名空间: [iNKORE.UI.WPF.Modern.Controls](.) + +- 程序集: iNKORE.UI.WPF.Modern.dll + +- 继承: [Object](https://learn.microsoft.com/zh-cn/dotnet/api/system.object) → (...) → [Control](https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.controls.control) → ToggleSwitch + +```csharp +[ContentProperty(nameof(Header))] +[TemplatePart(Name = nameof(HeaderContentPresenter), Type = typeof(ContentPresenter))] +[TemplatePart(Name = nameof(SwitchKnobBounds), Type = typeof(FrameworkElement))] +[TemplatePart(Name = nameof(SwitchKnob), Type = typeof(FrameworkElement))] +[TemplatePart(Name = nameof(KnobTranslateTransform), Type = typeof(TranslateTransform))] +[TemplatePart(Name = nameof(SwitchThumb), Type = typeof(Thumb))] +[TemplateVisualState(GroupName = VisualStates.GroupCommon, Name = VisualStates.StateNormal)] +[TemplateVisualState(GroupName = VisualStates.GroupCommon, Name = VisualStates.StateMouseOver)] +[TemplateVisualState(GroupName = VisualStates.GroupCommon, Name = VisualStates.StatePressed)] +[TemplateVisualState(GroupName = VisualStates.GroupCommon, Name = VisualStates.StateDisabled)] +[TemplateVisualState(GroupName = ContentStatesGroup, Name = OffContentState)] +[TemplateVisualState(GroupName = ContentStatesGroup, Name = OnContentState)] +[TemplateVisualState(GroupName = ToggleStatesGroup, Name = DraggingOnState)] +[TemplateVisualState(GroupName = ToggleStatesGroup, Name = DraggingOffState)] +[TemplateVisualState(GroupName = ToggleStatesGroup, Name = OffState)] +[TemplateVisualState(GroupName = ToggleStatesGroup, Name = OnState)] +public class ToggleSwitch : Control { ... } +``` + +## 构造函数 + +### ToggleSwitch() + +初始化 `ToggleSwitch` 的新实例。 + +## 属性 + +### IsOn + +获取或设置 `ToggleSwitch` 的开关状态 (开/关) 。 + +- 属性:依赖属性 + +- 类型:`bool` + +- 默认值:`false` + +### [On/Off]-[Content/ContentTemplate] + +默认情况下,`ToggleSwitch` 包含自动本地化的 On/Off 标签。你可以通过设置 `OnContent` 与 `OffContent` 来替换这些标签。 + +下面示例将 On/Off 标签替换为 Show/Hide: + +```xml + +``` + +下面示例移除了标签: + +```xml + +``` + +你也可以通过设置 `OnContentTemplate` 与 `OffContentTemplate` 来使用更复杂的内容。 + +### (继承) + +该类继承自基类 `Control` 的属性。 + +## 事件 + +### Toggled + +当 `IsOn` 属性值更改时触发该事件。 + +- 事件类型:Routed + +- 委托类型:`RoutedEventHandler` + +### (继承) + +该类继承自基类 `Control` 的事件。 + +## 方法 + +### (继承) + +该类继承自基类 `Control` 的方法。 + + +## 另请参阅 + +### 相关文章 + +- [组件 / ToggleSwitch](%BASE_NAME%/components/basic-input/toggle-switch) + +### Microsoft Learn + +- [Toggle switches - Windows apps](https://learn.microsoft.com/zh-cn/windows/apps/design/controls/toggles) + +- [ToggleSwitch class (WinRT)](https://learn.microsoft.com/zh-cn/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.toggleswitch) + +### 源代码 + +- [GitHub | ToggleSwitch.cs](https://github.com/iNKORE-NET/UI.WPF.Modern/blob/main/source/iNKORE.UI.WPF.Modern.Controls/Controls/Windows/ToggleSwitch/ToggleSwitch.cs) + + diff --git a/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# backdrop-type/index.zh-CN.mdx b/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# backdrop-type/index.zh-CN.mdx new file mode 100644 index 0000000..a80ff1b --- /dev/null +++ b/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# backdrop-type/index.zh-CN.mdx @@ -0,0 +1,134 @@ +--- +description: 指定窗口材质类型。由 `WindowHelper.SystemBackdropType` 属性使用。 +--- + +# BackdropType 枚举 + +指定窗口材质类型。由 `WindowHelper.SystemBackdropType` 属性使用。 + +## 定义 + +- 命名空间: [iNKORE.UI.WPF.Modern.Helpers.Styles](.) +- 程序集: iNKORE.UI.WPF.Modern.dll + +```csharp +public enum BackdropType {...} +``` + +继承: [Object](https://learn.microsoft.com/zh-cn/dotnet/api/system.object) → [ValueType](https://learn.microsoft.com/zh-cn/dotnet/api/system.valuetype?view=windowsdesktop-8.0) → [Enum](https://learn.microsoft.com/zh-cn/dotnet/api/system.enum?view=windowsdesktop-8.0) → BackdropType + +## 枚举值 + +### None + +不应用任何窗口材质,窗口保持实色。 + +**值**:1 + +### Mica + +窗口将使用 Mica 效果,表现为对桌面背景进行模糊与半透明处理的材质。 + +**值**:2 + +Mica 是 Windows 11 引入的一种新型不透明材质,表面会根据用户桌面背景色做细微着色。 + +Mica 支持浅色/深色模式,并内置了针对窗口聚焦 (活动/非活动) 的状态差异。 + +![](materials_mica_hero_1880.jpg) + +### Acrylic + +窗口将使用 Acrylic 效果,所用的具体 API 由系统版本决定,表现为模糊背景之上的半透明材质。 + +**值**:3 + +Acrylic 是一种半透明材质,模拟磨砂玻璃效果。在 Windows 11 中,Acrylic 更明亮、更透明,以便与背后的视觉内容建立更强的语境关系。Acrylic 通常用于临时、轻度消失的表面,例如弹出菜单与上下文菜单。 + +Acrylic 支持浅色/深色模式。 + +![](materials_acrylic_hero_1880.jpg) + +### Tabbed + +窗口将使用类似 Mica 的 Tabbed (Mica Alt) 效果,但色彩更深,通常用于窗口具有根 `TabControl` 的场景 (例如资源管理器) 。 + +**值**:4 + +Mica Alt (又称 Tabbed) 是 Mica 的一个变体,对用户桌面背景色做更强的着色。针对带有选项卡的标题栏应用 Mica Alt,可以提供比 Mica 更深的视觉层级。Mica Alt 在使用 Windows App SDK 1.1 及更高版本且运行于 Windows 11 版本 22000 或更高时可用。 + +![](mica-alt-tabs.png) + +### Acrylic10 + +使用较旧 API 实现的 Acrylic 效果。 + +**值**:5 + +### Acrylic11 + +使用较新 API 实现的 Acrylic 效果。 + +**值**:6 + +## 备注 + +### Acrylic10 与 Acrylic11 + +尽管 Acrylic10 与 Acrylic11 在视觉效果上相似,但它们使用不同的 API,存在一些差异: + +| | Acrylic10 | Acrylic11 | +|-------------------|----------------------------------------------------------------------|-------------------------------------------------------------------------------------| +| 可用性 | Windows 10 与 11 (Windows 10.0.17063+) | Windows 11 (Windows 10.0.22523+) | +| 性能 | 调整窗口大小时可能有卡顿 | 调整窗口大小时表现良好 | +| 可定制性 | 可定制色调 (使用 ui:WindowHelper.Acrylic10Color 属性) | 不支持 | +| 过渡 | 无 | 在切换浅/深色及聚焦/失焦时会显示过渡动画 | +| 失去焦点时 | Acrylic 效果仍然保留 | Acrylic 效果会被临时禁用 | + +如上所示,两个 Acrylic 效果各有优缺点,可根据需求选择。 + +### Mica 与 Tabbed + +Mica 与 Tabbed 在外观上相似,但用途不同:Mica 适用于一般窗口,Tabbed 适用于带根 `TabControl` 的窗口。 + +下面图片展示了带选项卡的标题栏中 Mica 与 Mica Alt (Tabbed) 的差异。 + +![](mica-tabs.png) + +![](mica-alt-tabs.png) + +### 系统级特性 + +窗口材质由系统提供并由系统管理,这意味着我们并不自行实现背景效果或对其有完全控制权。我们所能做的是请求系统对窗口应用相应的背景效果。 + +:::danger 注意 + +请不要要求我们做超出我们控制范围的操作。例如:提升 Acrylic10 的性能、强制对某个控件应用材质、或更改 Acrylic11 的颜色。我们无法实现这些功能。如遇窗口材质问题,请向 Microsoft 报告。 + +如果你的想法在其他 Win32 应用中不可行,在我们的库中也不会可行。我们使用的是其他 Win32 应用同样的 API。在提出请求前,请先确认该行为在其他 Win32 应用中是否可行。 + +::: + +## 另请参阅 + +### 相关文章 + +- [组件 / Window](%BASE_NAME%/components/dialogs/window#system-backdrops) + +- [定义 / WindowHelper Class](%BASE_NAME%/definitions/controls/helpers/window-helper#systembackdroptype) + +- [定义 / Acrylic10Helper Class](%BASE_NAME%/definitions/controls/helpers/acrylic10-helper) + +- [定义 / BackdropHelper Class](%BASE_NAME%/definitions/controls/helpers/backdrop-helper) + +### Microsoft Learn + +- [Mica material - Windows Apps](https://learn.microsoft.com/zh-cn/windows/apps/design/style/mica) + +- [Acrylic material - Windows Apps](https://learn.microsoft.com/zh-cn/windows/apps/design/style/acrylic) + +- [Materials in Windows 11](https://learn.microsoft.com/zh-cn/windows/apps/design/signature-experiences/materials) + +### 源代码 + +- [GitHub | BackdropHelper.cs](https://github.com/iNKORE-NET/UI.WPF.Modern/blob/main/source/iNKORE.UI.WPF.Modern/Helpers/Styles/BackdropHelper.cs#L18) diff --git a/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# window-corner-style/index.zh-CN.mdx b/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# window-corner-style/index.zh-CN.mdx new file mode 100644 index 0000000..4f03730 --- /dev/null +++ b/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# window-corner-style/index.zh-CN.mdx @@ -0,0 +1,81 @@ +--- +description: 指定窗口的圆角样式。由 `WindowHelper.CornerStyle` 属性使用。 +--- + +# WindowCornerStyle 枚举 + +指定窗口的圆角样式。由 `WindowHelper.CornerStyle` 属性使用。 + +## 定义 + +- 命名空间: [iNKORE.UI.WPF.Modern.Helpers.Styles](.) + +- 程序集: iNKORE.UI.WPF.Modern.dll + +```csharp +public enum WindowCornerStyle : uint {...} +``` + +继承: [Object](https://learn.microsoft.com/zh-cn/dotnet/api/system.object) → [ValueType](https://learn.microsoft.com/zh-cn/dotnet/api/system.valuetype?view=windowsdesktop-8.0) → [Enum](https://learn.microsoft.com/zh-cn/dotnet/api/system.enum?view=windowsdesktop-8.0) → WindowCornerStyle + +## 枚举值 + +### Default + +让系统决定是否应用窗口圆角。 + +*等价于 DWMWCP_DEFAULT* + +**值**:0 + +### DoNotRound + +从不应用窗口圆角。 + +*等价于 DWMWCP_DONOTROUND* + +**值**:1 + +### Round + +在适当情况下应用窗口圆角。 + +*等价于 DWMWCP_ROUND* + +**值**:2 + +### RoundSmall + +在适当情况下应用小一些的窗口圆角。 + +*等价于 DWMWCP_ROUNDSMALL* + +**值**:3 + +## 备注 + +要使用 Windows 11 引入的圆角特性,请查看该功能的官方说明。 + + (本文档日期为 2020/10/02,但实际提交于 2021/07/17。) + +关键常量的底层值 (例如 DWMWA_WINDOW_CORNER_PREFERENCE 及 DWM_WINDOW_CORNER_PREFERENCE 枚举) 可在包含于 Windows Insider Preview SDK 的 dwmapi.h 中找到。 + +当窗口应用圆角时,系统会自动添加一条灰色轮廓。 + +在版本 10.0.22000.100 中,圆角未应用抗锯齿处理,边缘会显得较为锯齿 (标准标题栏除外) 。 + +## 另请参阅 + +### 相关文章 + +- [组件 / Window](%BASE_NAME%/components/dialogs/window) + +- [定义 / WindowHelper Class](%BASE_NAME%/definitions/controls/helpers/window-helper#cornerstyle) + +### Microsoft Learn + +- [Apply rounded corners in desktop apps for Windows 11](https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/apply-rounded-corners) + +### 源代码 + +- [GitHub | CornerHelper.cs#L309](https://github.com/iNKORE-NET/UI.WPF.Modern/blob/main/source/iNKORE.UI.WPF.Modern/Helpers/Styles/CornerHelper.cs#L309) From d41ecc8fe152639ced38f90395fd71d632cb2a22 Mon Sep 17 00:00:00 2001 From: Dorian Zhuang Date: Sun, 3 May 2026 00:07:41 +0800 Subject: [PATCH 12/15] refactor: Updating the English and Chinese documentation to standardize terminology and enhance content consistency. --- CONTRIBUTING.en-US.md | 4 ++-- CONTRIBUTING.zh-CN.md | 6 +++--- .../01. basic-input/# combo-box/index.zh-CN.mdx | 4 ++-- .../04. dialogs/# window/index.en-US.mdx | 2 +- .../08. navigation/# frame/index.en-US.mdx | 4 ++-- .../08. navigation/# frame/index.zh-CN.mdx | 2 +- .../08. navigation/# navigation-view/index.en-US.mdx | 2 +- .../00. helpers/# window-helper/index.en-US.mdx | 2 +- .../00. helpers/# window-helper/index.zh-CN.mdx | 2 +- .../00. styles/# backdrop-type/index.en-US.mdx | 10 +++++----- .../00. styles/# window-corner-style/index.en-US.mdx | 2 +- .../00. styles/# window-corner-style/index.zh-CN.mdx | 2 +- 12 files changed, 21 insertions(+), 21 deletions(-) diff --git a/CONTRIBUTING.en-US.md b/CONTRIBUTING.en-US.md index d9e8d57..03f9fdd 100644 --- a/CONTRIBUTING.en-US.md +++ b/CONTRIBUTING.en-US.md @@ -101,7 +101,7 @@ launcher-home/ ### Space between latin and other characters -For some language-specified documents (e.g. Chinese), it's essential to use spaces between [Chinese] and [English/letters/numbers/minor-symbols]. +For some language-specified documents (e.g. Chinese), it's essential to use spaces between [Chinese] and [English/letters/numbers/minor-symbols]. ### Always use English symbols (with exceptions) @@ -113,7 +113,7 @@ For short date, please use `MM/dd/yyyy` format (e.g `05/02/2024`). for long date For time, always follow `HH:mm` or `HH:mm:ss` rule (e.g. `16:20`, `08:06:45`). **The military time** (24-hour clock) will always be used. -The rules above applies to all documents and all locales, no matter what language the document is. +The rules above applies to all documents and all locales, no matter what language the document is. ### Example diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md index 3c1307c..1a0c9a9 100644 --- a/CONTRIBUTING.zh-CN.md +++ b/CONTRIBUTING.zh-CN.md @@ -22,13 +22,13 @@ 每篇文章都有其指定的文件夹,由一个两位数的数字表示 + "." (如果你想手动排序),一个 # 号加空格,再加上 kebab 格式的 slug ~~以及烤肉串盒中的蛞蝓~~组成。举个例子,一篇关于按钮设计的文章会嵌套在文件夹中,如下所示:`02.# button-design`。在列举控件和 API 的时候,我们更倾向于让其根据字母自动排序,就可以写:`# button-design`。 -- **文章元数据和内容文件**:在这些文件夹中,`index.meta.yml` 包含以 YAML 格式跨语言共享的元数据。在名为`index.{language_code}.mdx`,每个都包含特定于该语言的前 Front matter 数据。 +- **文章元数据和内容文件**:在这些文件夹中,`index.meta.yml` 包含以 YAML 格式跨语言共享的元数据。在名为`index.{language_code}.mdx`,每个都包含特定于该语言的前 Front matter 数据。 关于 Font matter 的更多信息,请参见: [markdown-features#front-matter](https://docusaurus.io/zh-CN/docs/markdown-features#front-matter) 和 [plugin-content-docs#markdown-front-matter](https://docusaurus.io/zh-CN/docs/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter)。 示例:`index.en-US.mdx`,`index.zh-CN.mdx` -- **图像命名**:文章中的图片应当和 **index.{语言代号}.mdx** 存在同一目录内,并且以简短的 kebab 形式命名,比如 `create-a-new-project.png`。对于屏幕截图和其他较小的图片,请使用 PNG 格式,对于较大的图片,请使用 JPG 或 JPEG 格式。 +- **图像命名**:文章中的图片应当和 **index.{语言代号}.mdx** 存在同一目录内,并且以简短的 kebab 形式命名,比如 `create-a-new-project.png`。对于屏幕截图和其他较小的图片,请使用 PNG 格式,对于较大的图片,请使用 JPG 或 JPEG 格式。 示例:`create-new-project.png`,`mountain-view.jpg` @@ -159,7 +159,7 @@ launcher-home/ > 分类文件夹下应该有_category_.json,_category_.en-US.json,等,他们包含了这一分组的元数据。对于不同语言公用的元数据 (比如此分类是否默认展开) ,就会在_category_.json中;对于语言特定的元数据 (比如显示名称,描述) ,就在_category_.{语言代码}.json中。 > 这个文件中可以写的内容请详见:https://docusaurus.io/zh-CN/docs/sidebar/autogenerated#category-item-metadata > -> 如果这个文件夹是单个文章,那么文件名在序号和点之后应该有一个#号,并且#和slug之间有空格。对于单个文章的文件夹,里面应该有index.meta.yml (单篇文章共用元数据) ,和内容index.{语言代号}.mdx (如index.en-US.mdx和index.zh-CN.mdx) 。对于不同语言公用的元数据,就会在index.meta.yml中以yaml格式存储;队医单个语言特定的元数据,则存储在index.{语言代号}.mdx的front matter中。关于元数据请参见:https://docusaurus.io/zh-CN/docs/markdown-features#front-matter 和 https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter。 +> 如果这个文件夹是单个文章,那么文件名在序号和点之后应该有一个#号,并且#和slug之间有空格。对于单个文章的文件夹,里面应该有index.meta.yml (单篇文章共用元数据) ,和内容index.{语言代号}.mdx (如index.en-US.mdx和index.zh-CN.mdx) 。对于不同语言公用的元数据,就会在index.meta.yml中以yaml格式存储;对于单个语言特定的元数据,则存储在index.{语言代号}.mdx的front matter中。关于元数据请参见:https://docusaurus.io/zh-CN/docs/markdown-features#front-matter 和 https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter。 > 文章中的图片应当和index.{..}.mdx存在同一目录内,并且以简短的kebab形式命名,比如 create-a-new-project.png。对于屏幕截图和其他较小的图片,请使用png格式,对于较大的图片,请使用jpg格式。 > > 文章内采用mdx格式进行编写,建议积极使用MDX的特殊功能,如告示 (https://docusaurus.io/zh-CN/docs/markdown-features/admonitions) 。 diff --git a/data/docs/ui-wpf-modern/03. components/01. basic-input/# combo-box/index.zh-CN.mdx b/data/docs/ui-wpf-modern/03. components/01. basic-input/# combo-box/index.zh-CN.mdx index 9a76cbd..f112fd9 100644 --- a/data/docs/ui-wpf-modern/03. components/01. basic-input/# combo-box/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/03. components/01. basic-input/# combo-box/index.zh-CN.mdx @@ -55,9 +55,9 @@ class VacationSpots : ObservableCollection 使用下拉列表允许用户从可以用单行文本充分表示的一组项目中选择单个值。 -使用列表或网格视图而不是 ComboBox 来显示包含多行文本或图像的项目。 +使用 ListView 或 GridView 而不是 ComboBox 来显示包含多行文本或图像的项目。 -当项目少于五个时,考虑使用单选按钮 (如果只能选择一项) 或ComboBox (如果可以选择多项) 。 +当项目少于五个时,考虑使用 RadioButton (如果只能选择一项) 或 CheckBox (如果可以选择多项) 。 当选择项目在您的应用程序流中的重要性不高时,使用 ComboBox。如果在大多数情况下建议使用默认选项,那么使用列表视图显示所有项目可能会比必要的给予选项更多关注。您可以使用 ComboBox 节省空间并最大程度地减少干扰。 diff --git a/data/docs/ui-wpf-modern/03. components/04. dialogs/# window/index.en-US.mdx b/data/docs/ui-wpf-modern/03. components/04. dialogs/# window/index.en-US.mdx index c3edf32..5429310 100644 --- a/data/docs/ui-wpf-modern/03. components/04. dialogs/# window/index.en-US.mdx +++ b/data/docs/ui-wpf-modern/03. components/04. dialogs/# window/index.en-US.mdx @@ -6,7 +6,7 @@ description: "Provides the ability to create, configure, show, and manage the li The Window class in represents a window in a Windows application. It provides a rich set of features to manage and interact with the window, such as handling its content, appearance, and behavior. This document covers the essential aspects of the Window class, including its properties, methods, and events. -- **Class**: [System.Windows](https://learn.microsoft.com/en-us/dotnet/api/system.windows)[.Window](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.button) +- **Class**: [System.Windows](https://learn.microsoft.com/en-us/dotnet/api/system.windows)[.Window](https://learn.microsoft.com/en-us/dotnet/api/system.windows.window) - **Inheritance**: [Object](https://learn.microsoft.com/en-us/dotnet/api/system.object) → (...) → [Control](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.control) → [ContentControl](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.contentcontrol) → [Window](https://learn.microsoft.com/en-us/dotnet/api/system.windows.window) diff --git a/data/docs/ui-wpf-modern/03. components/08. navigation/# frame/index.en-US.mdx b/data/docs/ui-wpf-modern/03. components/08. navigation/# frame/index.en-US.mdx index ddbea96..2966f04 100644 --- a/data/docs/ui-wpf-modern/03. components/08. navigation/# frame/index.en-US.mdx +++ b/data/docs/ui-wpf-modern/03. components/08. navigation/# frame/index.en-US.mdx @@ -188,7 +188,7 @@ Page1 Page_1 = new Page1(); private void Button_NavigateToPage1_Click(object sender, RoutedEventArgs e) { - Frame_Main.Navigate(Page1); + Frame_Main.Navigate(Page_1); } ``` @@ -425,7 +425,7 @@ Suppressing the animation is useful when implicit show/hide animations is used. ## See also -## Related articles +### Related articles - [Components / NavigationView](./navigation-view) diff --git a/data/docs/ui-wpf-modern/03. components/08. navigation/# frame/index.zh-CN.mdx b/data/docs/ui-wpf-modern/03. components/08. navigation/# frame/index.zh-CN.mdx index b49b738..a147274 100644 --- a/data/docs/ui-wpf-modern/03. components/08. navigation/# frame/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/03. components/08. navigation/# frame/index.zh-CN.mdx @@ -188,7 +188,7 @@ Page1 Page_1 = new Page1(); private void Button_NavigateToPage1_Click(object sender, RoutedEventArgs e) { - Frame_Main.Navigate(Page1); + Frame_Main.Navigate(Page_1); } ``` diff --git a/data/docs/ui-wpf-modern/03. components/08. navigation/# navigation-view/index.en-US.mdx b/data/docs/ui-wpf-modern/03. components/08. navigation/# navigation-view/index.en-US.mdx index 7056b59..6f6161e 100644 --- a/data/docs/ui-wpf-modern/03. components/08. navigation/# navigation-view/index.en-US.mdx +++ b/data/docs/ui-wpf-modern/03. components/08. navigation/# navigation-view/index.en-US.mdx @@ -8,7 +8,7 @@ The NavigationView control provides a common vertical layout for top-level areas - **Class**: [iNKORE.UI.WPF.Modern.Controls](..)[.NavigationView](.) -- **Inheritance**: [Object](https://learn.microsoft.com/en-us/dotnet/api/system.object) → (...) → [Control](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.control) → [ContentControl](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.contentcontrol) → [NavigationView](https://learn.microsoft.com/en-us/windows/apps/design/controls/navigationview) +- **Inheritance**: [Object](https://learn.microsoft.com/en-us/dotnet/api/system.object) → (...) → [Control](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.control) → [ContentControl](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.contentcontrol) → [NavigationView](.) ## Examples diff --git a/data/docs/ui-wpf-modern/05. definitions/00. controls/00. helpers/# window-helper/index.en-US.mdx b/data/docs/ui-wpf-modern/05. definitions/00. controls/00. helpers/# window-helper/index.en-US.mdx index 27b97dc..ec98574 100644 --- a/data/docs/ui-wpf-modern/05. definitions/00. controls/00. helpers/# window-helper/index.en-US.mdx +++ b/data/docs/ui-wpf-modern/05. definitions/00. controls/00. helpers/# window-helper/index.en-US.mdx @@ -78,7 +78,7 @@ This property decides whether the **Background** property will be applied to the ### ApplyNoise -This property decides whether the noise effect will be applied to the window. If you set this property to **False**, the noise effect will not be rendered. The noise effect is a subtle noise texture that makes the window look more natural and less flat. The default value is always **False** since we figured out that when you use the acrylic backdrop, the noise effect will be covered by system and it's not necessary to render the noise effect again. +This property decides whether the noise effect will be applied to the window. If you set this property to **False**, the noise effect will not be rendered. The noise effect is a subtle noise texture that makes the window look more natural and less flat. The default value is always **False** since we figured out that when you use the Acrylic backdrop, the noise effect will be covered by system and it's not necessary to render the noise effect again. You can set this property to **True** to enable an additional noise effect manually. diff --git a/data/docs/ui-wpf-modern/05. definitions/00. controls/00. helpers/# window-helper/index.zh-CN.mdx b/data/docs/ui-wpf-modern/05. definitions/00. controls/00. helpers/# window-helper/index.zh-CN.mdx index 6f3c238..53194bb 100644 --- a/data/docs/ui-wpf-modern/05. definitions/00. controls/00. helpers/# window-helper/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/05. definitions/00. controls/00. helpers/# window-helper/index.zh-CN.mdx @@ -70,7 +70,7 @@ public static class WindowHelper {...} ### ApplyNoise -决定是否为窗口启用噪点效果。噪点是一种细微的纹理效果,可让窗口看起来更自然、不那么平面。默认值为 `False`,因为在使用 acrylic 背景时系统会覆盖噪点效果,故通常无需重复渲染。 +决定是否为窗口启用噪点效果。噪点是一种细微的纹理效果,可让窗口看起来更自然、不那么平面。默认值为 `False`,因为在使用 Acrylic 背景时系统会覆盖噪点效果,故通常无需重复渲染。 你也可以手动将其设为 `True` 以启用额外噪点效果。 diff --git a/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# backdrop-type/index.en-US.mdx b/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# backdrop-type/index.en-US.mdx index 773e12f..c156dc3 100644 --- a/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# backdrop-type/index.en-US.mdx +++ b/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# backdrop-type/index.en-US.mdx @@ -27,7 +27,7 @@ None of the system backdrops will be applied. The window will remain solid. ### Mica -The window will have a Mica effect, which is a translucent background that blurs the desktop background it. +The window will have a Mica effect, which is a translucent background that blurs the desktop background behind it. **Value**: 2 @@ -39,11 +39,11 @@ Mica is mode aware; it supports both light and dark modes. Mica also indicates w ### Acrylic -The window will have an acrylic effect and determine which API will be used depending on the system version, which is a translucent background that blurs the content behind it. +The window will have an Acrylic effect and determine which API will be used depending on the system version, which is a translucent background that blurs the content behind it. **Value**: 3 -Acrylic is a semi-transparent material that replicates the effect of frosted glass. In Windows 11, acrylic has been updated to be brighter and more translucent, allowing for a stronger contextual relationship with the visuals behind it. Acrylic is used only for transient, light-dismiss surfaces such as flyouts and context menus. +Acrylic is a semi-transparent material that replicates the effect of frosted glass. In Windows 11, Acrylic has been updated to be brighter and more translucent, allowing for a stronger contextual relationship with the visuals behind it. Acrylic is used only for transient, light-dismiss surfaces such as flyouts and context menus. Acrylic is mode aware; it supports both light and dark mode. @@ -51,11 +51,11 @@ Acrylic is mode aware; it supports both light and dark mode. ### Tabbed -The window will have a tabbed effect, which looks like Mica but have deeper colors. This is often used when there's a root TabControl on the window (e.g. the Windows Explorer). +The window will have a Tabbed effect, which looks like Mica but has deeper colors. This is often used when there's a root TabControl on the window (e.g. the Windows Explorer). **Value**: 4 -Mica Alt (aka. Tabbed) is a variant of Mica, with stronger tinting of the user's desktop background color. You can apply Mica Alt to your app's backdrop to provide a deeper visual hierarchy than Mica, especially when creating an app with a tabbed title bar. Mica Alt is available for apps that use Windows App SDK 1.1 or later, while running on Windows 11 version 22000 or later. +Mica Alt (aka. Tabbed) is a variant of Mica, with stronger tinting of the user's desktop background color. You can apply Mica Alt to your app's backdrop to provide a deeper visual hierarchy than Mica, especially when creating an app with a Tabbed title bar. Mica Alt is available for apps that use Windows App SDK 1.1 or later, while running on Windows 11 version 22000 or later. ![](mica-alt-tabs.png) diff --git a/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# window-corner-style/index.en-US.mdx b/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# window-corner-style/index.en-US.mdx index c57e251..1724c4a 100644 --- a/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# window-corner-style/index.en-US.mdx +++ b/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# window-corner-style/index.en-US.mdx @@ -74,7 +74,7 @@ On version 10.0.22000.100, anti-aliasing is not applied to the rounded corners a ### Microsoft Learn -- [Apply rounded corners in desktop apps for Windows 11](https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/apply-rounded-corners) +- [Apply rounded corners in desktop apps for Windows 11](https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/ui/apply-rounded-corners) ### Source code diff --git a/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# window-corner-style/index.zh-CN.mdx b/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# window-corner-style/index.zh-CN.mdx index 4f03730..af23359 100644 --- a/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# window-corner-style/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/05. definitions/00. helpers/00. styles/# window-corner-style/index.zh-CN.mdx @@ -74,7 +74,7 @@ public enum WindowCornerStyle : uint {...} ### Microsoft Learn -- [Apply rounded corners in desktop apps for Windows 11](https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/apply-rounded-corners) +- [Apply rounded corners in desktop apps for Windows 11](https://learn.microsoft.com/zh-cn/windows/apps/desktop/modernize/ui/apply-rounded-corners) ### 源代码 From 37c61a3712a33c9f16c5c0de85976513de4ddc0c Mon Sep 17 00:00:00 2001 From: Dorian Zhuang Date: Sun, 3 May 2026 00:10:53 +0800 Subject: [PATCH 13/15] fix: minor translation --- data/docs/ui-wpf-modern/01.# introduction/index.zh-CN.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/docs/ui-wpf-modern/01.# introduction/index.zh-CN.mdx b/data/docs/ui-wpf-modern/01.# introduction/index.zh-CN.mdx index b2b1ff1..07a82c1 100644 --- a/data/docs/ui-wpf-modern/01.# introduction/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/01.# introduction/index.zh-CN.mdx @@ -48,8 +48,8 @@ iNKORE.UI.WPF.Modern 是一个创新的 Windows Presentation Foundation (WPF) ## 文档有缺失吗? -如果您发现文档有问题或对如何改进文档或项目有建议,请为我们[提交 Issue](https://github.com/iNKORE-NET/UI.WPF.Modern/issues/new/choose),或[通过社交媒体联系我们](https://inkore.net/about#social)。 +如果您发现文档有问题或对如何改进文档或项目有建议,请为我们[提交 issue](https://github.com/iNKORE-NET/UI.WPF.Modern/issues/new/choose),或[通过社交媒体联系我们](https://inkore.net/about#social)。 ## 结语 -iNKORE.UI.WPF.Modern 不仅仅是一个 UI 库。它是一个工具,可以改变开发人员构建应用程序的方式,使他们能够以极少的努力实现现代、用户友好的界面。它是增强 WPF 应用程序的完美选择,同时保持广泛的兼容性和易用性。 +iNKORE.UI.WPF.Modern 不仅仅是一个 UI 库。它是一个工具,可以改变开发人员构建应用程序的方式,使他们能够以最小的努力实现现代、用户友好的界面。它是增强 WPF 应用程序的完美选择,同时保持广泛的兼容性和易用性。 From 2062e238fb93b14fc72ec93cb0435ef7dc1e14a9 Mon Sep 17 00:00:00 2001 From: Wilson Wu Date: Mon, 4 May 2026 10:15:23 +0800 Subject: [PATCH 14/15] Update Chinese docs wording and examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make small copy edits across Chinese docs: change the onboarding sample button from “你好世界!” to “Hello World!”, clarify ComboBox wording by adding “且没有紧凑状态”, and adjust the blog post summary. Note: the blog post file contains unresolved merge conflict markers (<<<<<<<, =======, >>>>>>>) and requires manual resolution. --- .../index.zh-CN.mdx | 4 ++++ data/docs/ui-wpf-modern/02.# onboarding/index.zh-CN.mdx | 2 +- .../01. basic-input/# combo-box/index.zh-CN.mdx | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/data/blogs/blog/2024-09-17-reflection-interest-in-opensource-community/index.zh-CN.mdx b/data/blogs/blog/2024-09-17-reflection-interest-in-opensource-community/index.zh-CN.mdx index 3ec2d43..1d859a9 100644 --- a/data/blogs/blog/2024-09-17-reflection-interest-in-opensource-community/index.zh-CN.mdx +++ b/data/blogs/blog/2024-09-17-reflection-interest-in-opensource-community/index.zh-CN.mdx @@ -10,7 +10,11 @@ tags: ["开源", "利益", "回顾与反思", "社区", "iNKORE.UI.WPF.Modern"] :::note +<<<<<<< Updated upstream **极限省流版 (表达并不准确也不够中立,有时间和心情的话最好看下文):** 开放源代码社区里,我们借鉴了别人的代码 (根据 MIT 许可证完全合法合理吗,除了我们疏忽未将原作者名字进行标注) 做了个衍生作品,我们做得比原作者好 (用的人比原作多,收藏数量是原作的十多倍) ,原作者急眼了,到处去群里爆我们阴阳我们。虽然我们没有按照许可证要求标明原作者,但是我们在事情发生之后第一时间找到了原作者,可是他变本加厉,继续阴阳... +======= +**极限省流版 (表达并不准确也不够中立,有时间和心情的话最好看下文):** 开放源代码社区里,我们借鉴了别人的代码 (根据 MIT 许可证完全合法合理,除了我们疏忽未将原作者名字进行标注) 做了个衍生作品,我们做得比原作者好(用的人比原作多,收藏数量是原作的十多倍),原作者急眼了,到处去群里爆我们阴阳我们。虽然我们没有按照许可证要求标明原作者,但是我们在事情发生之后第一时间找到了原作者,可是他变本加厉,继续阴阳... +>>>>>>> Stashed changes ::: diff --git a/data/docs/ui-wpf-modern/02.# onboarding/index.zh-CN.mdx b/data/docs/ui-wpf-modern/02.# onboarding/index.zh-CN.mdx index ce1b048..ebf5a3a 100644 --- a/data/docs/ui-wpf-modern/02.# onboarding/index.zh-CN.mdx +++ b/data/docs/ui-wpf-modern/02.# onboarding/index.zh-CN.mdx @@ -200,7 +200,7 @@ ui:WindowHelper.SystemBackdropType="Mica" -