LiteHtml.Maui 1.0.0

dotnet add package LiteHtml.Maui --version 1.0.0                
NuGet\Install-Package LiteHtml.Maui -Version 1.0.0                
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="LiteHtml.Maui" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LiteHtml.Maui --version 1.0.0                
#r "nuget: LiteHtml.Maui, 1.0.0"                
#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 LiteHtml.Maui as a Cake Addin
#addin nuget:?package=LiteHtml.Maui&version=1.0.0

// Install LiteHtml.Maui as a Cake Tool
#tool nuget:?package=LiteHtml.Maui&version=1.0.0                

LiteHtml.Maui

LiteHtml.Maui is a cross platform library for rendering HTML content with Microsoft MAUI. It uses litehtml for parsing and layouting HTML. This library supports

  • Windows (.NET 7 and .NET 8)
  • Android (.NET 7 and .NET 8)
  • iOS (.NET 7 and .NET 8)

When to use

Use this library if a MAUI label is not enough but a WebView is too much overhead. This library is intended to be used for light workloads with HTML that you control. It is not meant to be a full web browser. Also this library does not implement text selection capabilities. This is mainly a limitation of litehtml.

How to use

A basic example how to use the library can be found in the TestApp. Basically it's the following steps.

In MauiProgram.cs

var builder = MauiApp.CreateBuilder();
    builder
        .UseMauiApp<App>()
        .UseLiteHtml() // Register the handlers, optionally you can register a custom master stylesheet.
        ...

In your views

<ContentPage ...
        xmlns:html="clr-namespace:LiteHtmlMaui.Controls;assembly=LiteHtmlMaui"/>
    <html:LiteHtml Html="Some HTML" />
<ContentPage>

If you want to use a custom image loader and control specific CSS, you can use an implementation of ILiteHtmlSource and assign an instance of this to LiteHtml.Source.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-android33.0 is compatible.  net7.0-ios was computed.  net7.0-ios16.1 is compatible.  net7.0-maccatalyst was computed.  net7.0-maccatalyst16.1 is compatible.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net7.0-windows10.0.19041 is compatible.  net8.0 is compatible.  net8.0-android was computed.  net8.0-android34.0 is compatible.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-ios17.0 is compatible.  net8.0-maccatalyst was computed.  net8.0-maccatalyst17.0 is compatible.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  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.
  • net7.0

    • No dependencies.
  • net7.0-android33.0

    • No dependencies.
  • net7.0-ios16.1

    • No dependencies.
  • net7.0-maccatalyst16.1

    • No dependencies.
  • net7.0-windows10.0.19041

    • No dependencies.
  • net8.0

    • No dependencies.
  • net8.0-android34.0

    • No dependencies.
  • net8.0-ios17.0

    • No dependencies.
  • net8.0-maccatalyst17.0

    • No dependencies.
  • net8.0-windows10.0.19041

    • No dependencies.

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
1.0.0 3,842 11/16/2023
0.1.0-alpha.4 85 10/2/2023
0.1.0-alpha.3 246 7/5/2023
0.1.0-alpha.2 124 7/3/2023
0.1.0-alpha.1 91 6/29/2023