Class TrippleBorder
Represents element that is used to draw 3 borders at once.
Inheritance
Namespace: Syncfusion.Windows.Shared
Assembly: Syncfusion.Shared.Wpf.dll
Syntax
public class TrippleBorder : Decorator
Constructors
TrippleBorder()
Initializes a new instance of the TrippleBorder class.
Declaration
public TrippleBorder()
Fields
BorderThicknessProperty
Identifies BorderThickness dependency property.
Declaration
public static readonly DependencyProperty BorderThicknessProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
CornerRadiusProperty
Identifies CornerRadius dependency property.
Declaration
public static readonly DependencyProperty CornerRadiusProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
InsideBorderBrushProperty
Identifies InsideBorderBrush dependency property.
Declaration
public static readonly DependencyProperty InsideBorderBrushProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
InsideBorderThicknessProperty
Identifies InsideBorderThickness dependency property.
Declaration
public static readonly DependencyProperty InsideBorderThicknessProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
OutsideBorderBrushProperty
Identifies OutsideBorderBrush dependency property.
Declaration
public static readonly DependencyProperty OutsideBorderBrushProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
OutsideBorderThicknessProperty
Identifies OutsideBorderThickness dependency property.
Declaration
public static readonly DependencyProperty OutsideBorderThicknessProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
AdornerChild
Gets or sets the adorner child.
Declaration
public UIElement AdornerChild { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.UIElement | The adorner child. |
Background
Gets or sets the value that specifies the brush used for filling background.
Declaration
public Brush Background { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | Type: System.Windows.Media.Brush Value that specifies the brush used for filling background. |
BorderBrush
Gets or sets the value that specifies the brush that should be used for drawing central border. This is dependency property.
Declaration
public Brush BorderBrush { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | Type: System.Windows.Media.Brush Value that specifies the brush that should be used for drawing central border. |
BorderThickness
Gets or sets the value that specifies the thickness of the borders. This is dependency property.
Declaration
public double BorderThickness { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type: System.Double Double value that represents the thickness of the borders. |
Remarks
While the standard border takes value of the System.Windows.Thickness type, we use a double value to improve rendering performance.
CornerRadius
Gets or sets the value that specifies the radius of the corners. This is dependency property.
Declaration
public CornerRadius CornerRadius { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.CornerRadius | Type: System.Double Double value that represents the radius of corners. |
Remarks
While the standard border takes value of the System.Windows.Thickness type, we use a double value to improve rendering performance.
InsideBorderBrush
Gets or sets the value that specifies the brush that should be used for drawing inside border. This is dependency property.
Declaration
public Brush InsideBorderBrush { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | Type: System.Windows.Media.Brush Value that specifies the brush that should be used for drawing inside border. |
InsideBorderThickness
Gets or sets the value that specifies the thickness of the inside border.
Declaration
public double InsideBorderThickness { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type: System.Double Double value that specifies the thickness of the inside border. |
Remarks
While the standard border takes value of the System.Windows.Thickness type, we use a double value to improve rendering performance.
LogicalChildren
Gets an enumerator that can be used to iterate the logical child elements of a TrippleBorder.
Declaration
protected override IEnumerator LogicalChildren { get; }
Property Value
Type | Description |
---|---|
System.Collections.IEnumerator | An enumerator that can be used to iterate the logical child elements of a TrippleBorder. |
OutsideBorderBrush
Gets or sets the value that specifies the brush that should be used for drawing outside border.
Declaration
public Brush OutsideBorderBrush { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | Type: System.Windows.Media.Brush Value that represents the brush that should be used for drawing outside border. |
OutsideBorderThickness
Gets or sets the value that specifies the thickness of the outside border.
Declaration
public double OutsideBorderThickness { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type: System.Double Double value that specifies the thickness of the outside border. |
Remarks
While the standard border takes value of the System.Windows.Thickness type, we use a double value to improve rendering performance.
VisualChildrenCount
Gets a value that is equal to the number of visual child elements of this instance of TrippleBorder.
Declaration
protected override int VisualChildrenCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of visual child elements. |
Methods
ArrangeOverride(Size)
Arranges child element and light-weight adorner, calculates areas of borders drawing.
Declaration
protected override Size ArrangeOverride(Size arrangeSize)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Size | arrangeSize | Specifies the supposed size of the control. |
Returns
Type | Description |
---|---|
System.Windows.Size | Returns the actually used size. It can be larger than the initial size in case when the initial size is too small to draw all borders. |
GetVisualChild(Int32)
Gets the child Visual element at the specified index position.
Declaration
protected override Visual GetVisualChild(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Index position of the child element. |
Returns
Type | Description |
---|---|
System.Windows.Media.Visual | The child element at the specified index position. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Index is greater than the number of visual child elements. |
MeasureOverride(Size)
Measures the child element of a TrippleBorder to prepare for arranging it during the ArrangeOverride(Size) pass.
Declaration
protected override Size MeasureOverride(Size constraint)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Size | constraint | An upper limit System.Windows.Size that should not be exceeded. |
Returns
Type | Description |
---|---|
System.Windows.Size | The target System.Windows.Size of the element. |
OnRender(DrawingContext)
Renders three rectangles.
Declaration
protected override void OnRender(DrawingContext drawingContext)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.DrawingContext | drawingContext | Context for drawing. |
Events
BorderBrushChanged
Event that is raised when BorderBrush property is changed.
Declaration
public event PropertyChangedCallback BorderBrushChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
BorderThicknessChanged
Event that is raised when BorderThickness property is changed.
Declaration
public event PropertyChangedCallback BorderThicknessChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
InsideBorderBrushChanged
Event that is raised when InsideBorderBrush property is changed.
Declaration
public event PropertyChangedCallback InsideBorderBrushChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
InsideBorderThicknessChanged
Event that is raised when InsideBorderThickness property is changed.
Declaration
public event PropertyChangedCallback InsideBorderThicknessChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
OutsideBorderBrushChanged
Event that is raised when OutsideBorderBrush property is changed.
Declaration
public event PropertyChangedCallback OutsideBorderBrushChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
OutsideBorderThicknessChanged
Event that is raised when OutsideBorderThickness property is changed.
Declaration
public event PropertyChangedCallback OutsideBorderThicknessChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |