HtmlHost (Silverlight Only) > Task-Based Help > Displaying an External Web Site |
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:
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.