How dotnet/maui works
.NET MAUI is a cross-platform framework for building mobile and desktop applications with shared C# and XAML. The principal workflow starts with an application defining a window and controls; shared control and layout logic is then adapted by platform-specific handlers to native UI. The repository also contains graphics, platform services, compatibility renderers, and BlazorWebView hosting. Some relationships are documented or visible in sampled files; links to unsampled platform subsystems are marked unverified rather than treated as inspected call paths.
Main entry points: View.cs View controls · Window.cs Window · BindableObject.cs Bindable properties · WebView2WebViewManager.cs WebView managers
Components 20
Application lifecycle
- Application model
src/Core/src/Hosting - Window
src/Controls/src/Core/Window/Window.cs
Controls and layout
- Bindable properties
src/Controls/src/Core/BindableObject.cs - Property definitions
src/Controls/src/Core/BindableProperty.cs - View controls
src/Controls/src/Core/View/View.cs - Visual states
src/Controls/src/Core/VisualStateManager.cs - Grid layout
src/Core/src/Layouts/GridLayoutManager.cs - Drag gestures
src/Controls/src/Core/DragAndDrop/DragGestureRecognizer.cs
Core runtime
- View contract
src/Core/src/Core/IView.cs - Dispatcher
src/Core/src/Dispatching/Dispatcher.cs - Graphics primitives
src/Graphics/src/Graphics
Platform adaptation
- Platform handlers
src/Controls/src/Core/Handlers - Android platform
src/Controls/src/Core/Platform/Android - Compatibility renderers
src/Compatibility/Core/src
Framework capabilities
- Device essentials
src/Essentials/src - Blazor WebView
src/BlazorWebView/src/Maui/BlazorWebView.cs - WebView managers
src/BlazorWebView/src/SharedSource/WebView2WebViewManager.cs - Static content reload
src/BlazorWebView/src/SharedSource/StaticContentHotReloadManager.cs
Other components
- App developer
- Native UI
Connections 20
- App developer → Application model: defines app
- Application model → Window: provides window
- Window → View controls: hosts content
- View controls → Bindable properties: uses properties
src/Controls/src/Core/View/View.cs - Bindable properties → Property definitions: uses definitions
src/Controls/src/Core/BindableObject.cs - Visual states → Bindable properties: applies setters
src/Controls/src/Core/VisualStateManager.cs - Visual states → Window: references window
src/Controls/src/Core/VisualStateManager.cs - View controls → View contract: implements view
src/Controls/src/Core/View/View.cs - Grid layout → View contract: measures views
src/Core/src/Layouts/GridLayoutManager.cs - Grid layout → Graphics primitives: uses size types
src/Core/src/Layouts/GridLayoutManager.cs - View controls → Drag gestures: hosts gestures
src/Controls/src/Core/DragAndDrop/DragGestureRecognizer.cs - View controls → Platform handlers: adapts controls
- Platform handlers → Native UI: creates native UI
- Android platform → Drag gestures: handles drag events
src/Controls/src/Core/Platform/Android/DragAndDropGestureHandler.cs - Compatibility renderers → Native UI: renders controls
- App developer → Device essentials: uses device APIs
- App developer → Blazor WebView: hosts Blazor
- Blazor WebView → WebView managers: initializes WebView
- WebView managers → Static content reload: supports reload
src/BlazorWebView/src/SharedSource/WebView2WebViewManager.cs - Dispatcher → WebView managers: dispatches work
src/BlazorWebView/src/SharedSource/WebView2WebViewManager.cs