(WPF)有关ListView和ListViewItem并自定义其项目内容的问题.通过代码 [英] (WPF) question regarding ListView and ListViewItem and customizing it's items content. By code

查看:337
本文介绍了(WPF)有关ListView和ListViewItem并自定义其项目内容的问题.通过代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题.

我想将stackpanel(包含项)塞入listviewitem列/行.假设同一行中的其余列具有文本内容(也许也有一些图标).如何通过代码执行此操作?是否可以不必为过多的XAML麻烦自己?

感谢

I have a question.

I want to stuff a stackpanel(with items) into a listviewitem column/row. The rest of the columns on the same row are suposed to have text-content (maybe some icon too). How do i do this by code? Is it possible without having to trouble myself with too much XAML?

thanks

推荐答案

简短的回答是,是的,您可以使用XAML进行的任何操作都可以使用C#进行.看看 ListView [
The short answer is yes, anything you can do with XAML you can do with C#. Take a look at the ListView[^] class for examples.


这篇关于(WPF)有关ListView和ListViewItem并自定义其项目内容的问题.通过代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆