tags:

views:

110

answers:

1

I want to build a sample application where you can preview HTML code

for example::

<TabControl......>
    <tabItem Header="HTML".....>

     <!- 
            Here I type my HTML code ...
               <html>
                   <body>
                       <p>********Some Text*******</p>
                   </body>
               </html>
           which would be saved in the database as it is.
     ->

    </TabItem>
    <tabItem Header="Preview".....>
       <!-
            On clicking this Tab the Preview of the above HTML code (read from the database)            should be displayed.
       ->
    </TabItem>
  </TabControl>

How do I display the preview??

+1  A: 

Embed the WebBrowser control on the preview tab and pass the HTML into it using the NavigateToString or NavigateToStream methods.

Drew Marsh