Extended Library for WPF and Silverlight | ComponentOne
HtmlHost (Silverlight Only) / Task-Based Help / Displaying an External Web Site
In This Topic
    Displaying an External Web Site
    In This Topic

    Displaying an external Web site in HtmlHost for Silverlight is as simple as setting a single property. The C1HtmlHost.SourceUri property determines the URI of the site displayed in the control. You can set the C1HtmlHost.SourceUri property to any Web site – even an external site – to display.

    At Design Time

    To set the C1HtmlHost.SourceUri property in Expression Blend, complete the following steps:

    1. Click the C1HtmlHost control once to select it.
    2. Navigate to the Properties window and locate the SourceUri item.
    3. Click in the text box next to the SourceUri item and enter "http://www.componentone.com".

    In XAML

    For example, to set the C1HtmlHost.SourceUri property add SourceUri="" to the <c1:C1HtmlHost> tag so that it appears similar to the following:

    <c1:C1HtmlHost Name="c1HtmlHost1" SourceUri="http://www.componentone.com" />

    In Code

    For example, to set the C1HtmlHost.SourceUri property, add the following code to your project:

    Visual Basic
    Copy Code
    Me.C1HtmlHost1.SourceUri = "http://www.componentone.com"
    

    C#
    Copy Code
    this.C1HtmlHost1.SourceUri = "http://www.componentone.com";
    

     

     What You've Accomplished

    You've set the C1HtmlHost.SourceUri property and customized the C1HtmlHost control so that it displays the ComponentOne Web site at run time. Run the application, and observe the ComponentOne Web site appears in the C1HtmlHost control at run time.

    See Also