Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3213876
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:59:42+00:00 2026-05-17T14:59:42+00:00

I would need to display some basic HTML (just some paragraphs, unordered lists and

  • 0

I would need to display some basic HTML (just some paragraphs, unordered lists and hyperlinks) in my Silverlight application. How would I go about that?

Which control to use?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T14:59:43+00:00Added an answer on May 17, 2026 at 2:59 pm

    Try this link for starters: http://www.wintellect.com/CS/blogs/jprosise/archive/2009/12/22/silverlight-4-s-new-html-hosting-support.aspx

    Here is the relevant part:

    Another of the new capabilities that Silverlight 4 brings to the
    platform is the ability to host HTML content inside a Silverlight
    control. This support isn’t limited to static HTML content; the
    content can be interactive and can include script. It can even be
    Flash content or content that includes other Silverlight controls.

    To host HTML content in Silverlight, you can use either a WebBrowser
    control or an HtmlBrush. One way to display HTML content is to fire up
    a WebBrowser control and point it to a URL:

    <WebBrowser x:Name="WebBrowserControl" Source="http://www.bing.com" />
    

    Another way to do it is to call NavigateToString and pass a string of
    content to the WebBrowser control:

    WebBrowserControl.NavigateToString("<h1>Hello, Silverlight</h1>");
    

    HTML hosting is not available to in-browser apps (it applies to
    out-of-browser applications only), and if an OOB lacks elevated
    permissions, it can only display content that comes from the same
    domain as the Silverlight application. However, you can use a little
    trick to display cross-domain content in OOBs that run without
    elevated permissions—simply pass an IFRAME targeting the remote
    content to NavigateToString:

    WebBrowserControl.NavigateToString("<iframe src=\"http://www.bing.com\" style=\"width: 100%; height: 100%\"></iframe>");
    

    You can render HTML content with HtmlBrush, too. The following XAML
    snippet paints a Rectangle with content retrieved from Bing:

    <WebBrowser x:Name="WebBrowserControl" Source="http://www.bing.com" />
    <Rectangle>
      <Rectangle.Fill>
        <HtmlBrush SourceName="WebBrowserControl" />
      </Rectangle.Fill>
    </Rectangle>
    

    One difference between WebBrowser and HtmlBrush is that the former
    displays “live” content, while the latter does not. Another difference
    is that HtmlBrush can have transforms applied to it, while WebBrowser
    cannot. For snazzy visual effects involving HTML content like the HTML
    puzzle demoed at the PDC, you’ll probably find yourself using
    HtmlBrush. To display live, interactive content, you’ll find
    WebBrowser more useful instead.

    One of the really cool things about the WebBrowser control is that you
    can use its InvokeScript method to call JavaScript functions in
    content hosted by the control. Conversely, JavaScript hosted inside a
    WebBrowser control can use window.external.Notify to raise
    ScriptNotify events that can be handled in C#.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would need some basic vector mathematics constructs in an application. Dot product, cross
I have a need to display some basic info about a facebook group on
I'm building a web application and I just received some basic foundation data from
I have a C# application that allows one user to enter information about customers
I have a basic linear layout, with image view that display photos, textviews that
I need to display some tabular data in a JSF page. I need some
I would need to create a temp table for paging purposes. I would be
What regex pattern would need I to pass to java.lang.String.split() to split a String
Does anyone know what would be the minimum rights I would need to grant
I'm working on a tool which would need to communitacte: send and recieve files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.