如何自定义XAML WPF行的终点 [英] How to customize the end point of line XAML WPF

查看:71
本文介绍了如何自定义XAML WPF行的终点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想画一个带有菱形或三角形(阴影或浅色)端点的线条形状。



如何实现这一点请帮助我。



谢谢。

I want to draw a line shape with diamond or triangle (shaded or shallow) end point.

How can I achieve this please help me.

Thank you.

推荐答案

Hey Deskul,



Triangle示例XAML:



Hey Deskul,

Triangle example XAML:

<!-- This polygon shape uses pre-defined color values for its Stroke and
     Fill properties. 
     The SolidColorBrush's Opacity property affects the fill color in 
     this case by making it slightly transparent (opacity of 0.4) so 
     that it blends with any underlying color. -->

<polygon

    Points="300,200 400,125 400,275 300,200"

    Stroke="Purple" 

    StrokeThickness="2">
    <polygon.fill>
       <solidcolorbrush color="Blue" opacity="0.4" />
    </polygon.fill>
</polygon>





干杯,

Edo



Cheers,
Edo


这篇关于如何自定义XAML WPF行的终点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆