Summary
Represents a border whose contents are clipped within the bounds
of the border. The border may have rounded corners.
- Namespace
- MahApps
.Metro .Controls - Base Types
-
- Decorator
graph BT
Type-->Base0["Decorator"]
Type["ClipBorder"]
class Type type-node
Syntax
public sealed class ClipBorder : Decorator
Fields
Name | Constant Value | Summary |
---|---|---|
BackgroundProperty |
Background Dependency Property
static
|
|
BorderBrushProperty |
BorderBrush Dependency Property
static
|
|
Border |
BorderThickness Dependency Property
static
|
|
CornerRadiusProperty |
CornerRadius Dependency Property
static
|
|
Optimize |
OptimizeClipRendering Dependency Property
static
|
|
PaddingProperty |
Padding Dependency Property
static
|
Properties
Name | Value | Summary |
---|---|---|
Background | Brush |
Gets or sets the Background property. This dependency property
indicates the Background with which the Background is drawn.
|
BorderBrush | Brush |
Gets or sets the BorderBrush property. This dependency property
indicates the BorderBrush with which the Border is drawn.
|
BorderThickness | Thickness |
Gets or sets the BorderThickness property. This dependency property
indicates the BorderThickness.
|
CornerRadius | CornerRadius |
Gets or sets the CornerRadius property. This dependency property
indicates the CornerRadius of the border.
|
Optimize |
bool |
Gets or sets the OptimizeClipRendering property. This dependency property
indicates whether the rendering of the clip should be optimized. When set to true,
In order to optimize the rendering of the clipped Child,
the background is rendered with the same brush as the border. Any other brush set for
the background will be ignored. The Child will be rendered on top of it.
This is done to prevent any gaps between the border the the clipped Child (this is
evidently visible if both the Border and the Child are of same color).
This works best when the Child does not have any level of transparency and is opaque.
|
Padding | Thickness |
Gets or sets the Padding property. This dependency property
indicates the Padding.
|
Methods
Name | Value | Summary |
---|---|---|
ArrangeOverride |
Size |
ClipBorder computes the position of its single child and applies its child's alignments to the child.
|
MeasureOverride |
Size |
Updates DesiredSize of the ClipBorder. Called by parent UIElement. This is the first pass of layout.
|
OnRender |
void |
Here the ClipBorder's Child, Border and Background are rendered.
|