How to pass listbox selecteditem as command parameter in a button?

后端 未结 1 1548
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-29 18:33

Here is my situation:


    
        
                    


        
相关标签:
1条回答
  • 2020-12-29 19:23

    Try this:

    1. Name your listbox
    2. Update the CommandParameter to:

      CommandParameter="{Binding ElementName=listBox1,Path=SelectedItem}"

    0 讨论(0)
提交回复
热议问题