如何在.net中实现这个控件
我对 .net 很陌生,我只是想知道如何制作此类 UI?我需要使用哪些控件来制作上述类型的 UI。如果不能,我能知道在 WPF 中是否可以吗?如果可以的话,怎么办?
谢谢
i am very new to .net, i just wanted to know how to make an UI of this sort? which controls do i need to use to make the UI of above sort. if not can i know in WPF is it possible if so how?..
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您的问题不是那么具体,因此您必须提供更多详细信息或提出更详细的问题。
在黑暗中拍摄一些照片(这是您正在寻找的吗?)
您可以使用 HeaderedContentControl 并为其设置样式/模板。
将黑色文本标签放入其内容中(也可能是网格)。
然后将其中几个放入网格的行(高度=“自动”)中。
该 Grid 可以是另一个 HeaderedContentControl 的内容,并对其进行样式设置,使其具有您希望它具有的 UI 样式。
至于淡出的蓝线,可以使用 LinearGradientBrush 来制作。
编辑 好的,就到这里。下面的 XAML 与上图几乎相似。有一些猜测和假设,因为并不总是清楚 UI 应该做什么(超链接/按钮?)。该代码表明 WPF 非常有能力显示所请求的 UI。这可以开发成一个控件,但因为我预计您会想要添加几种字段/项目/按钮/标签,所以我坚持使用基本布局。许多事情都可以改进(样式、模板),但这显示了基础知识。
Your question is not that specific so you have to give more details or ask more detailed questions.
Some shots in the dark (is this what you are looking for?)
You could use a HeaderedContentControl and style/template it.
Put the black text labels in its content (perhaps a grid too).
Then put a couple of them in the rows (Height="auto") of a Grid.
This Grid could be the content of yet another HeaderedContentControl and style it so it has the UI style you want it to have.
As for the fading blue line, that could be made using a LinearGradientBrush.
EDIT Ok here goes. the XAML below nearly resembles the image above. There are a couple of guesses and assumptions because it wasn't always clear what the UI should do (hyperlinks/buttons?). The code shows that WPF is quite capable of displaying the requested UI. This could be developed into a control but because I expect that you will want to add several kinds of fields/items/buttons/labels I stuck to the basic layout. Many things could be improved (styles, templates) but this shows the basics.
好的。这是非常粗糙的,因为我通过代码手动加载列表视图。另外,您可能需要稍微调整一下布局。查看有关 Listview.Groups 的文档。我认为它仅在图标模式下可用。你会想尝试一下这个。注意这不是 wpf;这是 Windows 窗体列表视图。不过,我敢打赌 wpf 版本会做类似的事情,而且看起来可能也更酷! (我还没有搞乱wpf,但计划在不久的将来......)。
OK. THis is pretty crude, becasue I am manually loading the listview via code. Also, you may need to play with your layout a bit. Check out your documentation on Listview.Groups. I think it is only available in Icon mode. You'll want to play around with this a little. Not ethat this is NOT wpf; This is Windows Forms Listview. However, I am betting the wpf version does something similar, and probably looks cooler, too! (I haven't messed with wpf yet, but plan to in the near future . . .).
我相信最终在 WPF 中它应该类似于具有分组功能的 ItemsControl:
http://msdn.microsoft.com/en -us/library/system.windows.controls.itemscontrol.isgrouping.aspx
当然也可以使用两个嵌套的ItemsControl来实现。
I believe finally in WPF it should be something like ItemsControl with grouping:
http://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol.isgrouping.aspx
Of course it can also be implemented using two nested ItemsControls.
我在 此处 找到了类似的示例,net Ready xp style lib 可用
I found similar example here in ,net ready xp style lib s available