i take it back, it's not a bug. you just have to do this:
TheLine.IconAppearance.PE.ElementType = PaintElementType.SolidFill