ServerDrivenUI.Maui
8.0.40-pre
This is a prerelease version of ServerDrivenUI.Maui.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package ServerDrivenUI.Maui --version 8.0.40-pre
NuGet\Install-Package ServerDrivenUI.Maui -Version 8.0.40-pre
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ServerDrivenUI.Maui" Version="8.0.40-pre" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ServerDrivenUI.Maui --version 8.0.40-pre
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ServerDrivenUI.Maui, 8.0.40-pre"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ServerDrivenUI.Maui as a Cake Addin #addin nuget:?package=ServerDrivenUI.Maui&version=8.0.40-pre&prerelease // Install ServerDrivenUI.Maui as a Cake Tool #tool nuget:?package=ServerDrivenUI.Maui&version=8.0.40-pre&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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
MauiAppBuilder
and 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
```xaml
<?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>
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-maccatalyst17.2 is compatible. net8.0-windows10.0.19041 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
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-maccatalyst17.2
- 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.64-pre | 0 | 11/26/2024 |
8.0.62-pre | 0 | 11/26/2024 |
8.0.60-pre | 37 | 11/12/2024 |
8.0.59-pre | 39 | 11/4/2024 |
8.0.57-pre | 35 | 11/4/2024 |
8.0.56-pre | 41 | 11/4/2024 |
8.0.55-pre | 34 | 11/4/2024 |
8.0.54-pre | 41 | 11/2/2024 |
8.0.53-pre | 37 | 11/2/2024 |
8.0.52-pre | 31 | 11/2/2024 |
8.0.51-pre | 39 | 11/2/2024 |
8.0.50-pre | 42 | 11/1/2024 |
8.0.49-pre | 36 | 11/1/2024 |
8.0.48-pre | 50 | 10/17/2024 |
8.0.47-pre | 52 | 10/17/2024 |
8.0.46-pre | 40 | 10/17/2024 |
8.0.45-pre | 59 | 10/17/2024 |
8.0.41-pre | 77 | 3/5/2024 |
8.0.40-pre | 59 | 3/3/2024 |
8.0.37-pre | 128 | 2/24/2024 |
8.0.31-pre | 85 | 2/18/2024 |