"djp" <pi*************@gmail.comwrote in message
news:20**************************@news.chello.pl.. .
I have int i = 0 that changes to max 20
I need to select different brushes depending on this 'i'.
How to do this?
I cannot do something like this: Brushes[i]... :/
First prepare your brushes:
List<BrushmyBrushes = new List<Brush>;
myBrushes.Add(Brushes.Black);
myBrushes.Add(Brushes.Aqua);
... (Add your 20 brushes)
Then, when you want to select one of your bruses, just extract it from
the List:
Brush selectedBrush = myBrushes.Item(i);