Share via


How to Create a New Form in the Authoring Tool

Applies To: System Center Service Manager 2010

If you defined a new custom class to extend System Center Service Manager 2010, you might have to create a custom form to interact with that class. You can use the System Center Service Manager Authoring Tool to create a form in either of the following methods:

  • Start from scratch.

  • Load a custom Windows Presentation Foundation (WPF) form that was initially developed by the Microsoft Visual Studio development system, and continue to customize that form in the Authoring Tool.

The Authoring Tool includes form controls such as the Check Box, Date Picker, Tab Control, and Tab Item that you can add to the form. You can access these controls from the Form Customizations Toolbox. Typically, you bind the form controls to specific properties of the form’s base class. Therefore, in either method, you must first select a base class for the form to be associated with. For more information about the controls that you can add to a form, see previous topics in this section, such as How to Add a Check Box Control to a Form in the Authoring Tool, and How to Add Tab Control and Tab Item Controls to a Form in the Authoring Tool.

The following two methods describe authoring a form in the Authoring Tool.

Creating a New Form from Scratch

Use the following procedure to create a simple form from scratch. When you create a form from scratch, the Authoring Tool does not support advanced capabilities. For example, there is no support for code-behind, complex rules such as field interdependency, or calculated values.

To create a new form from scratch

  1. In the Management Pack Explorer, expand the management pack in which you want to store the new form. Right-click Forms, and then click Create.

  2. In the Base class dialog box, select the base class for the form. You can narrow your search by selecting a specific management pack, or leave the default All Management Packs. Click OK.

  3. If you selected a sealed management pack in step 1, the Target Management Pack dialog box appears. Select an unsealed management pack in which to store the form, and click OK.

  4. In the Create form dialog box, in the Internal name box, type a name for the form, and then click Create. An initial blank form is displayed in the authoring pane. The initial form consists of a header section at the top, and a body section underneath; both sections are blank.

  5. Customize the form by dragging controls from the Form Customizations Toolbox pane to the new form.

  6. Save the management pack that contains the form that you created.

Creating a New Form that is Based on a Custom WPF Form

Sometimes a simple form is not sufficient, and you must use advanced features such as custom logic in the form. In this case, you can develop a custom WPF form by using a tool other than the Authoring Tool, using instead Visual Studio. Then, instead of authoring a form from scratch, you load that WPF form’s assembly file into the Authoring Tool and use that as a starting point for further customizations to the form. The form customizations that you make in the Authoring Tool are stored in a management pack file.

Later, to use the customized form in Service Manager after you complete all customizations, you must bundle the original form assembly file with the management pack that contains the customizations that you made in the Authoring Tool. For more information about bundling a management pack and creating a .mpb file, see How to Bundle Management Packs and Resource Files.

Use the following procedure to load a custom WPF form assembly file into the Service Manager and to continue and customize that form.

To create a new form that is based on a custom WPF form

  1. In the Management Pack Explorer, expand the management pack in which you want to store customizations to the form. Right-click Forms, and then click Add Custom.

  2. In the Base class dialog box, select the base class for the form. You can narrow your search by selecting a specific management pack, or keep the default All Management Packs. Click OK.

  3. If you selected a sealed management pack in step 1, the Target Management Pack dialog box appears. Select an unsealed management pack in which to store the form, and click OK.

  4. In the Add custom form dialog box, type a name in the Internal name box. In the Assembly box, select the assembly file that contains the custom form that you want to load, and in the Type box, select the name of the form from the assembly file that you want to load. Click Create. The form that you selected is now displayed in the authoring pane.

  5. Customize the form by dragging controls from the Form Customizations Toolbox pane to the form on the authoring pane.

  6. Save the management pack that contains the customizations of the form.

  7. Bundle the form’s original assembly file, the management pack that contains the form customizations that you made in the Authoring Tool, and any other resource files that you need, to create a .mpb file.

Did you find this information helpful? Please send your suggestions and comments about System Center Service Manager documentation to scsmdocs@microsoft.com.