문제

i done to create a custom tab and ribbon button in outlook addin using Ribbon(XML) in C#.

i want to change the ribbon button image when i click the button.how to i acheive that?

here my XML Design:

<?xml version="1.0" encoding="UTF-8"?>

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load" loadImage="GetCustomImage">

  <ribbon>

    <tabs>

      <tab id="TabAddIns" label="Mail Security">


        <group id="Group2" >

          <button id="Encrypt" onAction="Encrypt_Click" label="Encrypt" size="large" image="email-security.png" getVisible="Control_Visible" />


        </group>

      </tab>

    </tabs>

  </ribbon>

</customUI>

GetCustomImage Function:

public stdole.IPictureDisp GetCustomImage(string imageName)
        {

                return PictureConverter.ImageToPictureDisp(Properties.Resources.email_security);


        }

Actually i want to change the "Encrypt" Button image(email-security.png) into another one when after click that button.i have already try to call the GetCustomImage() in Encrypt button click.but its not working.

도움이 되었습니까?

해결책

You are not specifying getImage callback on the button XML element.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top