ServerDrivenUI.Maui
8.0.76-pre
dotnet add package ServerDrivenUI.Maui --version 8.0.76-pre
NuGet\Install-Package ServerDrivenUI.Maui -Version 8.0.76-pre
<PackageReference Include="ServerDrivenUI.Maui" Version="8.0.76-pre" />
<PackageVersion Include="ServerDrivenUI.Maui" Version="8.0.76-pre" />
<PackageReference Include="ServerDrivenUI.Maui" />
paket add ServerDrivenUI.Maui --version 8.0.76-pre
#r "nuget: ServerDrivenUI.Maui, 8.0.76-pre"
#:package ServerDrivenUI.Maui@8.0.76-pre
#addin nuget:?package=ServerDrivenUI.Maui&version=8.0.76-pre&prerelease
#tool nuget:?package=ServerDrivenUI.Maui&version=8.0.76-pre&prerelease
Maui.ServerDrivenUI
Server Driven UI library for dotnet MAUI. New features to be deployed on all platforms simultaneously via a backend change, without releasing new versions of the native apps.
Sample Api Response: https://serverdrivenui.azurewebsites.net/ServerDrivenUI?key=MyView
Getting started
- Install the ServerDrivenUI.Maui package
Install-Package ServerDrivenUI.Maui -Version 8.0.31-pre
- Add UseServerDrivenUI declaration to your
MauiAppBuilderand configure it to connect to your API
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
})
.ConfigureServerDrivenUI(s =>
{
s.RegisterElementGetter((key, provider) => provider.GetService<IYourApiService>().YourApiMethod(key)); //Register which api will be used to get the UI
s.AddServerElement("MyView"); // Register the visual elements that will follow server driven ui
});
return builder.Build();
}
}
- You can now use the ServerDrivenUI Elements, defining the key that will be used to get the UI from the API
- You can also define a LoadingTemplate and an ErrorTemplate to be shown while the UI is being fetched from the API
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="Maui.ServerDrivenUI.Sample.MainPage"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
<ServerDrivenView x:Name="sduiView" ServerKey="MyView">
<ServerDrivenView.ErrorTemplate>
<DataTemplate>
<StackLayout>
<Label Text="Unexpected error" />
</StackLayout>
</DataTemplate>
</ServerDrivenView.ErrorTemplate>
<ServerDrivenView.LoadingTemplate>
<DataTemplate>
<StackLayout>
<Label Text="Loading..." />
</StackLayout>
</DataTemplate>
</ServerDrivenView.LoadingTemplate>
</ServerDrivenView>
</ContentPage>
IOS
We need to set the interpreter to allow the Xaml loader to work
<PropertyGroup Condition="$(TargetFramework.Contains('-ios'))">
<UseInterpreter>true</UseInterpreter>
<MtouchInterpreter>-all</MtouchInterpreter>
</PropertyGroup>
Know issues
MAUI 16809 - Label().LoadFromXaml does not work when using Label.FormattedText
We are currently doing a workaround to make FormattedText work with ServerDrivenUI
Repo Activity
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-android34.0 is compatible. net8.0-ios17.0 is compatible. net8.0-maccatalyst18.0 is compatible. net8.0-windows10.0.19041 is compatible. net9.0-android was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-windows was computed. net10.0-android was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-windows was computed. |
-
net8.0-android34.0
- EasyCaching.LiteDB (>= 1.9.2)
- Microsoft.Maui.Controls (>= 8.0.3)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.3)
-
net8.0-ios17.0
- EasyCaching.LiteDB (>= 1.9.2)
- Microsoft.Maui.Controls (>= 8.0.3)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.3)
-
net8.0-maccatalyst18.0
- EasyCaching.LiteDB (>= 1.9.2)
- Microsoft.Maui.Controls (>= 8.0.3)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.3)
-
net8.0-windows10.0.19041
- EasyCaching.LiteDB (>= 1.9.2)
- Microsoft.Maui.Controls (>= 8.0.3)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 8.0.76-pre | 195 | 10/13/2025 |
| 8.0.74-pre | 271 | 9/15/2025 |
| 8.0.72-pre | 263 | 9/15/2025 |
| 8.0.70-pre | 267 | 9/15/2025 |
| 8.0.68-pre | 223 | 8/25/2025 |
| 8.0.66-pre | 163 | 12/23/2024 |
| 8.0.64-pre | 130 | 11/26/2024 |
| 8.0.62-pre | 133 | 11/26/2024 |
| 8.0.60-pre | 122 | 11/12/2024 |
| 8.0.59-pre | 129 | 11/4/2024 |
| 8.0.57-pre | 158 | 11/4/2024 |
| 8.0.56-pre | 186 | 11/4/2024 |
| 8.0.55-pre | 120 | 11/4/2024 |
| 8.0.54-pre | 135 | 11/2/2024 |
| 8.0.53-pre | 136 | 11/2/2024 |
| 8.0.52-pre | 149 | 11/2/2024 |
| 8.0.51-pre | 132 | 11/2/2024 |
| 8.0.50-pre | 156 | 11/1/2024 |
| 8.0.49-pre | 124 | 11/1/2024 |
| 8.0.48-pre | 138 | 10/17/2024 |