Élément FontControl
Représente un contrôle de police, qui est un conteneur spécialisé de contrôles individuels dédiés à la manipulation de polices.
Utilisation
<FontControl
CommandName = "xs:positiveInteger or xs:string"
FontType = "xs:string"
IsGrowShrinkButtonGroupVisible = "Boolean"
IsStrikethroughButtonVisible = "Boolean"
IsUnderlineButtonVisible = "Boolean"
IsHighlightButtonVisible = "Boolean"
ShowVerticalFonts = "Boolean"
ShowTrueTypeOnly = "Boolean"
MinimumFontSize = "xs:positiveInteger"
MaximumFontSize = "xs:positiveInteger"/>
Attributs
| Attribut | Type | Obligatoire | Description |
|---|---|---|---|
| CommandName |
XS : positiveInteger ou XS : String |
No |
Associe l’élément à une commande. La valeur doit être unique dans le document XML du ruban. Longueur maximale : 100 caractères. |
| FontType |
xs:string |
No |
Limité à l’une des valeurs suivantes : ![]() La définition de l’attribut FontType pour FontOnly active les fonctionnalités suivantes :
![]() La définition de l’attribut FontType pour FontWithColor active les fonctionnalités suivantes :
![]() La définition de l’attribut FontType pour RichFont active les fonctionnalités suivantes :
|
| IsGrowShrinkButtonGroupVisible |
Boolean |
Non |
Windows 8 et versions ultérieures Limité à l’une des valeurs suivantes : [!Note] FontWithColor ou RichFont .FontOnly . |
| IsHighlightButtonVisible |
Boolean |
Non |
Limité à l’une des valeurs suivantes (0 et 1 ne sont pas valides) : [!Note] FontWithColor ou RichFont .Valide uniquement lorsque la valeur de FontType est égale à FontWithColor ou RichFont .FontOnly .Valide uniquement lorsque la valeur de FontType est égale à FontOnly ou FontWithColor . |
| IsStrikethroughButtonVisible |
Boolean |
Non |
Limité à l’une des valeurs suivantes (0 et 1 ne sont pas valides) : FontOnly ou FontWithColor . |
| IsUnderlineButtonVisible |
Boolean |
Non |
Limité à l’une des valeurs suivantes (0 et 1 ne sont pas valides) : FontOnly ou FontWithColor . |
| MaximumFontSize |
xs:positiveInteger |
No |
Taille maximale en points à afficher. La valeur par défaut est 9999. |
| MinimumFontSize |
xs:positiveInteger |
No |
Taille minimale du point à afficher. La valeur par défaut est 1. |
| ShowTrueTypeOnly |
Boolean |
Non |
Limité à l’une des valeurs suivantes (0 et 1 ne sont pas valides) : |
| ShowVerticalFonts |
Boolean |
Non |
Limité à l’une des valeurs suivantes (0 et 1 ne sont pas valides) :[!Note] [!Note] |
Éléments enfants
Il n’y a pas d’éléments enfants.
Éléments parents
| Élément |
|---|
| ControlGroup |
| Groupe |
| MenuGroup |
Remarques
Optionnel.
Peut se produire au plus une fois pour chaque élément ControlGroup, Groupou MenuGroup .
Les attributs de commande FontControl déclarés dans le balisage, tels que Command. LabelTitle ou Command. TooltipTitle, sont substitués par les attributs des contrôles individuels qui composent le FontControl.
Toute tentative de sélection d’un échantillon de couleur dans le sélecteur de couleurs d’un contrôle de police peut entraîner une violation d’accès si aucun gestionnaire de commandes n’est associé au contrôle.
Exemples
L’exemple suivant illustre le balisage de base pour les trois types de contrôle de police.
Cette section de code montre les déclarations de commande FontControl , chacune avec une déclaration de conteneur de groupe .
<!-- A FontOnly FontControl -->
<Command Name="cmdFontOnlyGroup"
Symbol="cmdFontOnlyGroup"
Comment="FontOnlyGroup"
Id="50001"
LabelTitle="FontOnly"/>
<Command Name="cmdFontOnly"
Symbol="cmdFontOnly"
Comment="FontOnly"
Id="50010"/>
<!-- A FontWithColor FontControl -->
<Command Name="cmdFontWithColorGroup"
Symbol="cmdFontWithColorGroup"
Comment="FontWithColorGroup"
Id="50002"
LabelTitle="FontWithColor"/>
<Command Name="cmdFontWithColor"
Symbol="cmdFontWithColor"
Comment="FontWithColor"
Id="50020"/>
<!-- A RichFont FontControl -->
<Command Name="cmdRichFontGroup"
Symbol="cmdRichFontGroup"
Comment="RichFontGroup"
Id="50003"
LabelTitle="RichFont"
Keytip="ZF"/>
<Command Name="cmdRichFont"
Symbol="cmdRichFont"
Comment="RichFont"
Id="50030"
Keytip="RF"
LabelTitle="test"
TooltipTitle="test"/>
Cette section de code montre les déclarations de contrôle FontControl où chaque FontControl et groupe est déclaré dans un seul onglet.
<Tab CommandName="cmdTab1">
<Group CommandName="cmdFontOnlyGroup"
SizeDefinition="OneFontControl">
<FontControl CommandName="cmdFontOnly"
FontType="FontOnly"
IsUnderlineButtonVisible="false"
IsStrikethroughButtonVisible="false"
MinimumFontSize="15"/>
</Group>
<Group CommandName="cmdFontWithColorGroup"
SizeDefinition="OneFontControl">
<FontControl CommandName="cmdFontWithColor"
FontType="FontWithColor"
IsUnderlineButtonVisible="false"
IsStrikethroughButtonVisible="false"
IsHighlightButtonVisible="true"
MinimumFontSize="15"/>
</Group>
<Group CommandName="cmdRichFontGroup"
SizeDefinition="OneFontControl">
<FontControl CommandName="cmdRichFont"
FontType="RichFont"
IsHighlightButtonVisible="true"
IsUnderlineButtonVisible="true"
IsStrikethroughButtonVisible="true"
ShowVerticalFonts="true"
MinimumFontSize="15"/>
</Group>
Informations sur les éléments
- système minimal pris en charge: Windows 7
- Peut être vide: Oui


