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(); }
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) { border.WidthTop = border.WidthLeft = 0; border.WidthRight = border.WidthBottom = 0; } else { border.WidthTop = value.GetPX(0); border.WidthRight = value.GetPX(1); border.WidthBottom = value.GetPX(2); border.WidthLeft = value.GetPX(3); } // Does the border have any corners? If so, we need to update them: if (border.Corners != null) { border.Corners.Recompute(); } // Request a layout: border.RequestLayout(); // Set the styles size: style.SetSize(); }
public override ApplyState Apply(ComputedStyle style, Value value) { // Get the border: BorderProperty border = GetBorder(style); // Request a layout: border.RequestLayout(); // Ok! return(ApplyState.Ok); }
public override ApplyState Apply(ComputedStyle style, Value value) { // set background image if "fill" is presented // Get the border: BorderProperty border = GetBorder(style); // Request a layout: if (border != null) { border.RequestLayout(); } // Ok! return(ApplyState.Ok); }
public override ApplyState Apply(ComputedStyle style, Value value) { // Get the border: BorderProperty border = GetBorder(style); // Does the border have any corners? If so, we need to update them: if (border.Corners != null) { border.Corners.ClearCorners(); } // 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 || string.IsNullOrEmpty(value.Text) || value.Text == "solid") { border.Style = BorderStyle.Solid; } else if (value.Text == "dashed") { border.Style = BorderStyle.Dashed; } // Request a layout: border.RequestLayout(); }