# Adding a Control to the Reflector

## Content

The C1Reflector control can accept Silverlight UI controls. To illustrate this feature, this topic will have you add a standard Silverlight Button to the reflector. Once it is added to the control, you will see the control and its reflection in the C1Reflector control.

**At Design Time in Blend**

To add a control, complete the following steps:

1. Under the Objects and Timeline tab, select All for a list of all available controls.
2. In the list of controls, select the Button icon and then use a drag-and-drop operation to add it to the C1Reflector container.

**In XAML**

To add a control, place the following markup between the `<(c1ext:C1Reflector>` and `</c1ext:C1Reflector>` tags:

```xml
<Button Content="Button"></Button>
```

**In Code**

To add a control, complete the following steps:

1. Add x:Name=C1Reflector1 to the `<c1ext:C1Reflector>` tag. This will give the control a unique identifier that you can use to call it in code.
2. Switch to Code view and add the following beneath the InitializeComponent() method:

```vbnet
'Create a button object and name it
Dim Button1 As New Button()
Button1.Content = "Button"
'Set the C1Reflector control's content to the button
C1Reflector1.Content = Button1
```

```csharp
//Create a button object and name it
Button Button1 = new Button();
Button1.Content = "Button";
//Set the C1Reflector control's content to the button
C1Reflector1.Content = Button1;
```

3. Run the program.

![](https://cdn.mescius.io/document-site-files/images/babf1807-69aa-4d8a-96b6-d6c6d9325368/silverlightdocuments/documents/graphics/c1reflector/check.png) **This Topic Illustrates the Following**:

The result of this topic will resemble the following image:

![](https://cdn.mescius.io/document-site-files/images/babf1807-69aa-4d8a-96b6-d6c6d9325368/silverlightdocuments/documents/graphics/c1reflector/tbh/addcontrol_final.png)