Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 GridView。它的数据模板是一个网格,其中包含一个按钮。问题是,按钮的单击事件在网格视图的选择更改之前触发,因此我无法从单击事件处理程序访问正确的选定项目。单击按钮时,我想使用gridview的选定项目。我怎样才能做到?也许在gridview中找到发件人按钮?我怎样才能做到这一点?
谢谢,汤姆
我使用按钮的数据上下文,它继承了选定项的数据上下文,所以我很好。