我正试图执行我在Winforms申请中所说的话。 我是银星灯塔,因此,希望所有这一切都是最基本的。
我在银灯4中有一个名单箱。 我愿做以下工作:
- Right-click on the listbox
- Have the item under the location where I click highlight itself
- I d like a context menu to popup (with my own items in the context menu)
从我迄今为止的研究来看,似乎在银灯没有建筑背景材料,相反,我们必须建立Grid/Canvas结构,并将其附属于一个Popup物体,而后者当时正在流行。
我的问题如下:
- To accomplish #2, I need some kind of hit test on the listbox. I can t figure out how to do that and my google-fu isn t helping.
- Once I do identify the index under the mouse, how do I actually select the item?
- Is there a reusable Context menu component somewhere that I can use? Extra credit if the component allows arbitrary sub-menus.