TextStylePreview Control
The TextStylePreview
control is a small control that is used on options dialogs to show the end user a preview of how an IHighlightingStyle will render.
The TextStylePreview showing a preview of a keyword style
Capabilities
The control can display a preview of these highlighting style properties:
- Foreground
- Background
- Bold
- Italic
- Font family
- Font size
- Strike-through
- Underline
Usage
The control is extremely simple to use. Simply place a TextStylePreview control in your application and set its HighlightingStyle property to the IHighlightingStyle that should be previewed.
The HighlightingStyle property supports data binding so it can be bound to a Selector
's selected item or other data source.
The HighlightingStyleRegistry property can be set if you are using an alternate IHighlightingStyleRegistry, meaning one that is not the default AmbientHighlightingStyleRegistry. That ensures that it displays resolved values properly.