views:

139

answers:

1

Hi

I'm trying to figure out how to set Data property of the Path element to get soft corners of this type:

alt text

Right now I have only sharp corners like this:

alt text

I tried playing with ellipses, but I can't get what I want.

Thanks

+3  A: 

Segments of a path have a IsSmoothJoin property, defaulting to false. I have never tried it but it seems to be a good candidate.

Another idea is to use a PolyLine (instead of a Path, if that's OK in your case). PolyLine has the StrokeLineJoin property, of type PenLineJoin, which allow for rounded corners. See MSDN, under Strokes, for the possibilities.

Edit: added the following: Actually, the StrokeLineJoin property comes from the Shape class, and Path is a subclass of Shape, so you can use this property directly in the Path instance.

Timores
Thanks Timores, I was looking for something like this. Although the corner radius is still a bit smaller from what I need, I can work with this.
VexXtreme
Please have a look at the added paragraph at the end.
Timores