Version

Masked Editor

If you need a text editor that can constrain user input, then the MaskedEditor tool is the right tool for you. The MaskedEditor tool derives from the Infragistics.Windows.Editors.XamMaskedEditor class; therefore, you get all the functionality that xamMaskedEditor provides.

The MaskedEditor 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 MaskedEditorTool class exposes several extra properties that go a long way towards easily managing a masked text editor on xamRibbon. MaskedEditorTool exposes several 'Has' and 'Is' properties to help confirm if a property has been set or if the masked text editor is in a certain state. A few of the standard properties that help set up a MaskedEditor tool (or any tool) on xamRibbon include:

  • Caption - This text will always be visible next to the MaskedEditor tool regardless of the current SizingMode property value.

  • Id - An identification string that xamRibbon uses to associate tools when they’re located in different locations (i.e. a Ribbon Group and the Quick Access Toolbar simultaneously). The Id isn’t required, but it can help you access a tool at run time.

  • KeyTip - Each tool has a Key Tip (similar to main menu mnemonics) associated with it. If you don’t provide one explicitly, xamRibbon will internally choose one for you.

  • 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 or ImageOnly.

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.