SharePoint Software Factory 2010

Documentation




Version: 3.1
Authors: Torsten Mandelkow, Matthias Einig




 

1. Overview

1.1. About

The SPSF SharePoint Software Factory is an "extension" for Visual Studio 2005, 2008 and 2010 to allow easier development of SharePoint applications. It is based on the Microsoft Guidance Automation Toolkit.

Everybody is invited:

Target plattforms are
We (as Steria Mummert Consulting AG) will further support SPALM with new recipes and templates over time. You can find slides about the software factory at our project blog at http://www.spalmblogger.de.

1.2. Authors

SPSF Core Parts

The core part and concepts of SPSF SharePoint Software Factory 2010 has been created by Torsten Mandelkow and Matthias Einig.
Both are working with Steria Mummert Consulting in Germany (http://www.steria-mummert.de) as SharePoint consultants.

Their intention was to provide their tools and concepts to the SharePoint community to make it easier to develop custom applications in SharePoint.

Templates, Snippets,

The following people helped with code templates, snippets and sample projects (sorted by their activity):

1.3. System Requirements

The SPSF SharePoint Software Factory requires the following components:

1.4. How to use SPSF

How to use SharePoint Software Factory

To unleash the power of the sharepoint software factory, the sharepoint application project has to fulfill some requirements like solution/project structure and existing configuration files. As mentioned creating such a project with SPSF does NOT leave you stuck with it forever. At any time you wish to continue development without SPSF, you can uninstall it and your projects will still be compilable and deployable. After successful installation of SPSF SharePoint SoftwareFactory you can start to create SharePoint code in Visual Studio.

1. Create a new project in Visual Studio

Start Visual Studio 2008 and click "File -> New -> Project" to create a new Visual Studio project.



In the project template dialog under section "Guidance Packages -> SPSF SharePoint SoftwareFactory" choose an appropriate project template e.g. "Simple SharePoint 2007 Application".



Click "OK" and fill the SharePoint Project Wizard.

2. Run SharePoint recipes to create SharePoint code

Most SharePoint recipes like "Create new Content Type" are displayed in context menus dependend on the current selection. For instance the recipe "Create new Content Type" is only displayed on projects which will create a .wsp solution.



Alternatively you can use the "New Item" dialog to run the SharePoint recipes.



1.5. Project Types

During creation of a new Visual Studio project the SPSF provides the choice between 2 different project types.
The following screenshot shows the wizard page.



The decision which type of project type should be used is very important and cannot be changed after initial creation of a new project!

Differences between the project types

VSeWSS 2010 Format SharePoint Hive Format
Description The VSeWSS 2010 project format is based on the new Visual Studio 2010 format. Some files have been added by SPSF to make the format more useful. The Hive Format is based on the often used WSPBuilder format. SPSF used this format also in the previous version.
Difference in project structure SharePoint artefacts are organized in separate "containers" and "mapped" folders. These containers and mapped folders can be added to a WSP package with the Package Explorer of VS. SharePoint artefacts (like feature.xml, element.xml etc.) are located in a folder "SharePointRoot" (formerly used as "12" or "14" in older projects).
Difference in WSP creation The WSP file is created by Visual Studio internally. The WSP file is created by SPSF based on a manifest.xml and a makecab.ddf. These files can be generated by SPSF with T4 templates.
Advantages
  • The full new SharePoint functionality of VS 2010 can be used (like Package Explorer, import of Workflow WSPs etc.)
  • Older VSeWSS projects from VS 2008 (e.g. VSeWSS 1.2) can be migrated to the new VSeWSS 2010 format.
  • New functionality by Microsoft can be used (e.g. new item templates etc.)
  • Projects based on this format can be opened in VS 2010 and VS 2008.
  • Older WSPBuilder or SPSF projects can be easily migrated to this format.
  • The project structure may be more readable for experienced developers because files and folders are organized like the SharePoint hive.
Disadvantages
  • Projects can only be opened in VS 2010.
  • Opening the project on a server without a local SharePoint 2010 installation can lead to errors and warnings (no remote development possible)
  • Some new SharePoint 2010 features like the Package Explorer cannot be used.
  • All new SharePoint templates in VS 2010 cannot be used. This include BCS, Workflows, import of reusable workflows.
  • The very often used Hive format has been "invented" by the development community and is not supported by Microsoft guidance.

Why 2 different formats?

During the creation of SPSF 2010 we had a lot disucssion, which format should be used by SPSF: the new VS 2010 SharePoint format or the well-known "WSP-Builder" format. Both formats have advantages and disadvantages (see above).
So we were not able to decide which way to go and finally came to the conclusion: "Let the developer community decide which format is best". So tell us!

Notes

Normally the VSeWSS 2010 format can only be used with SharePoint 2010. But in our tests we were able to use the format to develop for SharePoint 2007. However, this is not supported by Microsoft.

1.6. License

GNU General Public License version 2 (GPLv2)



Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

Preamble

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.

Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.

Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and modification follow.

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.

b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.

c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.

In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:

a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.

7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.

10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 

2. Recipes

2.1. SPSF Projects

Contains the project templates

2.1.4. SharePoint 2007 Application

Arguments

Name Description
Application Settings
Company Name Required String. Specifies the company name of the SharePoint application, used in copyright statements.
Application Name Required String. Specifies the name of the SharePoint application, given by the name of the VS solution name.
Application Version Required String. Specifies the version of the SharePoint application.
Local Site for debugging Optional Url. Name of a SharePoint site for local debugging.
Multilanguage Settings
Generate .resx files automatically Optional Boolean. If true .resx files are generated automatically.
Add separate project for language resources Optional Boolean. It is a best practice to use a separate project for language resources to make new languages easier to integrate. If unchecked resources are added in each WSP solution.
Code Quality
Check code with FxCop in 'Release' build Optional Boolean. If true Microsoft FxCop will be executed during the 'Release' build to check the complied code against certain coding rules. Additionally a SharePoint specific FxCop settings file will be added to the solution.
Check code with StyleCop in 'Release' build Optional Boolean. If true Microsoft StyleCop will be executed during the 'Release' build to check the C# source code against certain style rules. Additionally a SharePoint specific StyleCop settings file will be added to the solution.
Check code with ShareCop in 'Release' build Optional Boolean. If true SharePoint Code Analysis will be executed during the 'Release' build to check the C# source code against certain style rules. Additionally a SharePoint specific ShareCop settings file will be added to the solution.
Check code with SPDisposeChecker in 'Release' build Optional Boolean. If true SharePoint Dispose Checker will be executed during the 'Release' build to check the code for potential memory leaks.
Advanced Settings
Generate manifest.xml automatically Optional Boolean. If true the files manifest.xml and makecab.ddf are generated automatically.
Initial WSP Solution
Final WSP Solution Filename Optional String. Displays the final name of the wsp solution file
WSP Solution Name Required String. Specifies the name of the wsp solution. The final wsp solution name will be a combination of the application name (name of the VS.NET solution) and the wsp name.
Deployment Server Type Optional String. Specifies the type of deployment server.
Deployment Target Optional String. Specifies the deployment target.
Reset Webserver Optional Boolean. If checked the option "ResetWebServer" in the solution manifest is set to TRUE.

Authors

Version history

2.1.2. MSBuild Task

Arguments

Name Description
Task Name

Authors

Version history

2.1.5. SharePoint 2010 Application

Arguments

Name Description
Application Settings
Company Name Required String. Specifies the company name of the SharePoint application, used in copyright statements.
Application Name Required String. Specifies the name of the SharePoint application, given by the name of the VS solution name.
Application Version Required String. Specifies the version of the SharePoint application.
Local Site for debugging Optional Url. Name of a SharePoint site for local debugging.
Multilanguage Settings
Generate .resx files automatically Optional Boolean. If true .resx files are generated automatically.
Add separate project for language resources Optional Boolean. It is a best practice to use a separate project for language resources to make new languages easier to integrate. If unchecked resources are added in each WSP solution.
Code Quality
Check code with FxCop in 'Release' build Optional Boolean. If true Microsoft FxCop will be executed during the 'Release' build to check the complied code against certain coding rules. Additionally a SharePoint specific FxCop settings file will be added to the solution.
Check code with StyleCop in 'Release' build Optional Boolean. If true Microsoft StyleCop will be executed during the 'Release' build to check the C# source code against certain style rules. Additionally a SharePoint specific StyleCop settings file will be added to the solution.
Check code with ShareCop in 'Release' build Optional Boolean. If true SharePoint Code Analysis will be executed during the 'Release' build to check the C# source code against certain style rules. Additionally a SharePoint specific ShareCop settings file will be added to the solution.
Check code with SPDisposeChecker in 'Release' build Optional Boolean. If true SharePoint Dispose Checker will be executed during the 'Release' build to check the code for potential memory leaks.
Advanced Settings
Generate manifest.xml automatically Optional Boolean. If true the files manifest.xml and makecab.ddf are generated automatically.
Initial WSP Solution
Final WSP Solution Filename Optional String. Displays the final name of the wsp solution file
WSP Solution Name Required String. Specifies the name of the wsp solution. The final wsp solution name will be a combination of the application name (name of the VS.NET solution) and the wsp name.
Deployment Server Type Optional String. Specifies the type of deployment server.
Deployment Target Optional String. Specifies the deployment target.
Reset Webserver Optional Boolean. If checked the option "ResetWebServer" in the solution manifest is set to TRUE.
Sandboxed solution Optional Boolean. If checked a sandboxed solutions will be created.

Authors

Version history

2.1.7. Sharepoint 2007 Solution Package (.wsp)

Recipe Description

A customation project is the core wsp solution project type to deploy a .wsp solution to SharePoint.

Arguments

Name Description
Final WSP Solution Filename Optional String. Displays the final name of the wsp solution file
Solution Name Required String. Name of the project without full namespace.
Deployment Server Type Optional String. Specifies the type of deployment server.
Deployment Target Optional String. Specifies the deployment target.
Site Url for debugging Optional String. Specifies the local web application which is used for debugging and deployment.
Reset Webserver Optional Boolean. If checked the option "ResetWebServer" in the solution manifest is set to TRUE.

Authors

Version history

2.1.8. Sharepoint 2010 Solution Package (.wsp)

Recipe Description

A customation project is the core wsp solution project type to deploy a .wsp solution to SharePoint.

Arguments

Name Description
Final WSP Solution Filename Optional String. Displays the final name of the wsp solution file
Solution Name Required String. Name of the project without full namespace.
Deployment Server Type Optional String. Specifies the type of deployment server.
Deployment Target Optional String. Specifies the deployment target.
Reset Webserver Optional Boolean. If checked the option "ResetWebServer" in the solution manifest is set to TRUE.

Authors

Version history

2.1.6. Sharepoint 2007 Solution Package (.wsp)

Recipe Description

A customation project is the core wsp solution project type to deploy a .wsp solution to SharePoint.

Arguments

Name Description
Final WSP Solution Filename Optional String. Displays the final name of the wsp solution file
Solution Name Required String. Name of the project without full namespace.
Deployment Server Type Optional String. Specifies the type of deployment server.
Deployment Target Optional String. Specifies the deployment target.
Reset Webserver Optional Boolean. If checked the option "ResetWebServer" in the solution manifest is set to TRUE.

Authors

Version history

2.1.9. Sharepoint 2010 Solution Package (.wsp)

Recipe Description

A customation project is the core wsp solution project type to deploy a .wsp solution to SharePoint.

Arguments

Name Description
Final WSP Solution Filename Optional String. Displays the final name of the wsp solution file
Solution Name Required String. Name of the project without full namespace.
Deployment Server Type Optional String. Specifies the type of deployment server.
Deployment Target Optional String. Specifies the deployment target.
Site Url for debugging Optional String. Specifies the local web application which is used for debugging and deployment.
Reset Webserver Optional Boolean. If checked the option "ResetWebServer" in the solution manifest is set to TRUE.
Sandboxed solution Optional Boolean. If checked a sandboxed solutions will be created.

Authors

Version history

2.1.1. SharePoint Class Library (.dll)

Authors

Version history

2.1.3. PowerShell Snapin Project

Arguments

Name Description
Title Required String. Specifies the title of the snapin.
Description Required String. Specifies the title of the snapin.

Authors

Version history

2.2. SPSF Artefacts

Helps to create SharePoint code

2.1.1. Features

Contains feature recipes

2.1.1.1. Empty Feature

Recipe Description

The recipe creates a new empty feature. It should be used as a start for every custom feature.
It can be specified if the feature should be deployed in a farm, web application, site, or web scope.
Most of sharepoint custom components like content types, event handler etc. require a feature.
One feature can be used to deploy multiple of these components but it is also possible to make feature activation dependent of other features.

Arguments

Name Description
Feature settings
Name Required Text. Internal name of the Feature. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title (friendly name) of the Feature. Limited to 255 characters.
Description Required Text. Longer description of the Features purpose.
Scope Required Choice. Scope in which the Feature can be activated and contains one of the following values: Farm (farm), WebApplication (Web application), Site (site collection), Web (Web site).
Hidden Optional Boolean. Specifies if the feature should be hidden on the Feature activation webpages. This attribute equals FALSE by default.
Create Feature Receiver Optional Boolean. When activated, a feature receiver class file will be created and linked to the Feature. This attribute equals FALSE by default.
Create default elements.xml Optional Boolean. When activated the recipe creates a default elements.xml file. This attribute equals TRUE by default.
Advanced settings
Feature ID Required GUID. The GUID will be autogenerated by the recipe, but can be customized if neccesary.
Feature Version Optional Text. Specifies a System.Version-compliant representation of the version of a Feature. This can be up to four numbers delimited by decimals that represent a version.
Creator Optional Text. Name of the creator of the Feature stored in the feature.xml.
Activation Dependencies Optional GUID. One or multiple Features of which the activation of this Feature should depend on. The dependencies can be either out of the box SharePoint Features or custom Features of this project.
Options
Activate On Default Optional Boolean. TRUE if the Feature is activated by default during installation or when a Web application is created; FALSE if the Feature is not activated. This attribute equals TRUE by default. The ActivateOnDefault attribute does not apply to site collection (Site) or Web site (Web) scoped Features. In general, Farm-scoped Features become activated during installation, and when a new Web application is created, all installed Web application-scoped Features in it become activated.
Always Force Install Optional Boolean. TRUE if the Feature is installed by force during installation even if the Feature is already installed. For example, if set to TRUE, Feature installation callouts will always fire anytime a user tries to install the Feature (even if it is already installed) by using either the scanforFeatures or installfeature command-line operation. This attribute equals FALSE by default. The AlwaysForceInstall attribute affects Features of all scopes.
Auto Activate In Central Admin Optional Boolean. TRUE if the Feature is activated by default in the Administrative Web site, site collection, or Web application. This attribute equals FALSE by default. The AutoActivateInCentralAdmin attribute does not apply to Farm-scoped Features.
Require Resources Optional Boolean. TRUE to specify that Windows SharePoint Services check whether resources exist for the Feature by verifying that the standard "sentinel" resource for the Feature is present for a particular culture. The RequireResources attribute allows you to constrict the visibility of certain Features depending on whether resources exist in a particular language for the Feature.

References

Authors

Version history

2.1.1.4. Feature: Add Property

Arguments

Name Description
Key Optional Text. Returns the identifier of the property being modified.
Value Optional Text. Returns the value of the property.

References

Authors

Version history

2.1.1.5. Feature: Add Upgrade Action for Content Type

Arguments

Name Description
Content Type Optional string. Specifies the content type.
Field Optional string. Specifies the field in the content type.
Push Down Changes Optional Boolean. Specifies whether the content type field should be applied to inheriting content types and lists.
Begin Version Optional string. Specifies the earliest version number to upgrade.
End Version Optional string. Specifies the latest version number to upgrade.

References

Authors

Version history

2.1.1.2. Feature: Add Activation Dependency

Arguments

Name Description
Activation Dependencies Optional GUID. One or multiple Features of which the activation of this Feature should depend on. The dependencies can be either out of the box SharePoint Features or custom Features of this project.

References

Authors

Version history

2.1.1.3. Feature: Add Activation Dependency

Recipe Description

Feature Activation Dependencies in SharePoint 2010 can contain additional properties like MinimumVersion, FeatureName and FeatureDescription.

Arguments

Name Description
Activation Dependencies Optional GUID. One or multiple Features of which the activation of this Feature should depend on. The dependencies can be either out of the box SharePoint Features or custom Features of this project.
Minimum Version Optional string. The minimum version of the Feature dependency. This attribute must use the pattern n.n.n.n, where each occurrence of n is a numeric value.

References

Authors

Version history

2.1.2. Lists and Libaries

Contains recipes which belong to SharePoint lists

2.1.1.8. List Instance

Arguments

Name Description
List Instance Settings
Title Required Text. Title of the list in the schema.
Description Optional Text. Contains a description of the list.
Template Type
Url Required Text. Returns the site-relative URL at which to place the list.
Advanced Settings
RootWebOnly Optional Boolean. TRUE to specify that the list created from the definition exists only in the root Web site of a site collection.
OnQuickLaunch Optional Boolean. TRUE to display lists created from the list definition on the Quick Launch bar.
QuickLaunchUrl Optional Text. Specifies the URL of the view page to open for the list through Quick Launch navigation.
Id Required Text. Specifies a unique identifier for the list instance. The integer must be unique across the Feature definition.

Authors

Version history

2.1.1.7. List Definition

Arguments

Name Description
List Template Settings
Base Template Required Integer. Specifies the base type, or default schema, for lists created from the definition.
Name Required Text. Specifies the internal name of the list definition. No spaces or special characters can be used. This name is also used to find the folder that contains the Schema.xml file that defines the schema in use.
DisplayName Required Text. Specifies the display name of the list definition.
Description Optional Text. Provides a description of the list definition.
Category Optional Text. Specifies the category with which to associate lists created through the list definition.
Sequence Optional Integer. Specifies the ordering priority to use for the list template on the Create page. If Sequence is not set, the template appears last in arbitrary order with any other templates that also lack a Sequence value. Two templates that specify the same sequence are sorted together in an arbitrary order.
Advanced Settings
Type Optional Integer. Provides a unique identifier for the template. This identifier must be unique within the feature, but need not be unique across all feature definitions or site definitions.
Base Type Required Integer. Specifies the base type, or default schema, for lists created from the definition.
Additional Content Types Optional Content Types.
Options
Default in new sites Optional Boolean. TRUE to specify that new SharePoint sites will include this list.
OnQuickLaunch Optional Boolean. TRUE to display lists created from the list definition on the QuickLaunch bar.
DisableAttachments Optional Boolean. TRUE to specify that users can attach files to items in lists created through the template; otherwise, FALSE.
DisallowContentTypes Optional Boolean. TRUE to specify that content types can be managed on lists created through the template; otherwise, FALSE.
VersioningEnabled Optional Boolean. TRUE to specify that versioning is enabled by default in lists created through the template; otherwise, FALSE.
FolderCreation Optional Boolean. TRUE to enable folder creation within the list and to specify that the New Folder command appears on the New menu in list views; otherwise, FALSE.
EnableModeration Optional Boolean. TRUE to specify that content approval is enabled by default in lists created through the template; otherwise, FALSE.
Hidden Optional Boolean. TRUE to specify that the list definition is not available on the Create page for creating lists.
HiddenList Optional Boolean. TRUE to specify that a list created from the list definition is hidden.
Advanced
Security Read Optional Text. Defines the item-level permissions in the list for users with sufficient permission to read or edit list items. The SecurityBits attribute contains a 2-digit string. The first digit in the string controls the read access; the second digit in the string controls the edit access.
Security Edit Optional Text. Defines the item-level permissions in the list for users with sufficient permission to read or edit list items. The SecurityBits attribute contains a 2-digit string. The first digit in the string controls the read access; the second digit in the string controls the edit access.

Authors

Version history

2.1.1.9. Module

Arguments

Name Description
Select Files
Name Required Text. Contains the name of the file set.
Target Url Optional Text. Specifies the virtual path of the folder in which to place the files when a site is instantiated. If Path is not specified, the value of Url is used for the physical path. Use the Url attribute to provision a folder through the Feature.
Files Select the files which should be added to the module. The selected files will be copied into the project.
RootWebOnly Optional Boolean. TRUE if the files specified in the module are installed only in the top-level Web site of the site collection.

Authors

Version history

2.1.1.10. Site Column

Arguments

Name Description
Site Column Type
ID Required Text. Specifies the GUID of the field.
Name Required Text. The name of a field. This is the internal name of a field and is guaranteed never to change for the lifetime of the field definition. It must be unique with respect to the set of fields in a list. The name is autogenerated based on the user-defined name for a field.
Display Name Optional Text. The displayed name for a field. There is no restriction on text size or use of spaces. The display name can be edited by the user and can change after initial field creation. This name is used as a column heading when the field is displayed in a table view and as a form label when the field is displayed in a form. The FieldName tag returns the display name if given; otherwise, it defaults to the Name attribute.
Description Optional Text. Provides the description that is shown in the edit form for a list if a field description is specified. By default, fields in Microsoft Windows SharePoint Services do not have descriptions.
Group Optional Text. Specifies the column group to which the field belongs.

References

Authors

Version history

2.1.1.2. Content Type Binding

Arguments

Name Description
Content Type Binding
Content Type Required Text. A string that represents the content type ID of the site content type to add to the specified list.
List Url Required Text. A string that represents the Web-relative path to the list to which to add the content type (e.g. "Pages", "Lists/Contacts").
RootWebOnly Optional Boolean. TRUE to associate this binding only on the root Web site in a site collection (new in SP 2010).

References

Authors

Version history

2.1.1.6. ContentType: Add Field

Arguments

Name Description
Parent Element
Parent Content Type Required. Select the content type.
Fields
Fields Optional. Specifies a column to reference in this content type.
Remove Fields Optional. Specifies a column reference, included in the parent content type, to be removed from this content type.

References

Authors

Version history

2.1.1.1. Content Type

Arguments

Name Description
Content Type Settings
Parent Content Type Required. New content type will be derived from the selected parent content type.
Name Required Text. Specifies the content type name.
Description Optional Text. Provides a description for the content type, to display in the Windows SharePoint Services user interface.
Group Optional Text. Specifies the content type group to which the content type is assigned. Content type groups are user-defined groups that help you organize your columns into logical categories.
Fields
Fields Optional. Specifies a column to reference in this content type.
Remove Fields Optional. Specifies a column reference, included in the parent content type, to be removed from this content type.
Document Template
Document Template Optional Text. Document template which is used for creation of new items based on this content type.
Place template in _layouts folder for easier upgrade Optional Boolean. If checked, the selected document template will be placed inside the /_layouts/ in SharePoint and can be updated easier in the future. Otherwise the document template will be stored in the database.
Event Receivers
Item Adding Optional Boolean. If checked an event handler for ItemAdding event is added to the content type.
Item Added Optional Boolean. If checked an event handler for ItemAdded event is added to the content type.
Item Updating Optional Boolean. If checked an event handler for ItemUpdating event is added to the content type.
Item Updated Optional Boolean. If checked an event handler for ItemUpdated event is added to the content type.
Item Deleting Optional Boolean. If checked an event handler for ItemDeleting event is added to the content type.
Item Deleted Optional Boolean. If checked an event handler for ItemDeleted event is added to the content type.
Custom Forms
Custom Display Form Optional Boolean. If checked a custom form for the display mode of the content type is added.
Custom Edit Form Optional Boolean. If checked a custom form for the edit mode of the content type is added.
Custom New Form Optional Boolean. If checked a custom form for the creation of the content type is added.
Advanced Settings
Content Type ID Required Text. Specifies the content type ID of the content type.
Content Type Version Reserved for future use.
Hidden Optional Boolean. TRUE to define the content type as hidden. If you define a content type as hidden, Windows SharePoint Services does not display that content type on the New button in list views. If you do not include this attribute, Windows SharePoint Services treats the content type as if this attributes was set to FALSE.
Read Only Optional Boolean. TRUE to define the content type as read-only. If you do not include this attribute, Windows SharePoint Services treats the content type as if this attributes was set to FALSE.
Sealed Optional Boolean. TRUE to define the content type as sealed. You must have site collection administrator rights to unseal and edit a content type defined as sealed. If you do not include this attribute, Windows SharePoint Services treats the content type as if this attributes was set to FALSE.

References

Related Recipes

Authors

Version history

2.1.1.4. ContentType: Add Document Template

Arguments

Name Description
Parent Element
Parent Content Type Required. Select the content type.
Document Template
Document Template Optional Text. Document template which is used for creation of new items based on this content type.
Place template in _layouts folder for easier upgrade Optional Boolean. If checked, the selected document template will be placed inside the /_layouts/ in SharePoint and can be updated easier in the future. Otherwise the document template will be stored in the database.

References

Authors

Version history

2.1.1.5. ContentType: Add Event Receiver

Arguments

Name Description
Parent Element
Parent Content Type Required. Select the content type.
Event Receivers
Item Adding Optional Boolean. If checked an event handler for ItemAdding event is added to the content type.
Item Added Optional Boolean. If checked an event handler for ItemAdded event is added to the content type.
Item Updating Optional Boolean. If checked an event handler for ItemUpdating event is added to the content type.
Item Updated Optional Boolean. If checked an event handler for ItemUpdated event is added to the content type.
Item Deleting Optional Boolean. If checked an event handler for ItemDeleting event is added to the content type.
Item Deleted Optional Boolean. If checked an event handler for ItemDeleted event is added to the content type.

References

Authors

Version history

2.1.1.3. ContentType: Add Custom Form

Arguments

Name Description
Parent Element
Parent Content Type Required. Select the content type.
Custom Forms
Custom Display Form Optional Boolean. If checked a custom form for the display mode of the content type is added.
Custom Edit Form Optional Boolean. If checked a custom form for the edit mode of the content type is added.
Custom New Form Optional Boolean. If checked a custom form for the creation of the content type is added.

References

Authors

Version history

2.1.3. Webs and Sites

Contains recipes related to sites

2.1.1.3. Team Site Definition

Recipe Description

The Team Site Definition is a standard preconfigured site definition which already contains a documents library, an announcements list, discussion list etc. This site definition can be used as a starting point to create a custom team site definition based on the default out of the box configuration which comes with WSS.

Arguments

Name Description
General settings
Name Required Text. Specify the name of the folder which will be created in folder SiteTemplates. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title of the site template as it appears in the selection of Create Site dialog. Limited to 255 characters.
ID Required Number. Id of the site template. Should be unique on the farm and greater than 10000.
Description Required Text. Longer description of the purpose of this site definition.
Category Required Text. Title of the cateogry in which the site definition should appear in the Create Site dialog. Limited to 255 characters.
Advanced settings
Hidden Optional Boolean. If TRUE hides the site definition from the Create Site dialog. Creation of sites with this definition through code will be still possible.
RootWebOnly Optional Boolean. If TRUE the site created from the configuration can only exist as the root Web site in a site collection. This attribute is not enforced in site templates (.stp files).
Visibility Feature Dependency Optional Text. Optional Text. Used in a WebTemp*.xml file to hide the site definition configuration based on the activation state of the specified Feature. This attribute is not supported for Features with Web application scope.

References

Authors

Version history

2.1.1.1. Blank Site Definition

Recipe Description

The BalnkSite Definition is a standard site definition which does not contain any lists or libraries.
This site definition can be used as a starting point to create a custom site definition
based on the default out of the box configuration which comes with WSS.

Arguments

Name Description
General settings
Name Required Text. Specify the name of the folder which will be created in folder SiteTemplates. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title of the site template as it appears in the selection of Create Site dialog. Limited to 255 characters.
ID Required Number. Id of the site template. Should be unique on the farm and greater than 10000.
Description Required Text. Longer description of the purpose of this site definition.
Category Required Text. Title of the cateogry in which the site definition should appear in the Create Site dialog. Limited to 255 characters.
Advanced settings
Hidden Optional Boolean. If TRUE hides the site definition from the Create Site dialog. Creation of sites with this definition through code will be still possible.
RootWebOnly Optional Boolean. If TRUE the site created from the configuration can only exist as the root Web site in a site collection. This attribute is not enforced in site templates (.stp files).
Visibility Feature Dependency Optional Text. Optional Text. Used in a WebTemp*.xml file to hide the site definition configuration based on the activation state of the specified Feature. This attribute is not supported for Features with Web application scope.

References

Authors

Version history

2.1.1.2. Feature Stapling

Recipe Description

Stapling SharePoint features with site definitions, which relies on the FeatureSiteTemplateAssociation element, allows developers to attach features to both standard and custom site definitions without directly modifying them.
Every new site that is based on a site definition with a stapled feature is created with that feature activated.
Feature stapling is particularly useful when you want to add functionality to standard site definitions because editing standard site definition files is not a recommended practice. (Source: MSDN)

Arguments

Name Description
Feature Associations
Feature Required Feature. Feature to which the previously selected feature should be stapled to.
Site Template Optional Site Definition. Site Definition to which the previously selected feature should be stapled to.

References

Authors

Version history

2.1.1.4. Theme

Recipe Description

With a theme SharePoint Look and Feel can be altered only by modifying cascading stylesheets (CSS) and images.
Opposing to master pages, also affect the MOSS backend without the need to modify application.master (which is not recommended anyway).
This recipe creates a new basic theme which can be deployed to a farm with a feature.

Arguments

Name Description
Theme settings
Name Required Text. Internal name of the Feature. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Display Name Required Text. Display name of the Theme. Limited to 255 characters.
Description Optional String. Longer description ofthe theme.

References

Authors

Version history

2.1.1.5. Theme Activation

Recipe Description

Use this recipe if a custom theme should be activated on a site, together with the activation of a feature.
It is also possible to specificy which theme default theme should be used, when the feature is deactivated again.

Arguments

Name Description
Theme settings
Theme to activate Required Theme. The name of the theme which should be activated
Default theme for deactivation of the feature Required Theme. The name of the default theme which is activated if the feature is deactivated.

References

Authors

Version history

2.1.4. Custom Actions and Ribbons

Contains recipes to add custom actions and ribbons to the UI in

2.1.1.1. Custom Action for Content Type

Screens


Arguments

Name Description
Content Type
Content Type Select the content type to which the custom action should be added.
Custom Actions Settings
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Advanced Settings
Custom Action ID Optional Text. Specifies a unique identifier for the custom action. The ID may be a GUID, or it may be a unique term, for example, "HtmlViewer".
Options
Show In Lists
Show In ReadyOnly ContentTypes Optional Boolean. TRUE if the custom action is only displayed for read-only content types on the page for managing content types. The default value is FALSE.
Show In Sealed ContentTypes Optional Boolean. TRUE if the custom action is only displayed for sealed content types on the page for managing content types. The default value is FALSE.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Url Settings
Type of action Required. Select the type of action that should be performed after click.
Url Page Optional Text. Select a page where the custom action should link to. Only required if field 'Type of action' is 'UrlAction'.
Use URL Prefix Optional Text. Select the prefix which should be placed at the beginning of the url action.

Authors

Version history

2.1.1.2. Custom Action for File Extension

Arguments

Name Description
File Extension
Extension Enter the file extension.
Custom Actions Settings
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Advanced Settings
Custom Action ID Optional Text. Specifies a unique identifier for the custom action. The ID may be a GUID, or it may be a unique term, for example, "HtmlViewer".
Options
Show In Lists
Show In ReadyOnly ContentTypes Optional Boolean. TRUE if the custom action is only displayed for read-only content types on the page for managing content types. The default value is FALSE.
Show In Sealed ContentTypes Optional Boolean. TRUE if the custom action is only displayed for sealed content types on the page for managing content types. The default value is FALSE.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Url Settings
Type of action Required. Select the type of action that should be performed after click.
Url Page Optional Text. Select a page where the custom action should link to. Only required if field 'Type of action' is 'UrlAction'.
Use URL Prefix Optional Text. Select the prefix which should be placed at the beginning of the url action.

Authors

Version history

2.1.1.6. Custom Action for ProgID (Document Type)

Arguments

Name Description
ProgId
Content Type Select the document type to which the custom action should be added.
Custom Actions Settings
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Advanced Settings
Custom Action ID Optional Text. Specifies a unique identifier for the custom action. The ID may be a GUID, or it may be a unique term, for example, "HtmlViewer".
Options
Show In Lists
Show In ReadyOnly ContentTypes Optional Boolean. TRUE if the custom action is only displayed for read-only content types on the page for managing content types. The default value is FALSE.
Show In Sealed ContentTypes Optional Boolean. TRUE if the custom action is only displayed for sealed content types on the page for managing content types. The default value is FALSE.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Url Settings
Type of action Required. Select the type of action that should be performed after click.
Url Page Optional Text. Select a page where the custom action should link to. Only required if field 'Type of action' is 'UrlAction'.
Use URL Prefix Optional Text. Select the prefix which should be placed at the beginning of the url action.

Authors

Version history

2.1.1.4. Custom Action for List

Screens



Arguments

Name Description
List Type
List Type Select the list type where the action should be added.
Toolbar Select the location where the action should be added.
Custom Actions Settings
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Advanced Settings
Custom Action ID Optional Text. Specifies a unique identifier for the custom action. The ID may be a GUID, or it may be a unique term, for example, "HtmlViewer".
Options
Show In Lists
Show In ReadyOnly ContentTypes Optional Boolean. TRUE if the custom action is only displayed for read-only content types on the page for managing content types. The default value is FALSE.
Show In Sealed ContentTypes Optional Boolean. TRUE if the custom action is only displayed for sealed content types on the page for managing content types. The default value is FALSE.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Url Settings
Type of action Required. Select the type of action that should be performed after click.
Url Page Optional Text. Select a page where the custom action should link to. Only required if field 'Type of action' is 'UrlAction'.
Use URL Prefix Optional Text. Select the prefix which should be placed at the beginning of the url action.

Authors

Version history

2.1.1.5. Custom Action for List Toolbar

Screens


Arguments

Name Description
List Type
List Type Select the list type where the action should be added.
Toolbar Select the toolbar where the action should be added.
Custom Actions Settings
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Advanced Settings
Custom Action ID Optional Text. Specifies a unique identifier for the custom action. The ID may be a GUID, or it may be a unique term, for example, "HtmlViewer".
Options
Show In Lists
Show In ReadyOnly ContentTypes Optional Boolean. TRUE if the custom action is only displayed for read-only content types on the page for managing content types. The default value is FALSE.
Show In Sealed ContentTypes Optional Boolean. TRUE if the custom action is only displayed for sealed content types on the page for managing content types. The default value is FALSE.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Url Settings
Type of action Required. Select the type of action that should be performed after click.
Url Page Optional Text. Select a page where the custom action should link to. Only required if field 'Type of action' is 'UrlAction'.
Use URL Prefix Optional Text. Select the prefix which should be placed at the beginning of the url action.

Authors

Version history

2.1.1.7. Custom Action for Site

Screens






Arguments

Name Description
Location settings
Menu Location
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Custom Actions Settings
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Advanced Settings
Custom Action ID Optional Text. Specifies a unique identifier for the custom action. The ID may be a GUID, or it may be a unique term, for example, "HtmlViewer".
Url Settings
Type of action Required. Select the type of action that should be performed after click.
Url Page Optional Text. Select a page where the custom action should link to. Only required if field 'Type of action' is 'UrlAction'.
Use URL Prefix Optional Text. Select the prefix which should be placed at the beginning of the url action.

Authors

Version history

2.1.1.8. Custom Action for SiteActions menu

Screens



Arguments

Name Description
Location settings
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Custom Actions Settings
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Advanced Settings
Custom Action ID Optional Text. Specifies a unique identifier for the custom action. The ID may be a GUID, or it may be a unique term, for example, "HtmlViewer".
Url Settings
Type of action Required. Select the type of action that should be performed after click.
Url Page Optional Text. Select a page where the custom action should link to. Only required if field 'Type of action' is 'UrlAction'.
Use URL Prefix Optional Text. Select the prefix which should be placed at the beginning of the url action.

Authors

Version history

2.1.1.3. Custom Action Group

Screens


Arguments

Name Description
Location settings
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Hide Location Select the location where the action group should be added.

References

Authors

Version history

2.1.1.9. Hide Custom Action

Arguments

Name Description
Hide Action
Location Element Select the action which should be hidden.

Authors

Version history

2.1.1.17. Ribbon Tab

Arguments

Name Description
General Settings
Name Required Text. Specifies the name of the button control.
Title Required Text. The text to label the control.
Description Required Text. The text that appears as the description of the tooltip.
Sequence Required Integer. An integer that specifies the order of placement among sibling XML nodes.
Target Location Settings
Custom Action Location Required Text. Location element of the custom action.
Optional Permission Settings
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Optional List Settings
Registration Type Optional Text. Specifies the registration attachment for a per-item action. Possible values include: None, List, ContentType, ProgId, FileType
Registration Id Optional Text. Specifies the identifier of the list or item content type that this action is associated with, or the file type or programmatic identifier (ProgID). Enter the list type (e.g. 101) or the content type (e.g.0x10).

References

Authors

Version history

2.1.1.12. Ribbon Group

Screens


Arguments

Name Description
General Settings
Name Required Text. Specifies the name of the button control.
Title Required Text. The text to label the control.
Description Required Text. The text that appears as the description of the tooltip.
Sequence Required Integer. An integer that specifies the order of placement among sibling XML nodes.
Target Location Settings
Custom Action Location Required Text. Location element of the custom action.
Optional Permission Settings
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Optional List Settings
Registration Type Optional Text. Specifies the registration attachment for a per-item action. Possible values include: None, List, ContentType, ProgId, FileType
Registration Id Optional Text. Specifies the identifier of the list or item content type that this action is associated with, or the file type or programmatic identifier (ProgID). Enter the list type (e.g. 101) or the content type (e.g.0x10).
Location Settings
Parent Ribbon Tab Required Text. Specifies the existing ribbon tab into which the new group should be added.

References

Authors

Version history

2.1.1.11. Ribbon Control

Screens


Arguments

Name Description
General Settings
Name Required Text. Specifies the name of the button control.
Title Required Text. The text to label the control.
Description Required Text. The text that appears as the description of the tooltip.
Sequence Required Integer. An integer that specifies the order of placement among sibling XML nodes.
Target Location Settings
Custom Action Location Required Text. Location element of the custom action.
Optional Permission Settings
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Optional List Settings
Registration Type Optional Text. Specifies the registration attachment for a per-item action. Possible values include: None, List, ContentType, ProgId, FileType
Registration Id Optional Text. Specifies the identifier of the list or item content type that this action is associated with, or the file type or programmatic identifier (ProgID). Enter the list type (e.g. 101) or the content type (e.g.0x10).
Location Settings
Parent Ribbon Group Required Text. Specifies the existing ribbon group into which the new button should be added.
Control Settings
Type of Control Required String. Specifies the type of control that should be added.

References

Authors

Version history

2.1.1.15. Sample: Add Ribbon Button to List Form

Arguments

Name Description
General Settings
Name Required Text. Specifies the name of the button control.
Title Required Text. The text to label the control.
Description Required Text. The text that appears as the description of the tooltip.
Sequence Required Integer. An integer that specifies the order of placement among sibling XML nodes.
Optional Permission Settings
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Optional List Settings
List Type Select the list type where the action should be added.
Location Settings
Parent Ribbon Group Required Text. Specifies the existing ribbon group into which the new button should be added.

References

Authors

Version history

2.1.1.14. Sample: Add Ribbon Button to Item Form

Arguments

Name Description
General Settings
Name Required Text. Specifies the name of the button control.
Title Required Text. The text to label the control.
Description Required Text. The text that appears as the description of the tooltip.
Sequence Required Integer. An integer that specifies the order of placement among sibling XML nodes.
Optional Permission Settings
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Form Settings
Custom Action Location Required Text. Location element of the custom action.
Optional List Settings
List Type Select the list type where the action should be added.
Location Settings
Parent Ribbon Group Required Text. Specifies the existing ribbon group into which the new button should be added.

References

Authors

Version history

2.1.1.13. Sample: Add Ribbon Button to Content Type

Recipe Description

In this sample a custom ribbon button is added to the edit form of the content type Document (0x0101). The following code adds the button to the actions group.
  
  <CustomAction
    Id="Ribbon.SP2010.VseWss.RibbonContentType"
    Location="CommandUI.Ribbon"
    Title="RibbonContentType"
    RegistrationType="ContentType"
    RegistrationId="0x0101">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition
          Location="Ribbon.DocLibListForm.Edit.Actions.Controls._children">
          <Button
            Id="Ribbon.SP2010.VseWss.RibbonContentType.Button"
            Command="SP2010.VseWss.RibbonContentType.ButtonCommand"
            Sequence="500"
            Image16by16="/_layouts/images/SP2010_VseWss/RibbonIcon_RibbonContentType_16.gif"
            Image32by32="/_layouts/images/SP2010_VseWss/RibbonIcon_RibbonContentType_32.gif"
            LabelText="ContentType Button"
            ToolTipTitle="ContentType Button"
            ToolTipDescription="Description of ContentType Button"
            TemplateAlias="o2" />
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="SP2010.VseWss.RibbonContentType.ButtonCommand"
          CommandAction="javascript:alert('Hello, world');" />
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
        

Screens


Arguments

Name Description
General Settings
Name Required Text. Specifies the name of the button control.
Title Required Text. The text to label the control.
Description Required Text. The text that appears as the description of the tooltip.
Sequence Required Integer. An integer that specifies the order of placement among sibling XML nodes.
Optional Permission Settings
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Form Settings
Custom Action Location Required Text. Location element of the custom action.
Optional List Settings
Content Type Select the content type where the action should be added.
Location Settings
Parent Ribbon Group Required Text. Specifies the existing ribbon group into which the new button should be added.

References

Authors

Version history

2.1.1.16. Sample: Ribbon Tab with 3 buttons

Screens


Arguments

Name Description
General Settings
Name Required Text. Specifies the name of the button control.
Title Required Text. The text to label the control.
Description Required Text. The text that appears as the description of the tooltip.
Sequence Required Integer. An integer that specifies the order of placement among sibling XML nodes.
Target Location Settings
Custom Action Location Required Text. Location element of the custom action.
Optional Permission Settings
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Optional List Settings
Registration Type Optional Text. Specifies the registration attachment for a per-item action. Possible values include: None, List, ContentType, ProgId, FileType
Registration Id Optional Text. Specifies the identifier of the list or item content type that this action is associated with, or the file type or programmatic identifier (ProgID). Enter the list type (e.g. 101) or the content type (e.g.0x10).

References

Authors

Version history

2.1.1.10. Hide Ribbon Control

Screens


Arguments

Name Description
Location settings
Parent Group Required Text. Specifies the existing ribbon control which should be hidden.

References

Authors

Version history

2.1.5. Event Receivers

Contains recipes for typical event listeners

2.1.1.2. Item Event Handler

Recipe Description

Creates a ItemEventHandler.

Arguments

Name Description
Event Handler settings
Name Required Text. Used as the class name of the event handler.
List Template Optional Text. Specifies the index of the list template to which the event receiver applies. The following values are the default list template types.
List Template Owner Optional GUID. Specifies the GUID of the list template owner if the list template is registered via Features, or the name of the site definition if the list template is registered by a site definition.
Sequence Required Number. Specifies the order to use for the event registration when more than one handler is associated with the feature.
Registrations
Event Types Select the event elements.
Optional Settings
RootWebOnly Optional Boolean. True if the event receiver applies only to the root Web; otherwise, False.
Scope Optional enumeration. The scope of the event receiver. This can be Site or Web. When the Scope attribute is set to Site, event receivers that are defined inside of a Feature that is scoped to the site collection are registered at the site collection level. When the Scope attribute is set to Web, event receivers that are defined inside of a Feature that is scoped to a Web are registered on the Web.
Synchronization Specifies the synchronization of the event receiver.

References

Authors

Version history

2.1.1.3. List Event Handler

Recipe Description

Creates a ListEventHandler.

Arguments

Name Description
Event Handler settings
Name Required Text. Used as the class name of the event handler.
List Template Optional Text. Specifies the index of the list template to which the event receiver applies. The following values are the default list template types.
List Template Owner Optional GUID. Specifies the GUID of the list template owner if the list template is registered via Features, or the name of the site definition if the list template is registered by a site definition.
Sequence Required Number. Specifies the order to use for the event registration when more than one handler is associated with the feature.
Registrations
Event Types Select the event elements.
Optional Settings
RootWebOnly Optional Boolean. True if the event receiver applies only to the root Web; otherwise, False.
Scope Optional enumeration. The scope of the event receiver. This can be Site or Web. When the Scope attribute is set to Site, event receivers that are defined inside of a Feature that is scoped to the site collection are registered at the site collection level. When the Scope attribute is set to Web, event receivers that are defined inside of a Feature that is scoped to a Web are registered on the Web.
Synchronization Specifies the synchronization of the event receiver.

References

Authors

Version history

2.1.1.4. Web Event Handler

Recipe Description

Event handlers for sites and webs must be registered with a feature receiver

Arguments

Name Description
Event Handler settings
Name Required Text. Used as the class name of the event handler.
List Template Optional Text. Specifies the index of the list template to which the event receiver applies. The following values are the default list template types.
List Template Owner Optional GUID. Specifies the GUID of the list template owner if the list template is registered via Features, or the name of the site definition if the list template is registered by a site definition.
Sequence Required Number. Specifies the order to use for the event registration when more than one handler is associated with the feature.
Registrations
Event Types Select the event elements.
Optional Settings
RootWebOnly Optional Boolean. True if the event receiver applies only to the root Web; otherwise, False.
Scope Optional enumeration. The scope of the event receiver. This can be Site or Web. When the Scope attribute is set to Site, event receivers that are defined inside of a Feature that is scoped to the site collection are registered at the site collection level. When the Scope attribute is set to Web, event receivers that are defined inside of a Feature that is scoped to a Web are registered on the Web.
Synchronization Specifies the synchronization of the event receiver.

References

Authors

Version history

2.1.1.1. Email Event Handler

Recipe Description

Debugging of email events requires attaching to ows timer service.
After changing code the ows timer needs to be restarted. IISReset will not load new assembly to ows timer.

Arguments

Name Description
Event Handler settings
Name Required Text. Used as the class name of the event handler.
List Template Optional Text. Specifies the index of the list template to which the event receiver applies. The following values are the default list template types.
List Template Owner Optional GUID. Specifies the GUID of the list template owner if the list template is registered via Features, or the name of the site definition if the list template is registered by a site definition.
Sequence Required Number. Specifies the order to use for the event registration when more than one handler is associated with the feature.
Registrations
Event Types Select the event elements.
Optional Settings
RootWebOnly Optional Boolean. True if the event receiver applies only to the root Web; otherwise, False.
Scope Optional enumeration. The scope of the event receiver. This can be Site or Web. When the Scope attribute is set to Site, event receivers that are defined inside of a Feature that is scoped to the site collection are registered at the site collection level. When the Scope attribute is set to Web, event receivers that are defined inside of a Feature that is scoped to a Web are registered on the Web.
Synchronization Specifies the synchronization of the event receiver.

References

Authors

Version history

2.1.6. WebParts

Contains recipes for Webpart samples

2.1.1.5. SharePoint Web Part

Recipe Description

Web Parts are server-side controls that run inside the context of special pages (that is, Web Part Pages) within an ASP.NET application or a Windows SharePoint Services site.
They are the "building blocks" of pages in Windows SharePoint Services.
Windows SharePoint Services includes built-in Web Parts that you can use as soon as you have installed the product.
In addition, you can build your own Web Parts and deploy them to the server. (MSDN)

Arguments

Name Description
Web Part Information
Web Part Name Enter the name of the web part. The name will be used for the class name (.cs).
Web Part Title Enter the title of the web part (displayed in the web part gallery as web part title).
Web Part Description Enter the description of the web part (displayed in the web part gallery as web part description).
Group Enter the group in which the web part should appear in web part gallery.
QuickAdd Group Enter the quick add group in which the web part should appear when the user wants to add a web part to a page.

References

Authors

Version history

2.1.1.2. ASP Web Part

Recipe Description

Adds a web part to the project derived from System.Web.UI.WebControls.WebParts.WebPart.
Creating this kind of webpart allows reuse in non-SharePoint ASP WebPages, but also lacks the SharePoint specific additions, like caching.

Arguments

Name Description
Web Part Information
Web Part Name Enter the name of the web part. The name will be used for the class name (.cs).
Web Part Title Enter the title of the web part (displayed in the web part gallery as web part title).
Web Part Description Enter the description of the web part (displayed in the web part gallery as web part description).
Group Enter the group in which the web part should appear in web part gallery.
QuickAdd Group Enter the quick add group in which the web part should appear when the user wants to add a web part to a page.

References

Authors

Version history

2.1.1.7. Visual Web Part

Recipe Description

Creates a new webpart based on the SmartPart project.
The SharePoint web part which can host any ASP.NET web user control.

Arguments

Name Description
Web Part Information
Web Part Name Enter the name of the web part. The name will be used for the class name (.cs).
Web Part Title Enter the title of the web part (displayed in the web part gallery as web part title).
Web Part Description Enter the description of the web part (displayed in the web part gallery as web part description).
Group Enter the group in which the web part should appear in web part gallery.
QuickAdd Group Enter the quick add group in which the web part should appear when the user wants to add a web part to a page.

References

Authors

Version history

2.1.1.1. Sample: Ajax Web Part

Recipe Description

This recipe adsda an Ajax enabled webpart to your project.
Postback will be handled without loading the entire page.
Note: AJAX.net has to be installed on the server.

Arguments

Name Description
Web Part Information
Web Part Name Enter the name of the web part. The name will be used for the class name (.cs).
Web Part Title Enter the title of the web part (displayed in the web part gallery as web part title).
Web Part Description Enter the description of the web part (displayed in the web part gallery as web part description).
Group Enter the group in which the web part should appear in web part gallery.
QuickAdd Group Enter the quick add group in which the web part should appear when the user wants to add a web part to a page.

References

Authors

Version history

2.1.1.6. Sample: Simple Filter Consumer Web Part

Recipe Description

Windows SharePoint Services 3.0 uses the ASP.NET Web Part connection framework to connect Web Parts to each other programmatically.
Filter Web Parts use this connectivity support to provide filter criteria to other Web Parts.
Developers can now allow users to provide search or filter criteria.
Web Part connections are based on the concepts of "providers" and "consumers."
A provider Web Part supplies information to one or more consumer Web Parts through a programmatic interface. (MSDN)

Arguments

Name Description
Web Part Information
Web Part Name Enter the name of the web part. The name will be used for the class name (.cs).
Web Part Title Enter the title of the web part (displayed in the web part gallery as web part title).
Web Part Description Enter the description of the web part (displayed in the web part gallery as web part description).
Group Enter the group in which the web part should appear in web part gallery.
QuickAdd Group Enter the quick add group in which the web part should appear when the user wants to add a web part to a page.

References

Authors

Version history

2.1.1.3. Sample: Filter Consumer Web Part

Recipe Description

Windows SharePoint Services 3.0 uses the ASP.NET Web Part connection framework to connect Web Parts to each other programmatically.
Filter Web Parts use this connectivity support to provide filter criteria to other Web Parts.
Developers can now allow users to provide search or filter criteria.
Web Part connections are based on the concepts of "providers" and "consumers."
A provider Web Part supplies information to one or more consumer Web Parts through a programmatic interface. (MSDN)

Arguments

Name Description
Web Part Information
Web Part Name Enter the name of the web part. The name will be used for the class name (.cs).
Web Part Title Enter the title of the web part (displayed in the web part gallery as web part title).
Web Part Description Enter the description of the web part (displayed in the web part gallery as web part description).
Group Enter the group in which the web part should appear in web part gallery.
QuickAdd Group Enter the quick add group in which the web part should appear when the user wants to add a web part to a page.

References

Authors

Version history

2.1.1.4. Sample: Filter Provider Web Part

Recipe Description

Windows SharePoint Services 3.0 uses the ASP.NET Web Part connection framework to connect Web Parts to each other programmatically.
Filter Web Parts use this connectivity support to provide filter criteria to other Web Parts.
Developers can now allow users to provide search or filter criteria.
Web Part connections are based on the concepts of "providers" and "consumers."
A provider Web Part supplies information to one or more consumer Web Parts through a programmatic interface. (MSDN)

Arguments

Name Description
Web Part Information
Web Part Name Enter the name of the web part. The name will be used for the class name (.cs).
Web Part Title Enter the title of the web part (displayed in the web part gallery as web part title).
Web Part Description Enter the description of the web part (displayed in the web part gallery as web part description).
Group Enter the group in which the web part should appear in web part gallery.
QuickAdd Group Enter the quick add group in which the web part should appear when the user wants to add a web part to a page.

References

Authors

Version history

2.1.7. Field Types

Contains several examples for custom field types

2.1.1.1. Field Type

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types.
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a simple Field Type to your project.

Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Parent Type Required Type. The parent field type from which this type will inherit.
Display Name Required Text. The display name for this field type.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).

References

Authors

Version history

2.1.1.3. Sample: Field Type with Complex Value

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types.
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a MultiColumn Field Type to your project.

Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).
Display Name in column 'Type' Required Text. The display name for this field type.

References

Authors

Version history

2.1.1.6. Sample: Field Type with Multiple Columns

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types.
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a simple Field Type to your project.

Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).
Display Name in column 'Type' Required Text. The display name for this field type.

References

Authors

Version history

2.1.1.2. Sample: Field Type with Status Choice

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a simple Field Type to your project.

Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).
Display Name in column 'Type' Required Text. The display name for this field type.

References

Authors

Version history

2.1.1.5. Sample: Field Type for ISBN10

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types.
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a simple Field Type to your project.

Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).
Display Name in column 'Type' Required Text. The display name for this field type.

References

Authors

Version history

2.1.1.8. Sample: Field Type for Social Security Number

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types.
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a simple Field Type to your project.

Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).
Display Name in column 'Type' Required Text. The display name for this field type.

References

Authors

Version history

2.1.1.4. Sample: Field Type for Flash Movie

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types.
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a simple Field Type to your project.

Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).
Display Name in column 'Type' Required Text. The display name for this field type.

References

Authors

Version history

2.1.1.7. Sample: Field Type for Ratings

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types.
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a simple Field Type to your project.

Screens



Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).
Display Name in column 'Type' Required Text. The display name for this field type.

References

Authors

Version history

2.1.8. Publishing

Contains recipes for Web Content Management

2.1.1.3. Publishing Site Definition

Recipe Description

The publishing site definition creates a site with the publishing infrastructure and publishing site feature enabled and provides functionalities for web content management.
It creates three features which are required to activate the several components of the publishing site.

Arguments

Name Description
Site Template settings
Name Required Text. Specify the name of the folder which will be created in folder SiteTemplates. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title of the site template as it appears in the selection of Create Site dialog. Limited to 255 characters.
ID Required Number. Id of the site template. Should be unique on the farm and greater than 10000.
Description Required Text. Longer description of the purpose of this site definition.
Display Category Required Text. Title of the cateogry in which the site definition should appear in the Create Site dialog. Limited to 255 characters.
Master Page Settings
Name Required Text. Name of the Master Page. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title (friendly name) of the Page Layout. Limited to 255 characters.
Description Optional Text. Description of the Master Page.
Page Layout Settings
Page Layout Content Type Required Content Type. Content Type of this Page Layout.
Name Required Text. Name of the Page Layout class file. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title (friendly name) of the Page Layout. Limited to 255 characters.
Description Optional Text. Description of the Page Layout.
Options
Create Provisioning XML Optional Boolean. If TRUE creates a file named Portal.XML with XML data for the creation of subsites after provisioning this site template.
Create Provisioning Handler (.cs) Optional Boolean. If TRUE creates a cs.file for handling the event of provisioning.
Hidden Optional Boolean. If TRUE hides the site definition from the Create Site dialog. Creation of sites with this definition through code will be still possible.
Allow global Feature associations Optional Boolean. If TRUE the site definition is allowed to be associated to global features.
Root Web Only Optional Boolean. If TRUE the site created from the configuration can only exist as the root Web site in a site collection. This attribute is not enforced in site templates (.stp files).
Sub Web Only Optional Boolean. If TRUE tthe site created from the configuration can only exist as a subsite within a site collection.

References

Authors

Version history

2.1.1.1. Master Page

Arguments

Name Description
Master Page Settings
Name Required Text. Name of the Master Page. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title (friendly name) of the Master Page. Limited to 255 characters.
Description Optional Text. Description of the Master Page.

References

Authors

Version history

2.1.1.2. Page Layout

Recipe Description

The recipe creates a page layout, which can be made available in a publising site for a specific content type (i.e. news).
Page layouts dictate, along with master pages, the overall look and feel of your SharePoint Publishing site.
Master pages contain controls that are shared across multiple page layouts, such as navigation, search, or language-preference for multilingual sites.
Page layouts contain field controls and Web Parts.

Arguments

Name Description
Page Layout Settings
Page Layout Content Type Required Content Type. Content Type of this Page Layout.
Name Required Text. Name of the Page Layout class file. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title (friendly name) of the Page Layout. Limited to 255 characters.
Description Optional Text. Description of the Page Layout.

References

Authors

Version history

2.1.9. Import

Contains recipes to import external content into the project

2.1.1.2. Import .wsp solution

Recipe Description

This recipes imports a single .wsp file from the local system into an existing project. To run the recipe an existing customization project is needed.

Arguments

Name Description
WSP File Select the wsp file to be imported into the current project

Authors

Version history

2.1.1.3. Import .wsp solution from local farm

Recipe Description

This recipes imports a single .wsp file from the local SharePoint farm into an existing project. To run the recipe an existing customization project is needed.

Arguments

Name Description
WSP Solution Select the wsp from the local farm for the import

Authors

Version history

2.1.1.1. Import Content Type

Arguments

Name Description
Content Type Settings
ID Required Text. Specifies the content type ID of the content type.
Name Required Text. Specifies the content type name.
Description Optional Text. Provides a description for the content type, to display in the Windows SharePoint Services user interface.
Group Optional Text. Specifies the content type group to which the content type is assigned. Content type groups are user-defined groups that help you organize your columns into logical categories.
Version Reserved for future use.
Hidden Optional Boolean. TRUE to define the content type as hidden. If you define a content type as hidden, Windows SharePoint Services does not display that content type on the New button in list views. If you do not include this attribute, Windows SharePoint Services treats the content type as if this attributes was set to FALSE.
Read Only Optional Boolean. TRUE to define the content type as read-only. If you do not include this attribute, Windows SharePoint Services treats the content type as if this attributes was set to FALSE.
Sealed Optional Boolean. TRUE to define the content type as sealed. You must have site collection administrator rights to unseal and edit a content type defined as sealed. If you do not include this attribute, Windows SharePoint Services treats the content type as if this attributes was set to FALSE.

Authors

Version history

2.1.1.6. Import Site Column

Arguments

Name Description
Site Column Settings
ID
Name
Display Name
Description
Group

Authors

Version history

2.1.1.5. Import List Definition

Arguments

Name Description
List Template Settings
Name Required Text. Specifies the internal name of the list definition. No spaces or special characters can be used. This name is also used to find the folder that contains the Schema.xml file that defines the schema in use.
DisplayName Required Text. Specifies the display name of the list definition.
Description Optional Text. Provides a description of the list definition.
Type Optional Integer. Provides a unique identifier for the template. This identifier must be unique within the feature, but need not be unique across all feature definitions or site definitions.
Category Optional Text. Specifies the category with which to associate lists created through the list definition.
Sequence Optional Integer. Specifies the ordering priority to use for the list template on the Create page. If Sequence is not set, the template appears last in arbitrary order with any other templates that also lack a Sequence value. Two templates that specify the same sequence are sorted together in an arbitrary order.
Options
Default in new sites Optional Boolean. TRUE to specify that new SharePoint sites will include this list.
OnQuickLaunch Optional Boolean. TRUE to display lists created from the list definition on the QuickLaunch bar.
DisableAttachments Optional Boolean. TRUE to specify that users can attach files to items in lists created through the template; otherwise, FALSE.
DisallowContentTypes Optional Boolean. TRUE to specify that content types can be managed on lists created through the template; otherwise, FALSE.
VersioningEnabled Optional Boolean. TRUE to specify that versioning is enabled by default in lists created through the template; otherwise, FALSE.
FolderCreation Optional Boolean. TRUE to enable folder creation within the list and to specify that the New Folder command appears on the New menu in list views; otherwise, FALSE.
EnableModeration Optional Boolean. TRUE to specify that content approval is enabled by default in lists created through the template; otherwise, FALSE.
Hidden Optional Boolean. TRUE to specify that the list definition is not available on the Create page for creating lists.
HiddenList Optional Boolean. TRUE to specify that a list created from the list definition is hidden.
Advanced
Security Read Optional Text. Defines the item-level permissions in the list for users with sufficient permission to read or edit list items. The SecurityBits attribute contains a 2-digit string. The first digit in the string controls the read access; the second digit in the string controls the edit access.
Security Edit Optional Text. Defines the item-level permissions in the list for users with sufficient permission to read or edit list items. The SecurityBits attribute contains a 2-digit string. The first digit in the string controls the read access; the second digit in the string controls the edit access.
Name Optional URL. Specifies a URL to an icon used to represent a list.

Authors

Version history

2.1.1.4. Import List Instance

Arguments

Name Description
List Instance Settings
Title Required Text. Title of the list in the schema.
Description Optional Text. Contains a description of the list.
Url Required Text. Returns the site-relative URL at which to place the list.
Options
RootWebOnly Optional Boolean. TRUE to specify that the list created from the definition exists only in the root Web site of a site collection.
OnQuickLaunch Optional Boolean. TRUE to display lists created from the list definition on the Quick Launch bar.
QuickLaunchUrl Optional Text. Specifies the URL of the view page to open for the list through Quick Launch navigation.
Id Required Text. Specifies a unique identifier for the list instance. The integer must be unique across the Feature definition.

Authors

Version history

2.1.10. Application Pages

Contains recipes to create typical application pages (e.g. in /_layouts/ folder)

2.1.1.3. Unrestricted Layouts Page

Screens




Arguments

Name Description
Page Name Enter name of the application page without extension (.aspx)
Title Enter the title of page (displayed on top of the page and in the title of the html).
Description Enter the description of page (displayed on top of the page).
Allow Anonymous Access

References

Authors

Version history

2.1.1.2. Application Page

Screens




Arguments

Name Description
Name Enter the name of the application page (without .aspx).
Title Enter the title of page (displayed on top of the page and in the title of the html).
Description Enter the description of page (displayed on top of the page).

References

Authors

Version history

2.1.1.1. Administration Page

Screens



Arguments

Name Description
Name Enter the name of the application page (without .aspx).
Title Enter the title of page (displayed on top of the page and in the title of the html).
Description Enter the description of page (displayed on top of the page).

References

Authors

Version history

2.1.11. ASP.NET

Contains recipes for general ASP.NET (non-SharePoint) artefacts

2.1.1.2. Custom Control

Arguments

Name Description
Name Enter the name of the control (used as class name of the control).

Authors

Version history

2.1.1.8. Create WSDL and DISCO

Screens



Authors

Version history

2.1.1.7. Webservice

Screens





Arguments

Name Description
Name Required String. Enter the name of the web service.
Description Required String. Enter the description of the web service.

References

Authors

Version history

2.1.1.1. Administration Web Service

Arguments

Name Description
Name Required String. Enter the name of the web service.
Description Required String. Enter the description of the web service.

References

Authors

Version history

2.1.1.3. Delegate Control (.ASCX)

Recipe Description

* AdditionalPageHead
* GlobalSiteLink0
* GlobalSiteLink1
* GlobalSiteLink2
* SmallSearchInputBox
* TopNavigationDataSource
* PublishingConsole
* QuickLaunchDataSource

Arguments

Name Description
Delegate Control Settings
Name Required Text. Specifies the name of the control.
Sequence Optional Integer. Specifies the sequence number for the control, which determines whether the control is added to the control tree for a page. The control with the lowest sequence number is added to the tree.
Id Optional Text. Specifies the ID of the control, for example, "SmallSearchInputBox".

References

Authors

Version history

2.1.1.4. Delegate Control (.CS)

Recipe Description

* AdditionalPageHead
* GlobalSiteLink0
* GlobalSiteLink1
* GlobalSiteLink2
* SmallSearchInputBox
* TopNavigationDataSource
* PublishingConsole
* QuickLaunchDataSource

Arguments

Name Description
Delegate Control Settings
Name Required Text. Specifies the name of the control.
Sequence Optional Integer. Specifies the sequence number for the control, which determines whether the control is added to the control tree for a page. The control with the lowest sequence number is added to the tree.
Id Optional Text. Specifies the ID of the control, for example, "SmallSearchInputBox".

References

Authors

Version history

2.1.1.5. Http Handler

Arguments

Name Description
HttpHandler Settings
Http Handler Name Enter the class name of the Http handler.
Http Handler Path Enter path for which urls the http handler should be called, e.g. */_vti_bin/_vti_aut/author.dll

Authors

Version history

2.1.1.6. Http Module

Recipe Description

The Http module assembly needs to be registered in web.config. Therefore the Http module needs to be added to a feature with scope WebApplication and the necessary activation code is added to the feature receiver of the selected feature.

Arguments

Name Description
HttpModule Settings
Http Module Name

Authors

Version history

2.1.12. Workflows

Contains recipes for workflows

2.1.1.1. Simple Workflow

Arguments

Name Description
Workflow Settings
Name Required Text. Specifies the workflow name that is displayed in the SharePoint Foundation interface. The workflow name can be up to 256 characters long.
Title Optional Text.
Description Optional Text. Specifies the workflow description to be displayed in the SharePoint Foundation interface. The workflow description can be up to 256 characters long.
Id Required Text. Specifies the globally unique identifier (GUID) for the workflow.

Authors

Version history

2.1.13. Advanced

Contains recipes for advanced development tasks

2.1.1.4. web.config Modification

Recipe Description

In some occasions modifications of the web.config are required when activating a feature i.e. defining web application wide configuration settings.
A web.config modification feature can be utilized to make the neccessary configurations and undo them when the feature is deactivated.

References

Authors

Version history

2.1.1.5. Web Provisioning Provider

Recipe Description


Arguments

Name Description
Class Name Required Text. Name of the SPWebProvisioningProvider.

References

Authors

Version history

2.1.1.3. Timer Job Definition

Recipe Description

Windows SharePoint Services 3.0 lets you create custom jobs that are executed at set intervals. These jobs, known as timer jobs, are similar to those tasks that you can create in any version of Windows by using the Task Scheduler application. This capability is useful for scheduled process jobs because you keep everything in Windows SharePoint Services rather than create a console .exe file that is configured to run at set intervals by using the Windows Task Scheduler. The major benefits to using the Windows SharePoint Services timer service compared to using Windows Task Scheduler is that the timer service knows the topology of the Office SharePoint Server farm, and that you can load balance the jobs across all the servers in the farm or tie them to specific servers that are running particular services. (Source: MSDN).
    
You can run the timer job e.g. in a feature receiver during feature activation or deactivation.
    
Use the following code to start the timer job.
<code>
namespace ApplicationName.WSPSolution
{
public partial class EmptyFeature1FeatureReceiver : SPFeatureReceiver
{
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
TimerJob1.StartJob("param Value 1", "param Value 2");
}
}
}
</code>

Arguments

Name Description
Timer Job Class Required Text. Name of the Timer Job class file.

References

Authors

Version history

2.1.1.1. Alert Template

Recipe Description

Alerts are an e-mail subscription notification service in Windows SharePoint Services 3.0. Users can create alerts to be notified of changes to list items (item level alert), documents, lists (list level alert), or document libraries. Alerts in Windows SharePoint Services 3.0 are quite flexible; when you create an alert you have options such as when to be notified and what kind of changes will trigger the alert. Alerts can be managed by users and administrators and customized by developers.

After an alert has been created, changes that fit the criteria specified in the alert are recorded in an event log. Alerts are generated by a timer job that reads the event log, formats the alert email using an alert template, and then sends that email out to the user.

Alert templates are stored in Alerttemplates.xml. Alerttemplates.xml defines the format, contents, and properties used to create alert messages from each list type in Windows SharePoint Services 3.0. Developers can customize alerts by modifying a copy of Alerttemplates.xml and then loading the customized alert templates using the stsadm -o updatealerttemplates command.
(Source: Microsoft SharePoint Developer Documentation Team Blog)

This recipe creates such an alert template.

References

Authors

Version history

2.1.1.2. Minimal CAS

Recipe Description


Authors

Version history

2.1.14. Files

Contains recipes to add files at the correct location within the project

2.1.1.4. Add Assembly for GAC Deployment

Recipe Description

GAC assemblies are deployed to the GAC and are globally available. In manifest.xml they are located here:

<Solution xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SolutionId="00000000-0000-0000-0000-000000000000" ResetWebServer="True" xmlns="http://schemas.microsoft.com/sharepoint/">
 <Assemblies>
  <Assembly Location="WebPartResources.dll" DeploymentTarget="GlobalAssemblyCache">
   <SafeControls>
    <SafeControl Assembly="WebPartResources, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6763c0814d065309" Namespace="WebPartResources" TypeName="*" Safe="True" />
   </SafeControls>
  </Assembly>
 </Assemblies>
</Solution>

Arguments

Name Description
Source Files

Authors

Version history

2.1.1.5. Add Global Resource file (.resx)

Authors

Version history

2.1.1.2. Add Assembly for Webapplication Deployment

Recipe Description

WebApplication assemblies are added to the project to folder 80/BIN. In manifest.xml these files are located here:

<Solution xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SolutionId="00000000-0000-0000-0000-000000000000" ResetWebServer="True" xmlns="http://schemas.microsoft.com/sharepoint/">
 <Assemblies>
  <Assembly Location="WebPartResources.dll" DeploymentTarget="WebApplication">
   <SafeControls>
    <SafeControl Assembly="WebPartResources, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6763c0814d065309" Namespace="WebPartResources" TypeName="*" Safe="True" />
   </SafeControls>
  </Assembly>
 </Assemblies>
</Solution>

After deployment these files get deployed to folder \inetpub\wwwroot\wss\VirtualDirectories\80\bin

Arguments

Name Description
Source Files

Authors

Version history

2.1.1.3. Add Class Resource Files

Recipe Description

Class resource files are added to the project in folder 80/BIN/wpresources/[NameOfAssembly]. In manifest.xml these files are deployed to

<Solution xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SolutionId="00000000-0000-0000-0000-000000000000" ResetWebServer="True" xmlns="http://schemas.microsoft.com/sharepoint/">
 <Assemblies>
  <Assembly Location="WebPartResources.dll" DeploymentTarget="GlobalAssemblyCache">
   <SafeControls>
    <SafeControl Assembly="WebPartResources, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6763c0814d065309" Namespace="WebPartResources" TypeName="*" Safe="True" />
   </SafeControls>
   <ClassResources>
    <ClassResource Location="testfile.gif" FileName="testfile.gif" />
   </ClassResources>
  </Assembly>
 </Assemblies>
</Solution>

After deployment these files are located here.
For assemblies in GAX: C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\WebPartResources\1.0.0.0__6763c0814d065309\testfile.gif
For assemblies in BIN: C:\inetpub\wwwroot\wss\VirtualDirectories\80\wpresources\1.0.0.0__6763c0814d065309\testfile.gif

In code you can access there files:

SPWeb currentWeb = SPControl.GetContextWeb(Context);
Type currentType = this.GetType();
string classResourcePath = SPWebPartManager.GetClassResourcePath(currentWeb, currentType);  
image = new Image();
image.ImageUrl = classResourcePath + "/testfile.gif";

The file could also be access via URL:

http://servername/_wpresources/[assemblyname]/testfile.gif

Arguments

Name Description
Source Files

Authors

Version history

2.1.1.1. Add Application Resource Files

Recipe Description

Application resource files are mainly used for .resx files in application pages. They are deployed to folder VirtualDirectories\80\App_GlobalResources of a web application.

This functionality only works in SharePoint 2010. In earlier versions files could not be deployed to VirtualDirectories\80\App_GlobalResources with wsp solutions.

In SharePoint 2010 application resource files are deployed with wsp solutions to folder 12/CONFIG/Resources/ and copied to VirtualDirectories\80\App_GlobalResources with stsadm -o copyappbincontent.

Alternatively these files could be copied with a feature receiver:
- For Central Administration resources (and sitemaps): SPWebService.AdministrationService.ApplyApplicationContentToLocalServer();
- For Application Page resources (and sitemaps): SPFarm.Local.Services.GetValue().ApplyApplicationContentToLocalServer();

In the Visual Studio project application resource files are located here:
80/BIN/resources

Application resource files are located in manifest.xml here:
<Solution xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SolutionId="00000000-0000-0000-0000-000000000000" ResetWebServer="True" xmlns="http://schemas.microsoft.com/sharepoint/">
 <ApplicationResourceFiles>
  <ApplicationResourceFile Location="80\resources\testfile.gif/>
 </ApplicationResourceFiles>
 <!-- new in SharePoint 2010 -->
 <App_GlobalResources>
  <App_GlobalResourceFile Location="80\resources\testfile.gif/>
 </App_GlobalResources>
</Solution>

These files are deployed to C:\inetpub\wwwroot\wss\VirtualDirectories\80\App_GlobalResources in a webapplication.

Arguments

Name Description
Source Files

Authors

Version history

2.1.1.6. Add Image

Recipe Description

The recipes adds a image at the appropriate location within the project for deployment to /_images/

Arguments

Name Description
Source Files

Authors

Version history

2.1.1.7. Add Layouts file

Recipe Description

The recipes adds a file at the appropriate location within the project for deployment to /_layouts/.

Arguments

Name Description
Source Files

Authors

Version history

2.1.15. Silverlight

Contains recipes to add Silverlight applications to the project

2.1.1.1. Silverlight Application

Arguments

Name Description
Silverlight Application Settings
Generated Silverlight Application Name Required String. Generated name of the Silverlight application.
Silverlight Application Name Required Text. Name of the Silverlight application.
Silverlight Version Required Text. Target Silverlight version.
WebPart Title Required Text. Title of the webpart which displays the Silverlight application.
WebPart Description Required Text. Description of the webpart which displays the Silverlight application.

Authors

Version history

2.1.1.2. Sample: Silverlight Data Binding

Screens


Arguments

Name Description
Silverlight Application Settings
Generated Silverlight Application Name Required String. Generated name of the Silverlight application.
Silverlight Application Name Required Text. Name of the Silverlight application.
Silverlight Version Required Text. Target Silverlight version.
WebPart Title Required Text. Title of the webpart which displays the Silverlight application.
WebPart Description Required Text. Description of the webpart which displays the Silverlight application.

References

Authors

Version history

2.1.1.4. Sample: Silverlight Task Adder

Screens


Arguments

Name Description
Silverlight Application Settings
Generated Silverlight Application Name Required String. Generated name of the Silverlight application.
Silverlight Application Name Required Text. Name of the Silverlight application.
Silverlight Version Required Text. Target Silverlight version.
WebPart Title Required Text. Title of the webpart which displays the Silverlight application.
WebPart Description Required Text. Description of the webpart which displays the Silverlight application.

References

Authors

Version history

2.1.1.3. Sample: Silverlight List Viewer

Screens


Arguments

Name Description
Silverlight Application Settings
Generated Silverlight Application Name Required String. Generated name of the Silverlight application.
Silverlight Application Name Required Text. Name of the Silverlight application.
Silverlight Version Required Text. Target Silverlight version.
WebPart Title Required Text. Title of the webpart which displays the Silverlight application.
WebPart Description Required Text. Description of the webpart which displays the Silverlight application.

References

Authors

Version history

2.1.16. PowerShell

Contains recipes to add PowerShell scripts and cmdlets

2.1.1.4. SharePoint CmdLet

Recipe Description

The custom cmdlet can be used in powershell scripts (.ps1) to run adminstration jobs for instance, e.g. 'Start-MyCustomJob'.
Use command "Get-Help Start-MyCustomJob' to display a detailed help information.
Use command "Get-Command Start-MyCustomJob' to display general information.

Screens




Arguments

Name Description
Generated Command Optional String. Displays the final command
Verb Required String. Enter the verb e.g. "Start", "Stop", "Backup".
Noun Required String. Enter the operation or object type e.g. "SPSiteByName".
Description Required String. Enter the a short description of the cmdlet (used in help file).

References

Authors

Version history

2.1.1.5. SharePoint CmdLet with PipeBind

Recipe Description

The custom cmdlet can be used in powershell scripts (.ps1) to handle objects e.g. SPList or SPSite within a pipe.
Use command "Get-Help Get-MyCustomList' to display a detailed help information.
Use command "Get-Command Get-MyCustomList' to display general information.

Screens




Arguments

Name Description
General Settings
Generated Command Optional String. Displays the final command
Verb Required String. Select the verb e.g. "Get", "New", "Set", "Delete".
Noun Required String. Enter the operation or object type e.g. "SPSiteByName".
Description Required String. Enter the a short description of the cmdlet (used in help file).
Pipe Object Settings
Object Type Optional String. Enter the existing type of object that should be used for pipe binding (e.g. SPList, SPWeb).

References

Authors

Version history

2.1.1.1. PowerShell CmdLet

Authors

Version history

2.1.1.2. PowerShell PSCmdLet

Authors

Version history

2.1.1.3. PowerShell Script

Authors

Version history

2.3. SPSF Deploy and Debug

Contains the core recipes

2.1.1. Deployment

Contains recipes for local deployment of solutions

2.1.1.1. Deploy Solution(s)

Recipe Description

The recipe deploys the selected project(s) to the local SharePoint farm.
    
    If the wsp solution contains web application resources the solution is deployed to a specific web application. This specific web application can be configured with "Configure Deployment".

Authors

Version history

2.1.1.2. Redeploy Solution(s)

Authors

Version history

2.1.1.3. Undeploy Solution(s)

Authors

Version history

2.1.1.4. Upgrade Solution(s)

Authors

Version history

2.1.2. Quick Deploy

Contains recipes for quick deployment to the local farm

2.1.1.2. Copy Both

Authors

Version history

2.1.1.3. Copy to SharePoint Hive

Authors

Version history

2.1.1.1. Copy Assembly

Authors

Version history

2.1.3. Deploy Sandboxed Solutions Remotely

Contains recipes for deployment of sandboxed solutions to a remote farm

2.1.1.1. Deploy Sandboxed Solution(s)

Recipe Description

The recipe deploys the selected project(s) to the local SharePoint farm.
    
    If the wsp solution contains web application resources the solution is deployed to a specific web application. This specific web application can be configured with "Configure Deployment".

Authors

Version history

2.1.1.2. Undeploy Sandboxed Solution(s)

Authors

Version history

2.1.1.3. Upgrade Sandboxed Solution(s)

Authors

Version history

2.1.4. Debugging

Contains recipes to help debugging an application

2.1.1.7. Start New Instance

Authors

Version history

2.1.1.3. Attach to W3WP Worker Process

Arguments

Name Description
Worker Process Select the worker process.

Authors

Version history

2.1.1.2. Attach to SharePoint 2010 User Code Host

Authors

Version history

2.1.1.5. Recycle App Pool

Arguments

Name Description
Application Pool Select the application pool.

Authors

Version history

2.1.1.4. IIS Reset

Authors

Version history

2.1.1.1. Attach to OWSTimer

Authors

Version history

2.1.1.6. Restart OWSTimer

Authors

Version history

2.4. SPSF Test and Analyze

Contains helpful recipes

2.1.1. Test

Helpful commands to add tests to the project

2.1.2. Analyze

Helpful commands to analyze the code

2.1.1.1. Run SPDisposeChecker

Authors

Version history

2.5. SPSF Helpers

Contains helpful recipes

2.1.1. STSADM

Helpful commands to run stsadm operations

2.1.1.3. stsadm deactivatefeature

Recipe Description

This recipe is helpfull if hidden features are deployed and a feature needs to be deactivated via stsadm -o activatefeature.

Arguments

Name Description
Feature Id Select the feature to activate.
Url

Authors

Version history

2.1.1.1. stsadm activatefeature

Recipe Description

This recipe is helpfull if hidden features are deployed and a feature needs to be activated via stsadm -o activatefeature.

Arguments

Name Description
Feature Id Select the feature to activate.
Url

Authors

Version history

2.1.1.6. stsadm uninstallfeature

Recipe Description

Uninstalls the selected feature. This is useful if e.g. by corrupt solution deployments some features are still registered in the database, but the feature folder is already removed.

Arguments

Name Description
Feature Id Select the feature to activate.

Authors

Version history

2.1.1.2. stsadm copyappbincontent

Authors

Version history

2.1.1.4. stsadm execadmsvcjobs

Authors

Version history

2.1.1.5. Open stsadm Prompt

Authors

Version history

2.1.2. Shortcuts

Contains useful shortcuts

2.1.1.2. Open Debugging Site in Browser

Recipe Description

This recipe provides a shortcut to the debugging site of the current selected project.

Authors

Version history

2.1.1.5. Open Latest SharePoint Trace Log

Authors

Version history

2.1.1.3. Open Item in SharePoint Hive

Authors

Version history

2.1.1.6. Open SharePoint Trace Log Folder

Authors

Version history

2.1.1.1. Open Central Administration in Browser

Recipe Description

This recipe provides a shortcut to the local Central Administration in SharePoint, e.g. create a new site collection or check farm features.

Authors

Version history

2.1.1.4. Open Solution Management in Browser

Recipe Description

This recipe provides a shortcut to the Solution Management in SharePoint, e.g. to check which solutions are deployed or undeployed.

Authors

Version history

2.1.3. Helpers

Contains recipes to speed up the development process

2.1.1.4. Reload SharePoint Configuration

Recipe Description

In several dialogs within the wizards a list of SharePoint elements is provided to the user (e.g. list of available features, content types etc.). The values for this list are taken from the file SharePointConfiguration.xml, which should be located in the current solution.<br/><br/>This recipe recreates the file SharePointConfiguration.xml with the data from the local computer.

Authors

Version history

2.1.1.11. Run MSBuild Target

Arguments

Name Description
Build Target Name of the target to be executed.

Authors

Version history

2.1.1.1. Exclude item from SourceControl

Recipe Description

The recipe removes a file from source control to avoid conflicts during build.

Authors

Version history

2.1.1.2. Get AssemblyName

Recipe Description

The assembly name of often needed during development, e.g. to specify the assembly of a feature receiver in the feature.xml.

Arguments

Name Description
Assembly Name

Authors

Version history

2.1.1.3. Get Installed SharePoint Version

Arguments

Name Description
SharePoint Version

Authors

Version history

2.1.1.7. Open WSP solution file as .CAB

Authors

Version history

2.1.1.5. Remove TextTemplating Transformation

Recipe Description

Recipe changes a .tt file to a static file. This is usefull e.g. for transforming manifest.tt to manifest.xml to enable editing of manifest.xml.

Authors

Version history

2.1.1.6. Open in Browser

Recipe Description

The recipe opens the selected file in browser. The recipe is useful to open deployed file in SharePoint directly from within Visual Studio.

Authors

Version history

2.1.1.9. Show Properties

Recipe Description

Recipe displays the properties in visual studio of the current item. This is used for debugging purposes within Visual Studio.

Authors

Version history

2.1.1.10. Open SPSF Help

Authors

Version history

2.1.1.8. About SPSF

Recipe Description

Displays the about dialog with information about the SPSF.

Arguments

Name Description

Authors

Version history

2.1.4. Configuration

Contains recipes to configure the application

2.1.1.6. Migrate Solution to current SPSF version

Recipe Description

Migrates the whole solution to the current installed version of SharePoint Software Factory.

Arguments

Name Description
Application Settings
Company Name Required String. Specifies the company name of the SharePoint application, used in copyright statements.
Application Name Required String. Specifies the name of the SharePoint application, given by the name of the VS solution name.
Application Version Required String. Specifies the version of the SharePoint application.
SharePoint Version Required String. Target SharePoint version (12 or 14).
Local Site for debugging Optional Url. Name of a SharePoint site for local debugging.
Code Quality
Check code with FxCop in 'Release' build Optional Boolean. If true Microsoft FxCop will be executed during the 'Release' build to check the complied code against certain coding rules. Additionally a SharePoint specific FxCop settings file will be added to the solution.
Check code with StyleCop in 'Release' build Optional Boolean. If true Microsoft StyleCop will be executed during the 'Release' build to check the C# source code against certain style rules. Additionally a SharePoint specific StyleCop settings file will be added to the solution.
Check code with ShareCop in 'Release' build Optional Boolean. If true SharePoint Code Analysis will be executed during the 'Release' build to check code against certain style rules. Additionally a SharePoint specific ShareCop settings file will be added to the solution.
Check code with SPDisposeChecker in 'Release' build Optional Boolean. If true SharePoint Dispose Checker will be executed during the 'Release' build to check the code for potential memory leaks.

Authors

Version history

2.1.1.5. Migrate Project to current SPSF version

Recipe Description

Migrates the selected project to the current installed version of SharePoint Software Factory.

Arguments

Name Description

Authors

Version history

2.1.1.1. Analyze and Fix Project

Recipe Description

Checks Visual Studio projects for possible problems. This could be:
        - Output of .TT-Files like mainfest.tt should not be under source control. Otherwise these files cannot be generated during build
        - Hidden files in folder SharePointRoot will be included into the wsp file without intention
        

Authors

Version history

2.1.1.2. Configure Application

Recipe Description

Configures the generell settings of the project.

Arguments

Name Description
Local Site for debugging Optional Url. Name of a SharePoint site for local debugging.
Local Site for testing Optional Url. Name of a SharePoint site for local testing.
SharePoint Version Required String. Specifies the target SharePoint version.
Generate .resx files automatically Optional Boolean. If true .resx files are generated automatically.
Generate manifest.xml automatically Optional Boolean. If true the files manifest.xml and makecab.ddf are generated automatically.

Authors

Version history

2.1.1.3. Configure Project

Recipe Description

Configures the generell settings of the project.

Arguments

Name Description
DeploymentTarget

Authors

Version history

2.1.1.4. Configure Project

Recipe Description

Configures the generell settings of the project.

Arguments

Name Description
DeploymentTarget
Sandboxed solution Optional Boolean. If checked a sandboxed solutions will be created.

Authors

Version history

 

3. Snippets

1.1. Basic

1.2. CSharp

1.1.1. Content Types

1.1.1.1. Add Document Template To ContentType

Declarations

ID ToolTip Default
type Property type int
property Property name MyProperty
field The variable backing this property myVar

Snippet Code

private int myVar;

[Input()]
   public int MyProperty
   {
      get { return myVar;}
      set { myVar = value;}
   }
   $end$

Author

Torsten Mandelkow

HelpUrl

1.1.1.2. AddFieldAsXmlToList

Declarations

ID ToolTip Default
type Property type int
property Property name MyProperty
field The variable backing this property myVar

Snippet Code

using (SPWeb oWebsite = SPContext.Current.Site.AllWebs["MySite"])
{
SPFieldCollection collFields = oWebsite.Lists["MyList"].Fields;

string strNewField = "<Field Type=\"Calculated\" " +
"DisplayName=\"New_Field_Display_Name\" ResultType=\"Currency\" " +
"ReadOnly=\"TRUE\" Name=\"New_Field_Internal_Name\">" +
"<Formula>=Currency_Field_Name*100</Formula>" +
"<FieldRefs><FieldRef Name=\"Currency_Field_Name\" />" +
"</FieldRefs></Field>";

collFields.AddFieldAsXml(strNewField);
}

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ms457586.aspx

1.1.1.3. AddFieldToContentType

Declarations

ID ToolTip Default
type Property type int
property Property name MyProperty
field The variable backing this property myVar

Snippet Code

using (SPWeb oWebsite = new SPSite("http://MyServer/sites/MySiteCollection/MyWebSite").OpenWeb())
{
SPList oList = oWebsite.GetList("MyWebSite/Lists/MyList");
SPFieldCollection collFields = oWebsite.Fields;

string strNewColumn = collFields.Add("MyNewColumn", SPFieldType.Text, false);

SPFieldLink oFieldLink = new SPFieldLink(fields[strNewColumn]);
SPContentType oContentType = oList.ContentTypes["Specification"];
oContentType.FieldLinks.Add(oFieldLink);

oContentType.Update(true);
}

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ms442695.aspx

1.1.1.4. AddFieldToList

Declarations

ID ToolTip Default
type Property type int
property Property name MyProperty
field The variable backing this property myVar

Snippet Code

using (SPWeb oWebsite = SPContext.Current.Site.AllWebs["MySite"])
{
SPFieldCollection collFields = oWebsite.Lists["MyList"].Fields;
collFields.Add("MyField", Microsoft.SharePoint.SPFieldType.Text,
true);
}

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ms472869.aspx

1.1.1.5. CreateContentTypeByCode

Declarations

ID ToolTip Default
type Property type int
property Property name MyProperty
field The variable backing this property myVar

Snippet Code

using (SPWeb oWebsite = new SPSite("http://MyServer/sites/MySiteCollection/MyWebSite").OpenWeb())
{
SPList oList = oWebsite.GetList("MyWebSite/Lists/MyList");
SPFieldCollection collFields = oWebsite.Fields;

string strNewColumn = collFields.Add("MyNewColumn", SPFieldType.Text, false);

SPFieldLink oFieldLink = new SPFieldLink(fields[strNewColumn]);
SPContentType oContentType = oList.ContentTypes["Specification"];
oContentType.FieldLinks.Add(oFieldLink);

oContentType.Update(true);
}

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ms442695.aspx

1.1.1.6. UpdateFieldInList

Declarations

ID ToolTip Default
type Property type int
property Property name MyProperty
field The variable backing this property myVar

Snippet Code

SPSite oSiteCollection = SPContext.Current.Site;
SPList oList =
oSiteCollection.AllWebs["Site_Name"].Lists["List_Name"];
SPField oField = oList.Fields["Field_Name"];

oField.DefaultValue = "Default_Value";
oField.Description = "Description";
oField.Title = "New_Field_Title";

oField.Update();

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ms416125.aspx

1.1.2. Events

1.1.1.1. Register Event

Declarations

ID ToolTip Default
WebUrl Url of SPWeb http://MyServer/sites/MySiteCollection/MyWebSite
ListName Name of the list Shared Documents
AssemblyName Full name of the assembly with the event receiver Shared Documents
ClassName Full name of the event receiver class Namespace.ClassName
EventName Name of the event UniqueEventName
SequenceNumber Integer value of sequence 1000
EventType Type of the event to be registered SPEventReceiverType.ItemAdded

Snippet Code

using (SPWeb oWebsite = new SPSite("http://MyServer/sites/MySiteCollection/MyWebSite").OpenWeb())
{
SPList list = web.Lists["Shared Documents"];

SPEventReceiverDefinition def = list.EventReceivers.Add();
         def.Assembly = "Shared Documents";
         def.Class = "Namespace.ClassName";
         def.Name = "UniqueEventName";
         def.Type = SPEventReceiverType.ItemAdded;
         def.SequenceNumber = 1000;
         def.Synchronization = SPEventReceiverSynchronization.Synchronous;
         def.Update();

}

Author

Torsten Mandelkow

HelpUrl

1.1.1.2. Unregister Event

Declarations

ID ToolTip Default
WebUrl Url of SPWeb http://MyServer/sites/MySiteCollection/MyWebSite
ListName Name of the list Shared Documents
EventName Name of the event UniqueEventName

Snippet Code

using (SPWeb oWebsite = new SPSite("http://MyServer/sites/MySiteCollection/MyWebSite").OpenWeb())
{
   SPList list = web.Lists["Shared Documents"];

   SPEventReceiverDefinitionCollection receivers = list.EventReceivers;
   foreach (SPEventReceiverDefinition def in receivers)
   {
      if (def.Name == "UniqueEventName")
      {
         def.Delete();
      }
   }
}

Author

Torsten Mandelkow

HelpUrl

1.1.3. Features

1.1.4. Security

1.1.1.1. RunWithElevatedPrivileges

Declarations

ID ToolTip Default
type Property type int
property Property name MyProperty
field The variable backing this property myVar

Snippet Code

private int myVar;

[Input()]
   public int MyProperty
   {
      get { return myVar;}
      set { myVar = value;}
   }
   $end$

Author

Torsten Mandelkow

HelpUrl

1.1.5. User Profiles

1.1.6. Workflows

1.1.1.1. Start Workflow

Declarations

ID ToolTip Default
TemplateID ID of the workflow TemplateID
WebUrl Url of SPWeb http://MyServer/sites/MySiteCollection/MyWebSite
WorkflowTitle Title of the workflow Workflow

Snippet Code

using (SPWeb oWebsite = new SPSite("http://MyServer/sites/MySiteCollection/MyWebSite").OpenWeb())
{
Guid taskListID = oWebsite.Lists.Add("Tasks for workflow", "", SPListTemplateType.Tasks);
Guid historyListID = oWebsite.Lists.Add("History for workflow", "", SPListTemplateType.WorkflowHistory);

SPWorkflowTemplate template = oWebsite.WorkflowTemplates[TemplateID];
SPWorkflowAssociation association =
SPWorkflowAssociation.CreateWebAssociation(template,
"Workflow",
newSite.Lists[taskListID],
newSite.Lists[historyListID]);               
oWebsite.AddWorkflowAssociation(association);
oWebsite.Site.WorkflowManager.StartWorkflow(
oWebsite,
association, "", SPWorkflowRunOptions.Synchronous);
}

Author

Torsten Mandelkow

HelpUrl

1.3. XML

1.1.1. PowerShell

1.1.2. Ribbon Controls

1.1.1.1. Button

Declarations

ID ToolTip Default
id Required. A string that identifies the control, such as "Ribbon.Library.Share.NewRibbonButton". AppName.Button
alt Optional. Alternative text for the button. Button
labeltext Optional. The text to label the control. Button
tooltiptitle Optional. The text that appears as the title of the tooltip. Title
tooltipdescription Optional. The text that appears in the body of the tooltip. Description
sequence Optional. An integer that specifies the order of placement among sibling XML nodes. 10

Snippet Code

<Button
Id="Ribbon.AppName.Button"
Alt="Button"
Command="Ribbon.AppName.Button_command"
Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"
            Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-384"
LabelText="Button"
Sequence="10"
TemplateAlias="o2"
ToolTipTitle="Title"
ToolTipDescription="Description"/>

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ff458366.aspx

1.1.1.2. Checkbox

Declarations

ID ToolTip Default
id Required. Identifies the control. The value can be a string representation of a GUID or a unique term, such as "Ribbon.Library.Share.NewRibbonCheckBox". AppName.CheckBox
labeltext Optional. The text to label the control. Checkbox
alt Optional. Alternative text for the checkbox.
tooltiptitle Optional. The text that appears as the title of the tooltip. Title
tooltipdescription Optional. The text that appears in the body of the tooltip. Description
sequence Optional. An integer that specifies the order of placement among sibling XML nodes. 10

Snippet Code


<CheckBox
Id="Ribbon.AppName.CheckBox"
Command="Ribbon.AppName.CheckBox_command"
LabelText="Checkbox"
Alt=""
Sequence="10"
TemplateAlias="o2"
         ToolTipTitle="Title"
ToolTipDescription="Description"/>

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ff458368.aspx

1.1.1.3. Color Picker

Declarations

ID ToolTip Default
id Required. A string that identifies the control, such as "Ribbon.Library.Share.NewRibbonColorPicker". AppName.ColorPicker
alt Optional. Alternative text for the button. ColorPicker
labeltext Optional. The text to label the control. ColorPicker
tooltiptitle Optional. The text that appears as the title of the tooltip. ColorPicker
tooltipdescription Optional. The text that appears in the body of the tooltip. Description of ColorPicker
sequence Optional. An integer that specifies the order of placement among sibling XML nodes. 10

Snippet Code

<FlyoutAnchor      
         Id="Ribbon.AppName.ColorPicker"
Alt="ColorPicker"
Command="Ribbon.AppName.ColorPicker_command"
         Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"
         Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-384"
LabelText="ColorPicker"
Sequence="10"
ToolTipTitle="ColorPicker"
ToolTipDescription="Description of ColorPicker"
PopulateDynamically="false"
PopulateOnlyOnce="true"
PopulateQueryCommand="Ribbon.AppName.ColorPicker_Query_Command"
TemplateAlias="o2">
<Menu Id="Ribbon.AppName.ColorPicker.Menu">
<MenuSection
Id="Ribbon.AppName.ColorPicker.Menu.MenuSection"
Title="Custom ColorPicker">
<Controls Id="Ribbon.AppName.ColorPicker.Menu.MenuSection.Controls">
<ColorPicker
Id="Ribbon.AppName.ColorPicker.Menu.MenuSection.ColorPicker"
Command="Ribbon.AppName.ColorPicker.Menu.MenuSection.ColorPicker_CMD"
CommandPreview="Ribbon.AppName.ColorPicker.Menu.MenuSection.ColorPicker_PRE_CMD"
CommandRevert="Ribbon.AppName.ColorPicker.Menu.MenuSection.ColorPicker_REV_CMD" >
<Colors>
<Color Title="Light 1" Style="ms-rteThemeBackColor-1-0" DisplayColor="#ffffff" />
<Color Title="Dark 1" Style="ms-rteThemeBackColor-2-0" DisplayColor="#000000" />
<Color Title="Light 2" Style="ms-rteThemeBackColor-3-0" DisplayColor="#e9f5fa" />
<Color Title="Dark 2" Style="ms-rteThemeBackColor-4-0" DisplayColor="#33557b" />
<Color Title="Accent 1" Style="ms-rteThemeBackColor-5-0" DisplayColor="#00adee" />
<Color Title="Accent 2" Style="ms-rteThemeBackColor-6-0" DisplayColor="#ec008c" />
<Color Title="Accent 3" Style="ms-rteThemeBackColor-7-0" DisplayColor="#1d71b6" />
<Color Title="Accent 4" Style="ms-rteThemeBackColor-8-0" DisplayColor="#fd9f08" />
<Color Title="Accent 5" Style="ms-rteThemeBackColor-9-0" DisplayColor="#62ce33" />
<Color Title="Accent 6" Style="ms-rteThemeBackColor-10-0" DisplayColor="#fae032" />
<Color Title="Light 1 Lightest" Style="ms-rteThemeBackColor-1-1" DisplayColor="#f2f2f2" />
<Color Title="Dark 1 Lightest" Style="ms-rteThemeBackColor-2-1" DisplayColor="#7f7f7f" />
<Color Title="Light 2 Lightest" Style="ms-rteThemeBackColor-3-1" DisplayColor="#c1e3f1" />
<Color Title="Dark 2 Lightest" Style="ms-rteThemeBackColor-4-1" DisplayColor="#cfddeb" />
<Color Title="Accent 1 Lightest" Style="ms-rteThemeBackColor-5-1" DisplayColor="#c8f0ff" />
<Color Title="Accent 2 Lightest" Style="ms-rteThemeBackColor-6-1" DisplayColor="#ffc8e8" />
<Color Title="Accent 3 Lightest" Style="ms-rteThemeBackColor-7-1" DisplayColor="#cbe3f6" />
<Color Title="Accent 4 Lightest" Style="ms-rteThemeBackColor-8-1" DisplayColor="#feebcd" />
<Color Title="Accent 5 Lightest" Style="ms-rteThemeBackColor-9-1" DisplayColor="#e0f5d6" />
<Color Title="Accent 6 Lightest" Style="ms-rteThemeBackColor-10-1" DisplayColor="#fef8d6" />
<Color Title="Light 1 Lighter" Style="ms-rteThemeBackColor-1-2" DisplayColor="#d8d8d8" />
<Color Title="Dark 1 Lighter" Style="ms-rteThemeBackColor-2-2" DisplayColor="#595959" />
<Color Title="Light 2 Lighter" Style="ms-rteThemeBackColor-3-2" DisplayColor="#86c8e3" />
<Color Title="Dark 2 Lighter" Style="ms-rteThemeBackColor-4-2" DisplayColor="#a0bad8" />
<Color Title="Accent 1 Lighter" Style="ms-rteThemeBackColor-5-2" DisplayColor="#92e1ff" />
<Color Title="Accent 2 Lighter" Style="ms-rteThemeBackColor-6-2" DisplayColor="#ff91d2" />
<Color Title="Accent 3 Lighter" Style="ms-rteThemeBackColor-7-2" DisplayColor="#97c7ee" />
<Color Title="Accent 4 Lighter" Style="ms-rteThemeBackColor-8-2" DisplayColor="#fed89c" />
<Color Title="Accent 5 Lighter" Style="ms-rteThemeBackColor-9-2" DisplayColor="#c0ebad" />
<Color Title="Accent 6 Lighter" Style="ms-rteThemeBackColor-10-2" DisplayColor="#fef8d6" />
<Color Title="Light 1 Medium" Style="ms-rteThemeBackColor-1-3" DisplayColor="#bfbfbf" />
<Color Title="Dark 1 Medium" Style="ms-rteThemeBackColor-2-3" DisplayColor="#3f3f3f" />
<Color Title="Light 2 Medium" Style="ms-rteThemeBackColor-3-3" DisplayColor="#2c98c4" />
<Color Title="Dark 2 Medium" Style="ms-rteThemeBackColor-4-3" DisplayColor="#7098c4" />
<Color Title="Accent 1 Medium" Style="ms-rteThemeBackColor-5-3" DisplayColor="#5bd2ff" />
<Color Title="Accent 2 Medium" Style="ms-rteThemeBackColor-6-3" DisplayColor="#ff5abc" />
<Color Title="Accent 3 Medium" Style="ms-rteThemeBackColor-7-3" DisplayColor="#64abe6" />
<Color Title="Accent 4 Medium" Style="ms-rteThemeBackColor-8-3" DisplayColor="#fdc56a" />
<Color Title="Accent 5 Medium" Style="ms-rteThemeBackColor-9-3" DisplayColor="#b9de8c" />
<Color Title="Accent 6 Medium" Style="ms-rteThemeBackColor-10-3" DisplayColor="#fcec84" />
<Color Title="Light 1 Darker" Style="ms-rteThemeBackColor-1-4" DisplayColor="#a5a5a5" />
<Color Title="Dark 1 Darker" Style="ms-rteThemeBackColor-2-4" DisplayColor="#262626" />
<Color Title="Light 2 Darker" Style="ms-rteThemeBackColor-3-4" DisplayColor="#164c62" />
<Color Title="Dark 2 Darker" Style="ms-rteThemeBackColor-4-4" DisplayColor="#26405c" />
<Color Title="Accent 1 Darker" Style="ms-rteThemeBackColor-5-4" DisplayColor="#0081b2" />
<Color Title="Accent 2 Darker" Style="ms-rteThemeBackColor-6-4" DisplayColor="#b10069" />
<Color Title="Accent 3 Darker" Style="ms-rteThemeBackColor-7-4" DisplayColor="#155488" />
<Color Title="Accent 4 Darker" Style="ms-rteThemeBackColor-8-4" DisplayColor="#c27801" />
<Color Title="Accent 5 Darker" Style="ms-rteThemeBackColor-9-4" DisplayColor="#499b25" />
<Color Title="Accent 6 Darker" Style="ms-rteThemeBackColor-10-4" DisplayColor="#dbbf05" />
<Color Title="Light 1 Darkest" Style="ms-rteThemeBackColor-1-5" DisplayColor="#7f7f7f" />
<Color Title="Dark 1 Darkest" Style="ms-rteThemeBackColor-2-5" DisplayColor="#0c0c0c" />
<Color Title="Light 2 Darkest" Style="ms-rteThemeBackColor-3-5" DisplayColor="#081e27" />
<Color Title="Dark 2 Darkest" Style="ms-rteThemeBackColor-4-5" DisplayColor="#192a3e" />
<Color Title="Accent 1 Darkest" Style="ms-rteThemeBackColor-5-5" DisplayColor="#005677" />
<Color Title="Accent 2 Darkest" Style="ms-rteThemeBackColor-6-5" DisplayColor="#760046" />
<Color Title="Accent 3 Darkest" Style="ms-rteThemeBackColor-7-5" DisplayColor="#0e385b" />
<Color Title="Accent 4 Darkest" Style="ms-rteThemeBackColor-8-5" DisplayColor="#815001" />
<Color Title="Accent 5 Darkest" Style="ms-rteThemeBackColor-9-5" DisplayColor="#316819" />
<Color Title="Accent 6 Darkest" Style="ms-rteThemeBackColor-10-5" DisplayColor="#927f03" />
</Colors>
</ColorPicker>
</Controls>
</MenuSection>
</Menu>
</FlyoutAnchor>

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ff458441.aspx

1.1.1.4. Dynamic DropDown

Declarations

ID ToolTip Default
id Required. A string that identifies the control, such as "Ribbon.Library.Share.DynamicDropDown". AppName.DynamicDropDown
alt Optional. Alternative text for the button.
labeltext Optional. The text to label the control. DynamicDropDown
tooltiptitle Optional. The text that appears as the title of the tooltip. Title
tooltipdescription Optional. The text that appears in the body of the tooltip. Description
sequence Optional. An integer that specifies the order of placement among sibling XML nodes. 10

Snippet Code


<DropDown
Id="Ribbon.AppName.DynamicDropDown"
Alt=""
Command="Ribbon.AppName.DynamicDropDown_command"
CommandMenuOpen="Ribbon.AppName.DynamicDropDown_MenuOpen_command"
CommandMenuClose="Ribbon.AppName.DynamicDropDown_MenuClose_command"
PopulateDynamically="true"
PopulateOnlyOnce="false"
PopulateQueryCommand="Ribbon.$tabName$.$groupName$.$controlID$_PopulateQuery_CMD"
Width="125px"
         Sequence="10"
TemplateAlias="o2"
         ToolTipTitle="Title"
ToolTipDescription="Description">
</DropDown>

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ff458462.aspx

1.1.1.5. FlyoutAnchor

Declarations

ID ToolTip Default
id Required. A string that identifies the control, such as "Ribbon.Library.Share.FlyoutAnchor". AppName.FlyoutAnchor
alt Optional. Alternative text for the control. FlyoutAnchor
labeltext Optional. The text to label the control. FlyoutAnchor
sequence Optional. An integer that specifies the order of placement among sibling XML nodes. 10

Snippet Code

<FlyoutAnchor
Id="Ribbon.AppName.FlyoutAnchor"
Command="Ribbon.AppName.FlyoutAnchor_CMD"
Alt="FlyoutAnchor"
               Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"
               Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-384"
LabelText="FlyoutAnchor"
Sequence="10"
TemplateAlias="o2"
ToolTipTitle="FlyoutAnchor"
ToolTipDescription="FlyoutAnchor">
<Menu Id="Ribbon.AppName.FlyoutAnchor.Menu">
<MenuSection
Id="Ribbon.AppName.FlyoutAnchor.Menu.MenuSection"
Sequence="10"
Scrollable="false">
<Controls Id="Ribbon.AppName.FlyoutAnchor.Menu.MenuSection.Controls">
<Button
Id="Ribbon.AppName.FlyoutAnchor.Menu.MenuSection.Button1"
Sequence="10"
Command="Ribbon.AppName.FlyoutAnchor.Menu.MenuSection.Button1_CMD"
Alt="Ribbon.AppName.FlyoutAnchor.Menu.MenuSection.Button1_ALT"
                     Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"
                     Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-384"
LabelText="Button1"
MenuItemId="splitcellshorizontal"
/>
<Button
Id="Ribbon.AppName.FlyoutAnchor.Menu.MenuSection.Button2"
Sequence="20"
Command="Ribbon.AppName.FlyoutAnchor.Menu.MenuSection.Button2_CMD"
Alt="Ribbon.AppName.FlyoutAnchor.Menu.MenuSection.Button2_ALT"
                     Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"
                     Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-384"
LabelText="Button2"
MenuItemId="splitcellsvertical"
/>
</Controls>
</MenuSection>
</Menu>
</FlyoutAnchor>

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ff458372.aspx

1.1.1.6. Ribbon Gallery Flyout

Declarations

ID ToolTip Default
id Required. A string that identifies the control, such as "Ribbon.Library.Share.GalleryFlyout". AppName.GalleryFlyout
alt Optional. Alternative text for the control. GalleryFlyout
labeltext Optional. The text to label the control. GalleryFlyout
sequence Optional. An integer that specifies the order of placement among sibling XML nodes. 10

Snippet Code

<FlyoutAnchor
Id="Ribbon.AppName.GalleryFlyout"
Sequence="10"
Alt="GalleryFlyout"
LabelText="GalleryFlyout"
Command="Ribbon.AppName.GalleryFlyout_CMD"
PopulateDynamically="false"
PopulateOnlyOnce="true"
PopulateQueryCommand="Ribbon.AppName.GalleryFlyout_Query_CMD"
TemplateAlias="o2"
            Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"
            Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-384"
ToolTipTitle="GalleryFlyout"
ToolTipDescription="Style Gallery Flyout">
<Menu Id="Ribbon.AppName.GalleryFlyout.Menu">
<MenuSection Id="Ribbon.AppName.GalleryFlyout.Menu.MenuSection">
<Gallery
Id="Ribbon.AppName.GalleryFlyout.Menu.MenuSection.Gallery"
Command="Ribbon.AppName.GalleryFlyout.Menu.MenuSection.Gallery_CMD"
QueryCommand="Ribbon.AppName.GalleryFlyout.Menu.MenuSection.Gallery_Query_CMD"
CommandPreview="Ribbon.AppName.GalleryFlyout.Menu.MenuSection.Gallery_Preview_CMD"
CommandRevert="Ribbon.AppName.GalleryFlyout.Menu.MenuSection.Gallery_Revert_CMD"
ElementDimensions="Size96by72"
Width="4">
<GalleryButton
Id="Ribbon.AppName.GalleryFlyout.Menu.MenuSection.Gallery.GalleryButton1"
Alt="Ribbon.AppName.GalleryFlyout.Menu.MenuSection.Gallery.GalleryButton1_ALT"
InnerHTML="<div style='text-overflow:ellipsis'><div style='height:47px;overflow:hidden;white-space:nowrap'><img src='/_layouts/images/blank.gif' style='vertical-align:middle;height:47px;width:1px;'><span class='ms-rteStyle-1'>AaBbCcDdEeFfGgHhIiJjKkLlMm</span></div><div>Headline</div></div>"
Command="Ribbon.AppName.GalleryFlyout.Menu.MenuSection.Gallery.GalleryButton1_CMD"
CommandType="OptionSelection"
CommandPreview="Ribbon.AppName.GalleryFlyout.Menu.MenuSection.Gallery.GalleryButton1_Preview_CMD"
CommandRevert="Ribbon.AppName.GalleryFlyout.Menu.MenuSection.Gallery.GalleryButton1_Revert_CMD"/>
<GalleryButton
Id="Ribbon.AppName.GalleryFlyout.Menu.MenuSection.Gallery.GalleryButton2"
Alt="Ribbon.AppName.GalleryFlyout.Menu.MenuSection.Gallery.GalleryButton_ALT"
InnerHTML="<div style='text-overflow:ellipsis'><div style='height:47px;overflow:hidden;white-space:nowrap'><img src='/_layouts/images/blank.gif' style='vertical-align:middle;height:47px;width:1px;'><span class='ms-rteStyle-2'>AaBbCcDdEeFfGgHhIiJjKkLlMm</span></div><div>Subhead</div></div>"
Command="Ribbon.AppName.GalleryFlyout.Menu.MenuSection.Gallery.GalleryButton2_CMD"
CommandType="OptionSelection"
CommandPreview="Ribbon.AppName.GalleryFlyout.Menu.MenuSection.Gallery.GalleryButton2_Preview_CMD"
CommandRevert="Ribbon.AppName.GalleryFlyout.Menu.MenuSection.Gallery.GalleryButton2_Revert_CMD" />
</Gallery>
</MenuSection>
</Menu>
</FlyoutAnchor>

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ff458372.aspx

1.1.1.7. Label

Declarations

ID ToolTip Default
id Required. A string that identifies the control, such as "Ribbon.Library.Share.NewRibbonLabel". AppName.Label
alt Optional. Alternative text for the label. Label
labeltext Optional. The text to label the control. Label
tooltiptitle Optional. The text that appears as the title of the tooltip. Title
tooltipdescription Optional. The text that appears in the body of the tooltip. Description
sequence Optional. An integer that specifies the order of placement among sibling XML nodes. 10

Snippet Code

<Label
Id="Ribbon.AppName.Label"
LabelText="Label"
Command="Ribbon.AppName.Label.Label_command"
         Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"               
Sequence="10"
TemplateAlias="o2" />

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ff458414.aspx

1.1.1.8. MRUSplitButton

Declarations

ID ToolTip Default
id Required. A string that identifies the control, such as "Ribbon.Library.Share.NewRibbonMRUSplitButton". AppName.MRUSplitButton
alt Optional. Alternative text for the button. MRUSplitButton
labeltext Optional. The text to label the control. MRUSplitButton
tooltiptitle Optional. The text that appears as the title of the tooltip. Title
tooltipdescription Optional. The text that appears in the body of the tooltip. Description
sequence Optional. An integer that specifies the order of placement among sibling XML nodes. 10

Snippet Code

<MRUSplitButton
Id="Ribbon.AppName.MRUSplitButton"
Sequence="10"
Alt="MRUSplitButton"
Command="Ribbon.AppName.MRUSplitButton_CMD"
MenuCommand="Ribbon.AppName.MRUSplitButton_Menu_CMD"
InitialItem="Ribbon.AppName.MRUSplitButton.Button1"
TemplateAlias="o1"
ToolTipTitle="Title"
ToolTipDescription="Description">
<Menu Id="Ribbon.AppName.MRUSplitButton.Menu">
<MenuSection Id="Ribbon.AppName.MRUSplitButton.Menu.MenuSection" Sequence="10" DisplayMode="Menu32">
<Controls Id="Ribbon.AppName.MRUSplitButton.Menu.MenuSection.Controls">
<Button
Id="Ribbon.AppName.MRUSplitButton.Menu.MenuSection.Button1"
MenuItemId="Ribbon.AppName.MRUSplitButton.Button1"
Sequence="10"
Alt="Ribbon.AppName.MRUSplitButton.Menu.MenuSection.Button1_ALT"
CommandType="OptionSelection"
Command="Ribbon.AppName.MRUSplitButton.Menu.MenuSection.Button1_CMD"
CommandValueId="Ribbon.AppName.MRUSplitButton.Menu.MenuSection.Button1_ValueID_CMD"
                  Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"
                  Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-384"
LabelText="MRU_Btn1"/>
<Button
Id="Ribbon.AppName.MRUSplitButton.Menu.MenuSection.Button2"
MenuItemId="Ribbon.AppName.MRUSplitButton.Button2"
Sequence="20"
Alt="Ribbon.AppName.MRUSplitButton.Menu.MenuSection.Button2_ALT"
CommandType="OptionSelection"
Command="Ribbon.AppName.MRUSplitButton.Menu.MenuSection.Button2_CMD"
CommandValueId="Ribbon.AppName.MRUSplitButton.Menu.MenuSection.Button2_ValueID_CMD"
                  Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"
                  Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-384"
LabelText="MRU_Btn2"/>
</Controls>
</MenuSection>
</Menu>
</MRUSplitButton>

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ff458360.aspx

1.1.1.9. Spinner

Declarations

ID ToolTip Default
id Required. A string that identifies the control, such as "Ribbon.Library.Share.NewRibbonSpinner". AppName.Spinner
sequence Optional. An integer that specifies the order of placement among sibling XML nodes. 10

Snippet Code

<Spinner
Id="Ribbon.AppName.Spinner"
DefaultUnit="pixel"
DefaultValue="10"
AltUpArrow="Up"
AltDownArrow="Down"
AccelerationInterval="125"
MultiplierInterval="2000"
Command="Ribbon.AppName.Spinner_CMD"
TemplateAlias="o2"
Sequence="10">
<Unit
Name="pixel"
MinimumValue="1"
MaximumValue="2000"
DecimalDigits="0"
Interval="5">
<UnitAbbreviation Value="px" />
</Unit>
<Unit
Name="percent"
MinimumValue="1"
MaximumValue="100"
DecimalDigits="0"
Interval="1">
<UnitAbbreviation Value="%" />
</Unit>
</Spinner>

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ff458442.aspx

1.1.1.10. SplitButton

Declarations

ID ToolTip Default
id Required. A string that identifies the control, such as "Ribbon.Library.Share.NewRibbonSplitButton". AppName.SplitButton
alt Optional. Alternative text for the button. SplitButton
labeltext Optional. The text to label the control. SplitButton
tooltiptitle Optional. The text that appears as the title of the tooltip. Title
tooltipdescription Optional. The text that appears in the body of the tooltip. Description
sequence Optional. An integer that specifies the order of placement among sibling XML nodes. 10

Snippet Code

<SplitButton
Id="Ribbon.AppName.SplitButton"
Sequence="10"
Alt="SplitButton"
Command="Ribbon.AppName.SplitButton_CMD"
CommandMenuOpen="Ribbon.AppName.SplitButton_MenuOpen_CMD"
CommandMenuClose="Ribbon.AppName.SplitButton_MenuClose_CMD"
               Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"
               Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-384"
LabelText="SplitButton"
MenuAlt="Ribbon.AppName.SplitButton_Menu_ALT"
TemplateAlias="o1">
<Menu Id="Ribbon.AppName.SplitButton.Menu">
<MenuSection
Id="Ribbon.AppName.SplitButton.Menu.MenuSection"
DisplayMode="Menu"
Sequence="10">
<Controls Id="Ribbon.AppName.SplitButton.Menu.MenuSection.Controls">
<Button
Id="Ribbon.AppName.SplitButton.Menu.MenuSection.Button1"
Sequence="10"
Alt="Ribbon.AppName.SplitButton.Menu.MenuSection.Button1_ALT"
Command="Ribbon.AppName.SplitButton.Menu.MenuSection.Button1_CMD"
LabelText="SplitButton1"/>
<Button
Id="Ribbon.AppName.SplitButton.Menu.MenuSection.Button2"
Sequence="20"
Alt="Ribbon.AppName.SplitButton.Menu.MenuSection.Button2_ALT"
Command="Ribbon.AppName.SplitButton.Menu.MenuSection.Button2_CMD"
LabelText="SplitButton2"/>
</Controls>
</MenuSection>
</Menu>
</SplitButton>

Author

Torsten Mandelkow

HelpUrl

1.1.1.11. Static ComboBox

Declarations

ID ToolTip Default
id Required. A string that identifies the control, such as "Ribbon.Library.Share.NewRibbonStaticCombobBox". AppName.StaticComboBox
alt Optional. Alternative text for the button. StaticComboBox
sequence Optional. An integer that specifies the order of placement among sibling XML nodes. 10

Snippet Code

<ComboBox
Id="Ribbon.AppName.StaticComboBox"
Sequence="10"
Alt="StaticComboBox"
Command="Ribbon.AppName.StaticComboBox_CMD"
CommandMenuOpen="Ribbon.AppName.StaticComboBox_Open_CMD"
CommandMenuClose="Ribbon.AppName.StaticComboBox_MenuClose_CMD"
CommandPreview="Ribbon.AppName.StaticComboBox_Preview_CMD"
CommandPreviewRevert="Ribbon.AppName.StaticComboBox_PreviewRevert_CMD"
InitialItem="StaticComboButton1"
AllowFreeForm="false"
PopulateDynamically="false"
PopulateOnlyOnce="true"
PopulateQueryCommand="Ribbon.AppName.StaticComboBox_PopQuery_CMD"
Width="125px"
TemplateAlias="o2">
<Menu Id="Ribbon.AppName.StaticComboBox.Menu">
<MenuSection
Id="Ribbon.AppName.StaticComboBox.Menu.MenuSection"
Sequence="10">
<Controls Id="Ribbon.AppName.StaticComboBox.Menu.MenuSection.Controls">
<Button
Id="Ribbon.AppName.StaticComboBox.Menu.MenuSection.Button1"
Sequence="10"
Command="Ribbon.AppName.StaticComboBox.Menu.MenuSection.Button1_CMD"
CommandType="OptionSelection"
                     Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"
                     Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-384"
LabelText="StaticComboButton1"
MenuItemId="StaticComboButton1"/>
<Button
Id="Ribbon.AppName.StaticComboBox.Menu.MenuSection.Button2"
Sequence="20"
Command="Ribbon.AppName.StaticComboBox.Menu.MenuSection.Button2_CMD"
CommandType="OptionSelection"
                     Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"
                     Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-384"
LabelText="StaticComboButton2"
MenuItemId="StaticComboButton2"/>
</Controls>
</MenuSection>
</Menu>
</ComboBox>

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ff458425.aspx

1.1.1.12. Static DropDown

Declarations

ID ToolTip Default
id Required. A string that identifies the control, such as "Ribbon.Library.Share.NewRibbonStaticDropDown". AppName.StaticDropDown
alt Optional. Alternative text for the button. StaticDropDown
sequence Optional. An integer that specifies the order of placement among sibling XML nodes. 10

Snippet Code

<DropDown
Id="Ribbon.AppName.StaticDropDown"
Alt="StaticDropDown"
Sequence="10"
Command="Ribbon.AppName.StaticDropDown_CMD"
CommandMenuOpen="Ribbon.AppName.StaticDropDown_MenuOpen_CMD"
CommandMenuClose="Ribbon.AppName.StaticDropDown_MenuClose_CMD"
PopulateDynamically="false"
PopulateOnlyOnce="true"
PopulateQueryCommand="Ribbon.AppName.StaticDropDown_PopulateQuery_CMD"
InitialItem="StaticDropdownButton1"
Width="125px"
TemplateAlias="o2"
ToolTipTitle="Static DropDown"
ToolTipDescription="Static DropDown">
<Menu Id="Ribbon.AppName.StaticDropDown.Menu">
<MenuSection
Id="Ribbon.AppName.StaticDropDown.Menu.MenuSection"
Sequence="10">
<Controls Id="Ribbon.AppName.StaticDropDown.Menu.MenuSection.Controls">
<Button
Id="Ribbon.AppName.StaticDropDown.Menu.MenuSection.Button1"
Sequence="10"
Command="Ribbon.AppName.StaticDropDown.Menu.MenuSection.Button1_CMD"
CommandType="OptionSelection"
Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"
                     Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-384"
LabelText="StaticDropdownButton1"
MenuItemId="StaticDropdownButton1"/>
<Button
Id="Ribbon.AppName.StaticDropDown.Menu.MenuSection.Button2"
Sequence="20"
Command="Ribbon.AppName.StaticDropDown.Menu.MenuSection.Button2_CMD"
CommandType="OptionSelection"
Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"
                     Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-384"
LabelText="StaticDropdownButton2"
MenuItemId="StaticDropdownButton2"/>
</Controls>
</MenuSection>
</Menu>
</DropDown>

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ff458462.aspx

1.1.1.13. Table Flyout

Declarations

ID ToolTip Default
id Required. A string that identifies the control, such as "Ribbon.Library.Share.NewRibbonTableFlyout". AppName.TableFlyout
alt Optional. Alternative text for the control. TableFlyout
labeltext Optional. The text to label the control. TableFlyout
sequence Optional. An integer that specifies the order of placement among sibling XML nodes. 10

Snippet Code


<FlyoutAnchor
Id="Ribbon.AppName.TableFlyout"
Sequence="10"
Alt="TableFlyout"
LabelText="TableFlyout"
Command="Ribbon.AppName.TableFlyout_CMD"
PopulateDynamically="false"
PopulateOnlyOnce="true"
PopulateQueryCommand="Ribbon.AppName.TableFlyout_Query_CMD"
TemplateAlias="o2"
Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"
            Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-384"
ToolTipTitle="Table flyout"
ToolTipDescription="inserts a custom table">
<Menu Id="Ribbon.AppName.TableFlyout.Menu">
<MenuSection
Id="Ribbon.AppName.TableFlyout.Menu.MenuSection"
Title="Custom InsertTable">
<Controls Id="Ribbon.AppName.TableFlyout.Menu.MenuSection.Controls">
<InsertTable
Id="Ribbon.AppName.TableFlyout.Menu.MenuSection.InsertTable"
Sequence="10"
Alt="Insert a {0}x{1} Table"
Command="Ribbon.AppName.TableFlyout.Menu.MenuSection.InsertTable_CMD"
CommandPreview="Ribbon.AppName.TableFlyout.Menu.MenuSection.InsertTablePreview_CMD"
CommandRevert="Ribbon.AppName.TableFlyout.Menu.MenuSection.InsertTablePreviewRevert_CMD"
MenuSectionTitle="Custom Insert Table"
MenuSectionInitialTitle="InsertTable"/>
</Controls>
</MenuSection>
</Menu>
</FlyoutAnchor>

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ff458372.aspx

1.1.1.14. TextBox

Declarations

ID ToolTip Default
id Required. A string that identifies the control, such as "Ribbon.Library.Share.NewRibbonTextBox". AppName.TextBox
sequence Optional. An integer that specifies the order of placement among sibling XML nodes. 10

Snippet Code

<TextBox
Id="Ribbon.AppName.TextBox"
Sequence="10"
Command="Ribbon.AppName.TextBox_command"
MaxLength="512"
TemplateAlias="o2"/>

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ff458386.aspx

1.1.1.15. ToggleButton

Declarations

ID ToolTip Default
id Required. A string that identifies the control, such as "Ribbon.Library.Share.NewRibbonToggleButton". AppName.ToggleButton
alt Optional. Alternative text for the button. ToggleButton
labeltext Optional. The text to label the control. ToggleButton
tooltiptitle Optional. The text that appears as the title of the tooltip. Title
tooltipdescription Optional. The text that appears in the body of the tooltip. Description
sequence Optional. An integer that specifies the order of placement among sibling XML nodes. 10

Snippet Code

<ToggleButton
                  Id="Ribbon.AppName.ToggleButton"
                  Alt="ToggleButton"
                  Command="Ribbon.AppName.ToggleButton_command"
                  Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-64" Image16by16Left="-192"
                  Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-384"
                  LabelText="ToggleButton"
                  Sequence="10"
                  TemplateAlias="o2"
                  ToolTipTitle="Title"
                  ToolTipDescription="Description"/>

Author

Torsten Mandelkow

HelpUrl

http://msdn.microsoft.com/en-us/library/ff458393.aspx

1.1.3. SharePoint 2007

1.1.1.1. ContentType 2007

Declarations

ID ToolTip Default
ID Required Text. Specifies the content type ID of the content type. A content type ID has a very specific format. If the value that you assign the ID attribute is not in the correct format, you will get an error when the Feature activates. 0x01
Name Required Text. Specifies the content type name. The value can be a reference to a resource in the format $Resources:String. For more information, see Localizing SharePoint Solutions.The name itself cannot be longer than 128 characters. An error occurs if another content type with the same name exists in the collection where the content type is added. ContentType1
Description Optional Text. Provides a description for the content type, to display in the SharePoint Foundation user interface. The value can be a reference to a resource in the format $Resources:String.
FeatureId Optional Text. Provides the ID of the feature with which the content type is associated. The value should be the string representation of a GUID structure, including braces. 00000000-0000-0000-0000-000000000000
Group Optional Text. Specifies the content type group to which the content type is assigned. Content type groups are user-defined groups that help you organize content types into logical categories. The value can be a reference to a resource in the format $Resources:String.
Hidden Optional Boolean. TRUE to define the content type as hidden. If you define a content type as hidden, SharePoint Foundation does not display that content type on the New button in list views. If you do not include this attribute, SharePoint Foundation treats the content type as if the attribute was set to FALSE. FALSE
ReadOnly Optional Boolean. TRUE to specify that the content type cannot be edited without explicitly removing the read-only setting. This can be done either in the user interface or in code. FALSE
Sealed Optional Boolean. TRUE to prevent changes to this content type. You cannot change the value of this attribute through the user interface, but you can change it in code if you have sufficient rights. You must have site collection administrator rights to unseal a content type. FALSE
V2ListTemplateName Optional Text. Specifies the Windows SharePoint Services 2.0 list template type to which this content type maps. For example, the Document content type maps to the Document Library list template.
Version Reserved for future use. 0

Snippet Code

<ContentType          
ID=&