protected override Size MeasureOverride(Size availableSize) { //TODO: Consider creating the Pen once when Stroke and StrokeThickness are set return(LinePath.GetRenderBounds(new Pen(Stroke, StrokeThickness)).Size); }