FontControl element
Represents a Font Control, which is a specialized container of individual controls dedicated to font manipulation.
Usage
<FontControl CommandName = "xs:positiveInteger or xs:string" FontType = "xs:string" IsGrowShrinkButtonGroupVisible = "xs:string" IsStrikethroughButtonVisible = "Boolean" IsUnderlineButtonVisible = "Boolean" IsHighlightButtonVisible = "Boolean" ShowVerticalFonts = "Boolean" ShowTrueTypeOnly = "Boolean" MinimumFontSize = "xs:positiveInteger" MaximumFontSize = "xs:positiveInteger"/>
Attributes
| Attribute | Type | Required | Description |
|---|---|---|---|
|
CommandName |
xs:positiveInteger or xs:string |
No |
Associates the element with a Command. |
|
FontType |
xs:string |
No |
Restricted to one of the following values:
|
|
IsGrowShrinkButtonGroupVisible |
xs:string |
No |
Restricted to one of the following values: Note The Grow/Shrink buttons are never displayed in the MiniToolbar. |
|
IsHighlightButtonVisible |
Boolean |
No |
Restricted to one of the following values (0 and 1 are not valid): Note Color highlighting is available only from a FontControl when the value of the FontType
attribute equals |
|
IsStrikethroughButtonVisible |
Boolean |
No |
Restricted to one of the following values (0 and 1 are not valid): |
|
IsUnderlineButtonVisible |
Boolean |
No |
Restricted to one of the following values (0 and 1 are not valid): |
|
MaximumFontSize |
xs:positiveInteger |
No |
The maximum point size to display. |
|
MinimumFontSize |
xs:positiveInteger |
No |
The minimum point size to display. |
|
ShowTrueTypeOnly |
Boolean |
No |
Restricted to one of the following values (0 and 1 are not valid): |
|
ShowVerticalFonts |
Boolean |
No |
Restricted to one of the following values (0 and 1 are not valid): Note Vertical fonts are preceded by an @ symbol in the Font family list.
|
Child elements
There are no child elements.
Parent elements
| Element |
|---|
Remarks
Optional.
May occur at most once for each ControlGroup, Group, or MenuGroup element.
Any FontControl Command attributes declared in markup, such as Command.LabelTitle or Command.TooltipTitle, are overridden by the attributes of the individual controls that comprise the FontControl.
Any attempt to select a color swatch from the color picker of a Font Control may result in an access violation if no Command handler is associated with the control.
Examples
The following example demonstrates the basic markup for the three types of Font Control.
This section of code shows the FontControl Command declarations, each with a Group container declaration.
<!-- 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"/>
This section of code shows the FontControl control declarations where each FontControl and Group is declared in a single Tab.
<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>
Element information
|
Minimum supported system | Windows 7 |
|---|---|
| Can be empty | Yes |
See also
Send comments about this topic to Microsoft
Build date: 11/14/2012


