Getting Started with WPF | ComponentOne Studio Edition
In This Topic
    Adding the WPF Edition Components
    In This Topic

    When you install WPF Edition the WPF controls should be added to your Visual Studio Toolbox. You can also manually add ComponentOne controls to the Toolbox.

    WPF Edition provides several controls. To use a WPF Edition panel or control, add it to the window or add a reference to the required C1.WPF assembly to your project (for example, C1.WPF.DataGrid.dll).

    Note: All .NET Framework components and controls can be used in WPF Core 3.1 applications.

    Manually Adding WPF Edition controls to the Toolbox

    When you install the WPF Edition, several controls and panels will appear in the Visual Studio Toolbox customization dialog box.

    To manually add the WPF Edition controls to the Visual Studio Toolbox, complete the following steps:

    1. Open the Visual Studio IDE (Microsoft Development Environment), and the desired WPF project. Make sure the Toolbox is visible (select Toolbox in the View menu, if necessary) and right-click the Toolbox to open its context menu.
    2. To make WPF Edition components appear on their own tab in the Toolbox, select Add Tab from the context menu and type in the tab name, C1WPF, for example.
    3. Right-click the tab where the component is to appear and select Choose Items from the context menu.

    The Choose Toolbox Items dialog box opens.

    1. In the dialog box, select the WPF Components tab.
    2. Sort the list by Namespace (click the Namespace column header) and select the check boxes for components belonging to the C1.WPF namespace that you wish to add. Note that there may be more than one component for each namespace.

    Adding WPF Edition controls to the Window

    To add WPF Edition controls to a window or page, complete the following steps:

    1. Add the control to the Visual Studio Toolbox.
    2. Double-click the control or drag the control onto the MainWindow.

    Adding a Reference to the Assembly

    To add a reference to the WPF Edition assemblies, complete the following steps:

    1. Select the Add Reference option from the Project menu of your project.
    2. Select the desired WPF Edition assembly from the list on the .NET tab or on the Browse tab, browse to find the C1.WPF.Product.dll assembly and click OK.
    3. Double-click the window caption area to open the code window. At the top of the file, add the following import statements (in C#):

      C#
      Copy Code
      using C1.WPF;
      using C1.WPF.ProductName;
      

    This makes the objects defined in the WPF Edition assembly visible to the project. Note that in the steps above, replace "ProductName" with the correct assembly name, for instance "Extended" or "DataGrid".