Click here to Skip to main content
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 Sergey Alexandrovich Kryukov 329
1 Nirav Prabtani 274
2 OriginalGriff 239
3 _Amy 165
4 Richard MacCutchan 145
0 OriginalGriff 7,744
1 Sergey Alexandrovich Kryukov 6,956
2 Maciej Los 3,994
3 Peter Leow 3,708
4 CHill60 2,742


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 26 Feb 2012
Copyright © CodeProject, 1999-2014
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