简体   繁体   English

在 Blend 中从头开始创建自定义 ListView

[英]Creating custom ListView from scratch in Blend

I already looked through the internet but could not find a tutorial that showed the creation of a ListView in Expression Blend .我已经浏览了互联网,但找不到显示在 Expression Blend 中创建 ListView的教程。 I do not want to modify existing ListViews that are part of Blend, as I have done that already.我不想修改作为 Blend 一部分的现有 ListViews,因为我已经这样做了。

I need a tutorial that shows the first steps of creating a custom ListView and, in my case, specifically states all the parts the ListView consists of .我需要一个教程来展示创建自定义 ListView 的第一步,在我的例子中,特别说明ListView 包含的所有部分

A button for example, can be created in Blend by drawing a Rectangle, adding a ContentPresenter and converting that into a Button user control.例如,可以在 Blend 中通过绘制矩形、添加 ContentPresenter 并将其转换为 Button 用户控件来创建按钮。 I would like to do the same thing for a ListView.我想为 ListView 做同样的事情。

I went through that post already but since it is about WinForms I could not draw any helpful conclusions.我已经看过那篇文章了,但由于它是关于 WinForms 的,我无法得出任何有用的结论。

I am thankful for links to similar posts , tutorials and even code snippets .我很感谢提供类似帖子教程甚至代码片段的链接

After a long night of further research I came across this answer .经过一夜的进一步研究,我发现了这个答案 I installed the Windows SDK and there are files that contain the ControlTemplates for WPF Controls.我安装了 Windows SDK,有些文件包含 WPF 控件的 ControlTemplates。 Using them as a blueprint gives me the possibility of creating my own desired version of the ListView.将它们用作蓝图使我可以创建自己想要的 ListView 版本。

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

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