Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

WPF HTML Supported TextBlock

, 7 Feb 2009
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";
#else
        const string user32 = "user32.dll";
        const string kernel32 = "kernel32.dll";
#endif

        [DllImport(kernel32)]
        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);

        [DllImport(kernel32)]
        public static extern Int32 WaitForSingleObject(IntPtr handle, Int32 wait);

        [DllImport(kernel32)]
        public static extern Int32 GetLastError();

        [DllImport(kernel32)]
        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.

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


| Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 7 Feb 2009
Article Copyright 2009 by Leung Yat Chun
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid