In this topic, you’ll learn how to add images to the C1CoverFlow control in Blend, in XAML, and in code.
In Blend
Complete the following steps:
The Add Existing Item dialog box opens.
Navigate to the location of your image, select the image file, and click Open to add the image to the Image control.
In XAML
Complete the following steps:
XAML Copy Code<c1ext:C1CoverFlow Margin="0,0,205,200"></c1ext:C1CoverFlow>
XAML Copy Code <Image Height="100" Width="100" Source="YourImage.png"/>
In Code
Complete the following steps:
Visual Basic Copy Code Imports System.Windows.Media.Imaging
C# Copy Codeusing System.Windows.Media.Imaging;
Visual Basic Copy Code ' Create the Image control Dim Image1 As New Image() ' Create a bitmap image and add your image as its source Dim BitMapImage1 As New BitmapImage() BitMapImage1.UriSource = New Uri("Epica.jpg", UriKind.RelativeOrAbsolute) ' Add the bitmap image as the Image control's source Image1.Source = BitMapImage1 'Add the Image control to the C1CoverFlow control C1CoverFlow1.Items.Add(Image1)
C# Copy Code // Create the Image control Image Image1 = new Image(); // Create a bitmap image and add your image as its source BitmapImage BitMapImage1 = new BitmapImage(); BitMapImage1.UriSource = new Uri("Epica.jpg", UriKind.RelativeOrAbsolute); // Add the bitmap image as the Image control's source Image1.Source = BitMapImage1; //Add the Image control to the C1CoverFlow control C1CoverFlow1.Items.Add(Image1);