Click here to Skip to main content
15,885,278 members
Articles / Desktop Programming / WPF

WPF HTML Supported TextBlock

Rate me:
Please Sign up or sign in to vote.
4.36/5 (9 votes)
7 Feb 2009LGPL32 min read 173.5K   1.1K   35  
This article describes HtmlTextBlock which is a WPF TextBlock that can parse a limited set of HTML tags and display them.
/*
 * Created by SharpDevelop.
 * User: LYCJ
 * Date: 20/10/2007
 * Time: 20:27
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;
using System.Collections.Generic;

namespace QuickZip.MiniHtml2
{
	/// <summary>
	/// Description of Run.
	/// </summary>
	public class Run : Inline
	{
		private string text;
		public string Text { get { return text; } }		
		
		public Run()
		{
			text = "";
		}
		
		public Run(string aText)
		{
			text = aText;
		}
		
		public override string ToString()
		{
			return Text;
		}
				
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)


Written By
Founder
Hong Kong Hong Kong

Comments and Discussions