Click here to Skip to main content
11,645,087 members (71,373 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Silverlight
how i can select the controls in my Usercontrol with foreach in silverlight
in silverlight i can't find
MyuseControl.Contols
Posted 26-Feb-12 7:03am
Comments
SAKryukov at 26-Feb-12 13:20pm
   
Any code sample? Do you know that my access to your hard drive is somewhat limited at this time?
--SA

1 solution

Rate this: bad
good
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.

—SA
  Permalink  
Comments
kourosh_ag at 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 at 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?
--SA

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

  Print Answers RSS
0 OriginalGriff 700
1 jyo.net 494
2 Sergey Alexandrovich Kryukov 439
3 Afzaal Ahmad Zeeshan 404
4 CPallini 386
0 OriginalGriff 1,065
1 Sergey Alexandrovich Kryukov 683
2 DamithSL 681
3 Afzaal Ahmad Zeeshan 662
4 CPallini 555


Advertise | Privacy | Mobile
Web04 | 2.8.150731.1 | Last Updated 26 Feb 2012
Copyright © CodeProject, 1999-2015
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