Thank you for your interest in contributing to the .NET MAUI Linux Platform! This project is developed and maintained by MarketAlly Pte Ltd under the leadership of David H. Friedel Jr.
This document provides guidelines and information for contributors.
This project follows the .NET Foundation Code of Conduct. By participating, you are expected to uphold this code.
- .NET 9.0 SDK
- Linux development environment (Ubuntu 22.04+ recommended)
- Git
- Fork and clone the repository:
git clone https://github.com/your-username/maui-linux.git
cd maui-linux- Install dependencies:
# Ubuntu/Debian
sudo apt-get install libx11-dev libxrandr-dev libxcursor-dev libxi-dev libgl1-mesa-dev
# Fedora
sudo dnf install libX11-devel libXrandr-devel libXcursor-devel libXi-devel mesa-libGL-devel- Build the project:
dotnet build- Run tests:
dotnet test- Check if the bug has already been reported in Issues
- Use the bug report template
- Include reproduction steps, expected behavior, and actual behavior
- Include system information (distro, .NET version, desktop environment)
- Check existing feature requests first
- Use the feature request template
- Explain the use case and benefits
- Create a branch from
main:
git checkout -b feature/your-feature-name-
Make your changes following the coding guidelines
-
Add or update tests as needed
-
Ensure all tests pass:
dotnet test- Commit your changes:
git commit -m "Add feature: description"- Push and create a pull request
- Use C# 12 features where appropriate
- Follow .NET naming conventions
- Use
varfor obvious types - Prefer expression-bodied members for simple methods
- Use nullable reference types
Views/ # Skia-rendered view implementations
Skia*.cs # View classes (SkiaButton, SkiaLabel, etc.)
Handlers/ # MAUI handler implementations
*Handler.cs # Platform handlers
Services/ # Platform services
*Service.cs # Service implementations
Rendering/ # Rendering infrastructure
*.cs # Rendering helpers and caches
tests/ # Unit tests
Views/ # View tests
Services/ # Service tests
- Views:
Skia{ControlName}(e.g.,SkiaButton,SkiaCarouselView) - Handlers:
{ControlName}Handler(e.g.,ButtonHandler) - Services:
{Feature}Service(e.g.,ClipboardService) - Tests:
{ClassName}Tests(e.g.,SkiaButtonTests)
- Add XML documentation to public APIs
- Update README and docs for new features
- Include code examples where helpful
Example:
/// <summary>
/// A horizontally scrolling carousel view with snap-to-item behavior.
/// </summary>
public class SkiaCarouselView : SkiaLayoutView
{
/// <summary>
/// Gets or sets the current position (0-based index).
/// </summary>
public int Position { get; set; }
}- Write unit tests for new functionality
- Maintain test coverage above 80%
- Use descriptive test names:
MethodName_Condition_ExpectedResult
Example:
[Fact]
public void Position_WhenSetToValidValue_UpdatesPosition()
{
var carousel = new SkiaCarouselView();
carousel.AddItem(new SkiaLabel());
carousel.Position = 0;
Assert.Equal(0, carousel.Position);
}LinuxApplicationcreates the main windowSkiaRenderingEnginemanages the render loop- Views implement
Draw(SKCanvas canvas)for rendering DirtyRectManageroptimizes partial redraws
SkiaView (base class)
├── SkiaLayoutView (containers)
│ ├── SkiaStackLayout
│ ├── SkiaScrollView
│ └── SkiaCarouselView
└── Control views
├── SkiaButton
├── SkiaLabel
└── SkiaEntry
Handlers connect MAUI virtual views to platform-specific implementations:
public class ButtonHandler : ViewHandler<IButton, SkiaButton>
{
public static void MapText(ButtonHandler handler, IButton button)
{
handler.PlatformView.Text = button.Text;
}
}feature/- New featuresfix/- Bug fixesdocs/- Documentation updatesrefactor/- Code refactoringtest/- Test additions/fixes
Follow conventional commits:
feat:- New featurefix:- Bug fixdocs:- Documentationtest:- Testsrefactor:- Code refactoringchore:- Maintenance
- Code follows style guidelines
- Tests added/updated
- Documentation updated
- All tests pass
- No breaking changes (or documented if unavoidable)
- Additional control implementations
- Accessibility improvements (AT-SPI2)
- Performance optimizations
- Wayland support improvements
Look for issues labeled good-first-issue for beginner-friendly tasks.
- API documentation improvements
- Tutorials and guides
- Sample applications
- Open a Discussion for questions
- Join the .NET community on Discord
- Check existing issues and discussions
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to .NET MAUI on Linux!