If you are looking for the class designer when working with a Silverlight project you will notice that apparently you cannot use it, doing right click on the project and selecting ‘add new item’ bring you the following dialog box: AddNewItem As you can see there’s no Class Diagram option.

The good news is that you can use the designer anyway, you just to do the work of creating the item by hand, following this procedure:
  1. add a new text file (like ClassDiagram.txt).
  2. rename it with ‘.cd’ extension (ClassDiagram.cd)
  3. right click on it and select ‘open with...’ and then ‘notepad’
  4. copy and paste the following xml snippet
    <?xml version="1.0" encoding="utf-8"?>
    <ClassDiagram MajorVersion="1" MinorVersion="1">
      <Font Name="Segoe UI" Size="9" />
  5. Save the document and reopen it double clicking on the item.
Now you have your class designer working in a Silverlight Project.

ClassDesignerSilverlight Note: you can always define a template to do the dirty work for you.

Related Content