c# - Finding controls in listboxitem by sender -
I currently have a list box with each item containing the control list (in C # WPF), one of those buttons and What is a progress bar now, what I want to do is:
button mybutton = (button) sender;
How do I retrieve that control in the same listboxitem as my sender button that I want to retrieve the progress bar? Do I use visualtreehelper?
Thank you in advance,
Mistake, did you manually listboxitem retemplate ?
If so, then I believe that you are using the container (eg grid) to host buttons and progress bar. If so, then I think that till you can not find the progress bar, you can dive the container for the children and the sender in the loop. If it is static, you can also find it using the children's index.
Comments
Post a Comment