Version

Label

If you need a simple text label, then the Label tool is the right tool for you. The Label tool does not support user interaction. In fact, the Label tool will not display a KeyTip even if you set the KeyTip property since the Label tool’s functionality is for display purposes only.

The Label tool also implements the IRibbonTool interface, which adds cloning and binding functionality to facilitate advanced xamRibbon™ features. If you aren’t creating your own custom xamRibbon tool, you don’t need to worry about the IRibbonTool interface.

The LabelTool class exposes several properties that go a long way towards easily managing a label on xamRibbon. LabelTool exposes several 'Has' and 'Is' properties to help confirm if a property has been set or if the label is in a certain state. A few of the standard properties that help set up a Label tool on xamRibbon include:

  • Caption - This text will always be visible next to the Label tool regardless of its resolved SizingMode property.

  • Id - The Id isn’t required, but it can help you access a tool at run time.

  • LargeImage - Usually a 32 x 32 pixel image. You’ll see this image when a tool’s SizingMode is set to ImageAndTextLarge.

  • SizingMode - This property is read-only and returns how the tool is currently sized on its associated Ribbon group. If you want to set the size of a tool, you can set the RibbonGroup’s MinimumSize and/or MaximumSize attached properties.

  • SmallImage - Usually a 16 x 16 pixel image. You’ll see this image when a tool’s SizingMode is set to ImageAndTextNormal.

Since xamRibbon tools all derive from and implement the same objects, the functionality for each of them is very similar. The following topics apply to all xamRibbon tools.