3 using SiliconStudio.Core.Mathematics;
5 namespace SiliconStudio.Paradox.UI.Controls
12 internal Color BorderColorInternal = Color.Black;
13 private Thickness borderThickness = Thickness.UniformCuboid(0);
20 get {
return borderThickness; }
23 borderThickness = value;
31 public Color BorderColor
33 get {
return BorderColorInternal; }
34 set { BorderColorInternal = value; }
39 var availableLessBorders = CalculateSizeWithoutThickness(ref availableSizeWithoutMargins, ref borderThickness);
41 var neededSize = base.MeasureOverride(availableLessBorders);
43 return CalculateSizeWithThickness(ref neededSize, ref borderThickness);
49 if (VisualContent != null)
52 var availableLessBorders = CalculateSizeWithoutThickness(ref finalSizeWithoutMargins, ref borderThickness);
53 var childSizeWithoutPadding = CalculateSizeWithoutThickness(ref availableLessBorders, ref padding);
56 VisualContent.Arrange(childSizeWithoutPadding, IsCollapsed);
59 var childOffsets =
new Vector3(padding.Left + borderThickness.Left, padding.Top + borderThickness.Top, padding.Back + borderThickness.Back) - finalSizeWithoutMargins / 2;
62 VisualContent.DependencyProperties.Set(ContentArrangeMatrixPropertyKey, Matrix.Translation(childOffsets));
65 return finalSizeWithoutMargins;
A border element adds an uniform color border around its content.
override Vector3 ArrangeOverride(Vector3 finalSizeWithoutMargins)
When overridden in a derived class, positions possible child elements and determines a size for a UIE...
Represents a three dimensional mathematical vector.
Describes the thickness of a frame around a cuboid. Six float values describe the Left...
Represents a control with a single piece of content of any type.
Represents a 32-bit color (4 bytes) in the form of RGBA (in byte order: R, G, B, A).
SiliconStudio.Core.Mathematics.Vector3 Vector3
override Vector3 MeasureOverride(Vector3 availableSizeWithoutMargins)
When overridden in a derived class, measures the size in layout required for possible child elements ...