Click here to Skip to main content
13,002,163 members (74,791 online)
Rate this:
Please Sign up or sign in to vote.
See more:
how i can select the controls in my Usercontrol with foreach in silverlight
in silverlight i can't find
Posted 26-Feb-12 7:03am
SAKryukov 26-Feb-12 13:20pm
Any code sample? Do you know that my access to your hard drive is somewhat limited at this time?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Using foreach for finding a control is a bad idea. You can give a control a name and use it. What do your mean by "select"? Give it a keyboard focus? Normally don't do it or do it only once, in the very beginning. Finding something for this purpose makes no sense.

kourosh_ag 26-Feb-12 13:34pm
i use foreach Command to change several controls property in my usercontrols.
count of my controls in my usercontols is so much because i can't chenge the property one by one.
SAKryukov 26-Feb-12 14:41pm
This is a different story, but you failed to tell it in your question. Did you vote "1" for my answer? It was purely your fault.
This is appropriate and should works. How can I know where did you screw up? Could you make a code sample? Did you forget to search recursively?

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170624.1 | Last Updated 26 Feb 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100