I have the code:
<Canvas>
<Image Canvas.Left="0" Canvas.Top="0">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<GeometryDrawing>
<GeometryDrawing.Pen>
<Pen Brush="Black" Thickness="1" />
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<LineGeometry StartPoint="50,50" EndPoint="100,50">
</LineGeometry>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Canvas>
I hope it can be a line start from 50,50 to 100,50, but finally it starts with 0,0 to 50,0
I seems StartPoint
in GeometryDrawing
makes no sense?
Does anyone know the solution? I don't want to modify Canvas.Left
and Canvas.Top
.