public override ApplyState Apply(ComputedStyle style, Value value) { // Get the border: BorderProperty border = GetBorder(style); if (value == null) { // No corners: border.Corners = null; } else { // Apply top left: border.SetCorner(RoundCornerPosition.TopLeft, value[0].GetDecimal(style.RenderData, GetAliased(0))); // Apply top right: border.SetCorner(RoundCornerPosition.TopRight, value[1].GetDecimal(style.RenderData, GetAliased(1))); // Apply bottom right: border.SetCorner(RoundCornerPosition.BottomLeft, value[2].GetDecimal(style.RenderData, GetAliased(2))); // Apply bottom left: border.SetCorner(RoundCornerPosition.BottomRight, value[3].GetDecimal(style.RenderData, GetAliased(3))); } // Request a layout: border.RequestLayout(); // Ok! return(ApplyState.Ok); }
public override void Apply(ComputedStyle style, Value value) { // Get the border: BorderProperty border = GetBorder(style); if (value == null) { // No corners: border.Corners = null; } else { // Apply top left: border.SetCorner(RoundCornerPosition.TopLeft, value.GetPX(0)); // Apply top right: border.SetCorner(RoundCornerPosition.TopRight, value.GetPX(1)); // Apply bottom right: border.SetCorner(RoundCornerPosition.BottomLeft, value.GetPX(2)); // Apply bottom left: border.SetCorner(RoundCornerPosition.BottomRight, value.GetPX(3)); } // Request a layout: border.RequestLayout(); }