Here is a direct translation using a PathGeometry:
<PathGeometry FillRule="EvenOdd">
<PathFigure StartPoint="10,100" IsFilled="true" IsClosed="true">
<LineSegment Point="100,100" IsStroked="false" IsSmoothJoin="false" />
<LineSegment Point="100,50" IsStroked="true" IsSmoothJoin="false" />
</PathFigure>
</PathGeometry>
This can be simplified by omitting the default values for FillRule, IsFilled, IsStroked and IsSmoothJoin, resulting in this:
<PathGeometry>
<PathFigure StartPoint="10,100" IsClosed="true">
<LineSegment Point="100,100" IsStroked="false" />
<LineSegment Point="100,50" />
</PathFigure>
</PathGeometry>
This must be done with a PathGeometry, not with the geometry mini-language (eg "M10,100 L100,100 100,50") because the mini-language provides no way to set IsStroked=false.
Since you need a StreamGeometry, I recommend you use GeometryExtensions.DrawGeometry
method in this answer to convert the PathGeometry defined in XAML into a StreamGeometry.
I would be inclined to do this using a markup extension:
<local:ConvertToStreamGeometry>
<PathGeometry>
<PathFigure StartPoint="10,100" IsClosed="true">
<LineSegment Point="100,100" IsStroked="false" />
<LineSegment Point="100,50" />
</PathFigure>
</PathGeometry>
</local:ConvertToStreamGeometry>
The implementation of the markup extension is trivial:
[ContentProperty("Geometry")]
public class ConvertToStreamGeometry : MarkupExtension
{
public Geometry Geometry { get; set; }
public override object ProvideValue(IServiceProvider serviceProvider)
{
var result = new StreamGeometry();
using(var ctx = result.Open())
ctx.DrawGeometry(Geometry);
return result;
}
}
Note that this calls the GeometryExtensions.DrawGeometry extension method from the code in my earlier answer.