2026-01-17 05:27:21 +00:00
# OpenMaui Linux Platform API Documentation
2025-12-19 09:30:16 +00:00
## Overview
2026-01-17 05:27:21 +00:00
The OpenMaui Linux Platform provides native Linux desktop support for .NET MAUI applications using SkiaSharp for rendering. All public APIs use standard .NET MAUI types (Color, Rect, Size, Thickness) for full compliance with the MAUI API specification.
2025-12-19 09:30:16 +00:00
## Getting Started
### Installation
``` bash
2026-01-17 05:27:21 +00:00
dotnet add package OpenMaui.Controls.Linux --prerelease
2025-12-19 09:30:16 +00:00
```
Or using the project template:
``` bash
2026-01-17 05:27:21 +00:00
dotnet new install OpenMaui.Linux.Templates
dotnet new openmaui-linux-xaml -n MyApp
2025-12-19 09:30:16 +00:00
```
### Basic Application Structure
``` csharp
2026-01-17 05:27:21 +00:00
// MauiProgram.cs
using Microsoft.Maui.Hosting ;
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
public static class MauiProgram
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
public static MauiApp CreateMauiApp ( )
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
var builder = MauiApp . CreateBuilder ( ) ;
builder
. UseMauiApp < App > ( )
. UseOpenMauiLinux ( ) ; // Enable Linux platform
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
return builder . Build ( ) ;
2025-12-19 09:30:16 +00:00
}
}
```
2026-01-17 05:27:21 +00:00
## Core Types
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
All public APIs use .NET MAUI types for full API compliance:
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
| MAUI Type | Description |
|-----------|-------------|
| `Color` | Colors (e.g., `Colors.Red` , `Color.FromRgb(255, 0, 0)` ) |
| `Rect` | Rectangle bounds (x, y, width, height) |
| `Size` | Size measurements (width, height) |
| `Point` | Point coordinates (x, y) |
| `Thickness` | Padding/margins (left, top, right, bottom) |
| `double` | All numeric properties (not float) |
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
## View Controls
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
### Button
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
A clickable button control implementing `IButton` .
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
``` csharp
public class Button : View , IButton
{
// Text and appearance
public string Text { get ; set ; }
public Color TextColor { get ; set ; }
public Color BackgroundColor { get ; set ; }
public int CornerRadius { get ; set ; }
public Color BorderColor { get ; set ; }
public double BorderWidth { get ; set ; }
// Font
public string FontFamily { get ; set ; }
public double FontSize { get ; set ; }
public FontAttributes FontAttributes { get ; set ; }
// Image
public ImageSource ImageSource { get ; set ; }
public ButtonContentLayout ContentLayout { get ; set ; }
// Commands
public ICommand Command { get ; set ; }
public object CommandParameter { get ; set ; }
// Events
public event EventHandler Clicked ;
public event EventHandler Pressed ;
public event EventHandler Released ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
### Entry
A text input control implementing `IEntry` .
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public class Entry : View , IEntry , ITextInput
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
// Text
public string Text { get ; set ; }
public string Placeholder { get ; set ; }
public Color TextColor { get ; set ; }
public Color PlaceholderColor { get ; set ; }
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
// Font
public string FontFamily { get ; set ; }
public double FontSize { get ; set ; }
public FontAttributes FontAttributes { get ; set ; }
public double CharacterSpacing { get ; set ; }
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
// Behavior
public bool IsPassword { get ; set ; }
public int MaxLength { get ; set ; }
public Keyboard Keyboard { get ; set ; }
public ReturnType ReturnType { get ; set ; }
public ClearButtonVisibility ClearButtonVisibility { get ; set ; }
// Selection
public int CursorPosition { get ; set ; }
public int SelectionLength { get ; set ; }
// Commands
public ICommand ReturnCommand { get ; set ; }
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
// Events
public event EventHandler < TextChangedEventArgs > TextChanged ;
public event EventHandler Completed ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
### Label
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
A text display control implementing `ILabel` .
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public class Label : View , ILabel
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
// Text
2025-12-19 09:30:16 +00:00
public string Text { get ; set ; }
2026-01-17 05:27:21 +00:00
public FormattedString FormattedText { get ; set ; }
public Color TextColor { get ; set ; }
// Font
public string FontFamily { get ; set ; }
public double FontSize { get ; set ; }
public FontAttributes FontAttributes { get ; set ; }
public double CharacterSpacing { get ; set ; }
// Layout
public TextAlignment HorizontalTextAlignment { get ; set ; }
public TextAlignment VerticalTextAlignment { get ; set ; }
public LineBreakMode LineBreakMode { get ; set ; }
public int MaxLines { get ; set ; }
public double LineHeight { get ; set ; }
// Decoration
public TextDecorations TextDecorations { get ; set ; }
public TextTransform TextTransform { get ; set ; }
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
### Slider
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
A value slider control implementing `ISlider` .
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public class Slider : View , ISlider
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
// Value
public double Value { get ; set ; }
public double Minimum { get ; set ; } // Default: 0.0
public double Maximum { get ; set ; } // Default: 1.0
// Colors
public Color MinimumTrackColor { get ; set ; }
public Color MaximumTrackColor { get ; set ; }
public Color ThumbColor { get ; set ; }
// Events
public event EventHandler < ValueChangedEventArgs > ValueChanged ;
public event EventHandler DragStarted ;
public event EventHandler DragCompleted ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
### Image
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
An image display control implementing `IImage` .
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public class Image : View , IImage
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
public ImageSource Source { get ; set ; }
public Aspect Aspect { get ; set ; }
public bool IsOpaque { get ; set ; }
public bool IsAnimationPlaying { get ; set ; }
public bool IsLoading { get ; }
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
### CheckBox
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
A checkbox control implementing `ICheckBox` .
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public class CheckBox : View , ICheckBox
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
public bool IsChecked { get ; set ; }
public Color Color { get ; set ; }
public event EventHandler < CheckedChangedEventArgs > CheckedChanged ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
### Switch
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
A toggle switch control implementing `ISwitch` .
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public class Switch : View , ISwitch
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
public bool IsOn { get ; set ; }
public Color OnColor { get ; set ; }
public Color ThumbColor { get ; set ; }
public event EventHandler < ToggledEventArgs > Toggled ;
2025-12-19 09:30:16 +00:00
}
```
## Layout Controls
2026-01-17 05:27:21 +00:00
### StackLayout
2025-12-19 09:30:16 +00:00
Arranges children in a stack.
``` csharp
2026-01-17 05:27:21 +00:00
public class StackLayout : Layout
2025-12-19 09:30:16 +00:00
{
public StackOrientation Orientation { get ; set ; }
2026-01-17 05:27:21 +00:00
public double Spacing { get ; set ; }
2025-12-19 09:30:16 +00:00
}
2026-01-17 05:27:21 +00:00
public class VerticalStackLayout : StackLayout { }
public class HorizontalStackLayout : StackLayout { }
2025-12-19 09:30:16 +00:00
```
2026-01-17 05:27:21 +00:00
### Grid
2025-12-19 09:30:16 +00:00
Arranges children in a grid.
``` csharp
2026-01-17 05:27:21 +00:00
public class Grid : Layout
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
public RowDefinitionCollection RowDefinitions { get ; }
public ColumnDefinitionCollection ColumnDefinitions { get ; }
public double RowSpacing { get ; set ; }
public double ColumnSpacing { get ; set ; }
// Attached properties
public static int GetRow ( BindableObject view ) ;
public static void SetRow ( BindableObject view , int row ) ;
public static int GetColumn ( BindableObject view ) ;
public static void SetColumn ( BindableObject view , int column ) ;
public static int GetRowSpan ( BindableObject view ) ;
public static void SetRowSpan ( BindableObject view , int span ) ;
public static int GetColumnSpan ( BindableObject view ) ;
public static void SetColumnSpan ( BindableObject view , int span ) ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
### FlexLayout
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
CSS Flexbox-compatible layout.
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public class FlexLayout : Layout
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
public FlexDirection Direction { get ; set ; }
public FlexWrap Wrap { get ; set ; }
public FlexJustify JustifyContent { get ; set ; }
public FlexAlignItems AlignItems { get ; set ; }
public FlexAlignContent AlignContent { get ; set ; }
// Attached properties
public static int GetOrder ( BindableObject view ) ;
public static float GetGrow ( BindableObject view ) ;
public static float GetShrink ( BindableObject view ) ;
public static FlexBasis GetBasis ( BindableObject view ) ;
public static FlexAlignSelf GetAlignSelf ( BindableObject view ) ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
### ScrollView
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
A scrollable container.
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public class ScrollView : Layout , IScrollView
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
public View Content { get ; set ; }
public ScrollOrientation Orientation { get ; set ; }
public ScrollBarVisibility HorizontalScrollBarVisibility { get ; set ; }
public ScrollBarVisibility VerticalScrollBarVisibility { get ; set ; }
public double ScrollX { get ; }
public double ScrollY { get ; }
public Size ContentSize { get ; }
public Task ScrollToAsync ( double x , double y , bool animated ) ;
public Task ScrollToAsync ( Element element , ScrollToPosition position , bool animated ) ;
public event EventHandler < ScrolledEventArgs > Scrolled ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
## Collection Views
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
### CollectionView
A virtualized list/grid control.
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public class CollectionView : ItemsView
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
public IEnumerable ItemsSource { get ; set ; }
public DataTemplate ItemTemplate { get ; set ; }
public IItemsLayout ItemsLayout { get ; set ; }
public SelectionMode SelectionMode { get ; set ; }
public object SelectedItem { get ; set ; }
public IList < object > SelectedItems { get ; }
public View EmptyView { get ; set ; }
public DataTemplate EmptyViewTemplate { get ; set ; }
public object Header { get ; set ; }
public object Footer { get ; set ; }
public event EventHandler < SelectionChangedEventArgs > SelectionChanged ;
}
```
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
### CarouselView
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
A carousel/pager control.
``` csharp
public class CarouselView : ItemsView
{
public bool Loop { get ; set ; }
public bool IsSwipeEnabled { get ; set ; }
public int Position { get ; set ; }
public Thickness PeekAreaInsets { get ; set ; }
public event EventHandler < PositionChangedEventArgs > PositionChanged ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
### RefreshView
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
Pull-to-refresh container.
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
``` csharp
public class RefreshView : ContentView
{
public bool IsRefreshing { get ; set ; }
public ICommand Command { get ; set ; }
public object CommandParameter { get ; set ; }
public Color RefreshColor { get ; set ; }
public event EventHandler Refreshing ;
}
```
### SwipeView
Swipe-to-reveal actions.
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public class SwipeView : ContentView
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
public SwipeItems LeftItems { get ; set ; }
public SwipeItems RightItems { get ; set ; }
public SwipeItems TopItems { get ; set ; }
public SwipeItems BottomItems { get ; set ; }
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
public void Open ( OpenSwipeItem openSwipeItem ) ;
public void Close ( ) ;
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
public event EventHandler < SwipeStartedEventArgs > SwipeStarted ;
public event EventHandler < SwipeEndedEventArgs > SwipeEnded ;
2025-12-19 09:30:16 +00:00
}
2026-01-17 05:27:21 +00:00
```
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
## Navigation
### NavigationPage
Stack-based navigation.
``` csharp
public class NavigationPage : Page
{
public Page CurrentPage { get ; }
public Page RootPage { get ; }
public Color BarBackgroundColor { get ; set ; }
public Color BarTextColor { get ; set ; }
public bool HasNavigationBar { get ; set ; }
public Task PushAsync ( Page page , bool animated = true ) ;
public Task < Page > PopAsync ( bool animated = true ) ;
public Task PopToRootAsync ( bool animated = true ) ;
public event EventHandler < NavigationEventArgs > Pushed ;
public event EventHandler < NavigationEventArgs > Popped ;
public event EventHandler < NavigationEventArgs > PoppedToRoot ;
}
2025-12-19 09:30:16 +00:00
```
2026-01-17 05:27:21 +00:00
### TabbedPage
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
Tab-based navigation.
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public class TabbedPage : Page
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
public IList < Page > Children { get ; }
public Page CurrentPage { get ; set ; }
public Color BarBackgroundColor { get ; set ; }
public Color SelectedTabColor { get ; set ; }
public Color UnselectedTabColor { get ; set ; }
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
public event EventHandler CurrentPageChanged ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
### FlyoutPage
Flyout/drawer navigation.
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
``` csharp
public class FlyoutPage : Page
{
public Page Flyout { get ; set ; }
public Page Detail { get ; set ; }
public bool IsPresented { get ; set ; }
public FlyoutLayoutBehavior FlyoutLayoutBehavior { get ; set ; }
public bool IsGestureEnabled { get ; set ; }
public event EventHandler IsPresentedChanged ;
}
```
### Shell
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
Comprehensive navigation with URI routing.
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public class Shell : Page
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
public IList < ShellItem > Items { get ; }
public ShellItem CurrentItem { get ; set ; }
public ShellFlyoutBehavior FlyoutBehavior { get ; set ; }
public bool FlyoutIsPresented { get ; set ; }
public Color FlyoutBackgroundColor { get ; set ; }
public object FlyoutHeader { get ; set ; }
public object FlyoutFooter { get ; set ; }
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
public static void RegisterRoute ( string route , Type pageType ) ;
public Task GoToAsync ( string route ) ;
public Task GoToAsync ( ShellNavigationState state ) ;
public event EventHandler < ShellNavigatedEventArgs > Navigated ;
public event EventHandler < ShellNavigatingEventArgs > Navigating ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
## Platform Services
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
### IClipboard
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public interface IClipboard
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
bool HasText { get ; }
Task < string > GetTextAsync ( ) ;
Task SetTextAsync ( string text ) ;
event EventHandler < EventArgs > ClipboardContentChanged ;
}
```
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
### IFilePicker
``` csharp
public interface IFilePicker
{
Task < FileResult > PickAsync ( PickOptions options = null ) ;
Task < IEnumerable < FileResult > > PickMultipleAsync ( PickOptions options = null ) ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
### IShare
``` csharp
public interface IShare
{
Task RequestAsync ( ShareTextRequest request ) ;
Task RequestAsync ( ShareFileRequest request ) ;
Task RequestAsync ( ShareMultipleFilesRequest request ) ;
}
```
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
### ILauncher
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public interface ILauncher
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
Task < bool > CanOpenAsync ( Uri uri ) ;
Task < bool > OpenAsync ( Uri uri ) ;
Task < bool > TryOpenAsync ( Uri uri ) ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
### IBrowser
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
``` csharp
public interface IBrowser
{
Task OpenAsync ( Uri uri , BrowserLaunchOptions options ) ;
}
```
### IEmail
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public interface IEmail
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
bool IsComposeSupported { get ; }
Task ComposeAsync ( EmailMessage message ) ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
### IPreferences
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public interface IPreferences
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
bool ContainsKey ( string key , string sharedName = null ) ;
void Remove ( string key , string sharedName = null ) ;
void Clear ( string sharedName = null ) ;
T Get < T > ( string key , T defaultValue , string sharedName = null ) ;
void Set < T > ( string key , T value , string sharedName = null ) ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
### ISecureStorage
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public interface ISecureStorage
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
Task < string > GetAsync ( string key ) ;
Task SetAsync ( string key , string value ) ;
bool Remove ( string key ) ;
void RemoveAll ( ) ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
## Accessibility
### IAccessible
2025-12-19 09:30:16 +00:00
2026-01-17 05:27:21 +00:00
Interface for accessible UI elements.
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public interface IAccessible
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
string AccessibleId { get ; }
string AccessibleName { get ; }
string AccessibleDescription { get ; }
AccessibleRole Role { get ; }
AccessibleStates States { get ; }
IAccessible Parent { get ; }
IReadOnlyList < IAccessible > Children { get ; }
AccessibleRect Bounds { get ; }
IReadOnlyList < AccessibleAction > Actions { get ; }
bool DoAction ( string actionName ) ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
### IAccessibilityService
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public interface IAccessibilityService
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
bool IsEnabled { get ; }
void Initialize ( ) ;
void Register ( IAccessible accessible ) ;
void Unregister ( IAccessible accessible ) ;
void NotifyFocusChanged ( IAccessible accessible ) ;
void NotifyPropertyChanged ( IAccessible accessible , AccessibleProperty property ) ;
void NotifyStateChanged ( IAccessible accessible , AccessibleStates state , bool value ) ;
void Announce ( string text , AnnouncementPriority priority = AnnouncementPriority . Polite ) ;
void Shutdown ( ) ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
## Input Method (IME)
### IInputMethodService
2025-12-19 09:30:16 +00:00
``` csharp
2026-01-17 05:27:21 +00:00
public interface IInputMethodService
2025-12-19 09:30:16 +00:00
{
2026-01-17 05:27:21 +00:00
bool IsActive { get ; }
string PreEditText { get ; }
void Initialize ( IntPtr windowHandle ) ;
void SetFocus ( IInputContext context ) ;
void SetCursorLocation ( int x , int y , int width , int height ) ;
bool ProcessKeyEvent ( uint keyCode , KeyModifiers modifiers , bool isKeyDown ) ;
void Reset ( ) ;
void Shutdown ( ) ;
event EventHandler < TextCommittedEventArgs > TextCommitted ;
event EventHandler < PreEditChangedEventArgs > PreEditChanged ;
2025-12-19 09:30:16 +00:00
}
```
2026-01-17 05:27:21 +00:00
## Event Arguments
``` csharp
public class TextChangedEventArgs : EventArgs
{
public string OldTextValue { get ; }
public string NewTextValue { get ; }
}
public class ValueChangedEventArgs : EventArgs
{
public double OldValue { get ; }
public double NewValue { get ; }
}
public class CheckedChangedEventArgs : EventArgs
{
public bool Value { get ; }
}
public class ToggledEventArgs : EventArgs
{
public bool Value { get ; }
}
public class SelectionChangedEventArgs : EventArgs
{
public IReadOnlyList < object > PreviousSelection { get ; }
public IReadOnlyList < object > CurrentSelection { get ; }
}
public class PositionChangedEventArgs : EventArgs
{
public int PreviousPosition { get ; }
public int CurrentPosition { get ; }
}
public class ScrolledEventArgs : EventArgs
{
public double ScrollX { get ; }
public double ScrollY { get ; }
}
```
## Enumerations
### Common Enums
``` csharp
public enum Aspect { AspectFit , AspectFill , Fill , Center }
public enum TextAlignment { Start , Center , End }
public enum LineBreakMode { NoWrap , WordWrap , CharacterWrap , HeadTruncation , TailTruncation , MiddleTruncation }
public enum FontAttributes { None , Bold , Italic }
public enum TextTransform { None , Default , Lowercase , Uppercase }
public enum TextDecorations { None , Underline , Strikethrough }
public enum ReturnType { Default , Done , Go , Next , Search , Send }
public enum Keyboard { Default , Chat , Email , Numeric , Telephone , Text , Url }
public enum ClearButtonVisibility { Never , WhileEditing }
public enum SelectionMode { None , Single , Multiple }
public enum ScrollOrientation { Vertical , Horizontal , Both , Neither }
public enum ScrollBarVisibility { Default , Always , Never }
public enum StackOrientation { Vertical , Horizontal }
public enum FlyoutLayoutBehavior { Default , Popover , Split }
public enum ShellFlyoutBehavior { Disabled , Flyout , Locked }
```
### Accessibility Enums
2025-12-19 09:30:16 +00:00
``` csharp
public enum AccessibleRole
{
Unknown , Window , Application , Panel , Frame , Button ,
CheckBox , RadioButton , ComboBox , Entry , Label ,
List , ListItem , Menu , MenuItem , ScrollBar ,
2026-01-17 05:27:21 +00:00
Slider , StatusBar , Tab , TabPanel , Text , ProgressBar ,
SpinButton , Table , TableCell , TableRow , ToolBar ,
TreeItem , TreeView , // ... and more
}
[Flags]
public enum AccessibleStates
{
None = 0 ,
Active = 1 < < 0 ,
Checked = 1 < < 1 ,
Collapsed = 1 < < 2 ,
Enabled = 1 < < 3 ,
Expanded = 1 < < 4 ,
Focusable = 1 < < 5 ,
Focused = 1 < < 6 ,
Selected = 1 < < 7 ,
Visible = 1 < < 8 ,
2025-12-19 09:30:16 +00:00
// ... and more
}
2026-01-17 05:27:21 +00:00
public enum AnnouncementPriority { Polite , Assertive }
2025-12-19 09:30:16 +00:00
```
## Environment Variables
| Variable | Description |
|----------|-------------|
| `MAUI_DISPLAY_SERVER` | Force display server: `x11` , `wayland` , or `auto` |
2026-01-17 05:27:21 +00:00
| `MAUI_INPUT_METHOD` | Force IME: `ibus` , `fcitx5` , `xim` , or `none` |
2025-12-19 09:30:16 +00:00
| `GTK_A11Y` | Set to `none` to disable accessibility |
2026-01-17 05:27:21 +00:00
| `DISPLAY` | X11 display to connect to |
| `WAYLAND_DISPLAY` | Wayland display to connect to |
2025-12-19 09:30:16 +00:00
## System Requirements
2026-01-17 05:27:21 +00:00
- .NET 9.0 SDK or later
- Linux (kernel 5.4+)
- X11 or Wayland display server
- SkiaSharp native libraries (included via NuGet)
### Optional Dependencies
| Package | Purpose |
|---------|---------|
| libibus-1.0 | IBus input method support |
| libatspi | AT-SPI2 accessibility support |
| libnotify | Desktop notification support |
| xclip/xsel | Clipboard support |
| zenity/kdialog | Native file dialogs |