An open API service indexing awesome lists of open source software.

https://github.com/edsnider/htmllabel

HTML Label for Xamarin.Forms
https://github.com/edsnider/htmllabel

android html ios nuget plugin xamarin xamarin-forms xamarin-forms-control xamarin-plugin

Last synced: 26 days ago
JSON representation

HTML Label for Xamarin.Forms

Awesome Lists containing this project

README

        

# HTML Label for Xamarin.Forms apps

[![Build status](https://dev.azure.com/edsnider/htmllabel/_apis/build/status/htmllabel-CI)](https://dev.azure.com/edsnider/htmllabel/_build/latest?definitionId=4)
[![MyGet](https://img.shields.io/myget/edsnider/vpre/XamForms.HtmlLabel.svg?label=myget)](https://www.myget.org/feed/edsnider/package/nuget/XamForms.HtmlLabel)
[![NuGet](https://img.shields.io/nuget/v/XamForms.HtmlLabel.svg?label=nuget)](https://www.nuget.org/packages/XamForms.HtmlLabel)

Easily render HTML in your Xamarin.Forms apps.

**Note:** This control is intended for basic text formatting (e.g., bold, italic, hyperlinks, etc.). It is not intended for rendering complex HTML or webpages - use the `WebView` for that.

## Dependency

- Xamarin.Forms >= 3.0.0.446417

## Supported platforms

HtmlLabel is supported on the following Xamarin.Forms platforms:

- iOS
- Android

## Usage

You use `HtmlLabel` just like any other control on a Xamarin.Forms `ContentPage`.

The value of the `Text` property will be rendered as HTML using the platform's native text formatting approach.

### XAML example

```xaml








```

When using this control in XAML it is recommended you use [XAMLC](https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xamlc).

### C# example
```csharp
var signInLinks = new HtmlLabel
{
Text = @"Upon sign in you agree to our Terms of Service and Privacy Policy."
};
```

## License

Licensed under MIT. See [License file](https://github.com/edsnider/htmllabel/blob/master/LICENSE)