TextStylePresenter Class
Represents a control for rendering a text style preview.
public class TextStylePresenter : Decorator
- Inheritance:
- object Visual UIElement FrameworkElement Decorator object
Constructors
TextStylePresenter()
Initializes an instance of the class.
public TextStylePresenter()
Properties
Background
The Brush for the background.
Padding
The padding inside the control.
Methods
MeasureOverride(Size)
Measures the child element of a Decorator to prepare for arranging it during the ArrangeOverride(Size) pass.
protected override Size MeasureOverride(Size constraint)
| 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.
protected override void OnRender(DrawingContext drawingContext)
| Parameter | Type | Description |
|---|---|---|
| drawingContext | DrawingContext | The drawing instructions for a specific element. This context is provided to the layout system. |
Fields
BackgroundProperty
Defines the Background property.
public static readonly DependencyProperty BackgroundProperty
PaddingProperty
Defines the Padding property.
public static readonly DependencyProperty PaddingProperty