WPF列表框选择的ITem [英] WPF Listbox Selected ITem

查看:86
本文介绍了WPF列表框选择的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屋!

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