Draw solid color triangle using XAML only

后端 未结 3 1648
猫巷女王i
猫巷女王i 2021-02-02 04:49

Is it possible to draw a filled in triangle using XAML only (not a code behind solution)?

Triangle should be like on the image below to represent sort direction As

相关标签:
3条回答
  • 2021-02-02 05:20
    <Polygon Points="0,0 80,50, 0,100" Stroke="Black" Fill="Black" />
    

    See API or Example.

    0 讨论(0)
  • I want to add these to their collection:

    enter image description here

        <Polygon Points="5,0 10,10, 0,10" Stroke="Black" Fill="Black" />
    

    enter image description here

        <Polygon Points="0,0 5,10, 10,0" Stroke="Black" Fill="Black" />
    
    0 讨论(0)
  • 2021-02-02 05:45

    Using paths

    <Path Width="33" Height="37" Stretch="Fill" Stroke="Black" Fill="Black" Data="F1 M 319.344,237.333L 287.328,218.849L 287.328,255.818L 319.344,237.333 Z "/>
    <Path Width="33" Height="37" Stretch="Fill" Stroke="Black" Fill="Black" Data="F1 M 287.328,237.333L 319.344,255.818L 319.344,218.849L 287.328,237.333 Z "/>
    
    0 讨论(0)
提交回复
热议问题