-
Notifications
You must be signed in to change notification settings - Fork 839
docs: Improve porting agent instructions #22336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR significantly expands and improves the WinUI porting agent instructions, transforming a concise guide into a comprehensive reference document for converting WinUI C++ code to Uno Platform C#.
Changes:
- Restructured and expanded file layout documentation with detailed examples for each partial file type
- Added extensive sections on event handling patterns, including inline handlers, CompositeDisposable, and lifecycle patterns
- Introduced new helper method documentation (GetTemplateChild, SetDefaultStyleKey, ResourceAccessor, SharedHelpers, MUX_ASSERT)
- Added comprehensive C++ to C# syntax conversion examples
- Included conditional compilation patterns and TODO comment conventions
- Added section on porting code snippets with guidance for handling unported dependencies
- Included WinUI source location reference for easier navigation
| @@ -1,312 +1,713 @@ | |||
| --- | |||
| name: WinUI Porting Agent | |||
| description: Helps with porting of WinUI code from C++ to C# | |||
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description is missing the required issue link. According to repository guidelines, every PR must reference a proper GitHub issue using "Fixes", "Closes", or "Related to" with a fully qualified URL (e.g., Fixes https://github.com/unoplatform/uno/issues/#<ISSUE_NUMBER>). The description currently shows closes # without an issue number.
| ### 2.3. Header File: `ControlName.Header.cs` or `ControlName.h.mux.cs` | ||
|
|
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent naming convention for header files. The section title (line 81) mentions both ControlName.Header.cs and ControlName.h.mux.cs, but subsequent references use different naming. For example, line 124 refers to .Header.cs while line 677 refers to .h.mux.cs. The document should clarify which naming convention is preferred or if both are acceptable, to avoid confusion for users following the porting guide.
| ### 2.3. Header File: `ControlName.Header.cs` or `ControlName.h.mux.cs` | |
| ### 2.3. Header File: `ControlName.h.mux.cs` (preferred) / `ControlName.Header.cs` (legacy) | |
| - **Preferred for new ports:** `ControlName.h.mux.cs` | |
| - **Legacy/alternate pattern:** `ControlName.Header.cs` (use only when updating existing files that already follow this naming) |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22336/docs/index.html |
GitHub Issue: closes #
PR Type:
What is the current behavior? 🤔
What is the new behavior? 🚀
PR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information ℹ️