3
votes

I'm trying to add this Silverlight 4 control to my project. I went to the downloads page, and it's full of VS solutions/projects/.cs files. I'm new to Silverlight, and I don't really know how to get the control from that. Help?

Update: I tried following roufamatic's instructions. At this point, I was still unsure how to use the control, so I tried the following code:

        mpost.SilverlightSingleFileUpload.MainPage singleFileUpload = new mpost.SilverlightSingleFileUpload.MainPage();
        singleFileUpload.Width = singleFileUpload.Height = 100;

Unfortunately, the app crashes on the first of the above lines:

Could not load file or assembly 'mpost.SilverlightMultiFileUpload.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

What else can I try?

3

3 Answers

0
votes

Assuming your project is a web application, you can add it to your project like so:

  1. Download the full source, including the project file.
  2. Add the Silverlight project to your solution.
  3. Open Properties on your web application and choose "Silverlight Application" on the left side.
  4. Click "Add" and choose the Silverlight project.

This dialog can also generate a test page which will get you some boilerplate HTML to embed the control in your own pages. You may also enable debugging so you can step through the code when the control is loaded in the browser.

0
votes
  1. Build it.
  2. Take the output dll and put in a directory in your own solution.
  3. Add a reference to the dll.
  4. right click on tool box
  5. click 'choose items'
  6. look on the silverlight tab
  7. mark the appropriate checkbox
0
votes

Have you tried running the dll against Dependency Walker and see all its dependencies?