edsnider - XamForms.HtmlLabel 0.2.0-beta.140

Easily render HTML in your Xamarin.Forms apps (iOS and Android only).

PM> Install-Package XamForms.HtmlLabel -Version 0.2.0-beta.140 -Source https://www.myget.org/F/edsnider/api/v3/index.json

Copy to clipboard

> nuget.exe install XamForms.HtmlLabel -Version 0.2.0-beta.140 -Source https://www.myget.org/F/edsnider/api/v3/index.json

Copy to clipboard

> dotnet add package XamForms.HtmlLabel --version 0.2.0-beta.140 --source https://www.myget.org/F/edsnider/api/v3/index.json

Copy to clipboard
<PackageReference Include="XamForms.HtmlLabel" Version="0.2.0-beta.140" />
Copy to clipboard
source https://www.myget.org/F/edsnider/api/v3/index.json

nuget XamForms.HtmlLabel  ~> 0.2.0-beta.140
Copy to clipboard

> choco install XamForms.HtmlLabel --version 0.2.0-beta.140 --source https://www.myget.org/F/edsnider/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "edsnider" -SourceLocation "https://www.myget.org/F/edsnider/api/v2"
Install-Module -Name "XamForms.HtmlLabel" -RequiredVersion "0.2.0-beta.140" -Repository "edsnider" -AllowPreRelease
Copy to clipboard

HTML Label for Xamarin.Forms apps

Build status MyGet NuGet

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

<ContentPage 
    ...  
    xmlns:controls="clr-namespace:XamForms.HtmlLabel;assembly=XamForms.HtmlLabel">

    <StackLayout VerticalOptions="CenterAndExpand" HorizontalOptions="Center" WidthRequest="250">
        
        <Entry Text="" Placeholder="Username" />
        <Entry Text="" Placeholder="Password" />
        <Button Text="Sign in" BackgroundColor="Purple" TextColor="White" />
        
        <controls:HtmlLabel Text="Upon sign in you agree to our &lt;a href='http://www.infernored.com'&gt;Terms of Service&lt;/a&gt; and &lt;a href='http://www.infernored.com'&gt;Privacy Policy&lt;/a&gt;." />

        <!-- Or, with data binding -->
        <controls:HtmlLabel Text="{Binding SignInAgreementText}" />

    </StackLayout>

</ContentPage>

When using this control in XAML it is recommended you use XAMLC.

C# example

var signInLinks = new HtmlLabel
{
    Text = @"Upon sign in you agree to our <a href=""http://www.infernored.com"">Terms of Service</a> and <a href=""http://www.infernored.com"">Privacy Policy</a>."
};

License

Licensed under MIT. See License file

  • MonoAndroid 7.1
    • Xamarin.Forms (>= 3.0.0.446417)
  • Xamarin.iOS 1.0
    • Xamarin.Forms (>= 3.0.0.446417)
  • .NETStandard 2.0
    • Xamarin.Forms (>= 3.0.0.446417)
  • .NETStandard 2.0: 2.0.0.0
  • MonoAndroid 7.1: 7.1.0.0
  • Xamarin.iOS 1.0: 1.0.0.0

Owners

edsnider

Authors

edsnider

Project URL

https://github.com/edsnider/htmllabel

License

MIT

Tags

xamarin, xamarin.forms, html, label, ios, android, xamarin.ios, xamarin.android, mobile, xam.plugins, plugins, plugin, formsplugin, xamforms, control

Info

8 total downloads
2 downloads for version 0.2.0-beta.140
Download (9.01 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
0.2.0-beta.140 9.01 KB Fri, 02 Nov 2018 23:44:45 GMT 2
0.2.0-beta.139 8.8 KB Fri, 02 Nov 2018 23:10:09 GMT 2
0.2.0-beta.138 8.82 KB Sat, 27 Oct 2018 03:27:05 GMT 2
0.1.0-beta.137 8.82 KB Wed, 24 Oct 2018 20:30:54 GMT 2