Adding a Control to the Reflector

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:

      Visual Basic

      C#

3.   Run the program

 This Topic Illustrates the Following:

The result of this topic will resemble the following image:

 


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.