3

After adding a web part I always need to change the Chrome Type property from "default" to "none". Is there a way to make the default value be "none"?

Web Part properties > Appearance > Chrome Type: Default

2 Answers 2

4

You can make the change in the webpart element.xml file

<property name="ChromeType" type="chrometype">None</property>
2
  • Would he have to do that for every type of web part? Could you apply for adding libraries/lists to a web part page? Or is there a way to change it for every web part in the entire farm or site collection?
    – Erin L
    Commented Jun 8, 2016 at 21:14
  • This is for each webpart of the same type. For farm, site collection wide, I would have to look. Commented Jun 8, 2016 at 21:45
0

Bah, won't let me comment without 50 rep. In SP2013, when deploying via VisualStudio, I had to put the tag you gave in the .webpart file, not the elements file for the webpart.

Example: <?xml version="1.0" encoding="utf-8"?> <webParts> <webPart xmlns="http://schemas.microsoft.com/WebPart/v3"> <metaData> <type name="ConnectWebParts.Announcements.Announcements, $SharePoint.Project.AssemblyFullName$" /> <importErrorMessage>$Resources:core,ImportErrorMessage;</importErrorMessage> </metaData> <data> <properties> <property name="Title" type="string">Announcements</property> <property name="Description" type="string">Home Page Announcements Part</property> <property name="ChromeType" type="chrometype">None</property> </properties> </data> </webPart> </webParts>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.