Base class for all adorners displaying text.
More...
Inherits Adorner.
Inherited by ImageInfoAdorner, MeasureLineAdorner, MouseOverInfoAdorner, and RectangleAdorner.
|
static readonly DependencyProperty | FontBackgroundColorProperty |
| Backing store for FontBackgroundColor property.
|
|
static readonly DependencyProperty | FontFamilyProperty |
| Backing store for the FontFamily property.
|
|
static readonly DependencyProperty | FontShadowThicknessProperty |
| Backing store for the FontShadowThickness property.
|
|
static readonly DependencyProperty | FontSizeProperty |
| Backing store for the FontSize property.
|
|
static readonly DependencyProperty | FontStretchProperty |
| Backing store of the FontStretch property.
|
|
static readonly DependencyProperty | FontStyleProperty |
| Backing store of the FontStyle property. More...
|
|
static readonly DependencyProperty | FontWeightProperty |
| Backing store for the FontWeight property.
|
|
static readonly DependencyProperty | ForegroundProperty |
| Backing store for Foreground property.
|
|
|
| TextAdorner (UIElement adornedElement) |
| Ctor. More...
|
|
FormattedText | NewDefaultText (string text) |
| Creates a new FormattedText based on the current culture and control font settings. More...
|
|
void | DrawString (DrawingContext drawingContext, FormattedText text, Point location) |
| Draws the given text with a drop shadow to ensure its visibility. More...
|
|
Base class for all adorners displaying text.
◆ TextAdorner()
Ctor.
- Parameters
-
adornedElement | Element to place adorner on. |
◆ DrawString()
void DrawString |
( |
DrawingContext |
drawingContext, |
|
|
FormattedText |
text, |
|
|
Point |
location |
|
) |
| |
|
protected |
Draws the given text with a drop shadow to ensure its visibility.
- Parameters
-
drawingContext | Context to draw on. |
text | Formatted text to print. |
location | Point where the text is drawn. |
◆ NewDefaultText()
FormattedText NewDefaultText |
( |
string |
text | ) |
|
|
protected |
Creates a new FormattedText based on the current culture and control font settings.
- Parameters
-
text | Text from which the formatted text is created. |
- Returns
- New formatted text.
◆ FontStyleProperty
readonly DependencyProperty FontStyleProperty |
|
static |
Backing store of the FontStyle property.
Default is control default.
◆ FontBackgroundColor
Color FontBackgroundColor |
|
getset |
Gets/sets the background color for the font's background.
Default is Colors.White.
◆ FontFamily
Gets/sets the font family of the text.
Default is control default.
◆ FontShadowThickness
double FontShadowThickness |
|
getset |
Gets/sets the thickness of the border of the text.
Thickness in pixels (default is 2).
◆ FontSize
Gets/sets the font size of the text.
Default is control default.
◆ FontStretch
Gets/sets the font stretch of the text.
Default is control default.
◆ FontWeight
Gets/sets the font weight of the text.
Default is FontWeights.SemiBold.
◆ Foreground
Gets/sets the foreground brush to draw the text with.
Default is a solid color Brushes.Black brush.