I don't know how can I draw an arrow with XAML. I haven't any code at the moment.
Someone can help me to make this draw with XAML code ?
Thank you for your help.
I don't know how can I draw an arrow with XAML. I haven't any code at the moment.
Someone can help me to make this draw with XAML code ?
Thank you for your help.
You can use TextBlock
(http://xahlee.info/comp/unicode_arrows.html)
<TextBlock Text="➔" />
Or Path
(https://msdn.microsoft.com/en-us/library/system.windows.shapes.path%28v=vs.110%29.aspx)
<Path Stroke="Black" Data="M 0 4 L 16 4 L 10 0 M 16 4 L 10 8" />
I just draw one through setting point by hand and adjust the point by eyes:
<Path Stretch="Fill" Fill="LimeGreen"
Data="M
0,115 95,115 //p1, p2 (when really use remove these comments)
65,90 85,90 //p3, p4
120,120 //p5
85,150 65,150 //p6, p7
95,125 0,125 //p8, p9
Z"
HorizontalAlignment="Center" Width="60" Height="60" />
You can adjust width/height, Basically p1,p2,p3,p4
and p6,p7,p8,p9
are symmetric, and Data
can omit description and comma like this:
Data="M 0 115 95 115 65 90 85 90 120 120 85 150 65 150 95 125 0 125 Z"
The result:
Besides here's a way to Rotate the arrow, example below rotate another right arrow 180 degree, becoming a left arrow:
<Path Stretch="Fill" Fill="LimeGreen"
Data="M 0,110 70,110 45,90 75,90 120,120 75,150 45,150 70,130 0,130 Z"
HorizontalAlignment="Right" Width="30" Height="24" Margin="0,0,2,0"
RenderTransformOrigin=".5,.5">
<Path.RenderTransform>
<RotateTransform Angle="180" />
</Path.RenderTransform>
</Path>