This is an archive related to a previous version of Esri Maps for SharePoint. If you need the current version go to http://doc.arcgis.com/en/maps-for-sharepoint/.

Create a custom layout

Layouts allow you to change the look and feel of the Map Web Part. You can create your own custom layout for your Map Web Part by editing the DefaultLayout.xaml file in the Esri Maps Configuration Files document library.

The DefaultLayout.xaml file has the following restrictions:

  • You cannot reference other resource dictionaries; therefore, all styles need to be contained within the DefaultLayout.xaml file.
  • There is no title area and there are no toolbar containers in this layout, since all tools show up on the SharePoint ribbon.

You can also edit the DefaultLayout.xaml file to include custom controls such as a Chart control, overview map, and search text box. If you create a layout with a custom control, the .xap file containing the custom control's implementation needs to be added to the ArcGIS Mapping Extensions library.

The Map Web Part and ArcGIS Viewer for Silverlight share a common layout framework; therefore, you can adapt the content of any of the Viewer layouts into DefaultLayout.xaml, given the restrictions listed above.

The following steps show how to use the ArcGIS Viewer for Silverlight Visual Studio template to create a custom layout. First, create a new project with the Viewer template, and then customize one of the existing layouts as desired. For more information on the Viewer template, see Visual Studio template.

Create a new project

  1. Start Microsoft Visual Studio 2010 or 2012.
  2. Click File > New > Project. The New Project dialog box appears.
  3. In the New Project dialog box, expand Visual C# and expand the Silverlight node.
  4. Click ESRI Viewer under the Silverlight node and select ArcGIS Viewer for Silverlight Project
  5. Type a name for the add-in project in the Name text box and click OK.
    Create new ArcGIS Viewer for Silverlight project

    The Add-in solution loads with three projects: one containing add-in code, one containing layouts, and one containing a Viewer website. Each of these projects contains code and examples to help you get started creating custom tools, behaviors, and layouts.

    If there are any warnings, you may need to first compile the solution.

Create a custom layout

Once you have created a new Visual Studio project using the ArcGIS Viewer for Silverlight Project as described above, complete the following steps to create a custom layout:

  1. Download the DefaultLayout.xaml file from the Esri Maps Configuration Files document library. You may want to create a backup copy of the DefaultLayout.xaml file before proceeding.
  2. In the <ProjectName>.Layouts project of the solution you created previously, add the DefaultLayout.xaml file to the Config > Layouts folder.
  3. If desired, open the <ProjectName>.Layouts project in Microsoft Expression Blend to create your custom layout. You can have the project open in Microsoft Visual Studio and Microsoft Expression Blend at the same time.

  4. Once you have created the desired layout, add the DefaultLayout.xaml file to the ArcGIS Mapping Configuration Files document library.