简体   繁体   English

Windows应用商店中的行

[英]Lines in a windows store app

Just a simple question: I'm developing a Windows store app and for one function I want to show an intercept theorm. 只是一个简单的问题:我正在开发Windows应用商店,对于一个功能,我想展示一个截距定理。 For that (now my question) I need some lines. 为此(现在是我的问题),我需要一些内容。 Do I need to create an Image or is there any other possibility to display simple lines on a XAML-Form (I'm using XAML and C#). 我是否需要创建图像,或者是否有其他可能性在XAML表单上显示简单的行(我正在使用XAML和C#)。 I'm coming from Windows forms and there I used a line control from the Toolbox, but I can't find anything like that in the Toolbox of VS for Windows 8. I also had the idea to use GDI, but I read that it doesn't exist any longer (am I wrong?). 我来自Windows窗体,在那儿我使用了工具箱中的行控件,但在VS for Windows 8的工具箱中找不到类似的东西。我也有使用GDI的想法,但我读过它不再存在(我错了吗?)。

You should draw shape elements, in your XAML (or code-behind). 您应该在XAML(或隐藏代码)中绘制形状元素。

See MSDN: http://msdn.microsoft.com/en-us/library/windows/apps/hh465055.aspx 请参阅MSDN: http : //msdn.microsoft.com/en-us/library/windows/apps/hh465055.aspx

you can use like bellow 你可以像波纹管一样使用

 <Line X1="0" Y1="0" X2="100" Y2="100" Stroke="Red"></Line>

this draws a line from (0,0) to (100,100). 这从(0,0)到(100,100)画一条线。

don't forget to use stroke otherwise it won't be displayed. 不要忘记使用笔划,否则它不会显示。

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

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