Class Adornment
Adornments are a special form of View that appear outside the Viewport: Margin, Border, and Padding. They are defined using the Thickness class, which specifies the thickness of the sides of a rectangle.
public class Adornment : View, IDisposable, ISupportInitializeNotification, ISupportInitialize
- Inheritance
-
Adornment
- Implements
- Derived
- Inherited Members
Constructors
- Adornment()
Initializes a new instance of View.
- Adornment(View)
Constructs a new adornment for the view specified by
parent
.
Properties
- Parent
The Parent of this Adornment (the View this Adornment surrounds).
- SuperView
Adornments cannot be used as sub-views (see Parent); setting this property will throw InvalidOperationException.
- SuperViewRendersLineCanvas
Adornments only render to their Parent's or Parent's SuperView's LineCanvas, so setting this property throws an InvalidOperationException.
- Viewport
Gets the rectangle that describes the area of the Adornment. The Location is always (0,0). The size is the size of the Frame.
Methods
- Contains(in Point)
Indicates whether the specified Parent's SuperView-relative coordinates are within the Adornment's Thickness.
- FrameToScreen()
Gets the Frame with a screen-relative location.
- OnDrawAdornments()
Does nothing for Adornment
- OnDrawContent(Rectangle)
Redraws the Adornments that comprise the Adornment.
- OnMouseEnter(MouseEvent)
Called by NewMouseEvent(MouseEvent) when the mouse enters Viewport. The view will then receive mouse events until OnMouseLeave(MouseEvent) is called indicating the mouse has left the view.
- OnMouseLeave(MouseEvent)
Called by NewMouseEvent(MouseEvent) when a mouse leaves Viewport. The view will no longer receive mouse events.
- OnRenderLineCanvas()
Does nothing for Adornment
- OnThicknessChanged(Thickness)
Called whenever the Thickness property changes.
- ScreenToFrame(in Point)
Converts a screen-relative coordinate to a Frame-relative coordinate. Frame-relative means relative to the View's SuperView's Viewport.
Events
- ThicknessChanged
Fired whenever the Thickness property changes.