Uploader for Silverlight
Step 1 of 4: Creating a Silverlight Application

In this step we begin in Visual Studio to create a Silverlight application using Uploader for Silverlight. We create a new Silverlight project and set up the application.

To set up your project, complete the following steps:

  1. In Visual Studio, select File | New | Project.
  2. In the New Project dialog box, select a language in the left pane, and in the templates list select Silverlight Application. Enter a Name for your project, for example "QuickStart," and click OK. The New Silverlight Application dialog box appears.
  3. Click OK to accept the default settings, close the New Silverlight Application dialog box, and create your project. The MainPage.xaml file opens.
  4. Right-click the project in the Solution Explorer window and select Add Reference.
  5. In the Add Reference dialog box, locate and select the C1.Silverlight.dll and C1.Silverlight.Uploader.dll assemblies and click OK to add references to your project.
  6. In the XAML window of the project, place the cursor between the <Grid> and </Grid> tags and click once.
  7. Add the following XAML markup between the <Grid> and </Grid> tags in the MainPage.xaml file:
    XAML
    Copy Code
    <StackPanel Orientation="Horizontal" Height="250" HorizontalAlignment="Center">
        <Button Content="Upload Photos" Height="30" VerticalAlignment="Top" Margin="5" Click="Upload_Click" />
        <ScrollViewer Width="400" Margin="5" Background="White">
            <StackPanel x:Name="PicturePanel"/>
        </ScrollViewer>
    </StackPanel>
    
    This markup creates a button and a panel. Users click the button to upload image files to the server and the panel displays the images.
  8. Right-click the QuickStartWeb application in the Solution Explorer and select New Folder. Name the folder "Pictures." Note that if you name your project something other than "QuickStart" you right-click MyProjectWeb where "MyProject" is the name of your project.
    This folder is used to save the uploaded images. After you create the Pictures folder, you may need to set up its permissions so the application can save the pictures into the folder. You may need to confirm that the network service has read and write permissions on the folder.

What You've Accomplished

You have successfully created and set up a Silverlight application and added controls to the page. In the next step we add code to implement the C1Uploader class.

See Also

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback