Adding Images to the C1CoverFlow Control

In this topic, you'll learn how to add images to the C1CoverFlow control in Design view, in XAML, and in code. Note that you would need to add your image(s) to the application before completing the following steps..

In Design View

Complete the following steps:

1.   Add a C1CoverFlow control to your project and select the control in Design view.

2.   Navigate to the Toolbox and double-click the Image icon to add the Image control to the C1CoverFlow control. If the Image control was not added to the control, you may need to move its markup between the C1CoverFlow tags in XAML view.

3.   Select the Image control in Design view.

4.   In the Properties window, click the Source ellipsis button.

The Choose Image dialog box opens.

5.   Navigate to the location of your image, select the image file, and click Open to add the image to the Image control. You can also select the Add button to locate an image not listed in the dialog box.

In XAML

Complete the following steps:

1.   Add a C1CoverFlow control so that the XAML appears similar to the following:

 

<my:C1CoverFlow c1ext:C1CoverFlow>

 

2.   Place the following XAML between the <my:C1CoverFlow> and </my:C1CoverFlow> tags, replacing "YourImage.png" with the name of your image file:

 

<Image Height="100" Width="100" Source="YourImage.png"/>

In Code

Complete the following steps:

1.   In XAML view, add "x:Name="C1CoverFlow1" to the <my:C1CoverFlow> tag so that the control will have a unique identifier for you to call in code.

2.   Open the MainPage.xaml code page (either MainPage.xaml.csor MainPage.xaml.vb, depending on which language you've chosen for your project).

3.   Import the following namespace:

      Visual Basic

      C#

4.   Add the following code beneath the InitializeComponent method:

      Visual Basic

      C#

 This Topic Illustrates the Following:

You've added an image to your application. If you run your application, the image will be included in the C1CoverFlow control.


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