Adorner with which pixel distance and angle regarding the x-axis is calculated. More...
Inherits TextAdorner.
Public Member Functions | |
MeasureLineAdorner (Display adornedDisplay) | |
Creates the measure line adorner. | |
Static Public Attributes | |
static readonly DependencyProperty | AngleProperty |
Backing store for the Angle property. | |
static readonly DependencyProperty | CoordinateModeProperty |
Backing store for the CoordinateMode property. | |
static readonly DependencyProperty | DistanceProperty |
Backing store of the Distance property. | |
static readonly DependencyProperty | EndPointProperty |
Backing store for the EndPoint property. | |
static readonly DependencyProperty | StartPointProperty |
Backing store for the StartPoint property. | |
![]() | |
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. | |
static readonly DependencyProperty | FontWeightProperty |
Backing store for the FontWeight property. | |
static readonly DependencyProperty | ForegroundProperty |
Backing store for Foreground property. | |
Protected Member Functions | |
override void | OnRender (DrawingContext drawingContext) |
Renders the measure line in case a start/end point is set. | |
![]() | |
TextAdorner (UIElement adornedElement) | |
Ctor. | |
FormattedText | NewDefaultText (string text) |
Creates a new FormattedText based on the current culture and control font settings. | |
void | DrawString (DrawingContext drawingContext, FormattedText text, Point location) |
Draws the given text with a drop shadow to ensure its visibility. | |
Properties | |
Angle | Angle [get] |
Gets the current angle regarding the x-axis. | |
CoordinateMode | CoordinateMode [get, set] |
Gets/sets the coordinate mode for measuring. | |
double | Distance [get] |
Gets the distance between the start and the end point. | |
Point | EndPoint [get] |
Gets the measure line end point. | |
Point | StartPoint [get, set] |
Gets/sets the point from which to measure. | |
![]() | |
Color | FontBackgroundColor [get, set] |
Gets/sets the background color for the font's background. | |
FontFamily | FontFamily [get, set] |
Gets/sets the font family of the text. | |
double | FontShadowThickness [get, set] |
Gets/sets the thickness of the border of the text. | |
double | FontSize [get, set] |
Gets/sets the font size of the text. | |
FontStretch | FontStretch [get, set] |
Gets/sets the font stretch of the text. | |
FontStyle | FontStyle [get, set] |
Gets/sets the font style of the text. | |
FontWeight | FontWeight [get, set] |
Gets/sets the font weight of the text. | |
Brush | Foreground [get, set] |
Gets/sets the foreground brush to draw the text with. | |
Adorner with which pixel distance and angle regarding the x-axis is calculated.
MeasureLineAdorner | ( | Display | adornedDisplay | ) |
Creates the measure line adorner.
adornedDisplay | The display to adorn. |
|
protected |
Renders the measure line in case a start/end point is set.
drawingContext | Context to draw on. |
Gets the current angle regarding the x-axis.
Angle of the line through StartPoint and EndPoint regarding the x-axis.
|
get |
Gets the distance between the start and the end point.
Distance in image pixels; NaN
if no line is present.
We use cookies to improve your experience. By using this documentation, you agree to our use of cookies.