简体   繁体   English

在Windows Phone 8中画一条垂直线

[英]Draw a vertical line in windows phone 8

I want to draw a line vertical line in my wp8 c# project. 我想在wp8 c#项目中画一条垂直线。 I already have a horizontal line but I can't figure out how to get the vertical line. 我已经有一条水平线,但是我不知道如何获得垂直线。 How can I draw a vertical line? 如何绘制垂直线?

This is my horizontal line 这是我的水平线

 <Line Stretch="Fill" StrokeDashArray="4,1" Stroke="Black" X1="0" X2="1" Y1="0" Y2="0"/>

X1 and X2 changes the values horizontally, draws a horizontal line For drawing a vertical line you need to change Y values keeping that X fixed ... X1和X2水平更改值,绘制水平线。要绘制垂直线,您需要更改Y值,以保持X固定...

<Line Stretch="Fill" StrokeDashArray="4,1" Stroke="Black" X1="0"  Y2="100"/>

Check if this works. 检查是否可行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM