- Cross-platform WebView control for Avalonia. Supports Windows, Linux (GTK), and Android.
- Make sure your project targets the Windows-specific TFM to support WinForms/WPF components:
<TargetFramework>net9.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>- or you can add this to your csproj
<PropertyGroup Condition="'$(OS)' == 'Windows_NT'">
<UseWindowsForms>true</UseWindowsForms>
<TargetFramework>net9.0-windows</TargetFramework>
</PropertyGroup>- Then you can add the WebView in your
.axaml:
<awv:WebView Url="https://www.github.com"/>Note
- Example project: Sample Windows project .csproj
- Example usage in XAML: MainView.axaml
- Ensure the following native dependencies are installed:
# libgtk-3 and libwebkit2gtk
sudo pacman -Syu gtk3 webkit2gtk- Target plain
net9.0in your.csproj:
<TargetFramework>net9.0</TargetFramework>- Add the WebView in your XAML the same way:
<awv:WebView Url="https://www.github.com"/>- Target
net9.0-androidin your.csproj. - No additional setup is required; permissions are declared in the Android manifest.
- Usage in XAML is the same as above.
- Linux:
libgtk-3andlibwebkit2gtk - Windows: WebView2 runtime
- This project started as side project of my bigger project, so it might not be perfect.
- The control automatically picks the correct platform implementation.
- WindowsForms is required only for Windows. Using it on Linux/macOS will fail at build time.
- If you found any issues, or want some features to add, please report them on the Issues page.
- This project is under GNU GENERAL PUBLIC LICENSE Version 3.


