Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[SourceGenerator/Samples] Ability to add additional C# files to C# code display in samples

未关闭
#352 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
csharp
领域
tooling

调研方向

从 SourceGenerator/Samples 实现开始,跟踪提供主页源代码的现有属性或参数。定义如何指定和显示其他 C# 文件,然后验证 sample 是否可以在其 C# 标签页中显示多个源文件。

由索引模型根据 Issue 内容生成。

描述

bug :bug: documentation :page_with_curl: sample app 🖼 source generator :gear:
Describe the bug

Sometimes we write auxiliary helpers, converters, etc... when writing a sample.

Currently our XAML/C# code display only shows the main page. So we either have to include those converters inline in the page, but if we want to use them across samples then we'd want to have them as separate files.

Therefore we should have another attribute or parameter to an existing attribute that allows us to point to other classes whose source code we should include for the C# tab.

Steps to reproduce
N/A
Expected behavior

Able to include multiple C# source files to show under the source code display in a sample.

Screenshots

No response

Code Platform
  • UWP
  • WinAppSDK / WinUI 3
  • Web Assembly (WASM)
  • Android
  • iOS
  • MacOS
  • Linux / GTK
Windows Build Number
  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)
Other Windows Build number

No response

App minimum and target SDK version
  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Other (specify)
Other SDK version

No response

Visual Studio Version

No response

Visual Studio Build Number

No response

Device form factor

No response

Additional context

No response

Help us help you

Yes, but only if others can assist.

主要语言
C#
星标
483
派生
89
平均合并
4 天 5 小时
30 天内合并 PR
2

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CommunityToolkit/Labs-Windows 的其他 Issue

查看 CommunityToolkit/Labs-Windows 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。