Class MarginView
The View-backed rendering layer for the Margin adornment. Created lazily by Margin (via GetOrCreateView()) when shadow sub-views or other View-level functionality is needed.
public class MarginView : AdornmentView, IDisposable, ISupportInitializeNotification, ISupportInitialize, IAdornmentView, IDesignable
- Inheritance
-
MarginView
- Implements
- Inherited Members
- Extension Methods
Remarks
The Margin is transparent by default. This can be overridden by explicitly setting Scheme.
Margins are drawn after all other Views in the application View hierarchy are drawn.
Margins have Transparent and TransparentMouse enabled by default and are thus transparent to the mouse. This can be overridden by explicitly setting ViewportSettingsFlags.
See the AdornmentView class.
Constructors
- MarginView()
Parameter-less constructor required to support all views unit tests (e.g., AllViewsTester).
Properties
- ShadowSize
Gets or sets the size of the shadow effect.
- ShadowStyle
Gets or sets the shadow effect that will be drawn on the right and bottom sides of the Margin.
Methods
- BeginInit()
Signals the View that initialization is starting. See ISupportInitialize.
- OnClearingViewport()
Called when the Thickness of the Adornment is to be cleared.
- OnDrawingText()
Called when the Text of the View is to be drawn.
- SetShadow(ShadowStyles?)
Sets whether the Margin includes a shadow effect. The shadow is drawn on the right and bottom sides of the Margin.