在 C# 中显示 WPF 对象列表
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22681184/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Display List of WPF Objects in C#
提问by OmegaNine
This is hard to explain, and I am still pretty novice so I am apologies in advance.
这很难解释,我仍然是新手,所以我提前道歉。
Is there a way to take a WPF XAML document and display a list of them in a listBox?
有没有办法获取 WPF XAML 文档并在列表框中显示它们的列表?
Like if I wanted to make a contact list. I could create a .xaml file with the stuff I want (Icon, String to hold name, icon to show cell/home/pager) then call in to a list as if it were a class that I am making an instance off to fill the list.
就像我想制作联系人列表一样。我可以用我想要的东西(图标、保存名称的字符串、显示单元格/主页/寻呼机的图标)创建一个 .xaml 文件,然后调用一个列表,就好像它是一个类,我正在创建一个实例来填充列表。
Any help, even just a name, pattern or keyword to lookup, would be extremely helpful.
任何帮助,甚至只是查找的名称、模式或关键字,都会非常有帮助。
Thanks, Dane
谢谢,戴恩

