嵌套列表框事件问题。 [英] Nested Listbox Event Issue.

查看:82
本文介绍了嵌套列表框事件问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello all



我的应用程序在Windows Phone 7中,我使用的语言是C#



i有一个(父)列表框控件与一个属性绑定,并有一些Textblock,stackpanel和(子)列表框控件绑定data.if我查看数据,它显示我的确切绑定我想要的,

此外我在(父)列表框中使用Tap事件从列表中获取当前所选项目,这也完美运行,如上所述,我也使用(子)列表框控件与其他属性绑定,所以我的问题如果我点击(子)列表框控件,我将如何获得(父)列表框所选项目的值,我不想要(子)列表框中的项目,因为该(子)列表框仅用于显示目的。

解决方案

如果您想要父列表框选择的项目ID(可能是),您可以将其绑定为子列表框的标签,当您点击子列表框时,可以从中获取父选定项目该标签......



如果您需要进一步说明,请使用改进问题,请发布您的代码,并在儿童列表框点击事件中解释您想要的内容......

Hello all

My Application is in windows Phone 7 and language i use is C#

i have a (Parent) Listbox control which binds with a Property, and there are some Textblock,stackpanel and (child)listbox controls for binding data.if i view the data, it shows me exact binding what i want,
Further i use Tap event in (Parent)listbox to get the current selected item from the list, thats also run perfectly, as i mention above,am also using (child) listbox control which binds with other property, so my question is if i Tap on (child) listbox control, how will i get the value of (Parent) Listbox selected item, i don''t want item from (child) listbox because that (child)listbox is only use for display purpose.

解决方案

If you want Parent listbox selected item ID (may be), you can bind the same as the tag for child listbox and when you tap the child listbox, you can get the parent selected item from that tag...

If you need further clarification, use improve question and please post your code and explain what you want in child listbox tap event...


这篇关于嵌套列表框事件问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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