Is there a way to access wpf ui elements from a static method? I’m trying to access a textbox string from a static method to no avail
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This would be impossible. Your static method can run while the textbox doesn’t exist because there is no instance of your form.
Static methods are designed to be able to run without any instance.
Quote from wikipedia: