The C1Reflectorcontrol can accept Windows Phone UI controls. To illustrate this feature, this topic will have you add a standard Windows Phone 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
To add a control, complete the following steps:
1. Select the C1Reflector in the Design view.
2. From the Toolbox, select and double-click the Button icon to add it to the C1Reflector container.
3. If the control was not added to the C1Reflector, edit the markup in XAML view to move the control's tags within the C1Reflector.
In XAML
To add a control, place the following markup between the <my:C1Reflector> and </my:C1Reflector> tags:
<Button Content="Button"></Button>
In Code
To add a control, complete the following steps:
1. Add x:Name=C1Reflector1 to the <my: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:
'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
•C#
//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
This Topic Illustrates the Following:
The result of this topic will resemble the following image:
