WPF列表框选择的ITem [英] WPF Listbox Selected ITem
问题描述
我正在开发一个wpf应用程序.我有一个这样的数据库.
我有三列(id,name,profession).listbox显示name列.
当用户单击listbox中的项目时,我想显示他/她的职业
/>在文本块中.
列表框效果很好.我已经将其绑定到一个数据视图.但是我该如何在文本块中显示他/她的职业?
hi there i am developing a wpf app. i have a database like this.
i have three columns(id,name,profession).listbox shows name column.
When the user clicks the item in listbox, i wanna show his/her profession
in textblock.
listbox works well. i have bounded it to a dataview. but how can i show his/her profession in textblock?
private void listBox1_SelectionChanged(对象发送者,SelectionChangedEventArgs e)
{
private void listBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
我在这里可以写什么?
}
What can i write here?
}
预先感谢.
推荐答案
感谢您的帖子!我建议在 .NET Framework开发人员中发布您的问题居中 >
.NET开发论坛 > Windows Presentation Foundation(WPF)"位于此处:http://social.msdn.microsoft.com/Forums/en-US/wpf/threads Thank you for your post! I would suggest posting your question in the '.NET Framework Developer Center > .NET Development Forums > Windows Presentation Foundation (WPF) ' located here: http://social.msdn.microsoft.com/Forums/en-US/wpf/threads
具有美好的一天!
谢谢!
这篇关于WPF列表框选择的ITem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!