Skip to content

Examples

The repository's examples/ folder contains runnable sample apps, grouped by theme. Each shows a different aspect of the framework — from a static render-to-PNG console app to full cross-platform Razor apps.

FolderWhat it shows
BootstrapA Bootstrap-styled component gallery hosted from many platform heads.
MultiplatformStarter templates with a shared Razor core and Android / iOS / Desktop heads.
WindowsThe same starter templates as single Windows desktop projects.
Asyncasync/await components, Blazor-style EventCallback, and real HTTP calls.
MediaNetwork <img> (with placeholder) and <video> via the unified resource manager.

Bootstrap

A gallery of Bootstrap-inspired components (buttons, forms, tables, lists, icons, animations) implemented once and hosted from several platform "heads". The shared UI lives in MikoApp1/; each sibling project is a thin host (Console, Razor desktop, WinUI, Android, iOS).

bash
# Run the console renderer (writes output.png showing all component variants)
dotnet run --project examples/Bootstrap/MikoApp1.Console/MikoApp1.Console.csproj

# Run the desktop window
dotnet run --project examples/Bootstrap/MikoApp1.Razor/MikoApp1.Razor.csproj

Demonstrates: authoring a reusable component library and hosting it from multiple entry points; a Bootstrap-inspired palette; routing and a shared MainLayout; rendering both to an image file and to a live window.

Multiplatform

Starter templates structured as a shared Razor core plus one host project per platform (Android, iOS, Desktop) — the recommended layout for a multi-target app. Three templates are provided: MikoAppBlank, MikoAppSidemenu, and MikoAppTabs.

bash
# Run the desktop head
dotnet run --project examples/Multiplatform/MikoAppBlank/MikoAppBlank.Desktop/MikoAppBlank.Desktop.csproj

The Android and iOS heads require the corresponding .NET workloads and are typically built from an IDE.

Windows

The same three starter templates as single Windows desktop projects (no separate platform heads) — the simplest layout when you only target Windows.

bash
dotnet run --project examples/Windows/MikoAppBlank/MikoAppBlank.csproj

A window opens showing the home page (Pages/Home.razor). Each template folder has its own README with instructions for adding a page.

Async

MikoApp.AsyncDemo demonstrates async/await support — async lifecycle methods, Blazor-style EventCallback, and real HTTP communication between a Miko client and an ASP.NET Core API. It has three projects: the shared UI, a desktop client, and a minimal API.

bash
# Terminal 1 — start the API on http://localhost:5000
dotnet run --project examples/Async/MikoApp.AsyncDemo.Api/MikoApp.AsyncDemo.Api.csproj

# Terminal 2 — start the Miko client window
dotnet run --project examples/Async/MikoApp.AsyncDemo.Desktop/MikoApp.AsyncDemo.Desktop.csproj

Demonstrates: async lifecycle (OnInitializedAsync) with non-blocking loading states; EventCallback parameters and @onclick handlers; automatic re-render after an await; continuations marshalled back to the render thread. See Async & Lifecycle for the concepts.

Media

Media/ loads network and local images and video through Miko's unified resource manager. The client shows two <video> elements side by side — one streamed over http, one from a local file — both decoded by the system hardware decoder. An ASP.NET Core API serves offline-generated product thumbnails (SkiaSharp), rendered with <img> and a res://placeholder shown until each thumbnail loads.

bash
# The local video plays with no server at all
dotnet run --project examples/Media/MikoApp.Media.Desktop

# For the network video and thumbnails, start the API first (separate terminal)
dotnet run --project examples/Media/MikoApp.Media.Api        # http://localhost:5050

The client carries no FFmpeg binariesUseSystemVideo() dispatches to Media Foundation (Windows), GStreamer (Linux) or AVFoundation (macOS). Only the API project references FFmpeg, and only to pre-generate the sample clip offline.


For the full walkthroughs, see the examples/README.md in the repository.

Released under the MIT License.