Table of Contents

Class RectangleAdorner

Namespace
HelixToolkit.Wpf
Assembly
HelixToolkit.Wpf.dll

An adorner showing a rectangle with a crosshair in the middle. This is shown when zooming a rectangle.

public sealed class RectangleAdorner : Adorner, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient
Inheritance
RectangleAdorner
Implements
Inherited Members
Extension Methods

Constructors

RectangleAdorner(UIElement, Rect, Color, Color, double, double, double)

Initializes a new instance of the RectangleAdorner class.

public RectangleAdorner(UIElement adornedElement, Rect rectangle, Color color1, Color color2, double thickness1 = 1, double thickness2 = 1, double crossHairSize = 10)

Parameters

adornedElement UIElement

The adorned element.

rectangle Rect

The rectangle.

color1 Color

The color1.

color2 Color

The color2.

thickness1 double

The thickness1.

thickness2 double

The thickness2.

crossHairSize double

Size of the cross hair.

Exceptions

ArgumentNullException

RectangleAdorner(UIElement, Rect, Color, Color, double, double, double, DashStyle, Brush?)

Initializes a new instance of the RectangleAdorner class.

public RectangleAdorner(UIElement adornedElement, Rect rectangle, Color color1, Color color2, double thickness1, double thickness2, double crossHairSize, DashStyle dashStyle2, Brush? fillBrush = null)

Parameters

adornedElement UIElement

The adorned element.

rectangle Rect

The rectangle.

color1 Color

The color1.

color2 Color

The color2.

thickness1 double

The thickness1.

thickness2 double

The thickness2.

crossHairSize double

Size of the cross hair.

dashStyle2 DashStyle

The dash style2.

fillBrush Brush

The brush to color inside the rectangle.

Exceptions

ArgumentNullException

Properties

Rectangle

Gets or sets Rectangle.

public Rect Rectangle { get; set; }

Property Value

Rect

Methods

OnRender(DrawingContext)

Called when rendering.

protected override void OnRender(DrawingContext dc)

Parameters

dc DrawingContext

The dc.