2025-12-19 05:01:34 -05:00
# OpenMaui Linux Platform
2025-12-19 09:30:16 +00:00
A comprehensive Linux platform implementation for .NET MAUI using SkiaSharp rendering.
2025-12-19 05:01:34 -05:00
[](https://www.nuget.org/packages/OpenMaui.Controls.Linux)
2025-12-19 09:30:16 +00:00
[](LICENSE)
2025-12-19 04:36:16 -05:00
**Developed by [MarketAlly LLC](https://marketally.com) **
**Lead Architect: David H. Friedel Jr. **
2025-12-19 09:30:16 +00:00
## Overview
This project brings .NET MAUI to Linux desktops with native X11/Wayland support, hardware-accelerated Skia rendering, and full platform service integration.
### Key Features
- **Full Control Library**: 35+ controls including Button, Label, Entry, CarouselView, RefreshView, SwipeView, and more
- **Native Integration**: X11 and Wayland display server support
- **Accessibility**: AT-SPI2 screen reader support and high contrast mode
- **Platform Services**: Clipboard, file picker, notifications, global hotkeys, drag & drop
- **Input Methods**: IBus and XIM support for international text input
- **High DPI**: Automatic scale factor detection for GNOME, KDE, and X11
## Quick Start
### Installation
``` bash
2025-12-19 05:17:50 -05:00
# Install the templates
2025-12-19 05:01:34 -05:00
dotnet new install OpenMaui.Linux.Templates
2025-12-19 09:30:16 +00:00
2025-12-19 05:17:50 -05:00
# Create a new project (choose one):
dotnet new openmaui-linux -n MyApp # Code-based UI
dotnet new openmaui-linux-xaml -n MyApp # XAML-based UI (recommended)
2025-12-19 09:30:16 +00:00
2025-12-19 05:17:50 -05:00
cd MyApp
2025-12-19 09:30:16 +00:00
dotnet run
```
### Manual Installation
``` bash
2026-03-06 22:11:46 -05:00
dotnet add package OpenMaui.Controls.Linux
2025-12-19 09:30:16 +00:00
```
2025-12-19 05:17:50 -05:00
## XAML Support
OpenMaui fully supports standard .NET MAUI XAML syntax. Use the familiar XAML workflow:
``` xml
<!-- MainPage.xaml -->
<ContentPage xmlns= "http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x= "http://schemas.microsoft.com/winfx/2009/xaml"
x:Class= "MyApp.MainPage" >
<VerticalStackLayout >
<Label Text= "Hello, OpenMaui!" FontSize= "32" />
<Button Text= "Click me" Clicked= "OnButtonClicked" />
<Entry Placeholder= "Enter text..." />
<Slider Minimum= "0" Maximum= "100" />
</VerticalStackLayout>
</ContentPage>
```
``` csharp
// MauiProgram.cs
var builder = MauiApp . CreateBuilder ( ) ;
builder
. UseMauiApp < App > ( )
. UseOpenMauiLinux ( ) ; // Enable Linux with XAML support
```
2025-12-19 09:30:16 +00:00
## Supported Controls
| Category | Controls |
|----------|----------|
| **Basic ** | Button, Label, Entry, Editor, CheckBox, Switch, RadioButton |
| **Layout ** | StackLayout, ScrollView, Border, Page |
| **Selection ** | Picker, DatePicker, TimePicker, Slider, Stepper |
| **Display ** | Image, ImageButton, ActivityIndicator, ProgressBar |
| **Collection ** | CollectionView, CarouselView, IndicatorView |
| **Gesture ** | SwipeView, RefreshView |
| **Navigation ** | NavigationPage, TabbedPage, FlyoutPage, Shell |
| **Menu ** | MenuBar, MenuFlyout, MenuItem |
| **Graphics ** | GraphicsView, Border |
## Platform Services
| Service | Description |
|---------|-------------|
| `ClipboardService` | System clipboard access |
| `FilePickerService` | Native file open dialogs |
| `FolderPickerService` | Folder selection dialogs |
| `NotificationService` | Desktop notifications (libnotify) |
| `GlobalHotkeyService` | System-wide keyboard shortcuts |
| `DragDropService` | XDND drag and drop protocol |
| `LauncherService` | Open URLs and files |
| `ShareService` | Share content with other apps |
| `SecureStorageService` | Encrypted credential storage |
| `PreferencesService` | Application settings |
| `BrowserService` | Open URLs in default browser |
| `EmailService` | Compose emails |
| `SystemTrayService` | System tray icons |
## Accessibility
- **AT-SPI2**: Screen reader support for ORCA and other assistive technologies
- **High Contrast**: Automatic detection and color palette support
- **Keyboard Navigation**: Full keyboard accessibility
## Requirements
- .NET 9.0 SDK or later
- Linux (kernel 5.4+)
- X11 or Wayland
- SkiaSharp native libraries
### System Dependencies
**Ubuntu/Debian: **
``` bash
sudo apt-get install libx11-dev libxrandr-dev libxcursor-dev libxi-dev libgl1-mesa-dev libfontconfig1-dev
```
**Fedora: **
``` bash
sudo dnf install libX11-devel libXrandr-devel libXcursor-devel libXi-devel mesa-libGL-devel fontconfig-devel
```
## Documentation
- [Getting Started Guide ](docs/GETTING_STARTED.md )
2025-12-19 05:07:57 -05:00
- [FAQ - Visual Studio Integration ](docs/FAQ.md )
2025-12-19 09:30:16 +00:00
- [API Reference ](docs/API.md )
- [Contributing Guide ](CONTRIBUTING.md )
2025-12-21 13:41:52 -05:00
## Sample Applications
2025-12-27 09:45:26 -05:00
Full sample applications are available in the [maui-linux-samples ](https://git.marketally.com/open-maui/maui-linux-samples ) repository:
2025-12-21 13:41:52 -05:00
| Sample | Description |
|--------|-------------|
2025-12-27 09:45:26 -05:00
| * * [TodoApp ](https://git.marketally.com/open-maui/maui-linux-samples/src/branch/main/TodoApp )** | Task manager with NavigationPage, XAML data binding, CollectionView |
| * * [ShellDemo ](https://git.marketally.com/open-maui/maui-linux-samples/src/branch/main/ShellDemo )** | Control showcase with Shell navigation and flyout menu |
2025-12-21 13:41:52 -05:00
## Quick Example
2025-12-19 09:30:16 +00:00
``` csharp
2025-12-19 05:01:34 -05:00
using OpenMaui.Platform.Linux ;
2025-12-19 09:30:16 +00:00
var app = new LinuxApplication ( ) ;
app . MainPage = new ContentPage
{
Content = new VerticalStackLayout
{
Spacing = 10 ,
Children =
{
new Label
{
Text = "Welcome to MAUI on Linux!" ,
FontSize = 24
} ,
new Button
{
Text = "Click Me"
} ,
new Entry
{
Placeholder = "Enter your name"
}
}
}
} ;
app . Run ( ) ;
```
## Building from Source
``` bash
2025-12-27 09:45:26 -05:00
git clone https://git.marketally.com/open-maui/maui-linux.git
2025-12-19 09:30:16 +00:00
cd maui-linux
dotnet build
dotnet test
```
## Contributing
We welcome contributions! Please see our [Contributing Guide ](CONTRIBUTING.md ) for details.
## Architecture
```
┌─────────────────────────────────────────────────┐
│ .NET MAUI │
│ (Virtual Views) │
├─────────────────────────────────────────────────┤
│ Handlers │
│ (Platform Abstraction) │
├─────────────────────────────────────────────────┤
│ Skia Views │
│ (SkiaButton, SkiaLabel, etc.) │
├─────────────────────────────────────────────────┤
│ SkiaSharp Rendering │
│ (Hardware Accelerated) │
├─────────────────────────────────────────────────┤
│ X11 / Wayland │
│ (Display Server) │
└─────────────────────────────────────────────────┘
```
RC1: Full XAML support with BindableProperty, VSM, and data binding
Phase 1 - BindableProperty Foundation:
- SkiaLayoutView: Convert Spacing, Padding, ClipToBounds to BindableProperty
- SkiaStackLayout: Convert Orientation to BindableProperty
- SkiaGrid: Convert RowSpacing, ColumnSpacing to BindableProperty
- SkiaCollectionView: Convert all 12 properties to BindableProperty
- SkiaShell: Convert all 12 properties to BindableProperty
Phase 2 - Visual State Manager:
- Add VSM integration to SkiaImageButton pointer handlers
- Support Normal, PointerOver, Pressed, Disabled states
Phase 3-4 - XAML/Data Binding:
- Type converters for SKColor, SKRect, SKSize, SKPoint
- BindingContext propagation through visual tree
- Full handler registration for all MAUI controls
Documentation:
- README: Add styling/binding examples, update roadmap
- Add RC1-ROADMAP.md with implementation details
Version: 1.0.0-rc.1
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 09:26:04 -05:00
## Styling and Data Binding
OpenMaui supports the full MAUI styling and data binding infrastructure:
### XAML Styles
``` xml
<ContentPage.Resources >
<ResourceDictionary >
<Color x:Key= "PrimaryColor" > #5C6BC0</Color>
<Style TargetType= "Button" >
<Setter Property= "BackgroundColor" Value= "{StaticResource PrimaryColor}" />
<Setter Property= "TextColor" Value= "White" />
</Style>
</ResourceDictionary>
</ContentPage.Resources>
```
### Data Binding
``` xml
<Label Text= "{Binding Title}" />
<Entry Text= "{Binding Username, Mode=TwoWay}" />
<Button Command= "{Binding SaveCommand}" IsEnabled= "{Binding CanSave}" />
```
### Visual State Manager
All interactive controls support VSM states: Normal, PointerOver, Pressed, Focused, Disabled.
``` xml
<Button Text= "Hover Me" >
<VisualStateManager.VisualStateGroups >
<VisualStateGroup x:Name= "CommonStates" >
<VisualState x:Name= "Normal" >
<VisualState.Setters >
<Setter Property= "BackgroundColor" Value= "#2196F3" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name= "PointerOver" >
<VisualState.Setters >
<Setter Property= "BackgroundColor" Value= "#42A5F5" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Button>
```
2025-12-19 09:30:16 +00:00
## Roadmap
- [x] Core control library (35+ controls)
- [x] Platform services integration
- [x] Accessibility (AT-SPI2)
- [x] Input method support (IBus/XIM)
- [x] High DPI support
- [x] Drag and drop
- [x] Global hotkeys
RC1: Full XAML support with BindableProperty, VSM, and data binding
Phase 1 - BindableProperty Foundation:
- SkiaLayoutView: Convert Spacing, Padding, ClipToBounds to BindableProperty
- SkiaStackLayout: Convert Orientation to BindableProperty
- SkiaGrid: Convert RowSpacing, ColumnSpacing to BindableProperty
- SkiaCollectionView: Convert all 12 properties to BindableProperty
- SkiaShell: Convert all 12 properties to BindableProperty
Phase 2 - Visual State Manager:
- Add VSM integration to SkiaImageButton pointer handlers
- Support Normal, PointerOver, Pressed, Disabled states
Phase 3-4 - XAML/Data Binding:
- Type converters for SKColor, SKRect, SKSize, SKPoint
- BindingContext propagation through visual tree
- Full handler registration for all MAUI controls
Documentation:
- README: Add styling/binding examples, update roadmap
- Add RC1-ROADMAP.md with implementation details
Version: 1.0.0-rc.1
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 09:26:04 -05:00
- [x] BindableProperty for all controls
- [x] Visual State Manager integration
- [x] XAML styles and StaticResource
- [x] Data binding (OneWay, TwoWay, IValueConverter)
2025-12-19 09:30:16 +00:00
- [ ] Complete Wayland support
- [ ] Hardware video acceleration
- [ ] GTK4 interop layer
## License
2026-03-06 22:11:46 -05:00
Copyright (c) 2025-2026 MarketAlly LLC. Licensed under the MIT License - see the [LICENSE ](LICENSE ) file for details.
2025-12-19 09:30:16 +00:00
## Acknowledgments
2025-12-19 04:36:16 -05:00
- [MarketAlly LLC ](https://marketally.com ) - Project development and maintenance
2025-12-19 09:30:16 +00:00
- [SkiaSharp ](https://github.com/mono/SkiaSharp ) - 2D graphics library
- [.NET MAUI ](https://github.com/dotnet/maui ) - Cross-platform UI framework
- The .NET community
2025-12-27 11:44:46 -05:00
2025-12-27 11:48:09 -05:00
2025-12-27 11:54:40 -05:00
2025-12-27 12:01:33 -05:00