CVB.Net 15.0
Loading...
Searching...
No Matches

Adorner that simply displays a rectangle. More...

Inherits TextAdorner.

Public Member Functions

 RectangleAdorner (Display adornedDisplay)
 Creates the rectangle adorner.
 

Static Public Member Functions

static object CoerceP0 (DependencyObject d, object baseValue)
 coerce the P0 value if necessary.
 
static object CoerceP1 (DependencyObject d, object baseValue)
 coerce the P0 value if necessary
 

Static Public Attributes

static readonly DependencyProperty PlacementModeProperty
 Backing store.
 
static readonly DependencyProperty CoordinateModeProperty
 Backing store for the CoordinateMode property.
 
static readonly DependencyProperty PixelCoordinateSystemProperty
 Backing store for the PixelCoordinateSystem dependency property.
 
static readonly DependencyProperty P0Property
 Backing Store.
 
static readonly DependencyProperty P1Property
 Backing Store.
 
- Static Public Attributes inherited from TextAdorner
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)
 Paint the rectangle...
 
virtual Point CoercePoint (Point p)
 Coerce a point variable into sensible values.
 
- Protected Member Functions inherited from TextAdorner
 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

PlacementMode PlacementMode [get, set]
 Placement of the vertices relative to the image.
 
CoordinateMode CoordinateMode [get, set]
 Gets/sets the coordinate mode for measuring.
 
PixelCoordinateSystem PixelCoordinateSystem [get, set]
 Defines how the rectangle is painted.
 
Point P0 [get, set]
 Start Point of the rectangle (interacts with Left/Right).
 
Point P1 [get, set]
 Start Point of the rectangle (interacts with Left/Right).
 
- Properties inherited from TextAdorner
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.
 

Detailed Description

Adorner that simply displays a rectangle.

Constructor & Destructor Documentation

◆ RectangleAdorner()

RectangleAdorner ( Display adornedDisplay)

Creates the rectangle adorner.

Parameters
adornedDisplayThe display to adorn.

Member Function Documentation

◆ CoerceP0()

static object CoerceP0 ( DependencyObject d,
object baseValue )
static

coerce the P0 value if necessary.

Parameters
dDependency object to work on.
baseValueBase value to work with.
Returns
Coerced value.

◆ CoerceP1()

static object CoerceP1 ( DependencyObject d,
object baseValue )
static

coerce the P0 value if necessary

Parameters
dDependency object to work on.
baseValueBase value to work with.
Returns
Coerced value.

◆ CoercePoint()

virtual Point CoercePoint ( Point p)
protectedvirtual

Coerce a point variable into sensible values.

Parameters
pPoint to coerce.
Returns
Coercion result.

◆ OnRender()

override void OnRender ( DrawingContext drawingContext)
protected

Paint the rectangle...

Parameters
drawingContextContext to paint the rectangle to.