ComponentOne Extended Library for WPF and Silverlight
Hiding Frame Borders
HtmlHost (Silverlight Only) > Task-Based Help > Hiding Frame Borders

By default, borders are displayed around the C1HtmlHost control. You may want to hide this frame border – for example, if you want the control to blend more seamlessly with your application. Hiding frame borders in HtmlHost for Silverlight is as simple as setting a single property. The C1HtmlHost.FrameBorder property determines if a frame is displayed around the control.

At Design Time

To set the C1HtmlHost.FrameBorder property, complete the following steps:

  1. Click the C1HtmlHost control once to select it.
  2. Navigate to the Properties window and locate the FrameBorder item.
  3. Clear the check box next to the FrameBorder item.

In XAML

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

<c1ext:C1HtmlHost Name="c1HtmlHost1" FrameBorder="False" />

In Code

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

Visual Basic
Copy Code
Me.C1HtmlHost1.FrameBorder = False
C#
Copy Code
this.C1HtmlHost1.FrameBorder = false;

 

 What You've Accomplished

You've set the C1HtmlHost.FrameBorder property so a frame does not appear around the control at run time. Run the application, and observe the C1HtmlHost control appears without a surrounding frame.