Skip to main content

How to Add the Service Manager Authoring Tool's Form Controls to Visual Studio

Author by Christopher Mank

When it comes to authoring your own custom classes and forms in the Service Manager Authoring Tool (AT), you will find that it meets some of your basic needs.  It allows you to create the most basic of form controls like Text Boxes, Labels, Date Pickers, etc.  But if you are really looking to customize your form, and give that nice professional touch, you simply cannot accomplish this using the AT. There are a number of good blog posts out there that give you some very detailed instructions on how you can build your custom forms using Visual Studio, like this link, this link, and this link. When you open up Visual Studio and start to build out your custom forms, you will see that all of the common WPF controls are already added to your Toolbox by default.  So you can start to build your form using these already included controls.  But if you notice, the specific Service Manager (SM) controls found in the AT are not listed in the Toolbox.  A couple of examples of controls that are in AT and not in Visual Studio are the List Picker, Single Instance Picker and the User Picker, to name a few.  This is sort of detrimental to our custom form building since those specific SM controls are ones we would want to use in our custom forms. Now before you get sad, eat a bucket of ice cream, and tell all your friends about your SM authoring woes, I have good news for you.  You CAN add these controls to Visual Studio!  And on top of that, the process is actually quite easy. 1.  Open up Visual Studio and your current form project (you can find detailed instructions on how to do this in any one of the aforementioned blog posts).  In the Toolbox on the left side, right-click on any white space and select "Add Tab".  Name the tab "SM Controls". 2.  Right-click on the SM Controls tab and select "Choose Items..."  This brings up the Choose Toolbox Items dialog box.  From the WPF Components tab, click the Browse button.  From here, we need to locate the DLLs (listed below) that contain the source code for the controls.  You can get these files from the source directory of either the AT or anywhere you may have Service Manager installed (Management Server, local console, etc.).  The locations for both are are also listed below. Filenames: Microsoft.EnterpriseManagement.UI.Controls.dll Microsoft.EnterpriseManagement.UI.ExtendedControls.dll Microsoft.EnterpriseManagement.UI.SMControls.dll DLL folder location on local machine (AT): C:Program Files (x86)Microsoft System Center 2012Service Manager AuthoringPackagesToLoad DLL folder location on local machine (SM console): C:Program FilesMicrosoft System Center 2012Service Manager Select all three files and click Open.  You will now see the new controls in the window and they will be highlighted, like the screenshot below.  Click OK. 3.  You will see that your toolbox is now populated with all of the Service Manager controls, including the ones used by the AT.  It also includes other controls used throughout Service Manager that are not even available in the AT, like the Sortable ListView and the Wait Ring. (The below screenshot has been reorganized so you can see the mentioned controls together). 4.  You can now add these controls to your form just as you would any other control. That's all it takes to start adding Service Manager controls to your Visual Studio projects.  But what about Binding?  Stay tuned for my next blog post where I'll show you how you can use the AT to give you a hint on how and where to bind your SM controls in Visual Studio. UPDATE:  Next blog post found here. Until the Whole World Hears... Christopher

Christopher Mank

Systems Architect