ComponentOne DateTimeEditors for WPF: ComponentOne DateTimeEditors for WPF > Adding the DateTimeEditors for WPF Components to a Visual Studio Project

Adding the DateTimeEditors for WPF Components to a Visual Studio Project

When you install ComponentOne DateTimeEditors for WPF the C1DateTimePicker or C1TimeEditor control should be added to your Visual Studio Toolbox. You can also manually add ComponentOne controls to the Toolbox.

ComponentOne DateTimeEditors for WPF provides the following controls:

      C1DateTimePicker

      C1TimeEditor

To use a DateTimeEditors for WPF panel or control, add it to the window or add a reference to the C1.WPF assembly to your project.

Manually Adding DateTimeEditors for WPF to the Toolbox

When you install DateTimeEditors for WPF, the following DateTimePicker for WPF controls and panel will appear in the Visual Studio Toolbox customization dialog box:

      C1DateTimePicker

      C1TimeEditor

To manually add the C1DateTimePicker or C1TimeEditor control to the Visual Studio Toolbox, complete the following steps:

1.   Open the Visual Studio IDE (Microsoft Development Environment). 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 DateTimeEditors for WPF components appear on its own tab in the Toolbox, select Add Tab from the context menu and type in the tab name, C1WPFDateTimeEditors, 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.

4.   In the dialog box, select the WPF Components tab.

5.   Sort the list by Namespace (click the Namespace column header) and select the check boxes for components belonging to the C1.WPF.DateTimeEditors namespace. Note that there may be more than one component for each namespace.

Adding DateTimeEditors for WPF to the Window

To add ComponentOne DateTimeEditors for WPF to a window or page, complete the following steps:

1.   Add the C1DateTimeEditors controls to the Visual Studio Toolbox.

2.   Double-click C1DateTimePicker or C1TimeEditor or drag the control onto the window.

Adding a Reference to the Assembly

To add a reference to the DateTimeEditors for WPF assembly, complete the following steps:

1.   Select the Add Reference option from the Project menu of your project.

2.   Select the ComponentOne DateTimeEditors for WPF assembly from the list on the .NET tab or on the Browse tab, browse to find the C1.WPF.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 Imports statements (using in C#):

Imports C1.WPF.DateTimeEditors

This makes the objects defined in the DateTimeEditors for WPF assembly visible to the project.


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.