Class Decorator
Base class for controls which decorate a single child control.
public class Decorator : Control, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
- Inheritance
-
Decorator
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
Decorator()
public Decorator()
Fields
ChildProperty
Defines the Child property.
public static readonly StyledProperty<Control?> ChildProperty
Field Value
PaddingProperty
Defines the Padding property.
public static readonly StyledProperty<Thickness> PaddingProperty
Field Value
Properties
Child
Gets or sets the decorated control.
[Content]
public Control? Child { get; set; }
Property Value
Padding
Gets or sets the padding to place around the Child control.
public Thickness Padding { get; set; }
Property Value
Methods
ArrangeOverride(Size)
Positions child elements as part of a layout pass.
protected override Size ArrangeOverride(Size finalSize)
Parameters
finalSize
SizeThe size available to the control.
Returns
- Size
The actual size used.
MeasureOverride(Size)
Measures the control and its child elements as part of a layout pass.
protected override Size MeasureOverride(Size availableSize)
Parameters
availableSize
SizeThe size available to the control.
Returns
- Size
The desired size for the control.