I am trying to create a polygon using points in xaml and as per my understanding the output with the given points should be the triangle with black fill, but it return the triangle with pink fill. I am not getting how this is happening. Kindly let me know.
Tha xaml for this is
<Polygon Width="237"
Height="214"
Fill="White"
Stroke="Black"
StrokeThickness="2">
<Polygon.Points>
<Point X="50" Y="50" />
<Point X="150" Y="150" />
<Point X="50" Y="150" />
</Polygon.Points>
</Polygon>
The Point X=0 and Y=0 is in the upper left corner, not in the lower left corner. So the drawing is correct.
To get what you want is to change your xaml as follows:
<Polygon Width="237"
Height="214"
Fill="Black"
Stroke="White"
StrokeThickness="2">
<Polygon.Points>
<Point X="50" Y="150" />
<Point X="150" Y="150" />
<Point X="150" Y="50" />
</Polygon.Points>
<Polygon>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With