如何将 XAML 代码(代表一组形状)更改为 PATH 呈现的单个图形?
假设我们有 XAML 代码,例如:
<Ellipse Fill="#FF0A0A0E" HorizontalAlignment="Left" Margin="192,184,0,0"
Stroke="Black" Width="8" Height="8" VerticalAlignment="Top"/>
<Rectangle Fill="Black" HorizontalAlignment="Left" Margin="152,187.5,0,0"
Stroke="Black" Width="89.5" Height="1" VerticalAlignment="Top"/>
并需要将其转换为单个路径对象?
我尝试使用 Blend 4,它允许您将形状转换为路径,但上面的代码被转换为:
<Path Data="M7.5,4 C7.5,5.9329966 5.9329966,7.5 4,7.5 C2.0670034,7.5 0.5,5.9329966 0.5,4 C0.5,2.0670034 2.0670034,0.5 4,0.5 C5.9329966,0.5 7.5,2.0670034 7.5,4 z"
Fill="#FF0A0A0E" HorizontalAlignment="Left" Height="8" Margin="192,184,0,0"
Stretch="Fill" Stroke="Black" VerticalAlignment="Top" Width="8"/>
<Path Data="M0.5,0.5 L89,0.5 z" Fill="Black" HorizontalAlignment="Left" Height="1"
Margin="152,187.5,0,0" Stretch="Fill" Stroke="Black" VerticalAlignment="Top"
Width="89.5" />
我问这个问题的原因是因为我只能定义一个路径。如我错了请纠正我。如果是这样,那么我怎样才能在一种样式中嵌入 2 条或更多条路径?