用于绘制刻度线的路径的数据点

时间:2015-04-27 05:53:41

标签: wpf xaml styling

任何人都可以指定用于获取刻度标记的数据点,如下所示

enter image description here

我用这个

<Path Name="TickMark" Fill="Black" Data="M0,4 5,9 9,0 4,5" Visibility="Hidden" />

但看起来不像上面那样,看起来像是

enter image description here

1 个答案:

答案 0 :(得分:8)

如果您需要特定路径,我建议您使用Inkscape或Expression Design并尝试自己制作

对于这种情况,我在Inkscape中制作并粘贴到Expression Design中:

<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="Layer_1" Width="8" Height="9" Canvas.Left="0" Canvas.Top="0">
<Path Width="7.85446" Height="8.57578" Canvas.Left="-0.0522281" Canvas.Top="-0.100391" Stretch="Fill" StrokeThickness="1.04192" StrokeMiterLimit="2.75" Stroke="#FF000000" Data="F1 M 0.468732,4.66838L 3.03345,7.95443L 7.28127,0.420569"/>

然后将数据提取到您的路径

<Path Name="TickMark" Fill="Black" Data="F1 M 0.468732,4.66838L 3.03345,7.95443L 7.28127,0.420569" Visibility="Hidden" />

然后调整直到你喜欢刻度线