Open RJSIMMONS opened 7 years ago
You have to put it in to array of objects, Let's assume we have 4 labels
```
Label[] lbls = { label1, label2, label3, label4 };
foreach(Label labl in lbls)
{
}
ill show you by next week sir if i couldn't fix it, ill keep trying
Sir, i have a issue with a small code
i have 3 labels : lbl1, lbl2 and lbl3 and i their visible hidden
i want to write a for loop to active them visible using code , example:
label1.Visibility = Visibility.Visible;
but i need to enable those labels according to the number i'm giving
for an example if i said enable visible only 2 labels then it should enable lbl1 and lbl2
i tried to use below code but its wrong int x =2 for(int count=1;count<=x;count++) { lbl(count).Visibility = Visibility.Visible; }
can yout help ?
thanks