public RoundedCorners(BorderProperty border){ Border=border; // Grab the renderer: Renderer=Border.Element.Document.Renderer; // Grab the computed style: Computed=border.Element.style.Computed; // Create the inverse border set: InverseBorder=new RoundBorderInverseProperty(border.Element); }
public RoundedCorners(BorderProperty border) { Border = border; // Grab the renderer: Renderer = Border.Element.Document.Renderer; // Grab the computed style: Computed = border.Element.style.Computed; // Create the inverse border set: InverseBorder = new RoundBorderInverseProperty(border.Element); }
/// <summary>Call this if the current property requies a border object.</summary> public BorderProperty GetBorder(ComputedStyle style){ BorderProperty border=style.Border; if(border==null){ style.Border=border=new BorderProperty(style.Element); style.EnforceNoInline(); } // Flag it as having a change: border.Changed=true; return border; }
/// <summary>Call this if the current property requies a border object.</summary> public BorderProperty GetBorder(ComputedStyle style) { BorderProperty border = style.Border; if (border == null) { style.Border = border = new BorderProperty(style.Element); style.EnforceNoInline(); } // Flag it as having a change: border.Changed = true; return(border); }
/// <summary>Creates a new rounded corner in the given position.</summary> public RoundCorner(RoundedCorners roundCorners,RoundCornerPosition position){ Position=position; RoundCorners=roundCorners; Border=roundCorners.Border; InverseBorder=roundCorners.InverseBorder; // Get the to index: ToIndex=(int)position; // Get the from index: FromIndex=ToIndex-1; // May need to wrap it: if(FromIndex==-1){ FromIndex=3; } }
/// <summary>Creates a new rounded corner in the given position.</summary> public RoundCorner(RoundedCorners roundCorners, RoundCornerPosition position) { Position = position; RoundCorners = roundCorners; Border = roundCorners.Border; InverseBorder = roundCorners.InverseBorder; // Get the to index: ToIndex = (int)position; // Get the from index: FromIndex = ToIndex - 1; // May need to wrap it: if (FromIndex == -1) { FromIndex = 3; } }