Inside <window> tag, I have written below code
<Grid Width="80" Height="80" Background="LightGoldenrodYellow">
<Polygon Points="0,0 80,80"
StrokeThickness="1"
Stroke="Black" />
</Grid>
I am trying to draw line using Polygon control in place of Line or Polyline control. If we see design view of the form, then Polygon has started from upper left point of the Grid and ended at lower right point of Grid. It is fine. But
If inside <window> tag, I have written below code
<Canvas Width="80" Height="80" Background="LightGoldenrodYellow">
<Polygon Points="0,0 80,80"
StrokeThickness="1"
Stroke="Black" />
</Canvas>
Polygon has started some distance before the upper left point of Canvas and ended some distance after the lower right point of Canvas. This line goes outside of the Canvas control. Why is it happening?
What I have tried:
I have searched this issue on internet, but I have not found any link related to this issue.