Click here to Skip to main content
13,558,939 members
Click here to Skip to main content

Tagged as

Stats

114.5K views
34 bookmarked
Posted 7 Feb 2009
Licenced LGPL3

WPF HTML Supported TextBlock

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:24
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;
using System.Collections.Generic;
using System.Drawing;

namespace QuickZip.MiniHtml2
{
	/// <summary>
	/// Description of InLine.
	/// </summary>
	public class Inline : TextElement
	{
		protected Inline nextInLine = null;
		protected Inline previousInLine = null;
		internal void setNextInLine(Inline aInline) { nextInLine = aInline; }
		
		public Inline NextInLine { get { return nextInLine; } }
		public Inline PreviousInLine { get { return previousInLine; } }
		
		
//		public InlineCollection InLines 
		
		
		public override FontStyle FontStyle 
		{ 
			get { 
					if (NextInLine != null)
						return fontStyle | PreviousInLine.FontStyle;
					return fontStyle;
				}
		 	set { fontStyle = value; } 
		}
		
		
		public Inline()
		{
		}
		
		public override string ToString()
		{
			string retVal = this.GetType().Name + "|";
			if (PreviousInLine != null)
				return retVal + PreviousInLine.ToString();
			return retVal;
		}
	}
}

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)

Share

About the Author

Leung Yat Chun (Fainx)
Founder FANIX.ME
Hong Kong Hong Kong
From the end of the Universe we have Fainx and Quick Zip.
http://www.FANIX.ME
Quickzip.org is stolen by and moved to Fanix.me.
--
May Thy Lord Your God be blessed always.

DirectoryInfoEx - [1.0.27]
WPF FileExplorer3 - [3.0.19]
WPF HtmlTextBlock - [Codeplex]
WPF ListView MultiSelect - [0.4]
WPF UIEventHub MultiSelect/DragDrop w Touch support - [3.0]
WPF BreadcrumbFolderTextBox - [2.5]
WPF BreadcrumbTree and Breadcrumb
WPF Aero Titlebar - [0.2]

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02-2016 | 2.8.180515.1 | Last Updated 7 Feb 2009
Article Copyright 2009 by Leung Yat Chun (Fainx)
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid