Build Cross-Platform Apps with C#, VB.NET, or F# and XAML. One codebase. Six platforms. Powered by WebAssembly and .NET.
Build Cross-Platform Apps with C#, VB.NET, or F# and XAML. One codebase. Six platforms. Powered by WebAssembly and .NET.
OpenSilver
Build Cross-Platform Apps with C#, VB.NET, or F# and XAML
One codebase. Six platforms. Powered by WebAssembly and .NET.
Website · Documentation · Try Online · 200+ Live Samples · Gallery · What's New · Contact
OpenSilver is a modern, open-source framework for building cross-platform applications using C#, VB.NET, or F# combined with XAML. Write your code once and deploy to:
OpenSilver is like WPF, but cross-platform and evolved. It brings the productivity of XAML and the power of .NET to every major platform.
OpenSilver is not an emulator, a wrapper, or an Electron-style bundled browser. It is a complete reimplementation of the WPF/Silverlight API from scratch, using modern .NET, WebAssembly, and the browser's DOM.
On the Web, your C# code compiles to WebAssembly. Unlike canvas-based rendering approaches, XAML is rendered at runtime using real HTML elements: TextBox becomes , `MediaElement` becomes , PasswordBox becomes , `Image` becomes , and so on. This unlocks native browser behaviors like Ctrl+F search, text selection (to copy text), screen readers, SEO indexing, browser translation, mobile long-press, UI automated testing, and accessibility compliance. The compiled app is a set of static files (WebAssembly, JS, index.html...) that can be hosted anywhere: Azure, AWS, GitHub Pages, or any basic web server. No special server technology is required.
On desktop and mobile (via MAUI-OpenSilver Hybrid or Photino), the UI is still rendered as HTML/CSS, but C# runs as native .NET instead of WebAssembly. This preserves full compatibility with JS libraries and Blazor components (because the UI is still HTML/CSS), while adding native performance and direct access to platform APIs (because the runtime is native .NET).
XAML.io: Write and run C#/XAML code directly in your browser. No installation required. Perfect for quick experiments, learning, and sharing code snippets.
OpenSilverShowcase.com: Over 200 interactive C#/XAML samples running live. View source code for each sample with a toggle to switch between C#, VB.NET, and F#. Includes examples of Blazor component integration. Also available on Android and iOS. Source code.
Visit the Gallery to see real-world applications built with OpenSilver.
Because OpenSilver implements a subset of the WPF API, it provides a realistic path to bring existing applications to the web and mobile without a full rewrite:
The team that built OpenSilver has been migrating enterprise applications since 2014. Whether you need a full end-to-end migration, help porting a specific module, or want to accelerate the implementation of a WPF feature your app depends on, we work with teams of all sizes.
We offer free migration assessments. Let's talk about your project
Install Visual Studio 2022 or newer (VS 2026 is supported) with the ASP.NET and web development and .NET desktop development workloads, plus .NET 8.0 SDK or later
Download the OpenSilver extension (VSIX) from opensilver.net/download
Click "Create a new project", search for "OpenSilver", and choose your target platforms
Press F5 to build and run!
--
Preview packages: If you want the very latest iteration of OpenSilver, check "Include prerelease" in the NuGet Package Manager. Preview packages are built for each commit on the
developbranch and published to a MyGet feed (already configured in yournuget.config). Learn more
Install the OpenSilver extension for VS Code (includes project templates and the visual XAML designer), then use the Command Palette (Ctrl+Shift+P) and run OpenSilver: Create New Project. Learn more
dotnet new install OpenSilver.Templates
dotnet new opensilverapp -n MyApp
cd MyApp && dotnet run --project MyApp.BrowserVisit XAML.io, create your project in the browser, then click File > Download Visual Studio Solution to continue working locally in Visual Studio or VS Code.
| Project | Description |
|---|---|
| MyApp | Main project containing all your C#/XAML files. Cannot be run directly. |
| MyApp.Browser | Entry point for Web deployment (WebAssembly) |
| MyApp.MauiHybrid | Entry point for Android, iOS, Windows, macOS (via .NET MAUI) |
| MyApp.Photino | Entry point for Linux desktop (via Photino) |
| MyApp.Simulator | Entry point for the Simulator, which provides the best debugging experience (faster startup, better exception reporting, full .NET debugging features such as move execution point, etc.) |
// MainPage.xaml.cs
using System;
using System.Windows;
using System.Windows.Controls;
namespace MyApp;
public partial class MainPage : Page
{
private int clickCount = 0;
public MainPage()
{
InitializeComponent();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
clickCount++;
ResultText.Text = $"Button clicked {clickCount} time(s)!";
}
}This example uses C#, but VB.NET and F# work equally well with XAML. See all three languages side by side on OpenSilverShowcase.com.
Debug mode is not representative of production performance. Here is a benchmark rendering 30,000 XAML UI elements (OpenSilver 3.2):
| Mode | Time | vs. Debug |
|---|---|---|
| Debug (from VS) | 2,150 ms | baseline |
| Release (from VS) | 1,630 ms | 1.3x faster |
| Published | 760 ms | 2.8x faster |
| Published + AOT | 360 ms | 6x faster |
For best results in production, publish with AOT enabled. Other common optimizations include enabling virtualization for large lists/comboboxes/treeviews, using IIS compression, lazy-loading large assemblies, and trimming to reduce the app size. Learn more
| Resource | Description |
|---|---|
| Official Documentation | Comprehensive guides, tutorials, and API reference |
| Getting Started Tutorial | Step-by-step walkthrough for beginners |
| Common Issues and Solutions | Troubleshooting tips |
| OpenSilverShowcase.com | 200+ live samples with source code |
Want to contribute or customize OpenSilver? See BUILDING.md for full instructions on cloning, building, and using custom NuGet packages.
The extensions for VS and VS Code can also built from source: github.com/OpenSilver/OpenSilver.VSIX
We welcome contributions from the community! Whether it's fixing bugs, improving documentation, or adding new features, every contribution helps make OpenSilver better.
develop branchMissing a WPF feature? Request it on GitHub or sponsor its development to accelerate its implementation.
| Repository | Description |
|---|---|
| OpenSilver.VSIX | Source code for Visual Studio, VS Code, and CLI extensions |
| OpenSilver.Documentation | Documentation source |
| [OpenSilver.Samples.Showcase](https://github.com/OpenSilver/OpenSilver. |
No open issues yet, or sync has not completed.