Click here to Skip to main content
15,890,845 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi

i am creatin the the textbox control dynamically in wpf with name of(pricetxt), right now i want to find the control and i want to use the properties dynamically , so that , i want to find the controls, i dont have much idea about the wpf,


generally in windows by using the controls.find(...);
we can find the control name but , in wpf i am not able to get the option like "Find", so that i am facing the proble , so please help me
the sample code is here


TextBox tx= (TextBox ) this.partialpan.Children.

here i am not able to get the Find option, is there any other option to find the control , please give me a replay

thank a lot for your attention
Posted

1 solution

Why are you making it hard on yourself?

If you're creating it dynamically, why not just hold onto in in a global static variable? That way, you can access it from anywhere you might need to.

Did you assign it a Name? If so code like that shown at this link should work:

http://www.c-sharpcorner.com/UploadFile/mahesh/FindName10022009122153PM/FindName.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900