Skip to content
Windows 8 and Windows Phone 8 class to bind string with HTML bold tags in XAML application.
C#
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE.txt
README.md
W8HTMLBinding.cs
WP8HTMLBinding.cs

README.md

Overview

This repository allow to bind a string with HTML bold tag (<b> </b>) in a XAML TextBlock control for Windows 8 (W8HTMLBinding.cs) and Windows Phone 8 (WP8HTMLBinding.cs).

You can customize the way highlighted part of Text property are rendered with HighlightedBrush property.

Example

Usage is very easy, you have just to add a namespace in the opening tag of your xaml file:

xmlns:algolia="using:AlgoliaSearch"

And then to bind a string that contains HTML bold tags:

<TextBlock algolia:HTMLBinding.Text="{Binding StringWithBoldTags}"
              algolia:HTMLBinding.HighlightBrush="#52aed9"
              Style="{StaticResource SubheaderTextStyle}"
              TextWrapping="NoWrap"/>
You can’t perform that action at this time.