🧪 [Experiment] Ribbon
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- csharp
- 领域
- desktop-dev, frontend
调研方向
首先定位 Ribbon、RibbonGroup、RibbonCollapsibleGroup 和 RibbonPanel 组件及其 RibbonStyle.xaml 文件。该 issue 将单元测试、社区反馈和技术审查标记为未完成;要完成这项工作,需要处理 WinUI 3 实验中剩余的这些方面,但其中没有指定任何测试文件或具体入口点。
由索引模型根据 Issue 内容生成。
描述
Approved from Discussion
https://github.com/CommunityToolkit/Labs-Windows/discussions/544
Problem Statement
Office and applications like Paint are using a "large" ribbon to display all their available commands. Those ribbons display all the available commands in groups. Those groups can automatically be collapsed if there is not enough space available to display them all based on a priority order.
The toolkit already provides a "small" ribbon through the TabbedCommandBar (See https://github.com/CommunityToolkit/Labs-Windows/discussions/500 and https://github.com/CommunityToolkit/Windows/pull/243) but does not have any way to display the "large" ribbon.
Overview
This experiment adds the following components:
- Ribbon the ribbon control.
- RibbonGroup an always displayed group container.
- RibbonCollapsibleGroup a group container which can be collapsed based on a priority order if there is not enough space available to fully display the group.
- RibbonPanel a custom panel for the Ribbon to automatically expand or collapse the RibbonCollapsibleGroups
Using
You can try it out via the NuGet Packages here:
- UWP: https://dev.azure.com/dotnet/CommunityToolkit/_artifacts/feed/CommunityToolkit-Labs/NuGet/CommunityToolkit.Labs.Uwp.Ribbon/overview/0.0.1
- WinUI 3: https://dev.azure.com/dotnet/CommunityToolkit/_artifacts/feed/CommunityToolkit-Labs/NuGet/CommunityToolkit.Labs.WinUI.Ribbon/overview/0.0.1
Read more about Preview Packages here.
Code
<Ribbon>
<RibbonGroup Label="Selection" />
<RibbonCollapsibleGroup Label="Edit" Style="{StaticResource RibbonLeftCollapsibleGroupStyle}" Priority="1">
<!-- group content -->
</RibbonCollapsibleGroup>
<RibbonCollapsibleGroup Label="Shapes" Style="{StaticResource RibbonLeftCollapsibleGroupStyle}" Priority="2">
<!-- group content -->
</RibbonCollapsibleGroup>
</Ribbon>
Result
Additional info
The control comes with a list of predefined styles from its RibbonStyle.xaml file. All the different parts of the Ribbon should support light templating.
The RibbonLeftGroupStyle/RibbonRightGroupStyle and RibbonLeftCollapsibleGroupStyle/ RibbonRightCollapsibleGroupStyle can be used to add a separator before or after the group.
Implementation Requirements
- Working Prototype
- Feature Complete
- Documentation
- Samples
- Unit Tests
- Community Feedback / Usage Testimonies
Tested Platforms
- UWP
- WinAppSDK / WinUI 3
- Web Assembly (WASM)
- Android
- iOS
- MacOS
- Linux / GTK
Technical Review
- Accessibility Audit
- API/Naming Review
- Code Quality/Style
- Dependency Review
- Design/Style Review
- Final Approval
Community Help?
Yes
- 主要语言
- C#
- 星标
- 483
- 派生
- 89
- 平均合并
- 4 天 5 小时
- 30 天内合并 PR
- 2
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CommunityToolkit/Labs-Windows 的其他 Issue
-
bug :bug:
难度 1/5 1-3 小时 新手友好度 80/100
CommunityToolkit/Labs-Windows#815 ·
-
bug :bug:
难度 4/5 3-5 天 新手友好度 38/100
CommunityToolkit/Labs-Windows#816 ·
-
bug :bug:
难度 3/5 1-2 天 新手友好度 55/100
CommunityToolkit/Labs-Windows#814 ·
-
experiment :test_tube:
难度 4/5 3-5 天 新手友好度 48/100
CommunityToolkit/Labs-Windows#812 ·
-
ux :paintbrush:
难度 3/5 1-2 天 新手友好度 52/100
CommunityToolkit/Labs-Windows#808 · 1 条评论 ·
查看 CommunityToolkit/Labs-Windows 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
PCL-Community/PCL-CE#3658 ·
维护者通常 1 天内回复
-
Deploy & Patch-issues opprettes ikke: create-pnd-issues.yml har feilet hver uke siden 2025-09-08未关闭
难度 2/5 1-3 小时 新手友好度 62/100
Altinn/altinn-auth#4359 ·
维护者通常 1 天内回复
-
type/automation type/tech-debt
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
no-stack-trace
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
S: Untriaged
难度 2/5 1-3 小时 新手友好度 62/100
project-wayfarer/wayfarer-14#1650 ·
维护者通常 2 天内回复