Introduction au mode Backstage Office 2010 pour les développeurs
Résumé : Microsoft Office 2010 introduit le mode Microsoft Office Backstage, la toute dernière innovation de l’interface utilisateur Office Fluent et une fonctionnalité associée au Ruban. Examinez les composants de Backstage et découvrez des scénarios montrant comment étendre Backstage dans différentes applications Office.
Dernière modification : vendredi 24 avril 2015
Frank Rice, Microsoft Corporation
Avril 2010
S’applique à : Excel 2010 | Office 2007 | Office 2010 | Open XML | PowerPoint 2010 | SharePoint Server 2010 | VBA | Word 2010
Sommaire
Présentation du mode Backstage de Microsoft Office Fluent
Glossaire des termes relatifs au mode Backstage
Composants du mode Backstage
Extensibilité du mode Backstage
Personnalisation de l’interface utilisateur Backstage à l’aide de fichiers Open XML
Personnalisation du mode Backstage en créant un complément COM partagé
Forum Aux Questions
Description, attributs et enfants des contrôles du mode Backstage
Conclusion
Ressources supplémentaires
Présentation du mode Backstage de Microsoft Office Fluent
Dans la version 2007 du système Microsoft Office, les fonctionnalités de niveau fichier étaient accessibles dans le menu Office, disponible en cliquant sur le bouton Office.
Dans Microsoft Office 2010, le bouton Office est remplacé par un onglet Fichier qui ouvre le mode Microsoft Office Backstage lorsque vous cliquez dessus. Le mode Backstage vous permet d’identifier et d’utiliser des fonctionnalités qui ne rentrent pas dans le cadre des fonctionnalités de création du Ruban. Le Ruban, la mini-barre d’outils et les galeries vous aident à travailler dans vos documents ; le mode Backstage vous aide à travailler avec vos documents.
Le mode Backstage est entièrement extensible par les développeurs ; autrement dit, les organisations peuvent personnaliser l’interface utilisateur en fonction de leurs propres besoins. Et mieux encore, l’interface utilisateur Backstage est personnalisable en utilisant les mêmes fichiers, rappels et contrôles que dans le Ruban. Ainsi, les développeurs déjà familiarisés avec la personnalisation de l’interface utilisateur du Ruban pourront aisément créer une interface utilisateur Backstage répondant aux besoins de leur organisation.
L’interface utilisateur Backstage existe dans toutes les applications Microsoft Office 2010 prenant en charge l’interface utilisateur Office Fluent : Microsoft Access 2010, Microsoft Excel 2010, Microsoft InfoPath 2010, Microsoft OneNote 2010, Microsoft PowerPoint 2010, Microsoft Project 2010, Microsoft Publisher 2010, Microsoft SharePoint Designer 2010, Microsoft Visio 2010 et Microsoft Word 2010. Les sections qui suivent décrivent la structure de la nouvelle interface utilisateur et examinent les détails dont vous avez besoin pour implémenter votre propre interface utilisateur Backstage personnalisée.
Glossaire des termes relatifs au mode Backstage
Les termes courants utilisés tout au long de cet article sont définis ci-dessous :
Mode Backstage Modèle d’interface utilisateur en plein écran qui affiche les fonctionnalités de niveau fichier pour le document actif. Il fait partie de l’interface utilisateur Microsoft Office Fluent, laquelle remplace le système antérieur de menus superposés, barres d’outils et volets Office.
Commande définitive Commande qui vous permet de repasser du mode Backstage au document. Lorsqu’elles sont appelées, les commandes définitives ferment le mode Backstage. Enregistrer, Enregistrer sous et Imprimer sont des exemples de commandes définitives.
Commande rapide Commande qui existe dans la barre de navigation de gauche et qui fournit un accès rapide à des fonctionnalités communes. Enregistrer, Enregistrer sous et Fermer sont des exemples de commandes rapides.
Onglet Page du mode Backstage qui est centrée sur une tâche particulière. Le mode Backstage est constitué d’un ensemble d’onglets de niveau supérieur. Le tout premier onglet est l’onglet par défaut. Si aucun emplacement n’est spécifié, les onglets personnalisés sont ajoutés tout en bas de la barre de navigation, sous tous les onglets existants et commandes rapides. Le mode Backstage peut contenir jusqu’à 255 onglets.
Groupe Conteneur d’interface utilisateur employé pour organiser les fonctionnalités connexes par groupes à l’intérieur des onglets du mode Backstage.
Composants du mode Backstage
Dans cette section, vous allez examiner les composants du mode Backstage. En observant la Figure 1, l’une des premières choses que vous noterez après avoir lancé une application Office 2010 est le nouvel onglet Fichier qui remplace le bouton Office. Le fait de cliquer sur l’onglet Fichier ouvre le mode Backstage. Vous pouvez également ouvrir le mode Backstage en appuyant sur les touches Alt + F.
Figure 1. Nouvel onglet Fichier
Sur le côté gauche du mode Backstage se trouve la barre de navigation avec des commandes rapides (comme Enregistrer et Ouvrir) et des onglets (comme Informations et Récent), comme illustré sur la Figure 2.
Figure 2. Mode Backstage
Les commandes rapides donnent accès à des tâches fréquemment utilisées qui ne sont pas associées explicitement à des onglets.
Un onglet regroupe les fonctionnalités associées à une tâche commune et les distribue sur une ou deux colonnes dans un jeu de groupes (comme Mode de compatibilité et Autorisations).
Extensibilité du mode Backstage
Le mode Backstage ne se limite pas à fournir aux utilisateurs une expérience enrichie en termes de fonctions de création et de sortie de documents ou encore de propriétés des documents. C’est dans ce mode que les services informatiques et les développeurs tiers se connectent pour fournir des fonctionnalités de gestion des documents. Le mode Backstage pourra être étendu dans différents cas de figure :
Un fournisseur de solution souhaite ajouter des données métier au mode Backstage :
Le fournisseur de solution peut souhaiter créer un onglet entièrement nouveau pour afficher une grande quantité d’informations sur le fichier actif.
Le fournisseur de solution peut souhaiter ajouter un groupe à un onglet existant (notamment à l’onglet Informations) afin de rendre les informations hautement visibles.
Un fournisseur de solution peut souhaiter exposer de nouvelles fonctionnalités dans le mode Backstage :
Le fournisseur de solution peut souhaiter créer un nouvel onglet centré sur cette fonctionnalité personnalisée (par exemple, la gestion du courrier indésirable).
Le fournisseur de solution peut souhaiter ajouter une fonctionnalité personnalisée à un onglet existant car cet onglet est le foyer logique de cette nouvelle fonctionnalité, ou l’utiliser comme commande rapide car elle sera utilisée fréquemment et peut être représentée par un seul bouton.
Les développeurs familiarisés avec l’extensibilité de l’interface utilisateur du Ruban devraient se sentir tout à fait à l’aise avec l’extensibilité du mode Backstage car les fichiers et structures utilisés sont sensiblement les mêmes. Les composants sont ajoutés au mode Backstage à l’aide de code XML et les fonctionnalités sont associées à ces composants à l’aide de procédures de rappel.
Notes
Pour plus d’informations sur l’extensibilité du Ruban, reportez-vous à la série d’articles en trois parties intitulée Customizing the 2007 Office Fluent Ribbon for Developers.
Définir le contenu et la structure du mode Backstage personnalisé via du code XML
À l’instar de l’interface utilisateur du Ruban, la structure et les composants du mode Backstage sont définis à l’aide de marquage XML. L’exemple suivant montre le format général d’un fichier de marquage XML qui personnalise le mode Backstage dans Word 2010. Les sections qui suivent décrivent ce marquage en détail. Ce marquage génère le mode Backstage personnalisé illustré dans la Figure 3.
Figure 3. Onglet Backstage personnalisé créé dans cet exemple
Notes
Le code XML utilisé pour modifier l’interface utilisateur du Ruban est également inclus pour montrer qu’il coexiste dans le même fichier XML que le marquage du mode Backstage.
<?xml version="1.0" encoding="utf-8" ?>
<customUI xmlns="https://schemas.microsoft.com/office/2009/07/customui" onLoad="OnLoad">
<backstage>
<tab id="testArea" insertAfterMso="TabInfo" label="Sample Scenarios" columnWidthPercent="30" >
<firstColumn>
<group id="grpOne" label="Group One" helperText="This is helper text for Group One">
<primaryItem>
<button id="firstButton" label="Primary Button" onAction="SampleCallback" />
</primaryItem>
<topItems>
<layoutContainer id="layoutOne" layoutChildren="vertical">
<editBox id="firstEBox" label="Sample Edit Box" text="This is sample text" alignLabel="topRight" />
<button id="sampleButton" label="Sample Definitive Button" isDefinitive="true" imageMso="FileDocumentInspect" />
</layoutContainer>
</topItems>
</group>
<group id="grpTwo" label="Group Two" visible="true" >
<primaryItem>
<menu id="menuOne" label="DropDown Menu">
<menuGroup id="menuGrpOne" >
<button id="btnOne" label="Button one" />
<button id="btnTwo" label="Button two" />
<checkBox id="chkBoxOne" label="Sample Check Box" />
</menuGroup>
</menu>
</primaryItem>
<topItems>
<editBox id="secondEBox" text="Disabled Edit Box" enabled="false"/>
<imageControl id="imgControlOne" imageMso="BlogHomePage"/>
<groupBox id="grpBox" label="Group Box with Check Boxes and Radio Group">
<checkBox id="chkBox1" label="A Check Box" />
<checkBox id="chkBox2" label="Disabled Check Box" enabled="false" />
<radioGroup id="rdoGrp" label="Nested Radio Group" >
<radioButton id="firstRadioBtn" label="1st Radio Button"/>
<radioButton id="secondRadioBtn" label="2nd Radio Button"/>
</radioGroup>
</groupBox>
</topItems>
</group>
</firstColumn>
<secondColumn>
<group id="grpThree" label="Group Three" visible="true">
<topItems>
<comboBox id="firstCBox" label="Sample Combo Box" >
<item id="itema" label="Cat"/>
<item id="itemb" label="Dog"/>
<item id="itemc" label="Fish"/>
</comboBox>
<layoutContainer id="layoutTwo" layoutChildren="vertical">
<editBox id="thirdEBox" label="Part of vertical layout" />
<editBox id="fourthEBox" label="Part of vertical layout" />
<editBox id="fifthEBox" label="Part of vertical layout" />
</layoutContainer>
<layoutContainer id="layoutThree" layoutChildren="horizontal">
<button id="anotherButton" label="Horizontal layout" imageMso="NewAppointment" />
<hyperlink id="hyperLink" label="You can place a link here"/>
<button id="lastButton" label="Horizontal layout" />
</layoutContainer>
</topItems>
</group>
</secondColumn>
</tab>
</backstage>
L’élément <backstage> délimite les structures personnalisées de l’interface utilisateur Backstage. D’un point de vue hiérarchique, l’élément <backstage> est l’un des quatre éléments de premier niveau autorisés à l’intérieur de l’élément <customUI>. Les autres éléments autorisés au même niveau sont <ribbon>, <contextMenus> et <commands>.
Dans l’élément <backstage>, il est possible d’héberger des commandes rapides (représentées par l’élément <button>) et des éléments <tab>. Dans cet exemple, le Backstage contient un seul élément <tab>. L’élément <tab> inclut plusieurs attributs comme les suivants :
id Identificateur de l’onglet.
insertAfterMso Identificateur de l’onglet intégré après lequel l’onglet personnalisé doit être inséré. Dans cet exemple, l’onglet personnalisé est ajouté après l’onglet Informations.
label Texte qui apparaît sur l’onglet. Dans cet exemple, l’étiquette de l’onglet est Sample Scenarios.
columnWidthPercent Spécifie la largeur de la première colonne dans la zone à onglets, sous forme de pourcentage. La largeur des deux colonnes totalise 100 % ; ainsi si la première colonne est définie sur 30 %, la seconde correspond à 70 % de la largeur totale.
L’onglet est nommé et placé après l’onglet intégré Informations.
Notes
Tous les attributs du marquage de personnalisation XML de l’interface utilisateur Microsoft Office Fluent utilisent la convention de casse mixte, qui met en majuscule le premier caractère de chaque mot, à l’exception du premier mot (comme dans onAction et insertBeforeMso).
Chaque élément <tab> peut avoir une ou deux colonnes. Dans le cas présent, l’onglet Sample Scenarios contient deux colonnes. Par ailleurs, chaque colonne peut héberger plusieurs éléments <group>. Dans cet exemple, la première colonne contient deux groupes (portant l’étiquette Groupe 1 et Groupe 2) et la seconde colonne un seul groupe (Groupe 3). L’élément <group> peut également avoir plusieurs attributs comme id, label, visible, enabled et helperText, pour n’en nommer que quelques-uns.
Notes
Vous trouverez la liste des éléments de contrôle avec leurs attributs associés, leurs enfants et d’autres informations plus loin dans cet article.
D’un point de vue conceptuel, les groupes personnalisés du Backstage sont similaires aux groupes du Ruban, avec deux différences notables. Premièrement, à la différence d’un groupe du Ruban, un groupe de Backstage n’est pas contraint de positionner son contenu sur exactement trois lignes (au maximum). Dans cet exemple, plusieurs éléments <layoutContainer> différents fournissent la structure et de riches fonctions de disposition, mais sans la limitation de trois lignes. Cet élément contient un attribut layoutChildren qui vous permet de spécifier si les objets enfants qu’il contient sont orientés horizontalement ou verticalement. Deuxièmement, à la différence d’un groupe du Ruban, un groupe de Backstage peut inclure plusieurs éléments <primaryItem> facultatifs, qui peuvent être soit un élément <button>, soit un élément <menu>. L’élément <primaryItem> détermine le point central de focus pour un groupe, lequel peut être un bouton (comme le bouton principal à l’intérieur de Groupe 1) ou un menu (comme le menu déroulant dans le Groupe 2).
Si vous observez l’élément <button> de l’exemple, l’un de ses attributs est isDefinitive. Lorsque cet attribut a la valeur True, le fait de cliquer sur le bouton déclenche son rappel, puis ferme le mode Backstage pour revenir au document. Si vous regardez la fin du code XML, vous pourrez observer différents composants définis avec des attributs variés. L’onglet personnalisé qui en résulte est similaire à celui de la Figure 3.
Utilisez des rappels pour ajouter des fonctionnalités
Pour reprendre l’exemple, lorsque vous cliquez sur le bouton, la sous-routine de rappel pointée dans l’attribut onAction est déclenchée. L’exemple suivant montre un rappel simple qui peut être déclenché à partir du bouton.
Sub SampleCallback(ByVal control As IRibbonControl)
MsgBox "You clicked the " & control.Id & " button. "
End Sub
Dans cette instance, lorsque la procédure est appelée, Microsoft Office insère un objet IRibbonControl qui représente le contrôle appelant. Les propriétés de l’objet IRibbonControl incluent les propriétés Id et Tag. Comme illustré dans le code, la propriété Id vous permet d’appeler la même procédure à partir de différents contrôles. Toutes les procédures de rappel prennent l’objet IRibbonControl et peuvent également inclure d’autres propriétés comme le statut d’un bouton bascule.
Les sections qui suivent montrent la procédure de personnalisation du mode Backstage au niveau des documents en modifiant un fichier au format Open XML, et au niveau des applications en utilisant le complément COM créé dans le code managé dans Microsoft Visual Studio. Pour la procédure de personnalisation du mode Backstage au niveau des documents, vous pouvez utiliser le code XML décrit dans la section précédente. Le complément COM utilise un code XML différent pour modifier le mode Backstage.
Personnalisation de l’interface utilisateur Backstage à l’aide de fichiers Open XML
Au niveau des documents, le processus de personnalisation de l’interface utilisateur Microsoft Office Fluent à l’aide du marquage XML comprend les étapes suivantes. Vous pouvez suivre cette procédure en utilisant le marquage XML décrit dans la section précédente.
Notes
Bien que vous deviez savoir ce qui se passe dans la structure du fichier Office Open XML, vous pouvez contourner cette procédure et tirer parti de l’Éditeur d’interface utilisateur personnalisé Microsoft Office 2007 (éventuellement en anglais). Cet outil vous permet d’ouvrir un document, d’insérer une interface utilisateur personnalisée (avec une partie ciblée sur Office 2007 ou Office 2010), puis d’enregistrer le document avec le marquage XML. Il réalise à votre place les étapes indiquées dans cet exemple. Cet outil vous permet également d’ajouter des icônes personnalisées au dossier customUI et facilite le référencement de ces icônes.
Pour définir le contenu et la structure du mode Backstage à l’aide de fichiers au format Open XML
Créez un dossier nommé customUI sur votre Bureau.
Créez le fichier de personnalisation dans un éditeur de texte quelconque en écrivant le marquage XML qui ajoute de nouveaux composants à l’interface utilisateur Microsoft Office Fluent, modifie des composants existants ou masque des composants. Utilisez le marquage XML de l’exemple utilisé précédemment dans cet article. Enregistrez le fichier sous le nom UIpersonnalisée14.xml dans le dossier que vous avez créé.
Validez le marquage XML par rapport au schéma personnalisé de l’interface utilisateur Microsoft Office Fluent (facultatif).
Créez un document dans Microsoft Word 2010 et enregistrez-le en tant que fichier Open XML prenant en charge les macros avec l’extension .docm. Vous devez enregistrer le document dans un format prenant en charge les macros si vous souhaitez ajouter du code qui réagit lorsque l’utilisateur interagit avec la personnalisation de l’interface utilisateur Microsoft Office Fluent.
Quittez Word.
Dans l’Explorateur Windows, ajoutez l’extension de nom de fichier .zip au nom de fichier du document, puis double-cliquez sur le fichier pour l’ouvrir en tant que dossier compressé.
Ajoutez le fichier de personnalisation au conteneur en faisant glisser le dossier customUI du Bureau vers le dossier .zip.
Faites glisser le dossier _rels du dossier .zip vers le Bureau. Un dossier nommé _rels contenant le fichier .rels apparaît sur le Bureau.
Ouvrez le nouveau dossier, puis ouvrez le fichier .rels dans un éditeur de texte.
Entre l’élément <Relationship> final et l’élément <Relationships> fermant, ajoutez le code qui crée une relation entre le fichier de document et le fichier de personnalisation, comme illustré dans l’exemple suivant. Veillez à spécifier les noms de fichier et de dossier corrects (l’attribut Id fournit un ID de relation unique pour le fichier customUI—sa valeur est arbitraire tant qu’elle reste unique).
<Relationship Type="https://schemas.microsoft.com/office/2010/relationships/ui/extensibility" Target="/customUI/customUI14.xml" Id="customUIRelID" />
Enregistrez le fichier .rels et faites-le glisser vers le dossier _rels dans le fichier compressé. Il remplace le fichier .rels existant.
Supprimez l’extension .zip, puis ouvrez le document.
Pour ajouter des rappels au classeur afin de donner la fonctionnalité Mode Backstage
Clique sur l’onglet Développeur, puis cliquez sur Visual Basic.
Notes
Si l’onglet Développeur n’est pas affiché, vous devez définir cette option. Pour ce faire, dans votre application, cliquez sur le bouton Microsoft Office, cliquez sur Options, puis sur Ruban. Dans la zone Réorganiser les commandes, sélectionnez l’option Développeur. Il s’agit là d’un paramètre global qui vous identifie en tant que développeur dans toutes les applications Office qui implémentent l’interface utilisateur Microsoft Office Fluent.
Dans Visual Basic Editor, double-cliquez sur ThisDocument pour ouvrir la fenêtre de code.
Tapez la fonction VBA comme indiqué dans l’exemple suivant.
Sub SampleCallback(ByVal control As IRibbonControl) MsgBox "You clicked the " & control.Id & " button. " End Sub
Enregistrez le document, puis fermez Visual Basic Editor.
Cliquez sur le bouton Microsoft Office, puis sur l’onglet Sample Scenarios.
Cliquez sur le bouton marqué Bouton principal. La Figure 4 illustre la boîte de dialogue.
Figure 4. Cette boîte de dialogue s’affiche après avoir cliqué sur le bouton Bouton principal
Personnalisation du mode Backstage en créant un complément COM partagé
Vous pouvez également utiliser des compléments COM pour modifier l’interface utilisateur Microsoft Office Fluent. Lorsque vous décidez de créer un complément COM qui contient une personnalisation de l’interface utilisateur et utilise du code managé, deux possibilités s’offrent à vous. Vous pouvez créer un complément COM standard en utilisant le modèle Complément partagé qui est inclus dans Microsoft Visual Studio 2008. Ou bien, si vous avez installé Microsoft Visual Studio 2005 Tools pour Office Second Edition, vous pouvez créer un complément COM qui présente différents avantages par rapport au complément partagé standard.
Parmi d’autres avantages, les compléments que vous créez à l’aide de Microsoft Visual Studio 2005 Tools pour Office Second Edition s’exécutent dans des domaines d’application séparés et le modèle de programmation de ces compléments est plus simple et plus facile à maintenir que celui utilisé par le modèle de complément partagé. Pour plus d’informations, voir Migration d’un complément partagé vers un complément Visual Studio 2005 Tools pour Office System Second Edition (éventuellement en anglais).
Malgré tout, dans la procédure qui suit, vous allez créer un complément Microsoft Word COM managé à l’aide d’un complément partagé standard. Pour plus d’informations sur la création d’une interface utilisateur Microsoft Office Fluent personnalisée à l’aide d’un complément COM partagé et à l’aide de Microsoft Visual Studio 2005 Tools pour Office Second Edition, voir l’article intitulé Personnalisation du Ruban Office 2007 Fluent pour les développeurs (partie 1 sur 3) (éventuellement en anglais).
Le complément COM crée l’onglet Backstage personnalisé illustré dans la Figure 5.
Figure 5. L’onglet Mode Backstage personnalisé montre différentes techniques avec des contrôles
Pour modifier l’interface utilisateur Microsoft Office Fluent en créant un complément COM partagé
Démarrez Microsoft Visual Studio 2008.
Dans le menu Fichier, pointez sur Nouveau, puis cliquez sur Projet.
Dans la boîte de dialogue Nouveau projet, dans le volet Types de projets, développez Autres types de projets, cliquez sur Extensibilité, puis sélectionnez Complément partagé.
Dans la zone Nom, tapez ComplémentCOMBackStage, puis cliquez sur OK pour créer le projet.
Dans la première page de l’Assistant Complément partagé, cliquez sur Suivant.
Dans la page Sélectionner un langage de programmation, sélectionnez Visual C# ou Visual Basic, puis cliquez sur Suivant.
Dans la page Sélectionner une application hôte, effacez toutes les sélections à l’exception de Microsoft Word, puis cliquez sur Suivant.
Dans la page Entrer un nom et une description, tapez le nom ComplémentCOMBackStage et la description Mise à jour du mode Backstage de Word, puis cliquez sur Suivant.
Dans la page Choisir les options du complément, sélectionnez Je souhaite que mon complément soit chargé en même temps que l’application hôte, cliquez sur Suivant, puis cliquez sur Terminer.
Visual Studio crée une solution contenant deux projets : le complément lui-même et un projet d’installation. (Le projet d’installation vous permet d’installer le complément sur l’ordinateur d’autres utilisateurs et au moment de la conception, facilite l’installation et la désinstallation du complément.)
Pour interagir avec Word 2010 et le modèle objet d’interface utilisateur Microsoft Office Fluent, vous devez avoir des références à des bibliothèques de types comme suit.
Pour ajouter des références à des bibliothèques de types
Dans l’Explorateur de solutions, développez le dossier Références. Si le dossier Références n’est pas affiché, dans le menu Projet, cliquez sur Afficher tous les fichiers.
Supprimez la référence Microsoft.Office.Core.
Cliquez avec le bouton droit sur le dossier Références, puis cliquez sur Ajouter une référence.
Cliquez sur l’onglet COM, sélectionnez Bibliothèque d’objets Microsoft Office 14.0, puis cliquez sur OK.
En haut de l’écran du code, ajoutez les instructions des exemples suivants.
Imports Office = Microsoft.Office.Core Imports Word = Microsoft.Office.Interop.Word
using Office = Microsoft.Office.Core; using Word = Microsoft.Office.Interop.Word;
Pour créer le fichier de personnalisation XML
Dans le menu Projet, cliquez sur Ajouter un nouvel élément.
Dans la boîte de dialogue Ajouter un nouvel élément, sélectionnez Fichier XML. Nommez le nouveau fichier UIpersonnalisée14.xml, puis cliquez sur Ajouter.
Dans le nouveau fichier XML, ajoutez le marquage XML comme indiqué dans l’exemple suivant.
<customUI xmlns="https://schemas.microsoft.com/office/2009/07/customui" onLoad="OnLoad"> <backstage> <tab id="testArea" label="Sample Scenarios" columnWidthPercent="30" insertAfterMso="TabInfo" visible="true" > <firstColumn> <group id="grpOne" label="Group One"> <primaryItem> <button id="btnSimToggleButton" label="Simulate Toggle Button" getImage="toggleImage" onAction="simToggleButton"/> </primaryItem> <topItems> <layoutContainer id="layoutOne" layoutChildren="vertical"> <editBox id="eboxTextTarget" label="Text From Button" getText="getToggledText" alignLabel="topRight" /> <button id="btnInsertText2Doc" label="Insert Text Into Document" isDefinitive="true" onAction="insertText2Doc"/> <editBox id="eboxTextSource" label="Gets Inserted into Document" text="Hello World" onChange="getInsertText"/> </layoutContainer> </topItems> </group> <group id="grpTwo" label="Group Two" getVisible="getInitGroupVisibility" > <primaryItem> <menu id="menuOne" label="Drop Down Menu"> <menuGroup id="menuGrpOne" > <button id="btnShowEditBox" getLabel="getHideShowEBoxLabel" onAction="showHideEditBox"/> <button id="menuButtonTwo" label="Swap Images" onAction="SwapImages"/> <checkBox id="chkEnableDisableEBox" getLabel="switchChkBoxLabel" onAction="chkEnable"/> </menuGroup> </menu> </primaryItem> <topItems> <editBox id="eboxEnabledDisabled" text="Hello World" getEnabled="getEBoxEnabledState"/> <editBox id="eboxShownHidden" text="See me now?" getVisible="getEBoxVisibility"/> <imageControl id="imgControlOne" getImage="getControlImage"/> <groupBox id="grpBox" label="Group Box"> <checkBox id="chkBox1" getLabel="getChkBox1Label" onAction="grpChkBox1Action"/> <checkBox id="chkBox2" getLabel="getChkBox2Label" onAction="grpChkBox2Action"/> <radioGroup id="rdoGrp" label="Nested Radio Group" getEnabled="getrdoEnableByChkBox" onAction="radioGrpAction"> <radioButton id="firstRadioBtn" label="1st Radio Button"/> <radioButton id="secondRadioBtn" label="2nd Radio Button"/> </radioGroup> </groupBox> <editBox id="eboxVisiblebyChkBox" text="See me" getVisible="getEBoxVisibleByChkBox"/> </topItems> </group> </firstColumn> <secondColumn> <group id="grpThree" label="Group Three" visible="true"> <topItems> <layoutContainer id="layoutTwo" layoutChildren="vertical"> <comboBox id="cboPopulateBox" label="Populate Edit Box" onChange="populateEBox"> <item id="item1" label="one"/> <item id="item2" label="two"/> <item id="item3" label="three"/> </comboBox> <editBox id="eboxPopulate" getLabel="getEBoxLabel" getText="getCBOXText"/> </layoutContainer> <layoutContainer id="layoutThree" layoutChildren="vertical"> <button id="btnHideGroup" getLabel="getHideGroupBtnLabel" onAction="hideGroup"/> </layoutContainer> </topItems> </group> </secondColumn> </tab> </backstage> </customUI>
Enregistrez et fermez le fichier.
Le fichier XML est plus facile à utiliser s’il est traité en tant que ressource dans le fichier de ressources du projet.
Pour ajouter le fichier XML en tant que ressource de projet
Dans l’Explorateur de solutions, sélectionnez UIpersonnalisée14.xml.
Dans la fenêtre Propriétés, sélectionnez la propriété Action de génération, puis sélectionnez Ressource incorporée dans la liste d’options.
Dans le menu Projet, cliquez sur Propriétés de ComplémentCOMBackStage.
Cliquez sur l’onglet Ressources.
Dans l’Explorateur de solutions, faites glisser UIpersonnalisée14.xml sur l’aire de conception Resources.
Cette action crée une nouvelle ressource reposant sur un fichier et renfermant le contenu XML. Désormais, le fichier UIpersonnalisée.xml est stocké automatiquement en tant que ressource d’application et vous pouvez récupérer son contenu à l’aide des fonctionnalités du langage Visual Basic ou Visual C#.
Fermez la fenêtre Ressources. Lorsque vous y êtes invité, cliquez sur Oui pour enregistrer la boîte de dialogue de ressources.
Pour accéder à l’application hôte et travailler en mode Backstage
Dans l’Explorateur de solutions, cliquez avec le bouton droit sur Connect.cs ou Connect.vb, puis cliquez sur Afficher le code.
Recherchez la déclaration existante pour la variable applicationObject et modifiez-la de sorte qu’elle fasse référence à un objet Word.Application. Autrement dit, modifiez la déclaration afin qu’elle se présente comme dans les exemples suivants.
Private applicationObject As Word.Application
private Word.Application applicationObject;
Modifiez la ligne existante dans la méthode OnConnection, qui crée une instance de l’objet Word.Application.
applicationObject = DirectCast(application, Word.Application)
applicationObject =(Word.Application)application;
(Visual Basic uniquement) Modifiez la ligne de code, près du haut de la classe, qui commence par Implements, en ajoutant la prise en charge de l’implémentation de l’espace de noms IRibbonExtensibility comme illustré dans l’exemple suivant et appuyez sur Entrée. Visual Basic insère automatiquement la procédure GetCustomUI.
Implements Extensibility.IDTExtensibility2, IRibbonExtensibility
(C# uniquement) À la fin de l’instruction public class Connect :, ajoutez une virgule et tapez le nom de l’interface, comme illustré dans l’exemple suivant.
IRibbonExtensibility
(C# uniquement) Cliquez avec le bouton droit sur l’interface que vous avez ajoutée, cliquez sur Implémenter l’interface, puis cliquez sur Implémenter l’interface explicitement. Une sous-procédure est alors ajoutée pour le seul membre de l’interface IRibbonExtensibility, à savoir GetCustomUI.
Modifiez la méthode GetCustomUI de manière à ce qu’elle se présente comme dans l’exemple suivant.
Public Function GetCustomUI(ByVal RibbonID As String) As String Implements Microsoft.Office.Core.IRibbonExtensibility.GetCustomUI Return OutSpaceCOMAddin.My.Resources.customUI14 End Function
string IRibbonExtensibility.GetCustomUI(string RibbonID) { return SpecStatusResource.customUI14; }
Important
La méthode GetCustomUI est implémentée afin de retourner la chaîne XML de votre personnalisation de l’interface utilisateur et ne doit pas être utilisée pour l’initialisation. En particulier, vous ne devez pas essayer d’afficher une quelconque boîte de dialogue ou fenêtre de message dans votre implémentation GetCustomUI. L’endroit le plus approprié pour effectuer l’initialisation est dans la méthode OnConnection (pour les compléments partagés) ou dans la méthode ThisAddIn_Startup (pour les compléments créés à l’aide de Microsoft Visual Studio 2005 Tools pour Office Second Edition.
Ajoutez la méthode suivante à la classe. Cette méthode est appelée lorsque l’interface utilisateur du Ruban est chargée. Elle crée une variable référençant l’interface utilisateur, puis repeint le Ruban.
Private myRibbon As Office.IRibbonUI Sub OnLoad(ByVal ribbon As Office.IRibbonUI) myRibbon = ribbon myRibbon.Invalidate() End Sub
IRibbonUI myRibbon; public void OnLoad(IRibbonUI ribbon) { myRibbon = ribbon; myRibbon.Invalidate(); }
Forum Aux Questions
Vous trouverez ci-après la liste des questions fréquemment posées sur le mode Backstage.
Combien d’onglets personnalisés puis-je ajouter au maximum au mode Backstage ?
La limite maximale est de 255 onglets.Puis-je indiquer où ajouter un onglet ?
Vous pouvez indiquer si un onglet personnalisé est affiché avant ou après un onglet existant.Puis-je réorganiser les onglets existants ?
Vous ne pouvez pas réorganiser les onglets existants. Vous pouvez uniquement spécifier l’ordre relatif des onglets en insérant un onglet avant ou après un autre onglet.Puis-je modifier la disposition des colonnes d’un onglet existant ?
Vous ne pouvez pas modifier la disposition des colonnes d’un onglet existant que vous n’avez pas créé.Où puis-je ajouter des groupes ?
Vous pouvez ajouter un nouveau groupe à toute colonne d’un onglet existant. Vous pouvez également spécifier si le nouveau groupe est affiché avant ou après un groupe existant. Mais, vous ne pouvez pas ajouter des groupes à des onglets qui contiennent un taskFormGroup, comme l’onglet Partage.Puis-je réorganiser des groupes existants ?
Vous ne pouvez pas réorganiser des groupes existants. Vous ne pouvez que spécifier l’ordre relatif des nouveaux groupes que vous créez.Lorsque j’ajoute plusieurs compléments COM qui modifient le Backstage à une application Microsoft Office, comment savoir dans quel ordre ils sont implémentés ?
L’ordre de précédence entre des modifications concurrentes est que la dernière chargée l’emporte.
Description, attributs et enfants des contrôles du mode Backstage
La référence XML suivante contient des détails sur les contrôles qui sont inclus dans le mode Backstage.
Backstage
Représente l’élément <backstage>
Attribut |
Type |
Signature de rappel |
---|---|---|
onShow |
Rappel |
VBA : Sub OnShow(contextObject As Object) C# : void OnShow(object contextObject) Visual Basic : Sub OnShow(contextObject As Object) C++ : HRESULT OnShow([in] Object *pContextObject) |
onHide |
Rappel |
VBA : Sub OnHide(contextObject As Object) C# : void OnHide(object contextObject) Visual Basic : Sub OnHide(contextObject As Object) C++ : HRESULT OnHide([in] Object *pContextObject) |
Enfants : tab, button
Bouton
Représente un contrôle button.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
Id |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
*expand |
Chaîne |
Non applicable |
*layout |
Chaîne |
Non applicable |
tag |
Chaîne |
Non applicable |
*insertAfterMso |
Nom intégré (chaîne) |
Non applicable |
*insertBeforeMso |
Nom intégré (chaîne) |
Non applicable |
*insertAfterQ |
Nom qualifié (chaîne) |
Non applicable |
*insertBeforeQ |
Nom qualifié (chaîne) |
Non applicable |
*description |
Chaîne |
Non applicable |
*getDescription |
Rappel |
VBA : Sub GetDescription(control As IRibbonControl, ByRef returnedVal) C# : string GetDescription(IRibbonControl control) Visual Basic : Function GetDescription(control As IRibbonControl) As String C++ : HRESULT GetDescription([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
enabled |
Booléen |
Non applicable |
getEnabled |
Rappel |
VBA : Sub GetEnabled(control As IRibbonControl, ByRef returnedVal) C# : bool GetEnabled(IRibbonControl control) Visual Basic : Function GetEnabled(control As IRibbonControl) as Boolean C++ : HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
visible |
Booléen |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : Function GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
keytip |
Jeton |
Non applicable |
getKeytip |
Rappel |
VBA : Sub GetKeytip(control As IRibbonControl, ByRef returnedVal) C# : string GetKeytip(IRibbonControl control) Visual Basic : Function GetKeytip(control As IRibbonControl) As String C++ : HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
*screentip |
Chaîne |
Non applicable |
*getScreentip |
Rappel |
VBA : Sub GetScreentip(control As IRibbonControl, ByRef returnedVal) C# : string GetScreentip(IRibbonControl control) Visual Basic: Function GetScreentip(control As IRibbonControl) As String C++ : HRESULT GetScreentip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
*supertip |
Chaîne |
Non applicable |
*getSupertip |
Rappel |
VBA : Sub GetSupertip(control As IRibbonControl, ByRef returnedVal) C# : string GetSupertip(IRibbonControl control) Visual Basic : Function GetSupertip(control As IRibbonControl) As String C++ : HRESULT GetSupertip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
onAction |
Rappel |
VBA : Sub OnAction(control As IRibbonControl) C# : void OnAction(IRibbonControl control) Visual Basic : Sub OnAction(control As IRibbonControl) C++ : HRESULT OnAction([in] IRibbonControl *pControl) |
isDefinitive |
Booléen |
Non applicable |
image |
Chaîne |
Non applicable |
imageMso |
Nom intégré (chaîne) |
Non applicable |
getImage |
Rappel |
VBA : Sub GetImage(control As IRibbonControl, ByRef returnedBitmap) C# : Bitmap GetImage(IRibbonControl control) Visual Basic : Function GetImage(control As IRibbonControl) As Bitmap C++ : HRESULT GetImage([in] IRibbonControl *pControl, [out, retval] IPictureDisp ** ppdispImage) |
* Non utilisé dans toutes les implémentations
Enfants : Aucun
Catégorie
Représente un conteneur category.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
visible |
Booléen |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : Function GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
Enfant : task
Case à cocher
Représente un contrôle checkBox.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
Id |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
*expand |
Chaîne |
Non applicable |
*layout |
Chaîne |
Non applicable |
enabled |
Booléen |
Non applicable |
getEnabled |
Rappel |
VBA : Sub GetEnabled(control As IRibbonControl, ByRef returnedVal) C# : bool GetEnabled(IRibbonControl control) Visual Basic : Function GetEnabled(control As IRibbonControl) as Boolean C++ : HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
visible |
Booléen |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : Function GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
keytip |
Jeton |
Non applicable |
getKeytip |
Rappel |
VBA : Sub GetKeytip(control As IRibbonControl, ByRef returnedVal) C# : string GetKeytip(IRibbonControl control) Visual Basic : Function GetKeytip(control As IRibbonControl) As String C++ : HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
onAction |
Rappel |
VBA : Sub OnAction(control As IRibbonControl, isPressed As Boolean) C# : void OnAction(IRibbonControl control, bool isPressed) Visual Basic : Sub OnAction(control As IRibbonControl, isPressed As Boolean) C++ : HRESULT OnAction([in] IRibbonControl *pControl, [in] BSTR VARIANT_BOOL *pvarPressed) |
getPressed |
Rappel |
VBA : Sub GetPressed(control As IRibbonControl, ByRef returnedVal) C# : bool GetPressed(IRibbonControl control) Visual Basic : Function GetPressed(control As IRibbonControl) As Boolean C++ : HRESULT GetPressed([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
description |
Chaîne |
Non applicable |
getDescription |
Rappel |
VBA : Sub GetDescription(control As IRibbonControl, ByRef returnedVal) C# : string GetDescription(IRibbonControl control) Visual Basic : Function GetDescription(control As IRibbonControl) As String C++ : HRESULT GetDescription([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
*screentip |
Chaîne |
Not applicable |
*getScreentip |
Rappel |
VBA : Sub GetScreentip(control As IRibbonControl, ByRef returnedVal) C# : string GetScreentip(IRibbonControl control) Visual Basic: Function GetScreentip(control As IRibbonControl) As String C++ : HRESULT GetScreentip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
*supertip |
Chaîne |
Non applicable |
*getSupertip |
Rappel |
VBA : Sub GetSupertip(control As IRibbonControl, ByRef returnedVal) C# : string GetSupertip(IRibbonControl control) Visual Basic : Function GetSupertip(control As IRibbonControl) As String C++ : HRESULT GetSupertip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
* Non utilisé dans toutes les implémentations
Enfants : Aucun
Zone de liste déroulante
Représente un contrôle comboBox.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
alignLabel |
Chaîne |
Non applicable |
expand |
Chaîne |
Non applicable |
layout |
Chaîne |
Non applicable |
enabled |
Booléen |
Non applicable |
getEnabled |
Rappel |
VBA : Sub GetEnabled(control As IRibbonControl, ByRef returnedVal) C# : bool GetEnabled(IRibbonControl control) Visual Basic : Function GetEnabled(control As IRibbonControl) as Boolean C++ : HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
getItemCount |
Rappel |
VBA : Sub GetItemCount(control As IRibbonControl, ByRef returnedVal) C# : int GetItemCount(IRibbonControl control) Visual Basic : Function GetItemCount(control As IRibbonControl) as Integer C++ : HRESULT GetItemCount([in] IRibbonControl *pControl, [out, retval] LONG *returnedVal) |
getItemID |
Rappel |
VBA : Sub GetItemID(control As IRibbonControl, itemIndex as Integer, ByRef returnedVal) C# : string GetItemID(IRibbonControl control, int itemIndex) Visual Basic : Function GetItemID(control As IRibbonControl, itemIndex as Integer) as String C++ : HRESULT GetItemID([in] IRibbonControl *pControl, [in] LONG cIndex, [out, retval] BSTR *pbstrReturnedVal) |
getItemLabel |
Rappel |
VBA : Sub GetItemLabel(control As IRibbonControl, itemIndex as Integer, ByRef returnedVal) C# : string GetItemLabel(IRibbonControl control, int itemIndex) Visual Basic : Function GetItemLabel(control As IRibbonControl, itemIndex as Integer) as String C++ : HRESULT GetItemLabel([in] IRibbonControl *pControl, [in] LONG cIndex, [out, retval] BSTR *pbstrReturnedVal) |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
visible |
Booléen |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : Function GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
onChange |
Rappel |
VBA : Sub OnChange(control As IRibbonControl, text As String) C# : void OnChange(IRibbonControl control, string text) Visual Basic : Sub OnChange(control As IRibbonControl, text As String) C++ : HRESULT OnChange([in] IRibbonControl *pControl, [in] BSTR *pbstrText) |
keytip |
Jeton |
Non applicable |
getKeytip |
Rappel |
VBA : Sub GetKeytip(control As IRibbonControl, ByRef returnedVal) C# : string GetKeytip(IRibbonControl control) Visual Basic : Function GetKeytip(control As IRibbonControl) As String C++ : HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
sizeString |
Chaîne |
Non applicable |
getText |
Rappel |
VBA : Sub GetText(control As IRibbonControl, ByRef returnedVal) C# : string GetText(IRibbonControl control) Visual Basic : Function GetText(control As IRibbonControl) As String C++ : HRESULT GetText([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
Enfant : item
customUI
Balise racine de toutes les personnalisations de l’interface utilisateur Fluent.
Attribut |
Type |
Signature de rappel |
---|---|---|
onLoad |
Rappel |
VBA : Sub OnLoad(ribbon As IRibbonUI) C# : void OnLoad(IRibbonUI ribbon) Visual Basic : Sub OnLoad(ribbon As IRibbonUI) C++ : HRESULT OnLoad([in] IRibbonUI *pRibbon) |
loadImage |
Rappel |
VBA : Sub LoadImage(imageId As String, ByRef image) C# : IPictureDisp LoadImage(string image_id) Visual Basic : Function LoadImage(imageId As String) As IPictureDisp C++ : HRESULT LoadImage([in] BSTR *pbstrImageId, [out, retval] IPictureDisp ** ppdispImage) *pRibbon) |
Enfants : commandes, Ruban, Backstage
Élément déroulant
Représente un contrôle dropDown.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
expand |
Chaîne |
Non applicable |
layout |
Chaîne |
Non applicable |
enabled |
Booléen |
Non applicable |
getEnabled |
Rappel |
VBA : Sub GetEnabled(control As IRibbonControl, ByRef returnedVal) C# : bool GetEnabled(IRibbonControl control) Visual Basic : Function GetEnabled(control As IRibbonControl) as Boolean C++ : HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
getItemCount |
Rappel |
VBA : Sub GetItemCount(control As IRibbonControl, ByRef returnedVal) C# : int GetItemCount(IRibbonControl control) Visual Basic : Function GetItemCount(control As IRibbonControl) as Integer C++ : HRESULT GetItemCount([in] IRibbonControl *pControl, [out, retval] LONG *returnedVal) |
getItemID |
Rappel |
VBA : Sub GetItemID(control As IRibbonControl, itemIndex as Integer, ByRef returnedVal) C# : string GetItemID(IRibbonControl control, int itemIndex) Visual Basic : Function GetItemID(control As IRibbonControl, itemIndex as Integer) as String C++ : HRESULT GetItemID([in] IRibbonControl *pControl, [in] LONG cIndex, [out, retval] BSTR *pbstrReturnedVal) |
getItemLabel |
Rappel |
VBA : Sub GetItemLabel(control As IRibbonControl, itemIndex as Integer, ByRef returnedVal) C# : string GetItemLabel(IRibbonControl control, int itemIndex) Visual Basic : Function GetItemLabel(control As IRibbonControl, itemIndex as Integer) as String C++ : HRESULT GetItemLabel([in] IRibbonControl *pControl, [in] LONG cIndex, [out, retval] BSTR *pbstrReturnedVal) |
getSelectedItemIndex |
Rappel |
VBA : Sub GetSelectedItemIndex(control As IRibbonControl, ByRef returnedVal) C# : int GetSelectedItemIndex(IRibbonControl control) Visual Basic : Function GetSelectedItemIndex(control As IRibbonControl) as Integer C++ : HRESULT GetSelectedItemIndex([in] IRibbonControl *pControl, [out, retval] LONG *returnedVal) |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
visible |
Booléen |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : Function GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
onAction |
Rappel |
VBA : Sub OnAction(control As IRibbonControl, itemID As String, itemIndex As Integer) C# : void OnAction(IRibbonControl control, string itemID, int itemIndex) Visual Basic : Sub OnAction(control As IRibbonControl, itemID As String, itemIndex As Integer) C++ : HRESULT OnAction([in] IRibbonControl *pControl, [in] BSTR *selectedID, [in] LONG cSelectedIndex) |
keytip |
Jeton |
Non applicable |
getKeytip |
Rappel |
VBA : Sub GetKeytip(control As IRibbonControl, ByRef returnedVal) C# : string GetKeytip(IRibbonControl control) Visual Basic : Function GetKeytip(control As IRibbonControl) As String C++ : HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
sizeString |
Chaîne |
Non applicable |
screentip |
Chaîne |
Non applicable |
getScreentip |
Rappel |
VBA : Sub GetScreentip(control As IRibbonControl, ByRef returnedVal) C# : string GetScreentip(IRibbonControl control) Visual Basic: Function GetScreentip(control As IRibbonControl) As String C++ : HRESULT GetScreentip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
supertip |
Chaîne |
Non applicable |
getSupertip |
Rappel |
VBA : Sub GetSupertip(control As IRibbonControl, ByRef returnedVal) C# : string GetSupertip(IRibbonControl control) Visual Basic : Function GetSupertip(control As IRibbonControl) As String C++ : HRESULT GetSupertip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
Enfant : item
Zone d’édition
Représente un contrôle editBox.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
alignLabel |
Chaîne |
Non applicable |
enabled |
Booléen |
Non applicable |
getEnabled |
Rappel |
VBA : Sub GetEnabled(control As IRibbonControl, ByRef returnedVal) C# : bool GetEnabled(IRibbonControl control) Visual Basic : Function GetEnabled(control As IRibbonControl) as Boolean C++ : HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
expand |
Chaîne |
Non applicable |
layout |
Chaîne |
Non applicable |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
keytip |
Jeton |
Non applicable |
getKeytip |
Rappel |
VBA : Sub GetKeytip(control As IRibbonControl, ByRef returnedVal) C# : string GetKeytip(IRibbonControl control) Visual Basic : Function GetKeytip(control As IRibbonControl) As String C++ : HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
maxLength |
Entier positif |
Non applicable |
onChange |
Rappel |
VBA : Sub OnChange(control As IRibbonControl, text As String) C# : void OnChange(IRibbonControl control, string text) Visual Basic : Sub OnChange(control As IRibbonControl, text As String) C++ : HRESULT OnChange([in] IRibbonControl *pControl, [in] BSTR *pbstrText) |
sizeString |
Chaîne |
Non applicable |
getText |
Rappel |
VBA : Sub GetText(control As IRibbonControl, ByRef returnedVal) C# : string GetText(IRibbonControl control) Visual Basic : Function GetText(control As IRibbonControl) As String C++ : HRESULT GetText([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
visible |
Booléen |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : Function GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
Enfants : Aucun
Groupe
Représente le conteneur group.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
insertAfterMso |
Nom intégré (chaîne) |
Non applicable |
insertBeforeMso |
Nom intégré (chaîne) |
Non applicable |
insertAfterQ |
Nom qualifié (chaîne) |
Non applicable |
insertBeforeQ |
Nom qualifié (chaîne) |
Non applicable |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
visible |
Booléen |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : Function GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
getStyle |
Rappel |
VBA : Sub GetStyle(control As IRibbonControl, ByRef returnedVal) C# : BackstageGroupStyle GetStyle(IRibbonControl control) Visual Basic : Function GetStyle(control As IRibbonControl) As BackstageGroupStyle C++ : HRESULT GetStyle([in] IRibbonControl *pControl, [out, retval] BackstageGroupStyle *pbstrReturnedVal) |
helperText |
Chaîne |
Non applicable |
getHelperText |
VBA : Sub GetHelperText(control As IRibbonControl, ByRef returnedVal) C# : string GetHelperText(IRibbonControl control) Visual Basic : Function GetHelperText(control As IRibbonControl) As String C++ : HRESULT GetHelperText([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
|
showLabel |
Booléen |
Non applicable |
getShowLabel |
Rappel |
VBA : Sub GetShowLabel(control As IRibbonControl, ByRef returnedVal) C# : bool GetShowLabel(IRibbonControl control) Visual Basic : Function GetShowLabel(control As IRibbonControl) As Boolean C++ : HRESULT GetShowLabel([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
Enfants : primaryItem, topItems, bottomItems
Zone de groupe
Représente le conteneur groupBox.
Attributs :
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
expand |
Chaîne |
Non applicable |
layout |
Chaîne |
Non applicable |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
Enfants : button, checkbox, editBox, dropdown, radioGroup, comboBox, hyperlink, labelControl, groupBox, layoutContainer, imageControl
Lien hypertexte
Représente un contrôle hyperlink.
Attributs :
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
alignLabel |
Chaîne |
Non applicable |
expand |
Chaîne |
Non applicable |
enabled |
Booléen |
Non applicable |
getEnabled |
Rappel |
VBA : Sub GetEnabled(control As IRibbonControl, ByRef returnedVal) C# : bool GetEnabled(IRibbonControl control) Visual Basic : Function GetEnabled(control As IRibbonControl) as Boolean C++ : HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
keytip |
Jeton |
Non applicable |
getKeytip |
Rappel |
VBA : Sub GetKeytip(control As IRibbonControl, ByRef returnedVal) C# : string GetKeytip(IRibbonControl control) Visual Basic : Function GetKeytip(control As IRibbonControl) As String C++ : HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
layout |
Chaîne |
Non applicable |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
target |
Chaîne |
Non applicable |
getTarget |
Rappel |
VBA : Sub GetTarget(control As IRibbonControl, ByRef returnedVal) C# : string GetTarget(IRibbonControl control) Visual Basic : Function GetTarget(control As IRibbonControl) As String C++ : HRESULT GetTarget([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
visible |
Booléen |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : Function GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
Enfants : Aucun
Contrôle Image
Représente un contrôle imageControl.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
enabled |
Booléen |
Non applicable |
getEnabled |
Rappel |
VBA : Sub GetEnabled(control As IRibbonControl, ByRef returnedVal) C# : bool GetEnabled(IRibbonControl control) Visual Basic : Function GetEnabled(control As IRibbonControl) as Boolean C++ : HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
image |
Chaîne |
Non applicable |
imageMso |
Nom intégré (chaîne) |
Non applicable |
getImage |
Rappel |
VBA : Sub GetImage(control As IRibbonControl, ByRef returnedBitmap) C# : Bitmap GetImage(IRibbonControl control) Visual Basic : Function GetImage(control As IRibbonControl) As Bitmap C++ : HRESULT GetImage([in] IRibbonControl *pControl, [out, retval] IPictureDisp ** ppdispImage) |
visible |
Booléen |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : Function GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
Enfants : Aucun
Élément
Réprésente l’élément dans un contrôle dropDown ou comboBox control.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
Enfants : Aucun
Contrôle étiquette
Représente un contrôle labelControl.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
alignLabel |
Chaîne |
Non applicable |
expand |
Chaîne |
Non applicable |
enabled |
Booléen |
Not applicable |
getEnabled |
Rappel |
VBA : Sub GetEnabled(control As IRibbonControl, ByRef returnedVal) C# : bool GetEnabled(IRibbonControl control) Visual Basic : Function GetEnabled(control As IRibbonControl) as Boolean C++ : HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
layout |
Chaîne |
Non applicable |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
visible |
Booléen |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : Function GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
Enfants : Aucun
Disposition
Représente le conteneur layoutContainer.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
align |
Chaîne |
Non applicable |
expand |
Chaîne |
Non applicable |
layoutChildren |
Chaîne |
Non applicable |
Enfants : button, checkbox, editBox, dropdown, radioGroup, comboBox, hyperlink, labelControl, groupBox, layoutContainer, imageControl
Menu
Représente le contrôle menu.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
*description |
Chaîne |
Non applicable |
*getDescription |
Rappel |
VBA : Sub GetDescription(control As IRibbonControl, ByRef returnedVal) C# : string GetDescription(IRibbonControl control) Visual Basic : Function GetDescription(control As IRibbonControl) As String C++ : HRESULT GetDescription([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
tag |
Chaîne |
Non applicable |
enabled |
Booléen |
Non applicable |
getEnabled |
Rappel |
VBA : Sub GetEnabled(control As IRibbonControl, ByRef returnedVal) C# : bool GetEnabled(IRibbonControl control) Visual Basic : Function GetEnabled(control As IRibbonControl) as Boolean C++ : HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
image |
Chaîne |
Non applicable |
imageMso |
Nom intégré (chaîne) |
Non applicable |
getImage |
Rappel |
VBA : Sub GetImage(control As IRibbonControl, ByRef returnedBitmap) C# : Bitmap GetImage(IRibbonControl control) Visual Basic : Function GetImage(control As IRibbonControl) As Bitmap C++ : HRESULT GetImage([in] IRibbonControl *pControl, [out, retval] IPictureDisp ** ppdispImage) |
keytip |
Jeton |
Non applicable |
getKeytip |
Rappel |
VBA : Sub GetKeytip(control As IRibbonControl, ByRef returnedVal) C# : string GetKeytip(IRibbonControl control) Visual Basic : Function GetKeytip(control As IRibbonControl) As String C++ : HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
visible |
Booléen |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
*screentip |
Chaîne |
Non applicable |
*getScreentip |
Rappel |
VBA : Sub GetScreentip(control As IRibbonControl, ByRef returnedVal) C# : string GetScreentip(IRibbonControl control) Visual Basic: Function GetScreentip(control As IRibbonControl) As String C++ : HRESULT GetScreentip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
*supertip |
Chaîne |
Non applicable |
*getSupertip |
Rappel |
VBA : Sub GetSupertip(control As IRibbonControl, ByRef returnedVal) C# : string GetSupertip(IRibbonControl control) Visual Basic : Function GetSupertip(control As IRibbonControl) As String C++ : HRESULT GetSupertip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
* Non utilisé dans toutes les implémentations
Enfant : menuGroup
Groupe Menu
Représente le conteneur menuGroup.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
itemSize |
Chaîne |
Non applicable |
Enfants : button, checkbox, menu
Élément principal
Représente un conteneur primaryItem
Attributs : Aucun
Enfants : button, menu
Case d’option
Représente le bouton dans un contrôle radioGroup.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
Enfants : Aucun
Groupe Case d’option
Représente le conteneur du contrôle radioButton.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
alignLabel |
Chaîne |
Non applicable |
expand |
Chaîne |
Non applicable |
layout |
Chaîne |
Non applicable |
enabled |
Booléen |
Non applicable |
getEnabled |
Rappel |
VBA : Sub GetEnabled(control As IRibbonControl, ByRef returnedVal) C# : bool GetEnabled(IRibbonControl control) Visual Basic : Function GetEnabled(control As IRibbonControl) as Boolean C++ : HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
getItemCount |
Rappel |
VBA : Sub GetItemCount(control As IRibbonControl, ByRef returnedVal) C# : int GetItemCount(IRibbonControl control) Visual Basic : Function GetItemCount(control As IRibbonControl) as Integer C++ : HRESULT GetItemCount([in] IRibbonControl *pControl, [out, retval] LONG *returnedVal) |
getItemID |
Rappel |
VBA : Sub GetItemID(control As IRibbonControl, itemIndex As Integer, ByRef returnedVal) C# : string GetItemID(IRibbonControl control, int itemIndex) Visual Basic : Function GetItemID(control As IRibbonControl, itemIndex as Integer) as String C++ : HRESULT GetItemID([in] IRibbonControl *pControl, [in] LONG cIndex, [out, retval] BSTR *pbstrReturnedVal) |
getItemLabel |
Rappel |
VBA : Sub GetItemLabel(control As IRibbonControl, itemIndex As Integer, ByRef returnedVal) C# : string GetItemLabel(IRibbonControl control, int itemIndex) Visual Basic : Function GetSelectedItemIndex(control As IRibbonControl, itemIndex as Integer) as String C++ : HRESULT GetSelectedItemIndex([in] IRibbonControl *pControl, [in] LONG cIndex, [out, retval] BSTR *pbstrReturnedVal) |
getSelectedItemIndex |
Rappel |
VBA : Sub GetSelectedItemIndex(control As IRibbonControl, ByRef returnedVal) C# : int GetSelectedItemIndex(IRibbonControl control) Visual Basic : Function GetSelectedItemIndex(control As IRibbonControl) as Integer C++ : HRESULT GetSelectedItemIndex([in] IRibbonControl *pControl, [out, retval] LONG *returnedVal) |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
visible |
Booléen |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : Function GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
onAction |
Rappel |
VBA : Sub OnAction(control As IRibbonControl) C# : void OnAction(IRibbonControl control) Visual Basic : Sub OnAction(control As IRibbonControl) C++ : HRESULT OnAction([in] IRibbonControl *pControl) |
keytip |
Jeton |
Non applicable |
getKeytip |
Rappel |
VBA : Sub GetKeytip(control As IRibbonControl, ByRef returnedVal) C# : string GetKeytip(IRibbonControl control) Visual Basic : Function GetKeytip(control As IRibbonControl) As String C++ : HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
Enfant : élément
Tabulation
Représente le conteneur principal des contrôles associés du mode Backstage.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
insertAfterMso |
Nom intégré (chaîne) |
Non applicable |
insertBeforeMso |
Nom intégré (chaîne) |
Non applicable |
insertAfterQ |
Nom qualifié (chaîne) |
Non applicable |
insertBeforeQ |
Nom qualifié (chaîne) |
Non applicable |
enabled |
Booléen |
Non applicable |
getEnabled |
Rappel |
VBA : Sub GetEnabled(control As IRibbonControl, ByRef returnedVal) C# : bool GetEnabled(IRibbonControl control) Visual Basic : Function GetEnabled(control As IRibbonControl) as Boolean C++ : HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
visible |
Valeur booléenne |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : Function GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
keytip |
Jeton |
Non applicable |
getKeytip |
Rappel |
VBA : Sub GetKeytip(control As IRibbonControl, ByRef returnedVal) C# : string GetKeytip(IRibbonControl control) Visual Basic : Function GetKeytip(control As IRibbonControl) As String C++ : HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
title |
Chaîne |
Non applicable |
getTitle |
Rappel |
VBA : Sub GetTitle(control As IRibbonControl, ByRef returnedVal) C# : string GetTitle(IRibbonControl control) Visual Basic : Function GetTitle(control As IRibbonControl) As String C++ : HRESULT GetTitle([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
columnWidthPercent |
Entier positif |
Non applicable |
firstColumnMinWidth |
Entier positif |
Non applicable |
firstColumnMaxWidth |
Entier positif |
Non applicable |
secondColumnMinWidth |
Entier positif |
Non applicable |
secondColumnMaxWidth |
Entier positif |
Non applicable |
Enfants : firstColumn, secondColumn
Tâche
Représente le conteneur task.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
activation |
Booléen |
Non applicable |
getEnabled |
Rappel |
VBA : Sub GetEnabled(control As IRibbonControl, ByRef returnedVal) C# : bool GetEnabled(IRibbonControl control) Visual Basic : Function GetEnabled(control As IRibbonControl) as Boolean C++ : HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C#: string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
visible |
Valeur booléenne |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : Function GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
keytip |
Jeton |
Non applicable |
getKeytip |
Rappel |
VBA : Sub GetKeytip(control As IRibbonControl, ByRef returnedVal) C# : string GetKeytip(IRibbonControl control) Visual Basic : Function GetKeytip(control As IRibbonControl) As String C++ : HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
description |
Chaîne |
Non applicable |
getDescription |
Rappel |
VBA : Sub GetDescription(control As IRibbonControl, ByRef returnedVal) C# : string GetDescription(IRibbonControl control) Visual Basic : Function GetDescription(control As IRibbonControl) As String C++ : HRESULT GetDescription([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
image |
Chaîne |
Non applicable |
imageMso |
Nom intégré (chaîne) |
Non applicable |
GetImage |
Rappel |
VBA : Sub GetImage(control As IRibbonControl, ByRef returnedBitmap) C# : Bitmap GetImage(IRibbonControl control) Visual Basic : Function GetImage(IRibbonControl control) As Bitmap C++ : HRESULT GetImage([in] IRibbonControl *pControl, [out, retval] IPictureDisp ** ppdispImage) |
Enfant : group
Groupe Formulaire de tâche
Représente un conteneur taskFormGroup.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Non applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
insertAfterMso |
Nom intégré (chaîne) |
Non applicable |
insertBeforeMso |
Nom intégré (chaîne) |
Non applicable |
insertAfterQ |
Nom qualifié (chaîne) |
Non applicable |
insertBeforeQ |
Nom qualifié (chaîne) |
Non applicable |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
visible |
Booléen |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : Function GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
helperText |
Chaîne |
Non applicable |
getHelperText |
Rappel |
VBA : Sub GetHelperText(control As IRibbonControl, ByRef returnedVal) C# : string GetHelperText(IRibbonControl control) Visual Basic : Function GetHelperText(control As IRibbonControl) As String C++ : HRESULT GetHelperText([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
showLabel |
Booléen |
Non applicable |
getShowLabel |
Rappel |
VBA : Sub GetShowLabel(control As IRibbonControl, ByRef returnedVal) C# : bool GetShowLabel(IRibbonControl control) Visual Basic : Function GetShowLabel(control As IRibbonControl) As Boolean C++ : HRESULT GetShowLabel([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
Enfant : category
Groupe Tâche
Représente un conteneur taskGroup.
Attribut |
Type |
Signature de rappel |
---|---|---|
id |
ID |
Non applicable |
idQ |
Nom qualifié (chaîne) |
Not applicable |
idMso |
Nom intégré (chaîne) |
Non applicable |
tag |
Chaîne |
Non applicable |
insertAfterMso |
Nom intégré (chaîne) |
Non applicable |
insertBeforeMso |
Nom intégré (chaîne) |
Non applicable |
insertAfterQ |
Nom qualifié (chaîne) |
Non applicable |
insertBeforeQ |
Nom qualifié (chaîne) |
Non applicable |
label |
Chaîne |
Non applicable |
getLabel |
Rappel |
VBA : Sub GetLabel(control As IRibbonControl, ByRef returnedVal) C# : string GetLabel(IRibbonControl control) Visual Basic : Function GetLabel(control As IRibbonControl) As String C++ : HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
visible |
Booléen |
Non applicable |
getVisible |
Rappel |
VBA : Sub GetVisible(control As IRibbonControl, ByRef returnedVal) C# : bool GetVisible(IRibbonControl control) Visual Basic : Function GetVisible(control As IRibbonControl) As Boolean C++ : HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
helperText |
Chaîne |
Non applicable |
getHelperText |
Rappel |
VBA : Sub GetHelperText(control As IRibbonControl, ByRef returnedVal) C# : string GetHelperText(IRibbonControl control) Visual Basic : Function GetHelperText(control As IRibbonControl) As String C++ : HRESULT GetHelperText([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal) |
showLabel |
Booléen |
Non applicable |
getShowLabel |
Rappel |
VBA : Sub GetShowLabel(control As IRibbonControl, ByRef returnedVal) C# : bool GetShowLabel(IRibbonControl control) Visual Basic : Function GetShowLabel(control As IRibbonControl) As Boolean C++ : HRESULT GetShowLabel([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal) |
Enfant : category
Conclusion
L’extensibilité du mode Backstage est une puissante opportunité de fournir aux utilisateurs un ensemble ciblé et personnalisé de menus et d’options. Mieux encore, vous pouvez réutiliser l’expérience acquise et les structures que vous utilisez pour personnaliser l’interface utilisateur du Ruban. Je vous encourage à explorer les différents composants formant l’interface utilisateur Microsoft Office Fluent pour créer des applications personnalisées pour votre organisation.
Ressources supplémentaires
Vous trouverez des informations supplémentaires sur les rubriques abordées dans cet article aux endroits suivants.
Remerciements : Merci à mon éditrice, Linda Cannon, pour son aide dans la préparation de cet article.