ZeroWidthLabel Class
Represents a label control that measures as zero-width.
public class ZeroWidthLabel : Control
- Inheritance:
- object Visual UIElement FrameworkElement Control object
Constructors
ZeroWidthLabel()
Initializes an instance of the class.
public ZeroWidthLabel()
Properties
IdealWidth
Gets the ideal width of the control.
Label
Gets or sets the text label.
Methods
MeasureOverride(Size)
When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.
protected override Size MeasureOverride(Size availableSize)
Parameter | Type | Description |
---|---|---|
availableSize | Size | The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available. |
Returns
- Size:
The size that this element determines it needs during layout, based on its calculations of child element sizes.
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
IdealWidthProperty
Identifies the IdealWidth dependency property. This field is read-only.
public static readonly DependencyProperty IdealWidthProperty
LabelProperty
Identifies the Label dependency property. This field is read-only.
public static readonly DependencyProperty LabelProperty