maui-toolkit
Copilot instructions749 starsChanged 14 months agoMITView on GitHub
Guidance for GitHub Copilot when working on the Syncfusion Toolkit for .NET MAUI repository.
- Commits and pushes
We split this copilot-instructions.md into the rules it gives an agent
13 rules. About 1 is common, 7 are distinctive, and 5 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
When performing a code review on PRs that change functional code, verify that the PR title and description accurately match the actual …
- Distinctive: line 154
All unit tests live under:
- Distinctive: line 174
Run all unit tests:
- Common: line 212
Follow the .NET Foundation Coding Style with these project-specific exceptions:
- Very specific: line 214
Default accessibility: Do NOT use the private keyword (it is the default in C#)
- Distinctive: line 215
Indentation: Use hard tabs (not spaces)
- Very specific: line 216
Nullable: Always respect nullable reference type annotations (enable globally)
- Very specific: line 271
Every PR description must follow .github/PULL_REQUEST_TEMPLATE.md:
- Distinctive: line 290
All PRs target main branch
- Distinctive: line 300
Update XML documentation comments for all public APIs
- Distinctive: line 301
Follow existing documentation patterns in the control's source files
- Very specific: line 302
Add or update <summary>, <param>, <returns>, and <remarks> tags
- Distinctive: line 317
When a user request matches an agent's trigger phrases, immediately delegate to the appropriate agent.
≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Copilot Development Environment Instructions
This document provides specific guidance for GitHub Copilot when working on the Syncfusion Toolkit for .NET MAUI repository. It serves as context for understanding the project structure, development workflow, and best practices.
Code Review Instructions
When performing a code review on PRs that change functional code, verify that the PR title and description accurately match the actual implementation and reference the correct issue number(s) in the Fixes # field.
Repository Overview
Syncfusion Toolkit for .NET MAUI is an open-source UI controls library built on top of .NET MAUI, providing rich, cross-platform UI controls and components for Android, iOS, macOS, and Windows applications.
Key Technologies
- .NET MAUI — Cross-platform UI framework (Android, iOS, macOS, Windows)
- .NET SDK — Version
10.0.x(seepipelines/build.yml) - MSBuild — Solution:
Syncfusion.Maui.Toolkit.slnat repository root - xUnit — Unit testing framework (
Syncfusion.Maui.Toolkit.UnitTest) - C# with nullable reference types enabled globally (
Directory.Build.props)
Repository Source
- GitHub:
https://github.com/syncfusion/maui-toolkit - Primary branch:
main(all PRs targetmain)
Development Environment Setup
Prerequisites
- .NET 10 SDK —
dotnet --versionshould return10.x - Visual Studio 17.10+ (Windows) or VS Code + .NET MAUI Dev Kit (macOS)
- Android SDK — Install via Visual Studio or Android SDK Manager
- OpenJDK 17 — Required for Android targets
- Xcode (macOS only) — Required for iOS and MacCatalyst
Initial Setup
# Restore NuGet packages and build the solution
dotnet restore ./Syncfusion.Maui.Toolkit.sln
dotnet build ./Syncfusion.Maui.Toolkit.slnPlatform Requirements
| Platform | Host | Requirements |
| Android | Windows / macOS | OpenJDK 17 + Android SDK |
| iOS / MacCatalyst | macOS | Xcode (current stable) |
| Windows | Windows | Windows SDK |
Project Structure
Repository Root
maui-toolkit/
├── maui/
│ ├── src/ ← All control source code
│ ├── tests/ ← Unit tests
│ └── samples/ ← Sample gallery and sandbox
├── samples/ ← Top-level sample apps
├── pipelines/ ← Azure DevOps CI pipelines
├── targets/ ← MSBuild targets
├── .github/ ← GitHub workflows, templates, agents
├── Directory.Build.props
└── Syncfusion.Maui.Toolkit.slnSource Controls (maui/src/)
Each control lives in its own folder under maui/src/:
| Control | Path |
| Charts (Cartesian, Circular, Funnel, Pyramid) | maui/src/Charts/ |
| Spark Charts | maui/src/SparkCharts/ |
| Sunburst Chart | maui/src/SunburstChart/ |
| Calendar | maui/src/Calendar/ |
| Popup | maui/src/Popup/ |
| Bottom Sheet | maui/src/BottomSheet/ |
| Tab View | maui/src/TabView/ |
| Accordion / Expander | maui/src/Accordion/, maui/src/Expander/ |
| Navigation Drawer | maui/src/NavigationDrawer/ |
| Carousel | maui/src/Carousel/ |
| Cards | maui/src/Cards/ |
| Chip | maui/src/Chip/ |
| Segmented Control | maui/src/SegmentedControl/ |
| Button | maui/src/Button/ |
| Numeric Entry | maui/src/NumericEntry/ |
| OTP Input | maui/src/OtpInput/ |
| Text Input Layout | maui/src/TextInputLayout/ |
| Picker | maui/src/Picker/ |
| Pull to Refresh | maui/src/PullToRefresh/ |
| Progress Bar | maui/src/ProgressBar/ |
| Shimmer | maui/src/Shimmer/ |
| Effects View | maui/src/EffectsView/ |
| Core (shared utilities) | maui/src/Core/ |
Core Infrastructure (maui/src/Core/)
Shared utilities used across all controls:
Animation/— Animation helpersBaseView/— Base view classes (SfView)ButtonBase/— Button base implementationDrawableView/— Custom drawable canvas viewEntryView/— Entry-based view utilitiesExtensions/— Extension methodsFontElement/— Font-related bindable propertiesGestureDetector/— Cross-platform gesture supportHelper/— General helper utilitiesKeyboardDetector/— Keyboard event handlingLegend/— Shared legend for chart controlsLocalization/— Localization resourcesPickerView/— Base picker implementationTabView/— Tab view baseTextMeasurer/— Text size measurementTextStyle/— Text styling utilitiesTheme/— Light/dark theme supportTooltip/— Tooltip implementationTouchDetector/— Touch event detectionViewExtensions/— View helper extensionsWindowOverlay/— Window overlay support
Platform-Specific Code
Platform-specific files use folder and naming conventions:
Subfolder convention:
Android/— Android-only implementationsiOS/— iOS-only implementationsMacCatalyst/— MacCatalyst-only implementationsWindows/— Windows-only implementations
File extension convention:
.android.cs— Android TFM only.ios.cs— iOS and MacCatalyst TFMs.maccatalyst.cs— MacCatalyst TFM only (does NOT compile for iOS).windows.cs— Windows TFM only
⚠️
.ios.csfiles compile for both iOS and MacCatalyst. If you have both.ios.csand.maccatalyst.csfor the same file, both will compile for MacCatalyst.
Tests (maui/tests/)
All unit tests live under:
maui/tests/Syncfusion.Maui.Toolkit.UnitTest/
├── Calendar/
├── Buttons/
├── Picker/
├── Chart/
│ ├── Features/
│ └── DefaultTests/
├── Cards/
├── Editors/
├── Layout/
├── Navigation/
├── Notification/
├── ProgressBar/
├── SparkChart/
└── Miscellaneous/Run all unit tests:
dotnet test maui/tests/Syncfusion.Maui.Toolkit.UnitTest/Sample Projects (maui/samples/)
| Project | Purpose |
Gallery/ | Full control gallery demonstrating all features |
Sandbox/ | Empty project for quick testing and issue reproduction |
Development Workflow
Building
# Build entire solution
dotnet build ./Syncfusion.Maui.Toolkit.sln
# Build specific control project
dotnet build maui/src/Syncfusion.Maui.Toolkit.csprojRunning Tests
# Run all unit tests
dotnet test maui/tests/Syncfusion.Maui.Toolkit.UnitTest/
# Run tests for a specific control
dotnet test maui/tests/Syncfusion.Maui.Toolkit.UnitTest/ --filter "FullyQualifiedName~Chart"Code Style
Follow the .NET Foundation Coding Style with these project-specific exceptions:
- Default accessibility: Do NOT use the
privatekeyword (it is the default in C#) - Indentation: Use hard tabs (not spaces)
- Nullable: Always respect nullable reference type annotations (
enableglobally)
CI Pipelines (Azure DevOps)
| Pipeline | File | Purpose |
| PR Build | pipelines/build.yml | Full PR validation on Windows |
The CI pipeline:
- Installs .NET 10 SDK
- Installs .NET MAUI workloads
- Builds the solution
- Runs unit tests
Contribution Guidelines
Git Workflow
🚨 CRITICAL Git Rules for Copilot:
- NEVER commit directly to
main— Always create a feature branch. - When amending an existing PR, check out the PR's branch directly (
gh pr checkout XXXXX). Do NOT create a new branch off a PR branch. - Do NOT rebase, squash, or force-push unless explicitly requested.
Safe Git Workflow:
# Create a feature branch
git checkout -b fix/issue-XXXXX-short-description
# Commit with a descriptive message
git add .
git commit -m "Fix: Short description of the change
Fixes #XXXXX"
# Push to remote
git push -u origin fix/issue-XXXXX-short-descriptionWhen amending an existing PR:
gh pr checkout XXXXX
git add .
git commit -m "Fix: Description of additional change"
# STOP and ask the user before pushingBranching
main— All bug fixes and new features targetmain
Pull Request Requirements
Every PR description must follow .github/PULL_REQUEST_TEMPLATE.md:
### Root Cause of the Issue
<!-- Description of root cause -->
### Description of Change
<!-- What was changed and why -->
### Issues Fixed
Fixes #XXXXX
### Screenshots
#### Before:
#### After:- Always check "Allow edits from maintainers"
- At least two Syncfusion team reviewers must approve before merge
- All PRs target
mainbranch
Issue References
- Bug reports:
.github/ISSUE_TEMPLATE/bug-report.yml - Feature requests:
.github/ISSUE_TEMPLATE/feature-request.yml - Browse backlog:
https://github.com/syncfusion/maui-toolkit/issues?q=is%3Aopen+is%3Aissue+milestone%3ABacklog
Public API Changes
- Update XML documentation comments for all public APIs
- Follow existing documentation patterns in the control's source files
- Add or update
<summary>,<param>,<returns>, and<remarks>tags
Custom Agents
Available Custom Agents
- issue-resolver — End-to-end agent for fixing bugs and implementing features from GitHub issues or user prompts
- Use when: "Fix issue #XXXXX", "Implement feature from #XXXXX", "Resolve bug #XXXXX"
- Phases: Pre-flight → Fix → Report
- Location:
.github/agents/issue-resolver.md
Delegation Policy
When a user request matches an agent's trigger phrases, immediately delegate to the appropriate agent. Do not ask for permission.
Examples:
- "Fix issue #123" → Delegate to issue-resolver agent
- "Implement feature #456" → Delegate to issue-resolver agent
- "What does issue #789 describe?" → Answer directly (informational query)
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- multi-model-analysisSkill
- testing-guideSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

