Click here to Skip to main content
12,763,819 members (38,913 online)
Click here to Skip to main content


34 bookmarked
Posted 7 Feb 2009

WPF HTML Supported TextBlock

, 7 Feb 2009 LGPL3
This article describes HtmlTextBlock which is a WPF TextBlock that can parse a limited set of HTML tags and display them.
using System;
using System.Text;
using System.Drawing;
using System.Drawing.Text;
using System.Drawing.Imaging;
using System.Diagnostics;
using System.Windows.Forms;
using System.IO;
using System.Collections;
using System.Runtime.InteropServices;
using System.Threading;

namespace QuickZip.MiniHtml2
    public class ProcessInfo
        public IntPtr hProcess;
        public IntPtr hThread;
        public Int32 ProcessID;
        public Int32 ThreadID;

    public class Header
#if CF
        const string user32 = "coredll.dll";
        const string kernel32 = "coredll.dll";
        const string user32 = "user32.dll";
        const string kernel32 = "kernel32.dll";

        public static extern Int32 CreateProcess(string appName,
            string cmdLine, IntPtr lpProcessAttributes, IntPtr lpThreadAttributes,
            Int32 boolInheritHandles, Int32 dwCreationFlags, IntPtr lpEnvironment,
            IntPtr lpszCurrentDir, Byte[] si, ProcessInfo pi);

        public static extern Int32 WaitForSingleObject(IntPtr handle, Int32 wait);

        public static extern Int32 GetLastError();

        public static extern Int32 CloseHandle(IntPtr handle);


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.


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


About the Author

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170217.1 | Last Updated 7 Feb 2009
Article Copyright 2009 by Leung Yat Chun
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid