0
추가 기능 및 리본의 초기화 순서는 무엇입니까? 추가 기능 개체는 항상 리본보다 먼저 생성됩니까? 아니면이 속성이 달라질 수 있습니까?Office 추가 기능 및 리본 : 초기화 순서?
추가 기능 및 리본의 초기화 순서는 무엇입니까? 추가 기능 개체는 항상 리본보다 먼저 생성됩니까? 아니면이 속성이 달라질 수 있습니까?Office 추가 기능 및 리본 : 초기화 순서?
리본은 IRibbonExtensibility
구현을 위해 addin 개체의 RequestService
메서드를 호출하여 만들어집니다.
따라서 addin은 이미 존재해야합니다. 리본 XML 템플릿에서
을 수행 할 수 있습니다 리본 CS 파일에서 다음이 :
public partial class ThisAddIn {
private RibbonManager ribbon;
///<summary>Returns an object that extends a feature in the 2007 Microsoft Office system.</summary>
///<param name="serviceGuid">A System.Guid that identifies an extensibility interface
///that is supported by applications in the 2007 Microsoft Office system.</param>
///<returns>An object that implements the extensibility interface that is identified by serviceGuid.</returns>
protected override object RequestService(Guid serviceGuid) {
if (!String.IsNullOrEmpty(JournalPath) && serviceGuid == typeof(IRibbonExtensibility).GUID) {
if (ribbon == null)
ribbon = new RibbonManager();
return ribbon;
}
return base.RequestService(serviceGuid);
}
}