Spread WPF 14
Spread WPF Documentation / Developer's Guide / Getting Started / Adding a Component to the Project
In This Topic
    Adding a Component to the Project
    In This Topic

    If you are new to the WPF platform, you might be unfamiliar with how to start a new project using a component. To use the Spread WPF product, you need to add the component to a project in Visual Studio .NET.

    The first step is to create a new project in Visual Studio .NET, and to add a Spread WPF component to the project.

    1. Start Visual Studio .NET.
    2. From the File menu, choose New, Project.
    3. In the New Project dialog, select a project type depending on the language environment in which you are developing.
    4. Select Windows under Visual Basic or Visual C# in the Installed Templates section.
    5. Choose WPF Application in the project type area.
    6. In the Name box, type the name of the new project.
    7. Click OK.
    8. Set the location path when saving the project.

    The next step is to add the GcSpreadSheet component to the toolbox. This only has to be done once.

    1. If the Toolbox is not displayed, from the View menu choose Toolbox.
    2. Once the Toolbox is displayed, look in the ComponentOne Spread category (or in any other category if you have installed GcSpreadSheet and placed the toolbox icon in a different category).

      GcSpreadSheet component in the Toolbox

    3. If the GcSpreadSheet component is not in the Toolbox, right-click in the Toolbox, and from the pop-up menu select Choose Items.
    4. In the Customize Toolbox dialog, click the WPF Components tab.
    5. In the WPF Components tab, the GcSpreadSheet component (in the GrapeCity.WPF.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 WPF component. Once there, select the GrapeCity.WPF.SpreadSheet.UI.dll and click Open. The GcSpreadSheet component is now displayed in the list of components.

    6. 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.

    1. With an open project, in the Toolbox, select the GcSpreadSheet component.
    2. 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.