Represents a control for rendering a text style preview.
- Inheritance:
-
object
Visual
UIElement
Framework
Element Decorator object
Constructors
TextStylePresenter()
Initializes an instance of the class.
Properties
Background
Gets or sets the Brush for the background.
Padding
Gets or sets the padding inside the control.
Property Value
- Thickness:
The padding inside the control. The default value is
3,0
.
Methods
MeasureOverride(Size)
Measures the child element of a Decorator to prepare for arranging it during the Arrange
Parameter | Type | Description |
---|---|---|
constraint | Size | An upper limit System.Windows.Size that should not be exceeded. |
Returns
- Size:
The target System.Windows.Size of the element.
OnRender(DrawingContext)
When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.
Parameter | Type | Description |
---|---|---|
drawingContext | Drawing |
The drawing instructions for a specific element. This context is provided to the layout system. |
Fields
BackgroundProperty
Identifies the Background dependency property. This field is read-only.
PaddingProperty
Identifies the Padding dependency property. This field is read-only.