If you are new to the Silverlight platform, you might be unfamiliar with how to start a new project using a component. To use the Spread Silverlight product, you need to add the component to a project in Visual Studio.
The first step is to create a new project in Visual Studio, and to add a Spread Silverlight component to the project.
- Start Visual Studio.
- From the File menu, choose New, Project.
- In the New Project dialog, select a project type depending on the language environment in which you are developing.
- Select Silverlight under Visual Basic or Visual C# in the Installed Templates section.
- Choose Silverlight Application in the project type area.
- In the Name box, type the name of the new project.
- In the Location box, type the path to save the project to.
- In the Solution Name box, type the solution name of the new project.
- Click OK.
The next step is to add the GcSpreadSheet component to the toolbox. This only has to be done once.
- If the Toolbox is not displayed, from the View menu choose Toolbox.
- Once the Toolbox is displayed, look in the ComponentOne Spread category (or in any other category if you have installed Spread and placed the toolbox icon in a different category).
- If the GcSpread component is not in the Toolbox, right-click in the Toolbox, and from the pop-up menu select Choose Items.
- In the Customize Toolbox dialog, click the Silverlight Components tab.
- In the Silverlight Components tab, the GcSpreadSheet component (in the GrapeCity.Silverlight.SpreadSheet.UI namespace) should be displayed in the list of components. Select the GcSpreadSheet component check box and click OK.
If the GcSpreadSheet component is not displayed in the list of components, click Browse and browse to the installation path for the Spread Silverlight component. Once there, select the GrapeCity.Silverlight.SpreadSheet.UI.dll and click Open. The GcSpreadSheet component is now displayed in the list of components.
- You can test that the component has been added by opening a project and inserting the component.
The next step is to add the GcSpreadSheet component to a project.
- With an open project, in the Toolbox, select the GcSpreadSheet component.
- On your Main Window page, draw a GcSpreadSheet component by dragging a rectangle the size that you would like the initial component or simply double-click on the page.The GcSpreadSheet component appears.