0

I'm trying to add a ribbon in my project server site and it's working but I'm currently looking for a way to change my icon

Here the code I use:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="d6e0a4c1-19a9-4846-92fb-d0593aa3bbfc.myAppNewFormAction"
                RegistrationType="List"
                RegistrationId="115"
                Location="CommandUI.Ribbon"
                Sequence="10001"
                Title="New myApp Form">
    <CommandUIExtension>
      <!-- 
      Update the UI definitions below with the controls and the command actions
      that you want to enable for the custom action.
      -->
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.Documents.New.Controls._children">
          <Button Id="Ribbon.Documents.New.myAppNewFormActionButton"
                  Alt="New myApp Form"
                  Sequence="100"
                  Command="Invoke_myAppNewFormActionButtonRequest"
                  LabelText="New myApp Form"
                  TemplateAlias="o1"
                  Image32by32="Mysite/Pwa/ImageFolders/myAppLogoBug-onwhite-32.png"
                  Image16by16="Mysite/Pwa/ImageFolders/myAppLogoBug-onwhite-16.png" />
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler Command="Invoke_myAppNewFormActionButtonRequest"
                          CommandAction="~appWebUrl/Pages/Default.aspx?Action=New&amp;Source={Source}&amp;ListURLDir={ListUrlDir}"/>
      </CommandUIHandlers>
    </CommandUIExtension >
  </CustomAction>
</Elements>

So on my project server; I created a list in which I stored my image but it's not working, the icon shows me an empty case

Any idea of what I'm doing wrong?

0

Icon size should be 32 * 32 pixels. There are some rules related image size.

For more info visit here.

Also check file is published or not. Also check the file permissions. It's better to add image in masterpage gallery.

Thanks

  • My icon size is 32 * 32 pixels but there is something weird, if I remove the image, I still have an empty icon and not a red cross like it was the case before My image is published and I don't have the access for access the sharepoint site, this is why I publish it on my PWA website – Domiowa Mar 20 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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